diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 085c5aa51a75..0f8479d77111 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5795,6 +5795,33 @@ components: type: $ref: '#/components/schemas/FindingType' type: object + BulkPutAppsDatastoreItemsRequest: + description: Request to insert multiple items into a datastore in a single operation. + properties: + data: + $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequestData' + type: object + BulkPutAppsDatastoreItemsRequestData: + description: Data wrapper containing the items to insert and their configuration + for the bulk insert operation. + properties: + attributes: + $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequestDataAttributes' + type: + $ref: '#/components/schemas/DatastoreItemsDataType' + required: + - type + type: object + BulkPutAppsDatastoreItemsRequestDataAttributes: + description: Configuration for bulk inserting multiple items into a datastore. + properties: + conflict_mode: + $ref: '#/components/schemas/DatastoreItemConflictMode' + values: + $ref: '#/components/schemas/DatastoreItemValues' + required: + - values + type: object CIAppAggregateBucketValue: description: A bucket value, can either be a timeseries or a single value. oneOf: @@ -10785,6 +10812,77 @@ components: - id - type type: object + CreateAppsDatastoreRequest: + description: Request to create a new datastore with specified configuration + and metadata. + properties: + data: + $ref: '#/components/schemas/CreateAppsDatastoreRequestData' + type: object + CreateAppsDatastoreRequestData: + description: Data wrapper containing the configuration needed to create a new + datastore. + properties: + attributes: + $ref: '#/components/schemas/CreateAppsDatastoreRequestDataAttributes' + id: + description: Optional ID for the new datastore. If not provided, one will + be generated automatically. + type: string + type: + $ref: '#/components/schemas/DatastoreDataType' + required: + - type + type: object + CreateAppsDatastoreRequestDataAttributes: + description: Configuration and metadata to create a new datastore. + properties: + description: + description: A human-readable description about the datastore. + type: string + name: + description: The display name for the new datastore. + example: datastore-name + type: string + org_access: + $ref: '#/components/schemas/CreateAppsDatastoreRequestDataAttributesOrgAccess' + primary_column_name: + $ref: '#/components/schemas/DatastoreAttributesPrimaryColumnName' + primary_key_generation_strategy: + $ref: '#/components/schemas/DatastorePrimaryKeyGenerationStrategy' + required: + - name + - primary_column_name + type: object + CreateAppsDatastoreRequestDataAttributesOrgAccess: + description: The organization access level for the datastore. For example, 'contributor'. + enum: + - contributor + - viewer + - manager + type: string + x-enum-varnames: + - CONTRIBUTOR + - VIEWER + - MANAGER + CreateAppsDatastoreResponse: + description: Response after successfully creating a new datastore, containing + the datastore's assigned ID. + properties: + data: + $ref: '#/components/schemas/CreateAppsDatastoreResponseData' + type: object + CreateAppsDatastoreResponseData: + description: The newly created datastore's data. + properties: + id: + description: The unique identifier assigned to the newly created datastore. + type: string + type: + $ref: '#/components/schemas/DatastoreDataType' + required: + - type + type: object CreateCustomFrameworkRequest: description: Request object to create a custom framework. properties: @@ -13512,6 +13610,134 @@ components: required: - data type: object + Datastore: + description: A datastore's complete configuration and metadata. + properties: + data: + $ref: '#/components/schemas/DatastoreData' + type: object + DatastoreArray: + description: A collection of datastores returned by list operations. + properties: + data: + description: An array of datastore objects containing their configurations + and metadata. + items: + $ref: '#/components/schemas/DatastoreData' + type: array + required: + - data + type: object + DatastoreAttributesPrimaryColumnName: + description: "The name of the primary key column for this datastore. Primary + column names:\n - Must abide by both [PostgreSQL naming conventions](https://www.postgresql.org/docs/7.0/syntax525.htm)\n + \ - Cannot exceed 63 characters" + example: '' + maxLength: 63 + type: string + DatastoreData: + description: Core information about a datastore, including its unique identifier + and attributes. + properties: + attributes: + $ref: '#/components/schemas/DatastoreDataAttributes' + id: + description: The unique identifier of the datastore. + type: string + type: + $ref: '#/components/schemas/DatastoreDataType' + required: + - type + type: object + DatastoreDataAttributes: + description: Detailed information about a datastore. + properties: + created_at: + description: Timestamp when the datastore was created. + format: date-time + type: string + creator_user_id: + description: The numeric ID of the user who created the datastore. + format: int64 + type: integer + creator_user_uuid: + description: The UUID of the user who created the datastore. + type: string + description: + description: A human-readable description about the datastore. + type: string + modified_at: + description: Timestamp when the datastore was last modified. + format: date-time + type: string + name: + description: The display name of the datastore. + type: string + org_id: + description: The ID of the organization that owns this datastore. + format: int64 + type: integer + primary_column_name: + $ref: '#/components/schemas/DatastoreAttributesPrimaryColumnName' + primary_key_generation_strategy: + $ref: '#/components/schemas/DatastorePrimaryKeyGenerationStrategy' + type: object + DatastoreDataType: + default: datastores + description: The resource type for datastores. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES + DatastoreItemConflictMode: + description: How to handle conflicts when inserting items that already exist + in the datastore. + enum: + - fail_on_conflict + - overwrite_on_conflict + example: overwrite_on_conflict + type: string + x-enum-varnames: + - FAIL_ON_CONFLICT + - OVERWRITE_ON_CONFLICT + DatastoreItemValues: + description: An array of items to add to the datastore, where each item is a + set of key-value pairs representing the item's data. Up to 100 items can be + updated in a single request. + example: + - data: example data + key: value + - data: example data2 + key: value2 + items: + additionalProperties: {} + description: A single item's data as key-value pairs. Key names cannot exceed + 63 characters. + type: object + maxItems: 100 + type: array + DatastoreItemsDataType: + default: items + description: The resource type for datastore items. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS + DatastorePrimaryKeyGenerationStrategy: + description: Can be set to `uuid` to automatically generate primary keys when + new items are added. Default value is `none`, which requires you to supply + a primary key for each new item. + enum: + - none + - uuid + type: string + x-enum-varnames: + - NONE + - UUID Date: description: Date as Unix timestamp in milliseconds. example: 1722439510282 @@ -13537,6 +13763,59 @@ components: - id - type type: object + DeleteAppsDatastoreItemRequest: + description: Request to delete a specific item from a datastore by its primary + key. + properties: + data: + $ref: '#/components/schemas/DeleteAppsDatastoreItemRequestData' + type: object + DeleteAppsDatastoreItemRequestData: + description: Data wrapper containing the information needed to identify and + delete a specific datastore item. + properties: + attributes: + $ref: '#/components/schemas/DeleteAppsDatastoreItemRequestDataAttributes' + type: + $ref: '#/components/schemas/DatastoreItemsDataType' + required: + - type + type: object + DeleteAppsDatastoreItemRequestDataAttributes: + description: Attributes specifying which datastore item to delete by its primary + key. + properties: + id: + description: Optional unique identifier of the item to delete. + example: a7656bcc-51d4-4884-adf7-4d0d9a3e0633 + type: string + item_key: + description: The primary key value that identifies the item to delete. Cannot + exceed 256 characters. + example: primaryKey + maxLength: 256 + type: string + required: + - item_key + type: object + DeleteAppsDatastoreItemResponse: + description: Response from successfully deleting a datastore item. + properties: + data: + $ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData' + type: object + DeleteAppsDatastoreItemResponseData: + description: Data containing the identifier of the datastore item that was successfully + deleted. + properties: + id: + description: The unique identifier of the item that was deleted. + type: string + type: + $ref: '#/components/schemas/DatastoreItemsDataType' + required: + - type + type: object DeleteAppsRequest: description: A request object for deleting multiple apps by ID. example: @@ -22969,6 +23248,125 @@ components: type: string x-enum-varnames: - ERROR_TRACKING_SEARCH_RESULT + ItemApiPayload: + description: A single datastore item with its content and metadata. + properties: + data: + $ref: '#/components/schemas/ItemApiPayloadData' + type: object + ItemApiPayloadArray: + description: A collection of datastore items with pagination and schema metadata. + properties: + data: + description: An array of datastore items with their content and metadata. + items: + $ref: '#/components/schemas/ItemApiPayloadData' + maxItems: 100 + type: array + meta: + $ref: '#/components/schemas/ItemApiPayloadMeta' + description: Metadata about the included items, including pagination info + and datastore schema. + required: + - data + type: object + ItemApiPayloadData: + description: Core data and metadata for a single datastore item. + properties: + attributes: + $ref: '#/components/schemas/ItemApiPayloadDataAttributes' + id: + description: The unique identifier of the datastore. + type: string + type: + $ref: '#/components/schemas/DatastoreItemsDataType' + required: + - type + type: object + ItemApiPayloadDataAttributes: + description: Metadata and content of a datastore item. + properties: + created_at: + description: Timestamp when the item was first created. + format: date-time + type: string + modified_at: + description: Timestamp when the item was last modified. + format: date-time + type: string + org_id: + description: The ID of the organization that owns this item. + format: int64 + type: integer + primary_column_name: + $ref: '#/components/schemas/DatastoreAttributesPrimaryColumnName' + signature: + description: A unique signature identifying this item version. + type: string + store_id: + description: The unique identifier of the datastore containing this item. + type: string + value: + $ref: '#/components/schemas/ItemApiPayloadDataAttributesValue' + type: object + ItemApiPayloadDataAttributesValue: + additionalProperties: {} + description: The data content (as key-value pairs) of a datastore item. + type: object + ItemApiPayloadMeta: + description: Additional metadata about a collection of datastore items, including + pagination and schema information. + properties: + page: + $ref: '#/components/schemas/ItemApiPayloadMetaPage' + schema: + $ref: '#/components/schemas/ItemApiPayloadMetaSchema' + type: object + ItemApiPayloadMetaPage: + description: Pagination information for a collection of datastore items. + properties: + hasMore: + description: Whether there are additional pages of items beyond the current + page. + type: boolean + totalCount: + description: The total number of items in the datastore, ignoring any filters. + format: int64 + type: integer + totalFilteredCount: + description: The total number of items that match the current filter criteria. + format: int64 + type: integer + type: object + ItemApiPayloadMetaSchema: + description: Schema information about the datastore, including its primary key + and field definitions. + properties: + fields: + description: An array describing the columns available in this datastore. + items: + $ref: '#/components/schemas/ItemApiPayloadMetaSchemaField' + type: array + primary_key: + description: The name of the primary key column for this datastore. + type: string + type: object + ItemApiPayloadMetaSchemaField: + description: Information about a specific column in the datastore schema. + properties: + name: + description: The name of this column in the datastore. + example: '' + type: string + type: + description: The data type of this column. For example, 'string', 'number', + or 'boolean'. + example: '' + type: string + required: + - name + - type + type: object JSONAPIErrorItem: description: API error response body properties: @@ -33877,6 +34275,32 @@ components: data: $ref: '#/components/schemas/Deployment' type: object + PutAppsDatastoreItemResponseArray: + description: Response after successfully inserting multiple items into a datastore, + containing the identifiers of the created items. + properties: + data: + description: An array of data objects containing the identifiers of the + successfully inserted items. + items: + $ref: '#/components/schemas/PutAppsDatastoreItemResponseData' + maxItems: 100 + type: array + required: + - data + type: object + PutAppsDatastoreItemResponseData: + description: Data containing the identifier of a single item that was successfully + inserted into the datastore. + properties: + id: + description: The unique identifier assigned to the inserted item. + type: string + type: + $ref: '#/components/schemas/DatastoreItemsDataType' + required: + - type + type: object PutIncidentNotificationRuleRequest: description: Put request for a notification rule. properties: @@ -45742,6 +46166,94 @@ components: type: string type: array type: object + UpdateAppsDatastoreItemRequest: + description: Request to update specific fields on an existing datastore item. + properties: + data: + $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestData' + type: object + UpdateAppsDatastoreItemRequestData: + description: Data wrapper containing the item identifier and the changes to + apply during the update operation. + properties: + attributes: + $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestDataAttributes' + id: + description: The unique identifier of the datastore item. + type: string + type: + $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestDataType' + required: + - type + type: object + UpdateAppsDatastoreItemRequestDataAttributes: + description: Attributes for updating a datastore item, including the item key + and changes to apply. + properties: + id: + description: The unique identifier of the item being updated. + type: string + item_changes: + $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestDataAttributesItemChanges' + item_key: + description: The primary key that identifies the item to update. Cannot + exceed 256 characters. + example: '' + maxLength: 256 + type: string + required: + - item_changes + - item_key + type: object + UpdateAppsDatastoreItemRequestDataAttributesItemChanges: + description: Changes to apply to a datastore item using set operations. + properties: + ops_set: + additionalProperties: {} + description: Set operation that contains key-value pairs to set on the datastore + item. + type: object + type: object + UpdateAppsDatastoreItemRequestDataType: + default: items + description: The resource type for datastore items. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS + UpdateAppsDatastoreRequest: + description: Request to update a datastore's configuration such as its name + or description. + properties: + data: + $ref: '#/components/schemas/UpdateAppsDatastoreRequestData' + type: object + UpdateAppsDatastoreRequestData: + description: Data wrapper containing the datastore identifier and the attributes + to update. + properties: + attributes: + $ref: '#/components/schemas/UpdateAppsDatastoreRequestDataAttributes' + id: + description: The unique identifier of the datastore to update. + type: string + type: + $ref: '#/components/schemas/DatastoreDataType' + required: + - type + type: object + UpdateAppsDatastoreRequestDataAttributes: + description: Attributes that can be updated on a datastore. + properties: + description: + description: A human-readable description about the datastore. + type: string + name: + description: The display name of the datastore. + type: string + type: object UpdateCustomFrameworkRequest: description: Request object to update a custom framework. properties: @@ -47765,6 +48277,378 @@ info: version: '1.0' openapi: 3.0.0 paths: + /api/v2/actions-datastores: + get: + description: Lists all datastores for the organization. + operationId: ListDatastores + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DatastoreArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List datastores + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_read + post: + description: Creates a new datastore. + operationId: CreateDatastore + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppsDatastoreRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppsDatastoreResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create datastore + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_manage + /api/v2/actions-datastores/{datastore_id}: + delete: + description: Deletes a datastore by its unique identifier. + operationId: DeleteDatastore + parameters: + - description: The unique identifier of the datastore to retrieve. + in: path + name: datastore_id + required: true + schema: + type: string + responses: + '200': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete datastore + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_manage + get: + description: Retrieves a specific datastore by its ID. + operationId: GetDatastore + parameters: + - description: The unique identifier of the datastore to retrieve. + in: path + name: datastore_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Datastore' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get datastore + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_read + patch: + description: Updates an existing datastore's attributes. + operationId: UpdateDatastore + parameters: + - description: The unique identifier of the datastore to retrieve. + in: path + name: datastore_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAppsDatastoreRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Datastore' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update datastore + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_manage + /api/v2/actions-datastores/{datastore_id}/items: + delete: + description: Deletes an item from a datastore by its key. + operationId: DeleteDatastoreItem + parameters: + - description: The unique identifier of the datastore to retrieve. + in: path + name: datastore_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppsDatastoreItemRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteAppsDatastoreItemResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete datastore item + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_write + get: + description: Lists items from a datastore. You can filter the results by specifying + either an item key or a filter query parameter, but not both at the same time. + Supports server-side pagination for large datasets. + operationId: ListDatastoreItems + parameters: + - description: The unique identifier of the datastore to retrieve. + in: path + name: datastore_id + required: true + schema: + type: string + - description: Optional query filter to search items using the [logs search + syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). + in: query + name: filter + schema: + type: string + - description: Optional primary key value to retrieve a specific item. Cannot + be used together with the filter parameter. + in: query + name: item_key + schema: + maxLength: 256 + type: string + - description: Optional field to limit the number of items to return per page + for pagination. Up to 100 items can be returned per page. + in: query + name: page[limit] + schema: + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Optional field to offset the number of items to skip from the + beginning of the result set for pagination. + in: query + name: page[offset] + schema: + format: int64 + type: integer + - description: Optional field to sort results by. Prefix with '-' for descending + order (e.g., '-created_at'). + in: query + name: sort + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ItemApiPayloadArray' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List datastore items + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_read + patch: + description: Partially updates an item in a datastore by its key. + operationId: UpdateDatastoreItem + parameters: + - description: The unique identifier of the datastore to retrieve. + in: path + name: datastore_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAppsDatastoreItemRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ItemApiPayload' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update datastore item + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_write + /api/v2/actions-datastores/{datastore_id}/items/bulk: + post: + description: Creates or replaces multiple items in a datastore by their keys + in a single operation. + operationId: BulkWriteDatastoreItems + parameters: + - description: The unique identifier of the datastore to retrieve. + in: path + name: datastore_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PutAppsDatastoreItemResponseArray' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Bulk write datastore items + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_write /api/v2/actions/app_key_registrations: get: description: List App Key Registrations @@ -71931,6 +72815,12 @@ tags: description: Find out more at url: https://docs.datadoghq.com/service_management/workflows/connections/ name: Action Connection +- description: 'Leverage the Actions Datastore API to create, modify, and delete + + items in datastores owned by your organization.' + externalDocs: + url: https://docs.datadoghq.com/actions/datastore + name: Actions Datastores - description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin your hosts, running containers, and serverless functions\u2014all without\nrequiring teams to install Agents on every host or where Agents cannot be installed.\nAgentless diff --git a/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..91fb9c71dbe8 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-06T19:02:39.774Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..03885c9c9cdb --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Bad-Request-response.yml @@ -0,0 +1,65 @@ +http_interactions: +- recorded_at: Sat, 06 Sep 2025 19:02:39 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"226df00a-c52e-41cd-9067-2b8c2b18649d","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Sat, 06 Sep 2025 19:02:39 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"values":[{"id":"cust_3141","name":"Johnathan"},{"badPrimaryKey":"key2","name":"Johnathan"}]},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/226df00a-c52e-41cd-9067-2b8c2b18649d/items/bulk + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"b6f27ea4-0a0b-43fa-92ef-b023f8e06e2c","title":"item + key missing or invalid","detail":"primary column \"id\" is missing"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +- recorded_at: Sat, 06 Sep 2025 19:02:39 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/226df00a-c52e-41cd-9067-2b8c2b18649d + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"226df00a-c52e-41cd-9067-2b8c2b18649d","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Not-Found-response.frozen b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..468bf22ec4da --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-09-06T19:02:54.153Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Not-Found-response.yml b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Not-Found-response.yml new file mode 100644 index 000000000000..7192a4aea20f --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-Not-Found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Sat, 06 Sep 2025 19:02:54 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"values":[{"id":"cust_3141","name":"Johnathan"},{"id":"cust_3142","name":"Mary"}]},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/70b87c26-886f-497a-bd9d-09f53bc9b40c/items/bulk + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","id":"b799bd68-cfb7-4c3d-8026-e0e00c27252f","title":"datastore + not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-OK-response.frozen new file mode 100644 index 000000000000..315b978b48df --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:06.486Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-OK-response.yml new file mode 100644 index 000000000000..0e4ffc40922d --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-write-datastore-items-returns-OK-response.yml @@ -0,0 +1,64 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:06 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6c0dbbfd-a905-4f79-9c2f-16cb4d9a56a7","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:06 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"values":[{"id":"cust_3141","name":"Johnathan"},{"id":"cust_3142","name":"Mary"}]},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/6c0dbbfd-a905-4f79-9c2f-16cb4d9a56a7/items/bulk + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"8c6bba37-01d4-4b49-9d90-4ac909aa8c9f","type":"items"},{"id":"285244c6-b07f-4502-928b-2444c1de31e7","type":"items"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:06 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/6c0dbbfd-a905-4f79-9c2f-16cb4d9a56a7 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6c0dbbfd-a905-4f79-9c2f-16cb4d9a56a7","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..bc7536ef1fc9 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:06.982Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..386d2fc3afe8 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:06 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"datastore-name","primary_column_name":"0invalid_key"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"78cd887f-1a77-421f-915d-4bfebb3784c0","title":"datastore + configuration invalid","detail":"column name ''0invalid_key'' does not start + with a letter or an underscore"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.frozen new file mode 100644 index 000000000000..6833aae6503c --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:07.136Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.yml new file mode 100644 index 000000000000..be3f037ee88d --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:07 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"datastore-name","primary_column_name":"primaryKey"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"040e45f8-b354-4817-8c01-e5d2bb8aa55d","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:07 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/040e45f8-b354-4817-8c01-e5d2bb8aa55d + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"040e45f8-b354-4817-8c01-e5d2bb8aa55d","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..0bfb558f9189 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-06T19:03:07.134Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..6430308acb5d --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Sat, 06 Sep 2025 19:03:07 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_key":"primaryKey"},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/invalid-uuid/items + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"5adc82ee-f920-4fe9-aafc-10cabac28b68","title":"invalid + path parameter","detail":"invalid datastoreId format in path","source":{"parameter":"datastoreId"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.frozen b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..2636c1d2bfe4 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-09-06T19:03:18.396Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.yml b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.yml new file mode 100644 index 000000000000..920ada255718 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Sat, 06 Sep 2025 19:03:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_key":"primaryKey"},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/70b87c26-886f-497a-bd9d-09f53bc9b40c/items + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","id":"38b88198-bd74-4494-8571-f689b21cd216","title":"datastore + not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.frozen new file mode 100644 index 000000000000..c639a010e96e --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:07.743Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.yml new file mode 100644 index 000000000000..eb8a8d2a9e05 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.yml @@ -0,0 +1,86 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:07 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"ad9cc3b7-da9b-452d-8eab-a1e0a0a4e3d8","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:07 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"conflict_mode":"fail_on_conflict","values":[{"data":"test-value","id":"test-key"}]},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/ad9cc3b7-da9b-452d-8eab-a1e0a0a4e3d8/items/bulk + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"8eee511f-e1bc-4a02-8805-1770bbdc4d2e","type":"items"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:07 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_key":"test-key"},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/ad9cc3b7-da9b-452d-8eab-a1e0a0a4e3d8/items + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"8eee511f-e1bc-4a02-8805-1770bbdc4d2e","type":"items"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:07 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/ad9cc3b7-da9b-452d-8eab-a1e0a0a4e3d8 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"ad9cc3b7-da9b-452d-8eab-a1e0a0a4e3d8","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..a262f922c459 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:08.448Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..002b3062a0ab --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:08 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/invalid-uuid + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"ee853859-fef5-4771-98bd-1af309286bc0","title":"invalid + path parameter","detail":"invalid datastoreId format in path","source":{"parameter":"datastoreId"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.frozen new file mode 100644 index 000000000000..b46a8c75f26e --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:08.615Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.yml new file mode 100644 index 000000000000..425442d3c635 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:08 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"8185f4a4-6cf6-4fde-a705-e248effe50fc","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:08 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/8185f4a4-6cf6-4fde-a705-e248effe50fc + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"8185f4a4-6cf6-4fde-a705-e248effe50fc","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:08 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/8185f4a4-6cf6-4fde-a705-e248effe50fc + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..17f435beab38 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:09.096Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..d7dab0584446 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:09 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/invalid-uuid + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"51295683-ce69-48d6-8efb-4d877ff7e1b2","title":"invalid + path parameter","detail":"invalid datastoreId format in path","source":{"parameter":"datastoreId"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.frozen b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..ae156efd1c09 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:09.218Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.yml b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.yml new file mode 100644 index 000000000000..0cb5007d1070 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:09 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/5bf53b3f-b230-4b35-ab1a-b39f2633eb22 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","id":"d4aab06a-e0f9-4aff-9af4-bc99e2938ec3","title":"datastore + not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.frozen new file mode 100644 index 000000000000..34a4f2a77cb3 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:09.394Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.yml new file mode 100644 index 000000000000..bccf2ef3c0de --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.yml @@ -0,0 +1,61 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:09 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b06309e7-b4e9-4edb-a494-e5dd27d9525f","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:09 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/b06309e7-b4e9-4edb-a494-e5dd27d9525f + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b06309e7-b4e9-4edb-a494-e5dd27d9525f","type":"datastores","attributes":{"created_at":"2025-09-05T22:54:09.545626Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-09-05T22:54:09.545626Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:09 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/b06309e7-b4e9-4edb-a494-e5dd27d9525f + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b06309e7-b4e9-4edb-a494-e5dd27d9525f","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..b7c9ce7b3940 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:09.863Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..45f9ff9e84c5 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:09 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/invalid-uuid/items + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"d41a11e1-5db7-47bf-a542-b469768194dd","title":"invalid + path parameter","detail":"invalid datastoreId format in path","source":{"parameter":"datastoreId"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.frozen b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..0f045f4f8113 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:10.018Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.yml b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.yml new file mode 100644 index 000000000000..7d21205b8cdf --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:10 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/3cfdd0b8-c490-4969-8d51-69add64a70ea/items + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","id":"1fe0de3f-9e9c-475b-8cb4-6ea831aa167f","title":"datastore + not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.frozen new file mode 100644 index 000000000000..87a934a1bf2b --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:10.195Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.yml new file mode 100644 index 000000000000..3d02eb67a79b --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.yml @@ -0,0 +1,82 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:10 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"edfe7784-570c-4984-a4ae-883642b561d8","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:10 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"conflict_mode":"fail_on_conflict","values":[{"data":"test-value","id":"test-key"}]},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/edfe7784-570c-4984-a4ae-883642b561d8/items/bulk + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"b20fe87b-f383-4afc-91ee-8fbc178942a2","type":"items"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:10 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/edfe7784-570c-4984-a4ae-883642b561d8/items + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"b20fe87b-f383-4afc-91ee-8fbc178942a2","type":"items","attributes":{"created_at":"2025-09-05T22:54:10.544424Z","modified_at":"2025-09-05T22:54:10.544424Z","org_id":321813,"primary_column_name":"id","signature":"{\"signature\":\"{\\\"version\\\":2,\\\"algorithm\\\":\\\"ecdsa-p384\\\",\\\"pubkey\\\":\\\"voTcDho3mVIVzY8m98GyVfIib84TgbZoHSWzVQ09TFU=\\\",\\\"timestamp\\\":1757112850,\\\"proof\\\":\\\"MGUCMDX1ijfjUxZK9hVzaMIxU+DociQUkZpkz7FD7tAiykeviU/66p2j1sDf4fYGK3agCwIxALarzvBhasIVGC46VgJuoC0MIkb5WyVWZKh50ist9OfVCQbbe4ZTKKvrW3pVQN34rg==\\\"}\",\"version\":1}","store_id":"edfe7784-570c-4984-a4ae-883642b561d8","value":{"data":"test-value","id":"test-key"}}}],"meta":{"page":{"totalCount":1,"totalFilteredCount":1,"hasMore":false},"schema":{"primary_key":"id","fields":[{"name":"id","type":"STRING"},{"name":"data","type":"JSON"}]}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:10 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/edfe7784-570c-4984-a4ae-883642b561d8 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"edfe7784-570c-4984-a4ae-883642b561d8","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.frozen new file mode 100644 index 000000000000..34ec023d7a21 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:10.870Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.yml new file mode 100644 index 000000000000..20e1e94dd989 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.yml @@ -0,0 +1,61 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:10 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"0ff20856-6af3-4b8a-bfa6-26ffd7f61551","type":"datastores","attributes":{"created_at":"2025-08-08T13:45:48.532915Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:45:48.532915Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"1c60feb8-f9ea-4b81-9f7d-b0ae97b10cc7","type":"datastores","attributes":{"created_at":"2025-08-11T21:33:38.587401Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T21:33:38.587401Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"1d38b58d-d7ac-4a47-be37-6457cea49630","type":"datastores","attributes":{"created_at":"2025-08-08T17:42:31.923013Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:42:31.923013Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"1d6f1853-eb64-43a3-a85b-b187853393c7","type":"datastores","attributes":{"created_at":"2025-08-08T13:41:27.399846Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:41:27.399846Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"236e7736-44d9-40d0-985f-1ab73f25ad09","type":"datastores","attributes":{"created_at":"2025-08-08T18:02:29.490155Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T18:02:29.490155Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"2b0704ce-1efd-4485-976b-f272ea39a9b9","type":"datastores","attributes":{"created_at":"2025-08-08T14:02:11.360529Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T14:02:11.360529Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"2bccd24d-715d-473f-8771-eff9370d14b9","type":"datastores","attributes":{"created_at":"2025-08-11T22:19:07.258146Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:19:07.258146Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"31af63e6-8363-45a4-ad6b-d92ec256b005","type":"datastores","attributes":{"created_at":"2025-08-08T03:27:41.246238Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:27:41.246238Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"3d4f33dd-41af-4b4e-94e0-a142cd47f83d","type":"datastores","attributes":{"created_at":"2025-08-08T17:58:55.363703Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:58:55.363703Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"44f23b41-3925-4620-b5ad-641c0cac57b9","type":"datastores","attributes":{"created_at":"2025-08-08T17:30:39.520162Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:30:39.520162Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"457cae9c-32ad-4598-9ac0-489c7d4fc20b","type":"datastores","attributes":{"created_at":"2025-08-08T03:07:54.05107Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:07:54.05107Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"55a92f3e-6804-4f45-9ecf-7c09cef155ed","type":"datastores","attributes":{"created_at":"2025-08-08T13:33:42.534986Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:33:42.534987Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"5b3664f0-faaa-4f1b-b067-f521aa156516","type":"datastores","attributes":{"created_at":"2025-08-08T13:35:02.776449Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:35:02.776449Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"7059cb1d-20f6-44e6-a5ee-8eeb19b799e2","type":"datastores","attributes":{"created_at":"2025-08-08T17:24:03.907384Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:24:03.907384Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"7ef9ca96-be6d-435c-b452-9e562beedb4a","type":"datastores","attributes":{"created_at":"2025-08-08T17:27:38.411129Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:27:38.411129Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"8204dff8-7335-4e33-a28b-8f8a0dd47ad0","type":"datastores","attributes":{"created_at":"2025-08-08T14:08:19.382083Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T14:08:19.382083Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"84e4ca89-9266-4fb3-a552-e6da080abc3f","type":"datastores","attributes":{"created_at":"2025-08-08T18:11:58.405584Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T18:11:58.405584Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"858032d2-1c2f-4ac1-a434-de5773fc14c2","type":"datastores","attributes":{"created_at":"2025-08-08T02:55:43.831724Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T02:55:43.831724Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"89c95311-d63a-4535-be9d-92a3912ec074","type":"datastores","attributes":{"created_at":"2025-08-11T21:24:28.298273Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T21:24:28.298273Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"8b0fb519-c55f-45d5-b532-1645bed41a92","type":"datastores","attributes":{"created_at":"2025-08-08T13:54:02.27972Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:54:02.27972Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"99366571-d1de-4a6f-9213-5c77a5468de9","type":"datastores","attributes":{"created_at":"2025-08-08T13:50:10.748216Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:50:10.748217Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"9d9d7162-cfd2-40f1-b413-d2df89a5eba9","type":"datastores","attributes":{"created_at":"2025-08-08T03:28:50.178882Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:28:50.178882Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"a751bca4-54eb-4739-a4a3-4779650f9fad","type":"datastores","attributes":{"created_at":"2025-08-08T03:45:28.881437Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:45:28.881437Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"a78fe3e0-4325-459f-aca4-69c084ab818d","type":"datastores","attributes":{"created_at":"2025-08-08T13:22:37.043971Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:22:37.043972Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"aec831f3-cbc3-411f-8ef0-23fdb834d549","type":"datastores","attributes":{"created_at":"2025-08-08T17:36:12.428171Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:36:12.428171Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"b55b6d33-da75-4432-85fc-e0f0a28b4826","type":"datastores","attributes":{"created_at":"2025-08-08T13:38:13.641577Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:38:13.641578Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"bd5e4649-674b-444f-850c-74625b0be9ab","type":"datastores","attributes":{"created_at":"2025-08-08T18:03:00.425892Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T18:03:00.425892Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"be6825fd-82d5-4d9d-8db5-cc674404b710","type":"datastores","attributes":{"created_at":"2025-08-08T03:01:57.110842Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:01:57.110843Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"c412c4b3-7d3d-4ac3-ace6-99abfc0a8567","type":"datastores","attributes":{"created_at":"2025-08-08T02:57:09.998039Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T02:57:09.998039Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"c698d221-5dc9-44d3-ae61-a6a422d204ab","type":"datastores","attributes":{"created_at":"2025-08-08T03:18:11.876246Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:18:11.876246Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"cd915e84-87b1-495d-a868-9c24578696e3","type":"datastores","attributes":{"created_at":"2025-08-08T13:36:53.994588Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:36:53.994588Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"cfadef50-963b-45fa-8334-f33094ca6d76","type":"datastores","attributes":{"created_at":"2025-08-08T14:29:33.425183Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T14:29:33.425183Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"d018730c-26cb-47af-ba93-3604d8a8ad74","type":"datastores","attributes":{"created_at":"2025-08-08T17:35:23.034496Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:35:23.034496Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"d14f84a9-9a26-4b0d-bd6d-f7baf8c9a9ae","type":"datastores","attributes":{"created_at":"2025-08-08T17:30:07.452804Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:30:07.452804Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"d3dedf8d-6620-4dec-bb8b-b0fa53b19135","type":"datastores","attributes":{"created_at":"2025-08-08T13:45:16.371907Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:45:16.371907Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"d8cdfbae-8ec9-4c50-8459-5d55a7b5a945","type":"datastores","attributes":{"created_at":"2025-08-08T17:27:01.039091Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T17:27:01.039091Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"de765300-fca1-4ab2-a441-a6633cd7f976","type":"datastores","attributes":{"created_at":"2025-08-08T14:11:34.405607Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T14:11:34.405607Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"e174ff20-eff7-40b9-a472-b8ce2a8492d8","type":"datastores","attributes":{"created_at":"2025-08-11T20:40:08.137413Z","creator_user_id":2320499,"creator_user_uuid":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","description":"","modified_at":"2025-08-11T20:40:08.137413Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"ea68e1d7-6e4d-40d2-a67f-f5c3c54aab2b","type":"datastores","attributes":{"created_at":"2025-08-08T03:03:21.673996Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:03:21.673996Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"ee56b789-56b6-481c-851b-d0c14a7228d4","type":"datastores","attributes":{"created_at":"2025-08-08T13:44:50.073893Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T13:44:50.073894Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}},{"id":"f5a8ac6e-0cfb-44ad-b71d-28fd40a210a6","type":"datastores","attributes":{"created_at":"2025-08-08T03:36:29.121686Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-08T03:36:29.121686Z","name":"Test + Datastore","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..184d2c8e929a --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:11.057Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..798960ac5a1a --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:11 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_changes":{},"item_key":""},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/actions-datastores/invalid-uuid/items + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"f88d0b88-0d55-482b-9a90-3556ef7d6b4a","title":"invalid + path parameter","detail":"invalid datastoreId format in path","source":{"parameter":"datastoreId"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Not-Found-response.frozen b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..d3523bfc49da --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:11.195Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Not-Found-response.yml b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Not-Found-response.yml new file mode 100644 index 000000000000..cca637ef43e9 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-Not-Found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:11 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_changes":{},"item_key":"itemKey"},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/actions-datastores/3cfdd0b8-c490-4969-8d51-69add64a70ea/items + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","id":"d0d6adeb-c5cf-4dce-98d9-532cbc386b09","title":"datastore + not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-OK-response.frozen new file mode 100644 index 000000000000..27714e5ed37a --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:11.331Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-OK-response.yml new file mode 100644 index 000000000000..056a5bab088f --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-item-returns-OK-response.yml @@ -0,0 +1,86 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:11 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6d5556c8-04d7-45dc-9a08-cd671c4e519a","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:11 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"conflict_mode":"fail_on_conflict","values":[{"data":"test-value","id":"test-key"}]},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/6d5556c8-04d7-45dc-9a08-cd671c4e519a/items/bulk + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"94c791a3-9cc2-44be-857e-95c11eb1eefd","type":"items"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:11 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_changes":{},"item_key":"test-key"},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/actions-datastores/6d5556c8-04d7-45dc-9a08-cd671c4e519a/items + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"94c791a3-9cc2-44be-857e-95c11eb1eefd","type":"items","attributes":{"created_at":"2025-09-05T22:54:11.652289Z","modified_at":"2025-09-05T22:54:11.793763Z","org_id":321813,"primary_column_name":"id","signature":"{\"signature\":\"{\\\"version\\\":2,\\\"algorithm\\\":\\\"ecdsa-p384\\\",\\\"pubkey\\\":\\\"voTcDho3mVIVzY8m98GyVfIib84TgbZoHSWzVQ09TFU=\\\",\\\"timestamp\\\":1757112851,\\\"proof\\\":\\\"MGQCMGTEegXzPFeiOMj3tizwKvIXhJ2jLwzZW240N+HDLsvK2QIs1PD+6n/b15rdnABaigIwKYLG3PRtBKd8hV7eF4r9X5vM9fJvCyMPPi05K86m3lm22oxWEsDvLdgx0PxrojuT\\\"}\",\"version\":1}","store_id":"6d5556c8-04d7-45dc-9a08-cd671c4e519a","value":{"data":"test-value","id":"test-key"}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:11 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/6d5556c8-04d7-45dc-9a08-cd671c4e519a + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"6d5556c8-04d7-45dc-9a08-cd671c4e519a","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..46b1d9ed356e --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:11.950Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..5934cb9af291 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:11 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{},"id":"invalid-uuid","type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/actions-datastores/invalid-uuid + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","id":"22fc6f64-67c9-44ad-b6e0-094dd77c7690","title":"invalid + path parameter","detail":"invalid datastoreId format in path","source":{"parameter":"datastoreId"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.frozen b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..cd4a108daff4 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:12.100Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.yml b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.yml new file mode 100644 index 000000000000..8e703349fdb3 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:12 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"updated name"},"id":"c1eb5bb8-726a-4e59-9a61-ccbb26f95329","type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/actions-datastores/c1eb5bb8-726a-4e59-9a61-ccbb26f95329 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"404","id":"9738106a-d613-4be1-ad98-88760c9e0e9f","title":"datastore + not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.frozen new file mode 100644 index 000000000000..b667a5007bba --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-09-05T22:54:12.245Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.yml new file mode 100644 index 000000000000..e0735349a0c4 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.yml @@ -0,0 +1,65 @@ +http_interactions: +- recorded_at: Fri, 05 Sep 2025 22:54:12 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"description":"","name":"Test Datastore","org_access":"contributor","primary_column_name":"id","primary_key_generation_strategy":"none"},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"785f6031-19e8-4dda-8ccc-f4e700ae5c99","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:12 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"updated name"},"id":"785f6031-19e8-4dda-8ccc-f4e700ae5c99","type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/actions-datastores/785f6031-19e8-4dda-8ccc-f4e700ae5c99 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"785f6031-19e8-4dda-8ccc-f4e700ae5c99","type":"datastores","attributes":{"created_at":"2025-09-05T22:54:12.386695Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-09-05T22:54:12.575024Z","name":"updated + name","org_id":321813,"primary_column_name":"id","primary_key_generation_strategy":"none"}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Fri, 05 Sep 2025 22:54:12 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/785f6031-19e8-4dda-8ccc-f4e700ae5c99 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"785f6031-19e8-4dda-8ccc-f4e700ae5c99","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/actions-datastores/BulkWriteDatastoreItems.rb b/examples/v2/actions-datastores/BulkWriteDatastoreItems.rb new file mode 100644 index 000000000000..224a5c82ebe9 --- /dev/null +++ b/examples/v2/actions-datastores/BulkWriteDatastoreItems.rb @@ -0,0 +1,24 @@ +# Bulk write datastore items returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +# there is a valid "datastore" in the system +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] + +body = DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequest.new({ + data: DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequestData.new({ + attributes: DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequestDataAttributes.new({ + values: [ + { + "id": "cust_3141", "name": "Johnathan", + }, + { + "id": "cust_3142", "name": "Mary", + }, + ], + }), + type: DatadogAPIClient::V2::DatastoreItemsDataType::ITEMS, + }), +}) +p api_instance.bulk_write_datastore_items(DATASTORE_DATA_ID, body) diff --git a/examples/v2/actions-datastores/CreateDatastore.rb b/examples/v2/actions-datastores/CreateDatastore.rb new file mode 100644 index 000000000000..8d259bd6b866 --- /dev/null +++ b/examples/v2/actions-datastores/CreateDatastore.rb @@ -0,0 +1,15 @@ +# Create datastore returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +body = DatadogAPIClient::V2::CreateAppsDatastoreRequest.new({ + data: DatadogAPIClient::V2::CreateAppsDatastoreRequestData.new({ + attributes: DatadogAPIClient::V2::CreateAppsDatastoreRequestDataAttributes.new({ + name: "datastore-name", + primary_column_name: "primaryKey", + }), + type: DatadogAPIClient::V2::DatastoreDataType::DATASTORES, + }), +}) +p api_instance.create_datastore(body) diff --git a/examples/v2/actions-datastores/DeleteDatastore.rb b/examples/v2/actions-datastores/DeleteDatastore.rb new file mode 100644 index 000000000000..85eb3da3763b --- /dev/null +++ b/examples/v2/actions-datastores/DeleteDatastore.rb @@ -0,0 +1,8 @@ +# Delete datastore returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +# there is a valid "datastore" in the system +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] +p api_instance.delete_datastore(DATASTORE_DATA_ID) diff --git a/examples/v2/actions-datastores/DeleteDatastoreItem.rb b/examples/v2/actions-datastores/DeleteDatastoreItem.rb new file mode 100644 index 000000000000..24450cf08fcc --- /dev/null +++ b/examples/v2/actions-datastores/DeleteDatastoreItem.rb @@ -0,0 +1,17 @@ +# Delete datastore item returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +# there is a valid "datastore" in the system +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] + +body = DatadogAPIClient::V2::DeleteAppsDatastoreItemRequest.new({ + data: DatadogAPIClient::V2::DeleteAppsDatastoreItemRequestData.new({ + attributes: DatadogAPIClient::V2::DeleteAppsDatastoreItemRequestDataAttributes.new({ + item_key: "test-key", + }), + type: DatadogAPIClient::V2::DatastoreItemsDataType::ITEMS, + }), +}) +p api_instance.delete_datastore_item(DATASTORE_DATA_ID, body) diff --git a/examples/v2/actions-datastores/GetDatastore.rb b/examples/v2/actions-datastores/GetDatastore.rb new file mode 100644 index 000000000000..eff47d43fb5f --- /dev/null +++ b/examples/v2/actions-datastores/GetDatastore.rb @@ -0,0 +1,8 @@ +# Get datastore returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +# there is a valid "datastore" in the system +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] +p api_instance.get_datastore(DATASTORE_DATA_ID) diff --git a/examples/v2/actions-datastores/ListDatastoreItems.rb b/examples/v2/actions-datastores/ListDatastoreItems.rb new file mode 100644 index 000000000000..e336620dbf91 --- /dev/null +++ b/examples/v2/actions-datastores/ListDatastoreItems.rb @@ -0,0 +1,8 @@ +# List datastore items returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +# there is a valid "datastore" in the system +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] +p api_instance.list_datastore_items(DATASTORE_DATA_ID) diff --git a/examples/v2/actions-datastores/ListDatastores.rb b/examples/v2/actions-datastores/ListDatastores.rb new file mode 100644 index 000000000000..2d0c739ee9cc --- /dev/null +++ b/examples/v2/actions-datastores/ListDatastores.rb @@ -0,0 +1,5 @@ +# List datastores returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new +p api_instance.list_datastores() diff --git a/examples/v2/actions-datastores/UpdateDatastore.rb b/examples/v2/actions-datastores/UpdateDatastore.rb new file mode 100644 index 000000000000..e1fdd018db45 --- /dev/null +++ b/examples/v2/actions-datastores/UpdateDatastore.rb @@ -0,0 +1,18 @@ +# Update datastore returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +# there is a valid "datastore" in the system +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] + +body = DatadogAPIClient::V2::UpdateAppsDatastoreRequest.new({ + data: DatadogAPIClient::V2::UpdateAppsDatastoreRequestData.new({ + attributes: DatadogAPIClient::V2::UpdateAppsDatastoreRequestDataAttributes.new({ + name: "updated name", + }), + type: DatadogAPIClient::V2::DatastoreDataType::DATASTORES, + id: DATASTORE_DATA_ID, + }), +}) +p api_instance.update_datastore(DATASTORE_DATA_ID, body) diff --git a/examples/v2/actions-datastores/UpdateDatastoreItem.rb b/examples/v2/actions-datastores/UpdateDatastoreItem.rb new file mode 100644 index 000000000000..3f5392a03188 --- /dev/null +++ b/examples/v2/actions-datastores/UpdateDatastoreItem.rb @@ -0,0 +1,18 @@ +# Update datastore item returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +# there is a valid "datastore" in the system +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] + +body = DatadogAPIClient::V2::UpdateAppsDatastoreItemRequest.new({ + data: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestData.new({ + attributes: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestDataAttributes.new({ + item_changes: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestDataAttributesItemChanges.new({}), + item_key: "test-key", + }), + type: DatadogAPIClient::V2::UpdateAppsDatastoreItemRequestDataType::ITEMS, + }), +}) +p api_instance.update_datastore_item(DATASTORE_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index a10fe86546c4..60b68dc1952a 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -839,6 +839,39 @@ "user_handle" => "String", "body" => "User", }, + "v2.CreateDatastore" => { + "body" => "CreateAppsDatastoreRequest", + }, + "v2.DeleteDatastore" => { + "datastore_id" => "String", + }, + "v2.GetDatastore" => { + "datastore_id" => "String", + }, + "v2.UpdateDatastore" => { + "datastore_id" => "String", + "body" => "UpdateAppsDatastoreRequest", + }, + "v2.DeleteDatastoreItem" => { + "datastore_id" => "String", + "body" => "DeleteAppsDatastoreItemRequest", + }, + "v2.ListDatastoreItems" => { + "datastore_id" => "String", + "filter" => "String", + "item_key" => "String", + "page_limit" => "Integer", + "page_offset" => "Integer", + "sort" => "String", + }, + "v2.UpdateDatastoreItem" => { + "datastore_id" => "String", + "body" => "UpdateAppsDatastoreItemRequest", + }, + "v2.BulkWriteDatastoreItems" => { + "datastore_id" => "String", + "body" => "BulkPutAppsDatastoreItemsRequest", + }, "v2.ListAppKeyRegistrations" => { "page_size" => "Integer", "page_number" => "Integer", diff --git a/features/v2/actions_datastores.feature b/features/v2/actions_datastores.feature new file mode 100644 index 000000000000..ed19da3aec27 --- /dev/null +++ b/features/v2/actions_datastores.feature @@ -0,0 +1,220 @@ +@endpoint(actions-datastores) @endpoint(actions-datastores-v2) +Feature: Actions Datastores + Leverage the Actions Datastore API to create, modify, and delete items in + datastores owned by your organization. + + Background: + Given an instance of "ActionsDatastores" API + And a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + + @team:DataDog/app-builder-backend + Scenario: Bulk write datastore items returns "Bad Request" response + Given new "BulkWriteDatastoreItems" request + And there is a valid "datastore" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + And body with value {"data": {"attributes": {"values": [{"id": "cust_3141", "name": "Johnathan"}, {"badPrimaryKey": "key2", "name": "Johnathan"}]}, "type": "items"}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "item key missing or invalid" + + @team:DataDog/app-builder-backend + Scenario: Bulk write datastore items returns "Not Found" response + Given new "BulkWriteDatastoreItems" request + And request contains "datastore_id" parameter with value "70b87c26-886f-497a-bd9d-09f53bc9b40c" + And body with value {"data": {"attributes": {"values": [{"id": "cust_3141", "name": "Johnathan"}, {"id": "cust_3142", "name": "Mary"}]}, "type": "items"}} + When the request is sent + Then the response status is 404 Not Found + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "datastore not found" + + @team:DataDog/app-builder-backend + Scenario: Bulk write datastore items returns "OK" response + Given new "BulkWriteDatastoreItems" request + And there is a valid "datastore" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + And body with value {"data": {"attributes": {"values": [{"id": "cust_3141", "name": "Johnathan"}, {"id": "cust_3142", "name": "Mary"}]}, "type": "items"}} + When the request is sent + Then the response status is 200 OK + And the response "data" has length 2 + + @team:DataDog/app-builder-backend + Scenario: Create datastore returns "Bad Request" response + Given new "CreateDatastore" request + And body with value {"data": {"attributes": {"name": "datastore-name", "primary_column_name": "0invalid_key"}, "type": "datastores"}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "datastore configuration invalid" + + @team:DataDog/app-builder-backend + Scenario: Create datastore returns "OK" response + Given new "CreateDatastore" request + And body with value {"data": {"attributes": {"name": "datastore-name", "primary_column_name": "primaryKey"}, "type": "datastores"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/app-builder-backend + Scenario: Delete datastore item returns "Bad Request" response + Given new "DeleteDatastoreItem" request + And request contains "datastore_id" parameter with value "invalid-uuid" + And body with value {"data": {"attributes": {"item_key": "primaryKey"}, "type": "items"}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "invalid path parameter" + + @team:DataDog/app-builder-backend + Scenario: Delete datastore item returns "Not Found" response + Given new "DeleteDatastoreItem" request + And request contains "datastore_id" parameter with value "70b87c26-886f-497a-bd9d-09f53bc9b40c" + And body with value {"data": {"attributes": {"item_key": "primaryKey"}, "type": "items"}} + When the request is sent + Then the response status is 404 Not Found + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "datastore not found" + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Delete datastore item returns "OK" response + Given new "DeleteDatastoreItem" request + And there is a valid "datastore" in the system + And there is a valid "datastore_item" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + And body with value {"data": {"attributes": {"item_key": "test-key"}, "type": "items" }} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/app-builder-backend + Scenario: Delete datastore returns "Bad Request" response + Given new "DeleteDatastore" request + And request contains "datastore_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "invalid path parameter" + + @skip-typescript @skip-validation @team:DataDog/app-builder-backend + Scenario: Delete datastore returns "OK" response + Given new "DeleteDatastore" request + And there is a valid "datastore" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/app-builder-backend + Scenario: Get datastore returns "Bad Request" response + Given new "GetDatastore" request + And request contains "datastore_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "invalid path parameter" + + @team:DataDog/app-builder-backend + Scenario: Get datastore returns "Not Found" response + Given new "GetDatastore" request + And request contains "datastore_id" parameter with value "5bf53b3f-b230-4b35-ab1a-b39f2633eb22" + When the request is sent + Then the response status is 404 Not Found + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "datastore not found" + + @team:DataDog/app-builder-backend + Scenario: Get datastore returns "OK" response + Given new "GetDatastore" request + And there is a valid "datastore" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{datastore.data.id}}" + + @team:DataDog/app-builder-backend + Scenario: List datastore items returns "Bad Request" response + Given new "ListDatastoreItems" request + And request contains "datastore_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "invalid path parameter" + + @team:DataDog/app-builder-backend + Scenario: List datastore items returns "Not Found" response + Given new "ListDatastoreItems" request + And request contains "datastore_id" parameter with value "3cfdd0b8-c490-4969-8d51-69add64a70ea" + When the request is sent + Then the response status is 404 Not Found + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "datastore not found" + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: List datastore items returns "OK" response + Given new "ListDatastoreItems" request + And there is a valid "datastore" in the system + And there is a valid "datastore_item" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + + @team:DataDog/app-builder-backend + Scenario: List datastores returns "OK" response + Given new "ListDatastores" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/app-builder-backend + Scenario: Update datastore item returns "Bad Request" response + Given new "UpdateDatastoreItem" request + And request contains "datastore_id" parameter with value "invalid-uuid" + And body with value {"data": {"attributes": {"item_changes": {}, "item_key": ""}, "type": "items"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Update datastore item returns "Not Found" response + Given new "UpdateDatastoreItem" request + And request contains "datastore_id" parameter with value "3cfdd0b8-c490-4969-8d51-69add64a70ea" + And body with value {"data": {"attributes": {"item_changes": {}, "item_key": "itemKey"}, "type": "items"}} + When the request is sent + Then the response status is 404 Not Found + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Update datastore item returns "OK" response + Given new "UpdateDatastoreItem" request + And there is a valid "datastore" in the system + And there is a valid "datastore_item" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + And body with value {"data": {"attributes": {"item_changes": {}, "item_key": "test-key"}, "type": "items"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/app-builder-backend + Scenario: Update datastore returns "Bad Request" response + Given new "UpdateDatastore" request + And request contains "datastore_id" parameter with value "invalid-uuid" + And body with value {"data": {"attributes": {}, "type": "datastores", "id": "invalid-uuid"}} + When the request is sent + Then the response status is 400 Bad Request + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "invalid path parameter" + + @team:DataDog/app-builder-backend + Scenario: Update datastore returns "Not Found" response + Given new "UpdateDatastore" request + And request contains "datastore_id" parameter with value "c1eb5bb8-726a-4e59-9a61-ccbb26f95329" + And body with value {"data": {"attributes": {"name": "updated name"}, "type": "datastores", "id": "c1eb5bb8-726a-4e59-9a61-ccbb26f95329"}} + When the request is sent + Then the response status is 404 Not Found + And the response "errors" has length 1 + And the response "errors[0].title" is equal to "datastore not found" + + @team:DataDog/app-builder-backend + Scenario: Update datastore returns "OK" response + Given new "UpdateDatastore" request + And there is a valid "datastore" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + And body with value {"data": {"attributes": {"name": "updated name"}, "type": "datastores", "id": "{{datastore.data.id}}"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "updated name" diff --git a/features/v2/given.json b/features/v2/given.json index 4e0610f2f8f9..a4872ca4d572 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1,4 +1,32 @@ [ + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"datastores\",\n \"attributes\": {\n \"name\": \"Test Datastore\",\n \"primary_column_name\": \"id\",\n \"primary_key_generation_strategy\": \"none\",\n \"description\": \"\",\n \"org_access\": \"contributor\"\n }\n }\n}" + } + ], + "step": "there is a valid \"datastore\" in the system", + "key": "datastore", + "tag": "Actions Datastores", + "operationId": "CreateDatastore" + }, + { + "parameters": [ + { + "name": "datastore_id", + "source": "datastore.data.id" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"items\",\n \"attributes\": {\n \"conflict_mode\": \"fail_on_conflict\",\n \"values\": [\n {\n \"id\": \"test-key\",\n \"data\": \"test-value\"\n }\n ]\n }\n }\n}" + } + ], + "step": "there is a valid \"datastore_item\" in the system", + "key": "datastore_item", + "tag": "Actions Datastores", + "operationId": "BulkWriteDatastoreItems" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index f9424d938fd4..9aa936bc9951 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1,4 +1,65 @@ { + "ListDatastores": { + "tag": "Actions Datastores", + "undo": { + "type": "safe" + } + }, + "CreateDatastore": { + "tag": "Actions Datastores", + "undo": { + "operationId": "DeleteDatastore", + "parameters": [ + { + "name": "datastore_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteDatastore": { + "tag": "Actions Datastores", + "undo": { + "type": "idempotent" + } + }, + "GetDatastore": { + "tag": "Actions Datastores", + "undo": { + "type": "safe" + } + }, + "UpdateDatastore": { + "tag": "Actions Datastores", + "undo": { + "type": "idempotent" + } + }, + "DeleteDatastoreItem": { + "tag": "Actions Datastores", + "undo": { + "type": "idempotent" + } + }, + "ListDatastoreItems": { + "tag": "Actions Datastores", + "undo": { + "type": "safe" + } + }, + "UpdateDatastoreItem": { + "tag": "Actions Datastores", + "undo": { + "type": "idempotent" + } + }, + "BulkWriteDatastoreItems": { + "tag": "Actions Datastores", + "undo": { + "type": "idempotent" + } + }, "ListAppKeyRegistrations": { "tag": "Action Connection", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 34c7bfa4ff17..4684c1fccaab 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1257,6 +1257,9 @@ def overrides "v2.bulk_mute_findings_request_properties" => "BulkMuteFindingsRequestProperties", "v2.bulk_mute_findings_response" => "BulkMuteFindingsResponse", "v2.bulk_mute_findings_response_data" => "BulkMuteFindingsResponseData", + "v2.bulk_put_apps_datastore_items_request" => "BulkPutAppsDatastoreItemsRequest", + "v2.bulk_put_apps_datastore_items_request_data" => "BulkPutAppsDatastoreItemsRequestData", + "v2.bulk_put_apps_datastore_items_request_data_attributes" => "BulkPutAppsDatastoreItemsRequestDataAttributes", "v2.calculated_field" => "CalculatedField", "v2.cancel_data_deletion_response_body" => "CancelDataDeletionResponseBody", "v2.case" => "Case", @@ -1549,6 +1552,12 @@ def overrides "v2.create_app_request_data_attributes" => "CreateAppRequestDataAttributes", "v2.create_app_response" => "CreateAppResponse", "v2.create_app_response_data" => "CreateAppResponseData", + "v2.create_apps_datastore_request" => "CreateAppsDatastoreRequest", + "v2.create_apps_datastore_request_data" => "CreateAppsDatastoreRequestData", + "v2.create_apps_datastore_request_data_attributes" => "CreateAppsDatastoreRequestDataAttributes", + "v2.create_apps_datastore_request_data_attributes_org_access" => "CreateAppsDatastoreRequestDataAttributesOrgAccess", + "v2.create_apps_datastore_response" => "CreateAppsDatastoreResponse", + "v2.create_apps_datastore_response_data" => "CreateAppsDatastoreResponseData", "v2.create_custom_framework_request" => "CreateCustomFrameworkRequest", "v2.create_custom_framework_response" => "CreateCustomFrameworkResponse", "v2.create_data_deletion_request_body" => "CreateDataDeletionRequestBody", @@ -1698,11 +1707,24 @@ def overrides "v2.dataset_response_single" => "DatasetResponseSingle", "v2.dataset_type" => "DatasetType", "v2.dataset_update_request" => "DatasetUpdateRequest", + "v2.datastore" => "Datastore", + "v2.datastore_array" => "DatastoreArray", + "v2.datastore_data" => "DatastoreData", + "v2.datastore_data_attributes" => "DatastoreDataAttributes", + "v2.datastore_data_type" => "DatastoreDataType", + "v2.datastore_item_conflict_mode" => "DatastoreItemConflictMode", + "v2.datastore_items_data_type" => "DatastoreItemsDataType", + "v2.datastore_primary_key_generation_strategy" => "DatastorePrimaryKeyGenerationStrategy", "v2.data_transform" => "DataTransform", "v2.data_transform_properties" => "DataTransformProperties", "v2.data_transform_type" => "DataTransformType", "v2.delete_app_response" => "DeleteAppResponse", "v2.delete_app_response_data" => "DeleteAppResponseData", + "v2.delete_apps_datastore_item_request" => "DeleteAppsDatastoreItemRequest", + "v2.delete_apps_datastore_item_request_data" => "DeleteAppsDatastoreItemRequestData", + "v2.delete_apps_datastore_item_request_data_attributes" => "DeleteAppsDatastoreItemRequestDataAttributes", + "v2.delete_apps_datastore_item_response" => "DeleteAppsDatastoreItemResponse", + "v2.delete_apps_datastore_item_response_data" => "DeleteAppsDatastoreItemResponseData", "v2.delete_apps_request" => "DeleteAppsRequest", "v2.delete_apps_request_data_items" => "DeleteAppsRequestDataItems", "v2.delete_apps_response" => "DeleteAppsResponse", @@ -2340,6 +2362,14 @@ def overrides "v2.issue_user_attributes" => "IssueUserAttributes", "v2.issue_user_reference" => "IssueUserReference", "v2.issue_user_type" => "IssueUserType", + "v2.item_api_payload" => "ItemApiPayload", + "v2.item_api_payload_array" => "ItemApiPayloadArray", + "v2.item_api_payload_data" => "ItemApiPayloadData", + "v2.item_api_payload_data_attributes" => "ItemApiPayloadDataAttributes", + "v2.item_api_payload_meta" => "ItemApiPayloadMeta", + "v2.item_api_payload_meta_page" => "ItemApiPayloadMetaPage", + "v2.item_api_payload_meta_schema" => "ItemApiPayloadMetaSchema", + "v2.item_api_payload_meta_schema_field" => "ItemApiPayloadMetaSchemaField", "v2.jira_integration_metadata" => "JiraIntegrationMetadata", "v2.jira_integration_metadata_issues_item" => "JiraIntegrationMetadataIssuesItem", "v2.jira_issue" => "JiraIssue", @@ -3066,6 +3096,8 @@ def overrides "v2.project_response" => "ProjectResponse", "v2.projects_response" => "ProjectsResponse", "v2.publish_app_response" => "PublishAppResponse", + "v2.put_apps_datastore_item_response_array" => "PutAppsDatastoreItemResponseArray", + "v2.put_apps_datastore_item_response_data" => "PutAppsDatastoreItemResponseData", "v2.put_incident_notification_rule_request" => "PutIncidentNotificationRuleRequest", "v2.query" => "Query", "v2.query_formula" => "QueryFormula", @@ -3826,6 +3858,14 @@ def overrides "v2.update_app_response" => "UpdateAppResponse", "v2.update_app_response_data" => "UpdateAppResponseData", "v2.update_app_response_data_attributes" => "UpdateAppResponseDataAttributes", + "v2.update_apps_datastore_item_request" => "UpdateAppsDatastoreItemRequest", + "v2.update_apps_datastore_item_request_data" => "UpdateAppsDatastoreItemRequestData", + "v2.update_apps_datastore_item_request_data_attributes" => "UpdateAppsDatastoreItemRequestDataAttributes", + "v2.update_apps_datastore_item_request_data_attributes_item_changes" => "UpdateAppsDatastoreItemRequestDataAttributesItemChanges", + "v2.update_apps_datastore_item_request_data_type" => "UpdateAppsDatastoreItemRequestDataType", + "v2.update_apps_datastore_request" => "UpdateAppsDatastoreRequest", + "v2.update_apps_datastore_request_data" => "UpdateAppsDatastoreRequestData", + "v2.update_apps_datastore_request_data_attributes" => "UpdateAppsDatastoreRequestDataAttributes", "v2.update_custom_framework_request" => "UpdateCustomFrameworkRequest", "v2.update_custom_framework_response" => "UpdateCustomFrameworkResponse", "v2.update_open_api_response" => "UpdateOpenAPIResponse", @@ -3998,6 +4038,7 @@ def overrides "v1.users_api" => "UsersAPI", "v1.webhooks_integration_api" => "WebhooksIntegrationAPI", "v2.action_connection_api" => "ActionConnectionAPI", + "v2.actions_datastores_api" => "ActionsDatastoresAPI", "v2.agentless_scanning_api" => "AgentlessScanningAPI", "v2.api_management_api" => "APIManagementAPI", "v2.apm_retention_filters_api" => "APMRetentionFiltersAPI", diff --git a/lib/datadog_api_client/v2/api/actions_datastores_api.rb b/lib/datadog_api_client/v2/api/actions_datastores_api.rb new file mode 100644 index 000000000000..e7c799fcd8d4 --- /dev/null +++ b/lib/datadog_api_client/v2/api/actions_datastores_api.rb @@ -0,0 +1,655 @@ +=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 'cgi' + +module DatadogAPIClient::V2 + class ActionsDatastoresAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Bulk write datastore items. + # + # @see #bulk_write_datastore_items_with_http_info + def bulk_write_datastore_items(datastore_id, body, opts = {}) + data, _status_code, _headers = bulk_write_datastore_items_with_http_info(datastore_id, body, opts) + data + end + + # Bulk write datastore items. + # + # Creates or replaces multiple items in a datastore by their keys in a single operation. + # + # @param datastore_id [String] The unique identifier of the datastore to retrieve. + # @param body [BulkPutAppsDatastoreItemsRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(PutAppsDatastoreItemResponseArray, Integer, Hash)>] PutAppsDatastoreItemResponseArray data, response status code and response headers + def bulk_write_datastore_items_with_http_info(datastore_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.bulk_write_datastore_items ...' + end + # verify the required parameter 'datastore_id' is set + if @api_client.config.client_side_validation && datastore_id.nil? + fail ArgumentError, "Missing the required parameter 'datastore_id' when calling ActionsDatastoresAPI.bulk_write_datastore_items" + 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 ActionsDatastoresAPI.bulk_write_datastore_items" + end + # resource path + local_var_path = '/api/v2/actions-datastores/{datastore_id}/items/bulk'.sub('{datastore_id}', CGI.escape(datastore_id.to_s).gsub('%2F', '/')) + + # 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] || 'PutAppsDatastoreItemResponseArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :bulk_write_datastore_items, + :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: ActionsDatastoresAPI#bulk_write_datastore_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create datastore. + # + # @see #create_datastore_with_http_info + def create_datastore(body, opts = {}) + data, _status_code, _headers = create_datastore_with_http_info(body, opts) + data + end + + # Create datastore. + # + # Creates a new datastore. + # + # @param body [CreateAppsDatastoreRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(CreateAppsDatastoreResponse, Integer, Hash)>] CreateAppsDatastoreResponse data, response status code and response headers + def create_datastore_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.create_datastore ...' + 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 ActionsDatastoresAPI.create_datastore" + end + # resource path + local_var_path = '/api/v2/actions-datastores' + + # 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] || 'CreateAppsDatastoreResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_datastore, + :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: ActionsDatastoresAPI#create_datastore\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete datastore. + # + # @see #delete_datastore_with_http_info + def delete_datastore(datastore_id, opts = {}) + delete_datastore_with_http_info(datastore_id, opts) + nil + end + + # Delete datastore. + # + # Deletes a datastore by its unique identifier. + # + # @param datastore_id [String] The unique identifier of the datastore to retrieve. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_datastore_with_http_info(datastore_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.delete_datastore ...' + end + # verify the required parameter 'datastore_id' is set + if @api_client.config.client_side_validation && datastore_id.nil? + fail ArgumentError, "Missing the required parameter 'datastore_id' when calling ActionsDatastoresAPI.delete_datastore" + end + # resource path + local_var_path = '/api/v2/actions-datastores/{datastore_id}'.sub('{datastore_id}', CGI.escape(datastore_id.to_s).gsub('%2F', '/')) + + # 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(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_datastore, + :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::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#delete_datastore\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete datastore item. + # + # @see #delete_datastore_item_with_http_info + def delete_datastore_item(datastore_id, body, opts = {}) + data, _status_code, _headers = delete_datastore_item_with_http_info(datastore_id, body, opts) + data + end + + # Delete datastore item. + # + # Deletes an item from a datastore by its key. + # + # @param datastore_id [String] The unique identifier of the datastore to retrieve. + # @param body [DeleteAppsDatastoreItemRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(DeleteAppsDatastoreItemResponse, Integer, Hash)>] DeleteAppsDatastoreItemResponse data, response status code and response headers + def delete_datastore_item_with_http_info(datastore_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.delete_datastore_item ...' + end + # verify the required parameter 'datastore_id' is set + if @api_client.config.client_side_validation && datastore_id.nil? + fail ArgumentError, "Missing the required parameter 'datastore_id' when calling ActionsDatastoresAPI.delete_datastore_item" + 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 ActionsDatastoresAPI.delete_datastore_item" + end + # resource path + local_var_path = '/api/v2/actions-datastores/{datastore_id}/items'.sub('{datastore_id}', CGI.escape(datastore_id.to_s).gsub('%2F', '/')) + + # 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] || 'DeleteAppsDatastoreItemResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_datastore_item, + :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::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#delete_datastore_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get datastore. + # + # @see #get_datastore_with_http_info + def get_datastore(datastore_id, opts = {}) + data, _status_code, _headers = get_datastore_with_http_info(datastore_id, opts) + data + end + + # Get datastore. + # + # Retrieves a specific datastore by its ID. + # + # @param datastore_id [String] The unique identifier of the datastore to retrieve. + # @param opts [Hash] the optional parameters + # @return [Array<(Datastore, Integer, Hash)>] Datastore data, response status code and response headers + def get_datastore_with_http_info(datastore_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.get_datastore ...' + end + # verify the required parameter 'datastore_id' is set + if @api_client.config.client_side_validation && datastore_id.nil? + fail ArgumentError, "Missing the required parameter 'datastore_id' when calling ActionsDatastoresAPI.get_datastore" + end + # resource path + local_var_path = '/api/v2/actions-datastores/{datastore_id}'.sub('{datastore_id}', CGI.escape(datastore_id.to_s).gsub('%2F', '/')) + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Datastore' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_datastore, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#get_datastore\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List datastore items. + # + # @see #list_datastore_items_with_http_info + def list_datastore_items(datastore_id, opts = {}) + data, _status_code, _headers = list_datastore_items_with_http_info(datastore_id, opts) + data + end + + # List datastore items. + # + # Lists items from a datastore. You can filter the results by specifying either an item key or a filter query parameter, but not both at the same time. Supports server-side pagination for large datasets. + # + # @param datastore_id [String] The unique identifier of the datastore to retrieve. + # @param opts [Hash] the optional parameters + # @option opts [String] :filter Optional query filter to search items using the [logs search syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/). + # @option opts [String] :item_key Optional primary key value to retrieve a specific item. Cannot be used together with the filter parameter. + # @option opts [Integer] :page_limit Optional field to limit the number of items to return per page for pagination. Up to 100 items can be returned per page. + # @option opts [Integer] :page_offset Optional field to offset the number of items to skip from the beginning of the result set for pagination. + # @option opts [String] :sort Optional field to sort results by. Prefix with '-' for descending order (e.g., '-created_at'). + # @return [Array<(ItemApiPayloadArray, Integer, Hash)>] ItemApiPayloadArray data, response status code and response headers + def list_datastore_items_with_http_info(datastore_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.list_datastore_items ...' + end + # verify the required parameter 'datastore_id' is set + if @api_client.config.client_side_validation && datastore_id.nil? + fail ArgumentError, "Missing the required parameter 'datastore_id' when calling ActionsDatastoresAPI.list_datastore_items" + end + if @api_client.config.client_side_validation && !opts[:'item_key'].nil? && opts[:'item_key'].to_s.length > 256 + fail ArgumentError, 'invalid value for "opts[:"item_key"]" when calling ActionsDatastoresAPI.list_datastore_items, the character length must be smaller than or equal to 256.' + end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ActionsDatastoresAPI.list_datastore_items, must be smaller than or equal to 100.' + end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ActionsDatastoresAPI.list_datastore_items, must be greater than or equal to 1.' + end + # resource path + local_var_path = '/api/v2/actions-datastores/{datastore_id}/items'.sub('{datastore_id}', CGI.escape(datastore_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'item_key'] = opts[:'item_key'] if !opts[:'item_key'].nil? + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ItemApiPayloadArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_datastore_items, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#list_datastore_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List datastores. + # + # @see #list_datastores_with_http_info + def list_datastores(opts = {}) + data, _status_code, _headers = list_datastores_with_http_info(opts) + data + end + + # List datastores. + # + # Lists all datastores for the organization. + # + # @param opts [Hash] the optional parameters + # @return [Array<(DatastoreArray, Integer, Hash)>] DatastoreArray data, response status code and response headers + def list_datastores_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.list_datastores ...' + end + # resource path + local_var_path = '/api/v2/actions-datastores' + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DatastoreArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_datastores, + :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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#list_datastores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update datastore. + # + # @see #update_datastore_with_http_info + def update_datastore(datastore_id, body, opts = {}) + data, _status_code, _headers = update_datastore_with_http_info(datastore_id, body, opts) + data + end + + # Update datastore. + # + # Updates an existing datastore's attributes. + # + # @param datastore_id [String] The unique identifier of the datastore to retrieve. + # @param body [UpdateAppsDatastoreRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(Datastore, Integer, Hash)>] Datastore data, response status code and response headers + def update_datastore_with_http_info(datastore_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.update_datastore ...' + end + # verify the required parameter 'datastore_id' is set + if @api_client.config.client_side_validation && datastore_id.nil? + fail ArgumentError, "Missing the required parameter 'datastore_id' when calling ActionsDatastoresAPI.update_datastore" + 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 ActionsDatastoresAPI.update_datastore" + end + # resource path + local_var_path = '/api/v2/actions-datastores/{datastore_id}'.sub('{datastore_id}', CGI.escape(datastore_id.to_s).gsub('%2F', '/')) + + # 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] || 'Datastore' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_datastore, + :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::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#update_datastore\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update datastore item. + # + # @see #update_datastore_item_with_http_info + def update_datastore_item(datastore_id, body, opts = {}) + data, _status_code, _headers = update_datastore_item_with_http_info(datastore_id, body, opts) + data + end + + # Update datastore item. + # + # Partially updates an item in a datastore by its key. + # + # @param datastore_id [String] The unique identifier of the datastore to retrieve. + # @param body [UpdateAppsDatastoreItemRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ItemApiPayload, Integer, Hash)>] ItemApiPayload data, response status code and response headers + def update_datastore_item_with_http_info(datastore_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.update_datastore_item ...' + end + # verify the required parameter 'datastore_id' is set + if @api_client.config.client_side_validation && datastore_id.nil? + fail ArgumentError, "Missing the required parameter 'datastore_id' when calling ActionsDatastoresAPI.update_datastore_item" + 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 ActionsDatastoresAPI.update_datastore_item" + end + # resource path + local_var_path = '/api/v2/actions-datastores/{datastore_id}/items'.sub('{datastore_id}', CGI.escape(datastore_id.to_s).gsub('%2F', '/')) + + # 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] || 'ItemApiPayload' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_datastore_item, + :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::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#update_datastore_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request.rb b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request.rb new file mode 100644 index 000000000000..0cf97062b81e --- /dev/null +++ b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request.rb @@ -0,0 +1,105 @@ +=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 + # Request to insert multiple items into a datastore in a single operation. + class BulkPutAppsDatastoreItemsRequest + include BaseGenericModel + + # Data wrapper containing the items to insert and their configuration for the bulk insert operation. + 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' => :'BulkPutAppsDatastoreItemsRequestData' + } + 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::BulkPutAppsDatastoreItemsRequest` 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/bulk_put_apps_datastore_items_request_data.rb b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data.rb new file mode 100644 index 000000000000..b7b3635c80ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data.rb @@ -0,0 +1,133 @@ +=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 + # Data wrapper containing the items to insert and their configuration for the bulk insert operation. + class BulkPutAppsDatastoreItemsRequestData + include BaseGenericModel + + # Configuration for bulk inserting multiple items into a datastore. + attr_accessor :attributes + + # The resource type for datastore items. + 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' => :'BulkPutAppsDatastoreItemsRequestDataAttributes', + :'type' => :'DatastoreItemsDataType' + } + 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::BulkPutAppsDatastoreItemsRequestData` 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/bulk_put_apps_datastore_items_request_data_attributes.rb b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data_attributes.rb new file mode 100644 index 000000000000..3131010d360c --- /dev/null +++ b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data_attributes.rb @@ -0,0 +1,139 @@ +=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 + # Configuration for bulk inserting multiple items into a datastore. + class BulkPutAppsDatastoreItemsRequestDataAttributes + include BaseGenericModel + + # How to handle conflicts when inserting items that already exist in the datastore. + attr_accessor :conflict_mode + + # An array of items to add to the datastore, where each item is a set of key-value pairs representing the item's data. Up to 100 items can be updated in a single request. + attr_reader :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'conflict_mode' => :'conflict_mode', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'conflict_mode' => :'DatastoreItemConflictMode', + :'values' => :'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::BulkPutAppsDatastoreItemsRequestDataAttributes` 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?(:'conflict_mode') + self.conflict_mode = attributes[:'conflict_mode'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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? + return false if @values.nil? + return false if @values.length > 100 + true + end + + # Custom attribute writer method with validation + # @param values [Object] Object to be assigned + # @!visibility private + def values=(values) + if values.nil? + fail ArgumentError, 'invalid value for "values", values cannot be nil.' + end + if values.length > 100 + fail ArgumentError, 'invalid value for "values", number of items must be less than or equal to 100.' + end + @values = values + 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 && + conflict_mode == o.conflict_mode && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [conflict_mode, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_request.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_request.rb new file mode 100644 index 000000000000..7a78c7f22a58 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_request.rb @@ -0,0 +1,105 @@ +=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 + # Request to create a new datastore with specified configuration and metadata. + class CreateAppsDatastoreRequest + include BaseGenericModel + + # Data wrapper containing the configuration needed to create a new datastore. + 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' => :'CreateAppsDatastoreRequestData' + } + 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::CreateAppsDatastoreRequest` 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/create_apps_datastore_request_data.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data.rb new file mode 100644 index 000000000000..12ec895ee191 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data.rb @@ -0,0 +1,143 @@ +=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 + # Data wrapper containing the configuration needed to create a new datastore. + class CreateAppsDatastoreRequestData + include BaseGenericModel + + # Configuration and metadata to create a new datastore. + attr_accessor :attributes + + # Optional ID for the new datastore. If not provided, one will be generated automatically. + attr_accessor :id + + # The resource type for datastores. + 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateAppsDatastoreRequestDataAttributes', + :'id' => :'String', + :'type' => :'DatastoreDataType' + } + 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::CreateAppsDatastoreRequestData` 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?(:'id') + self.id = attributes[:'id'] + 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 && + id == o.id && + 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, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes.rb new file mode 100644 index 000000000000..290a491c5a8e --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes.rb @@ -0,0 +1,180 @@ +=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 + # Configuration and metadata to create a new datastore. + class CreateAppsDatastoreRequestDataAttributes + include BaseGenericModel + + # A human-readable description about the datastore. + attr_accessor :description + + # The display name for the new datastore. + attr_reader :name + + # The organization access level for the datastore. For example, 'contributor'. + attr_accessor :org_access + + # The name of the primary key column for this datastore. Primary column names: + # - Must abide by both [PostgreSQL naming conventions](https://www.postgresql.org/docs/7.0/syntax525.htm) + # - Cannot exceed 63 characters + attr_reader :primary_column_name + + # Can be set to `uuid` to automatically generate primary keys when new items are added. Default value is `none`, which requires you to supply a primary key for each new item. + attr_accessor :primary_key_generation_strategy + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'org_access' => :'org_access', + :'primary_column_name' => :'primary_column_name', + :'primary_key_generation_strategy' => :'primary_key_generation_strategy' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'name' => :'String', + :'org_access' => :'CreateAppsDatastoreRequestDataAttributesOrgAccess', + :'primary_column_name' => :'String', + :'primary_key_generation_strategy' => :'DatastorePrimaryKeyGenerationStrategy' + } + 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::CreateAppsDatastoreRequestDataAttributes` 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?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'org_access') + self.org_access = attributes[:'org_access'] + end + + if attributes.key?(:'primary_column_name') + self.primary_column_name = attributes[:'primary_column_name'] + end + + if attributes.key?(:'primary_key_generation_strategy') + self.primary_key_generation_strategy = attributes[:'primary_key_generation_strategy'] + 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 @name.nil? + return false if @primary_column_name.nil? + return false if @primary_column_name.to_s.length > 63 + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param primary_column_name [Object] Object to be assigned + # @!visibility private + def primary_column_name=(primary_column_name) + if primary_column_name.nil? + fail ArgumentError, 'invalid value for "primary_column_name", primary_column_name cannot be nil.' + end + if primary_column_name.to_s.length > 63 + fail ArgumentError, 'invalid value for "primary_column_name", the character length must be smaller than or equal to 63.' + end + @primary_column_name = primary_column_name + 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 && + description == o.description && + name == o.name && + org_access == o.org_access && + primary_column_name == o.primary_column_name && + primary_key_generation_strategy == o.primary_key_generation_strategy && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, name, org_access, primary_column_name, primary_key_generation_strategy, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes_org_access.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes_org_access.rb new file mode 100644 index 000000000000..f732010e57d5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes_org_access.rb @@ -0,0 +1,28 @@ +=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 organization access level for the datastore. For example, 'contributor'. + class CreateAppsDatastoreRequestDataAttributesOrgAccess + include BaseEnumModel + + CONTRIBUTOR = "contributor".freeze + VIEWER = "viewer".freeze + MANAGER = "manager".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_response.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_response.rb new file mode 100644 index 000000000000..67ac0e53fd25 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_response.rb @@ -0,0 +1,105 @@ +=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 + # Response after successfully creating a new datastore, containing the datastore's assigned ID. + class CreateAppsDatastoreResponse + include BaseGenericModel + + # The newly created datastore's data. + 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' => :'CreateAppsDatastoreResponseData' + } + 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::CreateAppsDatastoreResponse` 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/create_apps_datastore_response_data.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_response_data.rb new file mode 100644 index 000000000000..41b109e4afe7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_response_data.rb @@ -0,0 +1,133 @@ +=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 newly created datastore's data. + class CreateAppsDatastoreResponseData + include BaseGenericModel + + # The unique identifier assigned to the newly created datastore. + attr_accessor :id + + # The resource type for datastores. + 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'DatastoreDataType' + } + 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::CreateAppsDatastoreResponseData` 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?(:'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 && + 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, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/datastore.rb b/lib/datadog_api_client/v2/models/datastore.rb new file mode 100644 index 000000000000..b395bf01089a --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore.rb @@ -0,0 +1,105 @@ +=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 + # A datastore's complete configuration and metadata. + class Datastore + include BaseGenericModel + + # Core information about a datastore, including its unique identifier and attributes. + 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' => :'DatastoreData' + } + 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::Datastore` 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/datastore_array.rb b/lib/datadog_api_client/v2/models/datastore_array.rb new file mode 100644 index 000000000000..e6c76cd9bf3b --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_array.rb @@ -0,0 +1,125 @@ +=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 + # A collection of datastores returned by list operations. + class DatastoreArray + include BaseGenericModel + + # An array of datastore objects containing their configurations and metadata. + attr_reader :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::DatastoreArray` 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 + + # 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + 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/datastore_data.rb b/lib/datadog_api_client/v2/models/datastore_data.rb new file mode 100644 index 000000000000..6ab2f03759b8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_data.rb @@ -0,0 +1,143 @@ +=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 + # Core information about a datastore, including its unique identifier and attributes. + class DatastoreData + include BaseGenericModel + + # Detailed information about a datastore. + attr_accessor :attributes + + # The unique identifier of the datastore. + attr_accessor :id + + # The resource type for datastores. + 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DatastoreDataAttributes', + :'id' => :'String', + :'type' => :'DatastoreDataType' + } + 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::DatastoreData` 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?(:'id') + self.id = attributes[:'id'] + 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 && + id == o.id && + 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, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/datastore_data_attributes.rb b/lib/datadog_api_client/v2/models/datastore_data_attributes.rb new file mode 100644 index 000000000000..a0d2d5b0ee19 --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_data_attributes.rb @@ -0,0 +1,205 @@ +=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 + # Detailed information about a datastore. + class DatastoreDataAttributes + include BaseGenericModel + + # Timestamp when the datastore was created. + attr_accessor :created_at + + # The numeric ID of the user who created the datastore. + attr_accessor :creator_user_id + + # The UUID of the user who created the datastore. + attr_accessor :creator_user_uuid + + # A human-readable description about the datastore. + attr_accessor :description + + # Timestamp when the datastore was last modified. + attr_accessor :modified_at + + # The display name of the datastore. + attr_accessor :name + + # The ID of the organization that owns this datastore. + attr_accessor :org_id + + # The name of the primary key column for this datastore. Primary column names: + # - Must abide by both [PostgreSQL naming conventions](https://www.postgresql.org/docs/7.0/syntax525.htm) + # - Cannot exceed 63 characters + attr_reader :primary_column_name + + # Can be set to `uuid` to automatically generate primary keys when new items are added. Default value is `none`, which requires you to supply a primary key for each new item. + attr_accessor :primary_key_generation_strategy + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'creator_user_id' => :'creator_user_id', + :'creator_user_uuid' => :'creator_user_uuid', + :'description' => :'description', + :'modified_at' => :'modified_at', + :'name' => :'name', + :'org_id' => :'org_id', + :'primary_column_name' => :'primary_column_name', + :'primary_key_generation_strategy' => :'primary_key_generation_strategy' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'creator_user_id' => :'Integer', + :'creator_user_uuid' => :'String', + :'description' => :'String', + :'modified_at' => :'Time', + :'name' => :'String', + :'org_id' => :'Integer', + :'primary_column_name' => :'String', + :'primary_key_generation_strategy' => :'DatastorePrimaryKeyGenerationStrategy' + } + 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::DatastoreDataAttributes` 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'creator_user_id') + self.creator_user_id = attributes[:'creator_user_id'] + end + + if attributes.key?(:'creator_user_uuid') + self.creator_user_uuid = attributes[:'creator_user_uuid'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'org_id') + self.org_id = attributes[:'org_id'] + end + + if attributes.key?(:'primary_column_name') + self.primary_column_name = attributes[:'primary_column_name'] + end + + if attributes.key?(:'primary_key_generation_strategy') + self.primary_key_generation_strategy = attributes[:'primary_key_generation_strategy'] + 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 !@primary_column_name.nil? && @primary_column_name.to_s.length > 63 + true + end + + # Custom attribute writer method with validation + # @param primary_column_name [Object] Object to be assigned + # @!visibility private + def primary_column_name=(primary_column_name) + if !primary_column_name.nil? && primary_column_name.to_s.length > 63 + fail ArgumentError, 'invalid value for "primary_column_name", the character length must be smaller than or equal to 63.' + end + @primary_column_name = primary_column_name + 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 && + created_at == o.created_at && + creator_user_id == o.creator_user_id && + creator_user_uuid == o.creator_user_uuid && + description == o.description && + modified_at == o.modified_at && + name == o.name && + org_id == o.org_id && + primary_column_name == o.primary_column_name && + primary_key_generation_strategy == o.primary_key_generation_strategy && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, creator_user_id, creator_user_uuid, description, modified_at, name, org_id, primary_column_name, primary_key_generation_strategy, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/datastore_data_type.rb b/lib/datadog_api_client/v2/models/datastore_data_type.rb new file mode 100644 index 000000000000..7b35568911d5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_data_type.rb @@ -0,0 +1,26 @@ +=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 resource type for datastores. + class DatastoreDataType + include BaseEnumModel + + DATASTORES = "datastores".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/datastore_item_conflict_mode.rb b/lib/datadog_api_client/v2/models/datastore_item_conflict_mode.rb new file mode 100644 index 000000000000..f749ccc933c3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_item_conflict_mode.rb @@ -0,0 +1,27 @@ +=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 + # How to handle conflicts when inserting items that already exist in the datastore. + class DatastoreItemConflictMode + include BaseEnumModel + + FAIL_ON_CONFLICT = "fail_on_conflict".freeze + OVERWRITE_ON_CONFLICT = "overwrite_on_conflict".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/datastore_items_data_type.rb b/lib/datadog_api_client/v2/models/datastore_items_data_type.rb new file mode 100644 index 000000000000..7ef623ca5b74 --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_items_data_type.rb @@ -0,0 +1,26 @@ +=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 resource type for datastore items. + class DatastoreItemsDataType + include BaseEnumModel + + ITEMS = "items".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/datastore_primary_key_generation_strategy.rb b/lib/datadog_api_client/v2/models/datastore_primary_key_generation_strategy.rb new file mode 100644 index 000000000000..6e4826d2692c --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_primary_key_generation_strategy.rb @@ -0,0 +1,27 @@ +=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 + # Can be set to `uuid` to automatically generate primary keys when new items are added. Default value is `none`, which requires you to supply a primary key for each new item. + class DatastorePrimaryKeyGenerationStrategy + include BaseEnumModel + + NONE = "none".freeze + UUID = "uuid".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request.rb b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request.rb new file mode 100644 index 000000000000..4c73fa1887c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request.rb @@ -0,0 +1,105 @@ +=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 + # Request to delete a specific item from a datastore by its primary key. + class DeleteAppsDatastoreItemRequest + include BaseGenericModel + + # Data wrapper containing the information needed to identify and delete a specific datastore item. + 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' => :'DeleteAppsDatastoreItemRequestData' + } + 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::DeleteAppsDatastoreItemRequest` 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/delete_apps_datastore_item_request_data.rb b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data.rb new file mode 100644 index 000000000000..ed1d2660b335 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data.rb @@ -0,0 +1,133 @@ +=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 + # Data wrapper containing the information needed to identify and delete a specific datastore item. + class DeleteAppsDatastoreItemRequestData + include BaseGenericModel + + # Attributes specifying which datastore item to delete by its primary key. + attr_accessor :attributes + + # The resource type for datastore items. + 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' => :'DeleteAppsDatastoreItemRequestDataAttributes', + :'type' => :'DatastoreItemsDataType' + } + 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::DeleteAppsDatastoreItemRequestData` 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/delete_apps_datastore_item_request_data_attributes.rb b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data_attributes.rb new file mode 100644 index 000000000000..ebcebaf1dd32 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data_attributes.rb @@ -0,0 +1,137 @@ +=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 + # Attributes specifying which datastore item to delete by its primary key. + class DeleteAppsDatastoreItemRequestDataAttributes + include BaseGenericModel + + # Optional unique identifier of the item to delete. + attr_accessor :id + + # The primary key value that identifies the item to delete. Cannot exceed 256 characters. + attr_reader :item_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'item_key' => :'item_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'item_key' => :'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::DeleteAppsDatastoreItemRequestDataAttributes` 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?(:'item_key') + self.item_key = attributes[:'item_key'] + 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 @item_key.nil? + return false if @item_key.to_s.length > 256 + true + end + + # Custom attribute writer method with validation + # @param item_key [Object] Object to be assigned + # @!visibility private + def item_key=(item_key) + if item_key.nil? + fail ArgumentError, 'invalid value for "item_key", item_key cannot be nil.' + end + if item_key.to_s.length > 256 + fail ArgumentError, 'invalid value for "item_key", the character length must be smaller than or equal to 256.' + end + @item_key = item_key + 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 && + item_key == o.item_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, item_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response.rb b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response.rb new file mode 100644 index 000000000000..4668b62acae1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response.rb @@ -0,0 +1,105 @@ +=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 + # Response from successfully deleting a datastore item. + class DeleteAppsDatastoreItemResponse + include BaseGenericModel + + # Data containing the identifier of the datastore item that was successfully deleted. + 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' => :'DeleteAppsDatastoreItemResponseData' + } + 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::DeleteAppsDatastoreItemResponse` 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/delete_apps_datastore_item_response_data.rb b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_data.rb new file mode 100644 index 000000000000..b702e2b65c61 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_data.rb @@ -0,0 +1,133 @@ +=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 + # Data containing the identifier of the datastore item that was successfully deleted. + class DeleteAppsDatastoreItemResponseData + include BaseGenericModel + + # The unique identifier of the item that was deleted. + attr_accessor :id + + # The resource type for datastore items. + 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'DatastoreItemsDataType' + } + 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::DeleteAppsDatastoreItemResponseData` 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?(:'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 && + 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, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/item_api_payload.rb b/lib/datadog_api_client/v2/models/item_api_payload.rb new file mode 100644 index 000000000000..2ddc6cde7568 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload.rb @@ -0,0 +1,105 @@ +=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 + # A single datastore item with its content and metadata. + class ItemApiPayload + include BaseGenericModel + + # Core data and metadata for a single datastore item. + 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' => :'ItemApiPayloadData' + } + 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::ItemApiPayload` 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/item_api_payload_array.rb b/lib/datadog_api_client/v2/models/item_api_payload_array.rb new file mode 100644 index 000000000000..7d533cf6269e --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_array.rb @@ -0,0 +1,139 @@ +=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 + # A collection of datastore items with pagination and schema metadata. + class ItemApiPayloadArray + include BaseGenericModel + + # An array of datastore items with their content and metadata. + attr_reader :data + + # Additional metadata about a collection of datastore items, including pagination and schema information. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'ItemApiPayloadMeta' + } + 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::ItemApiPayloadArray` 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 @data.nil? + return false if @data.length > 100 + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + if data.length > 100 + fail ArgumentError, 'invalid value for "data", number of items must be less than or equal to 100.' + end + @data = data + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/item_api_payload_data.rb b/lib/datadog_api_client/v2/models/item_api_payload_data.rb new file mode 100644 index 000000000000..2e9bfccdb32e --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_data.rb @@ -0,0 +1,143 @@ +=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 + # Core data and metadata for a single datastore item. + class ItemApiPayloadData + include BaseGenericModel + + # Metadata and content of a datastore item. + attr_accessor :attributes + + # The unique identifier of the datastore. + attr_accessor :id + + # The resource type for datastore items. + 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ItemApiPayloadDataAttributes', + :'id' => :'String', + :'type' => :'DatastoreItemsDataType' + } + 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::ItemApiPayloadData` 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?(:'id') + self.id = attributes[:'id'] + 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 && + id == o.id && + 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, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/item_api_payload_data_attributes.rb b/lib/datadog_api_client/v2/models/item_api_payload_data_attributes.rb new file mode 100644 index 000000000000..3aa2443b91a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_data_attributes.rb @@ -0,0 +1,185 @@ +=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 + # Metadata and content of a datastore item. + class ItemApiPayloadDataAttributes + include BaseGenericModel + + # Timestamp when the item was first created. + attr_accessor :created_at + + # Timestamp when the item was last modified. + attr_accessor :modified_at + + # The ID of the organization that owns this item. + attr_accessor :org_id + + # The name of the primary key column for this datastore. Primary column names: + # - Must abide by both [PostgreSQL naming conventions](https://www.postgresql.org/docs/7.0/syntax525.htm) + # - Cannot exceed 63 characters + attr_reader :primary_column_name + + # A unique signature identifying this item version. + attr_accessor :signature + + # The unique identifier of the datastore containing this item. + attr_accessor :store_id + + # The data content (as key-value pairs) of a datastore item. + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'modified_at' => :'modified_at', + :'org_id' => :'org_id', + :'primary_column_name' => :'primary_column_name', + :'signature' => :'signature', + :'store_id' => :'store_id', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'modified_at' => :'Time', + :'org_id' => :'Integer', + :'primary_column_name' => :'String', + :'signature' => :'String', + :'store_id' => :'String', + :'value' => :'Hash' + } + 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::ItemApiPayloadDataAttributes` 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?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'org_id') + self.org_id = attributes[:'org_id'] + end + + if attributes.key?(:'primary_column_name') + self.primary_column_name = attributes[:'primary_column_name'] + end + + if attributes.key?(:'signature') + self.signature = attributes[:'signature'] + end + + if attributes.key?(:'store_id') + self.store_id = attributes[:'store_id'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + 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 !@primary_column_name.nil? && @primary_column_name.to_s.length > 63 + true + end + + # Custom attribute writer method with validation + # @param primary_column_name [Object] Object to be assigned + # @!visibility private + def primary_column_name=(primary_column_name) + if !primary_column_name.nil? && primary_column_name.to_s.length > 63 + fail ArgumentError, 'invalid value for "primary_column_name", the character length must be smaller than or equal to 63.' + end + @primary_column_name = primary_column_name + 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 && + created_at == o.created_at && + modified_at == o.modified_at && + org_id == o.org_id && + primary_column_name == o.primary_column_name && + signature == o.signature && + store_id == o.store_id && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, modified_at, org_id, primary_column_name, signature, store_id, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/item_api_payload_meta.rb b/lib/datadog_api_client/v2/models/item_api_payload_meta.rb new file mode 100644 index 000000000000..f4897c224d80 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_meta.rb @@ -0,0 +1,115 @@ +=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 + # Additional metadata about a collection of datastore items, including pagination and schema information. + class ItemApiPayloadMeta + include BaseGenericModel + + # Pagination information for a collection of datastore items. + attr_accessor :page + + # Schema information about the datastore, including its primary key and field definitions. + attr_accessor :schema + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page', + :'schema' => :'schema' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'ItemApiPayloadMetaPage', + :'schema' => :'ItemApiPayloadMetaSchema' + } + 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::ItemApiPayloadMeta` 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?(:'page') + self.page = attributes[:'page'] + end + + if attributes.key?(:'schema') + self.schema = attributes[:'schema'] + 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 && + page == o.page && + schema == o.schema && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, schema, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/item_api_payload_meta_page.rb b/lib/datadog_api_client/v2/models/item_api_payload_meta_page.rb new file mode 100644 index 000000000000..edc57bc62f21 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_meta_page.rb @@ -0,0 +1,125 @@ +=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 + # Pagination information for a collection of datastore items. + class ItemApiPayloadMetaPage + include BaseGenericModel + + # Whether there are additional pages of items beyond the current page. + attr_accessor :has_more + + # The total number of items in the datastore, ignoring any filters. + attr_accessor :total_count + + # The total number of items that match the current filter criteria. + attr_accessor :total_filtered_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'has_more' => :'hasMore', + :'total_count' => :'totalCount', + :'total_filtered_count' => :'totalFilteredCount' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'has_more' => :'Boolean', + :'total_count' => :'Integer', + :'total_filtered_count' => :'Integer' + } + 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::ItemApiPayloadMetaPage` 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?(:'has_more') + self.has_more = attributes[:'has_more'] + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + + if attributes.key?(:'total_filtered_count') + self.total_filtered_count = attributes[:'total_filtered_count'] + 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 && + has_more == o.has_more && + total_count == o.total_count && + total_filtered_count == o.total_filtered_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [has_more, total_count, total_filtered_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/item_api_payload_meta_schema.rb b/lib/datadog_api_client/v2/models/item_api_payload_meta_schema.rb new file mode 100644 index 000000000000..fd720b861449 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_meta_schema.rb @@ -0,0 +1,117 @@ +=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 + # Schema information about the datastore, including its primary key and field definitions. + class ItemApiPayloadMetaSchema + include BaseGenericModel + + # An array describing the columns available in this datastore. + attr_accessor :fields + + # The name of the primary key column for this datastore. + attr_accessor :primary_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fields' => :'fields', + :'primary_key' => :'primary_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fields' => :'Array', + :'primary_key' => :'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::ItemApiPayloadMetaSchema` 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?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + end + + if attributes.key?(:'primary_key') + self.primary_key = attributes[:'primary_key'] + 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 && + fields == o.fields && + primary_key == o.primary_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fields, primary_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/item_api_payload_meta_schema_field.rb b/lib/datadog_api_client/v2/models/item_api_payload_meta_schema_field.rb new file mode 100644 index 000000000000..4439cff94bf9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_meta_schema_field.rb @@ -0,0 +1,144 @@ +=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 + # Information about a specific column in the datastore schema. + class ItemApiPayloadMetaSchemaField + include BaseGenericModel + + # The name of this column in the datastore. + attr_reader :name + + # The data type of this column. For example, 'string', 'number', or 'boolean'. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'type' => :'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::ItemApiPayloadMetaSchemaField` 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?(:'name') + self.name = attributes[:'name'] + 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 @name.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + 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 && + name == o.name && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_array.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_array.rb new file mode 100644 index 000000000000..0fde95f1af77 --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_array.rb @@ -0,0 +1,129 @@ +=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 + # Response after successfully inserting multiple items into a datastore, containing the identifiers of the created items. + class PutAppsDatastoreItemResponseArray + include BaseGenericModel + + # An array of data objects containing the identifiers of the successfully inserted items. + attr_reader :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::PutAppsDatastoreItemResponseArray` 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 + + # 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 @data.nil? + return false if @data.length > 100 + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + if data.length > 100 + fail ArgumentError, 'invalid value for "data", number of items must be less than or equal to 100.' + end + @data = data + 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/put_apps_datastore_item_response_data.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_data.rb new file mode 100644 index 000000000000..dab26be16d3e --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_data.rb @@ -0,0 +1,133 @@ +=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 + # Data containing the identifier of a single item that was successfully inserted into the datastore. + class PutAppsDatastoreItemResponseData + include BaseGenericModel + + # The unique identifier assigned to the inserted item. + attr_accessor :id + + # The resource type for datastore items. + 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'DatastoreItemsDataType' + } + 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::PutAppsDatastoreItemResponseData` 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?(:'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 && + 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, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_apps_datastore_item_request.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request.rb new file mode 100644 index 000000000000..7e446efa2ca4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request.rb @@ -0,0 +1,105 @@ +=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 + # Request to update specific fields on an existing datastore item. + class UpdateAppsDatastoreItemRequest + include BaseGenericModel + + # Data wrapper containing the item identifier and the changes to apply during the update operation. + 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' => :'UpdateAppsDatastoreItemRequestData' + } + 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::UpdateAppsDatastoreItemRequest` 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/update_apps_datastore_item_request_data.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data.rb new file mode 100644 index 000000000000..fad450dab075 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data.rb @@ -0,0 +1,143 @@ +=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 + # Data wrapper containing the item identifier and the changes to apply during the update operation. + class UpdateAppsDatastoreItemRequestData + include BaseGenericModel + + # Attributes for updating a datastore item, including the item key and changes to apply. + attr_accessor :attributes + + # The unique identifier of the datastore item. + attr_accessor :id + + # The resource type for datastore items. + 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'UpdateAppsDatastoreItemRequestDataAttributes', + :'id' => :'String', + :'type' => :'UpdateAppsDatastoreItemRequestDataType' + } + 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::UpdateAppsDatastoreItemRequestData` 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?(:'id') + self.id = attributes[:'id'] + 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 && + id == o.id && + 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, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes.rb new file mode 100644 index 000000000000..319f491305b0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes.rb @@ -0,0 +1,158 @@ +=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 + # Attributes for updating a datastore item, including the item key and changes to apply. + class UpdateAppsDatastoreItemRequestDataAttributes + include BaseGenericModel + + # The unique identifier of the item being updated. + attr_accessor :id + + # Changes to apply to a datastore item using set operations. + attr_reader :item_changes + + # The primary key that identifies the item to update. Cannot exceed 256 characters. + attr_reader :item_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'item_changes' => :'item_changes', + :'item_key' => :'item_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'item_changes' => :'UpdateAppsDatastoreItemRequestDataAttributesItemChanges', + :'item_key' => :'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::UpdateAppsDatastoreItemRequestDataAttributes` 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?(:'item_changes') + self.item_changes = attributes[:'item_changes'] + end + + if attributes.key?(:'item_key') + self.item_key = attributes[:'item_key'] + 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 @item_changes.nil? + return false if @item_key.nil? + return false if @item_key.to_s.length > 256 + true + end + + # Custom attribute writer method with validation + # @param item_changes [Object] Object to be assigned + # @!visibility private + def item_changes=(item_changes) + if item_changes.nil? + fail ArgumentError, 'invalid value for "item_changes", item_changes cannot be nil.' + end + @item_changes = item_changes + end + + # Custom attribute writer method with validation + # @param item_key [Object] Object to be assigned + # @!visibility private + def item_key=(item_key) + if item_key.nil? + fail ArgumentError, 'invalid value for "item_key", item_key cannot be nil.' + end + if item_key.to_s.length > 256 + fail ArgumentError, 'invalid value for "item_key", the character length must be smaller than or equal to 256.' + end + @item_key = item_key + 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 && + item_changes == o.item_changes && + item_key == o.item_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, item_changes, item_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes_item_changes.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes_item_changes.rb new file mode 100644 index 000000000000..1e524afa16b9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_attributes_item_changes.rb @@ -0,0 +1,105 @@ +=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 + # Changes to apply to a datastore item using set operations. + class UpdateAppsDatastoreItemRequestDataAttributesItemChanges + include BaseGenericModel + + # Set operation that contains key-value pairs to set on the datastore item. + attr_accessor :ops_set + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'ops_set' => :'ops_set' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'ops_set' => :'Hash' + } + 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::UpdateAppsDatastoreItemRequestDataAttributesItemChanges` 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?(:'ops_set') + self.ops_set = attributes[:'ops_set'] + 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 && + ops_set == o.ops_set && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [ops_set, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_type.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_type.rb new file mode 100644 index 000000000000..e8ea0d796093 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_item_request_data_type.rb @@ -0,0 +1,26 @@ +=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 resource type for datastore items. + class UpdateAppsDatastoreItemRequestDataType + include BaseEnumModel + + ITEMS = "items".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/update_apps_datastore_request.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_request.rb new file mode 100644 index 000000000000..8b71dc750199 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_request.rb @@ -0,0 +1,105 @@ +=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 + # Request to update a datastore's configuration such as its name or description. + class UpdateAppsDatastoreRequest + include BaseGenericModel + + # Data wrapper containing the datastore identifier and the attributes to update. + 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' => :'UpdateAppsDatastoreRequestData' + } + 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::UpdateAppsDatastoreRequest` 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/update_apps_datastore_request_data.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_request_data.rb new file mode 100644 index 000000000000..60f33b01e35e --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_request_data.rb @@ -0,0 +1,143 @@ +=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 + # Data wrapper containing the datastore identifier and the attributes to update. + class UpdateAppsDatastoreRequestData + include BaseGenericModel + + # Attributes that can be updated on a datastore. + attr_accessor :attributes + + # The unique identifier of the datastore to update. + attr_accessor :id + + # The resource type for datastores. + 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'UpdateAppsDatastoreRequestDataAttributes', + :'id' => :'String', + :'type' => :'DatastoreDataType' + } + 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::UpdateAppsDatastoreRequestData` 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?(:'id') + self.id = attributes[:'id'] + 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 && + id == o.id && + 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, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_attributes.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_attributes.rb new file mode 100644 index 000000000000..e98ae2b792c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_attributes.rb @@ -0,0 +1,115 @@ +=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 + # Attributes that can be updated on a datastore. + class UpdateAppsDatastoreRequestDataAttributes + include BaseGenericModel + + # A human-readable description about the datastore. + attr_accessor :description + + # The display name of the datastore. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'name' => :'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::UpdateAppsDatastoreRequestDataAttributes` 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?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 && + description == o.description && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, name, additional_properties].hash + end + end +end