diff --git a/.generated-info b/.generated-info index 8623329320a1..7edb0b5e1bed 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "8001cbb", - "generated": "2025-08-13 20:27:07.288" + "spec_repo_commit": "7029440", + "generated": "2025-08-15 03:44:03.200" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5ab5923ba83d..b16005c865b5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5650,6 +5650,46 @@ components: type: $ref: '#/components/schemas/FindingType' type: object + BulkPutAppsDatastoreItemsRequest: + description: The definition of `BulkPutAppsDatastoreItemsRequest` object. + properties: + data: + $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequestData' + type: object + BulkPutAppsDatastoreItemsRequestData: + description: The definition of `BulkPutAppsDatastoreItemsRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequestDataAttributes' + id: + description: The `BulkPutAppsDatastoreItemsRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequestDataType' + required: + - type + type: object + BulkPutAppsDatastoreItemsRequestDataAttributes: + description: The definition of `BulkPutAppsDatastoreItemsRequestDataAttributes` + object. + properties: + conflict_mode: + description: The `attributes` `conflict_mode`. + type: string + values: + $ref: '#/components/schemas/DatastoreItemValues' + required: + - values + type: object + BulkPutAppsDatastoreItemsRequestDataType: + default: items + description: Items resource type. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS CIAppAggregateBucketValue: description: A bucket value, can either be a timeseries or a single value. oneOf: @@ -10609,6 +10649,185 @@ components: - id - type type: object + CreateAppsDatastoreFromImportRequest: + description: The definition of `CreateAppsDatastoreFromImportRequest` object. + properties: + data: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportRequestData' + type: object + CreateAppsDatastoreFromImportRequestData: + description: The definition of `CreateAppsDatastoreFromImportRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportRequestDataAttributes' + id: + description: The `CreateAppsDatastoreFromImportRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportRequestDataType' + required: + - type + type: object + CreateAppsDatastoreFromImportRequestDataAttributes: + description: The definition of `CreateAppsDatastoreFromImportRequestDataAttributes` + object. + properties: + description: + description: The `attributes` `description`. + type: string + name: + description: The `attributes` `name`. + example: datastore-name + type: string + org_access: + description: The `attributes` `org_access`. + type: string + primary_column_name: + description: The `attributes` `primary_column_name`. + example: primaryKey + type: string + primary_key_generation_strategy: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportRequestDataAttributesPrimaryKeyGenerationStrategy' + values: + $ref: '#/components/schemas/DatastoreItemValues' + required: + - name + - primary_column_name + - values + type: object + CreateAppsDatastoreFromImportRequestDataAttributesPrimaryKeyGenerationStrategy: + description: The `attributes` `primary_key_generation_strategy`. + enum: + - none + - uuid + type: string + x-enum-varnames: + - NONE + - UUID + CreateAppsDatastoreFromImportRequestDataType: + default: datastores + description: Datastores resource type. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES + CreateAppsDatastoreFromImportResponse: + description: The definition of `CreateAppsDatastoreFromImportResponse` object. + properties: + data: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportResponseData' + type: object + CreateAppsDatastoreFromImportResponseData: + description: The definition of `CreateAppsDatastoreFromImportResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportResponseDataAttributes' + id: + description: The `CreateAppsDatastoreFromImportResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportResponseDataType' + required: + - type + type: object + CreateAppsDatastoreFromImportResponseDataAttributes: + description: The definition of `CreateAppsDatastoreFromImportResponseDataAttributes` + object. + properties: + item_count: + description: The `attributes` `item_count`. + format: int64 + type: integer + type: object + CreateAppsDatastoreFromImportResponseDataType: + default: datastores + description: Datastores resource type. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES + CreateAppsDatastoreRequest: + description: The definition of `CreateAppsDatastoreRequest` object. + properties: + data: + $ref: '#/components/schemas/CreateAppsDatastoreRequestData' + type: object + CreateAppsDatastoreRequestData: + description: The definition of `CreateAppsDatastoreRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateAppsDatastoreRequestDataAttributes' + id: + description: The `CreateAppsDatastoreRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/CreateAppsDatastoreRequestDataType' + required: + - type + type: object + CreateAppsDatastoreRequestDataAttributes: + description: The definition of `CreateAppsDatastoreRequestDataAttributes` object. + properties: + description: + description: The `attributes` `description`. + type: string + name: + description: The `attributes` `name`. + example: datastore-name + type: string + org_access: + description: The `attributes` `org_access`. + type: string + primary_column_name: + description: The `attributes` `primary_column_name`. + example: primaryKey + type: string + primary_key_generation_strategy: + description: The `attributes` `primary_key_generation_strategy`. + type: string + required: + - name + - primary_column_name + type: object + CreateAppsDatastoreRequestDataType: + default: datastores + description: Datastores resource type. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES + CreateAppsDatastoreResponse: + description: The definition of `CreateAppsDatastoreResponse` object. + properties: + data: + $ref: '#/components/schemas/CreateAppsDatastoreResponseData' + type: object + CreateAppsDatastoreResponseData: + description: The definition of `CreateAppsDatastoreResponseData` object. + properties: + id: + description: The `CreateAppsDatastoreResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/CreateAppsDatastoreResponseDataType' + required: + - type + type: object + CreateAppsDatastoreResponseDataType: + default: datastores + description: Datastores resource type. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES CreateCustomFrameworkRequest: description: Request object to create a custom framework. properties: @@ -13315,6 +13534,100 @@ components: required: - data type: object + Datastore: + description: The definition of `Datastore` object. + properties: + data: + $ref: '#/components/schemas/DatastoreData' + type: object + DatastoreArray: + description: The definition of `DatastoreArray` object. + properties: + data: + description: The `DatastoreArray` `data`. + items: + $ref: '#/components/schemas/DatastoreData' + type: array + required: + - data + type: object + DatastoreData: + description: The definition of `DatastoreData` object. + properties: + attributes: + $ref: '#/components/schemas/DatastoreDataAttributes' + id: + description: The `DatastoreData` `id`. + type: string + type: + $ref: '#/components/schemas/DatastoreDataType' + required: + - type + type: object + DatastoreDataAttributes: + description: The definition of `DatastoreDataAttributes` object. + properties: + created_at: + description: The `attributes` `created_at`. + format: date-time + type: string + creator_user_id: + description: The `attributes` `creator_user_id`. + format: int64 + type: integer + creator_user_uuid: + description: The `attributes` `creator_user_uuid`. + type: string + description: + description: The `attributes` `description`. + type: string + modified_at: + description: The `attributes` `modified_at`. + format: date-time + type: string + name: + description: The `attributes` `name`. + type: string + org_id: + description: The `attributes` `org_id`. + format: int64 + type: integer + primary_column_name: + description: The `attributes` `primary_column_name`. + type: string + primary_key_generation_strategy: + $ref: '#/components/schemas/DatastoreDataAttributesPrimaryKeyGenerationStrategy' + type: object + DatastoreDataAttributesPrimaryKeyGenerationStrategy: + description: The `attributes` `primary_key_generation_strategy`. + enum: + - none + - uuid + type: string + x-enum-varnames: + - NONE + - UUID + DatastoreDataType: + default: datastores + description: Datastores resource type. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES + DatastoreItemValues: + description: The `attributes` `values`. + example: + - data: example data + key: value + - data: example data2 + key: value2 + items: + additionalProperties: {} + description: Item values to add to the datastore. + type: object + type: array Date: description: Date as Unix timestamp in milliseconds. example: 1722439510282 @@ -13340,6 +13653,101 @@ components: - id - type type: object + DeleteAppsDatastoreItemRequest: + description: The definition of `DeleteAppsDatastoreItemRequest` object. + properties: + data: + $ref: '#/components/schemas/DeleteAppsDatastoreItemRequestData' + type: object + DeleteAppsDatastoreItemRequestData: + description: The definition of `DeleteAppsDatastoreItemRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/DeleteAppsDatastoreItemRequestDataAttributes' + id: + description: The `DeleteAppsDatastoreItemRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/DeleteAppsDatastoreItemRequestDataType' + required: + - type + type: object + DeleteAppsDatastoreItemRequestDataAttributes: + description: The definition of `DeleteAppsDatastoreItemRequestDataAttributes` + object. + properties: + id: + description: The `item` `id`. + example: a7656bcc-51d4-4884-adf7-4d0d9a3e0633 + type: string + item_key: + description: The `attributes` `item_key`. + example: primaryKey + type: string + required: + - item_key + type: object + DeleteAppsDatastoreItemRequestDataType: + default: items + description: Items resource type. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS + DeleteAppsDatastoreItemResponse: + description: The definition of `DeleteAppsDatastoreItemResponse` object. + properties: + data: + $ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData' + type: object + DeleteAppsDatastoreItemResponseData: + description: The definition of `DeleteAppsDatastoreItemResponseData` object. + properties: + id: + description: The `DeleteAppsDatastoreItemResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/DeleteAppsDatastoreItemResponseDataType' + required: + - type + type: object + DeleteAppsDatastoreItemResponseDataType: + default: items + description: Items resource type. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS + DeleteAppsDatastoreResponse: + description: The definition of `DeleteAppsDatastoreResponse` object. + properties: + data: + $ref: '#/components/schemas/DeleteAppsDatastoreResponseData' + type: object + DeleteAppsDatastoreResponseData: + description: The definition of `DeleteAppsDatastoreResponseData` object. + properties: + id: + description: The `DeleteAppsDatastoreResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/DeleteAppsDatastoreResponseDataType' + required: + - type + type: object + DeleteAppsDatastoreResponseDataType: + default: datastores + description: Datastores resource type. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES DeleteAppsRequest: description: A request object for deleting multiple apps by ID. example: @@ -21321,6 +21729,133 @@ components: - DOWN - WARNING - 'OFF' + ItemApiPayloadArray: + description: The definition of `ItemApiPayloadArray` object. + properties: + data: + description: The `ItemApiPayloadArray` `data`. + items: + $ref: '#/components/schemas/ItemApiPayloadData' + type: array + meta: + $ref: '#/components/schemas/ItemApiPayloadMeta' + description: Metadata about the `ItemApiPayloadArray`. + required: + - data + type: object + ItemApiPayloadData: + description: The definition of `ItemApiPayloadData` object. + properties: + attributes: + $ref: '#/components/schemas/ItemApiPayloadDataAttributes' + id: + description: The `ItemApiPayloadData` `id`. + type: string + type: + $ref: '#/components/schemas/ItemApiPayloadDataType' + required: + - type + type: object + ItemApiPayloadDataAttributes: + description: The definition of `ItemApiPayloadDataAttributes` object. + properties: + created_at: + description: The `attributes` `created_at`. + format: date-time + type: string + modified_at: + description: The `attributes` `modified_at`. + format: date-time + type: string + org_id: + description: The `attributes` `org_id`. + format: int64 + type: integer + primary_column_name: + description: The `attributes` `primary_column_name`. + type: string + signature: + description: The `attributes` `signature`. + type: string + store_id: + description: The `attributes` `store_id`. + type: string + value: + $ref: '#/components/schemas/ItemApiPayloadDataAttributesValue' + type: object + ItemApiPayloadDataAttributesValue: + additionalProperties: {} + description: The `attributes` `value`. + type: object + ItemApiPayloadDataType: + default: items + description: Items resource type. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS + ItemApiPayloadMeta: + description: The definition of `ItemApiPayloadMeta` object. + properties: + page: + $ref: '#/components/schemas/ItemApiPayloadMetaPage' + schema: + $ref: '#/components/schemas/ItemApiPayloadMetaSchema' + type: object + ItemApiPayloadMetaPage: + description: The definition of `ItemApiPayloadMetaPage` object. + properties: + hasMore: + description: The `ItemApiPayloadMeta` `hasMore`. + type: boolean + totalCount: + description: The `ItemApiPayloadMeta` `totalCount`. + format: int64 + type: integer + totalFilteredCount: + description: The `ItemApiPayloadMeta` `totalFilteredCount`. + format: int64 + type: integer + type: object + ItemApiPayloadMetaSchema: + description: The definition of `ItemApiPayloadMetaSchema` object. + properties: + fields: + description: The `ItemApiPayloadMetaSchema` `fields`. + items: + $ref: '#/components/schemas/ItemApiPayloadMetaSchemaField' + type: array + primary_key: + description: The `ItemApiPayloadMetaSchema` `primary_key`. + type: string + type: object + ItemApiPayloadMetaSchemaField: + description: The definition of `ItemApiPayloadMetaSchemaField` object. + properties: + name: + description: The `ItemApiPayloadMetaSchemaField` `name`. + example: '' + type: string + type: + description: The `ItemApiPayloadMetaSchemaField` `type`. + example: '' + type: string + required: + - name + - type + type: object + ItemApiPayloadMetaSchemaItem: + description: The definition of `ItemApiPayloadMetaSchemaItem` object. + properties: + name: + description: The `ItemApiPayloadMetaSchemaItem` `name`. + type: string + type: + description: The `ItemApiPayloadMetaSchemaItem` `type`. + type: string + type: object JSONAPIErrorItem: description: API error response body properties: @@ -31947,6 +32482,84 @@ components: data: $ref: '#/components/schemas/Deployment' type: object + PutAppsDatastoreItemRequest: + description: The definition of `PutAppsDatastoreItemRequest` object. + properties: + data: + $ref: '#/components/schemas/PutAppsDatastoreItemRequestData' + type: object + PutAppsDatastoreItemRequestData: + description: The definition of `PutAppsDatastoreItemRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/PutAppsDatastoreItemRequestDataAttributes' + id: + description: The `PutAppsDatastoreItemRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/PutAppsDatastoreItemRequestDataType' + required: + - type + type: object + PutAppsDatastoreItemRequestDataAttributes: + description: The definition of `PutAppsDatastoreItemRequestDataAttributes` object. + properties: + value: + additionalProperties: {} + description: The `attributes` `value`. + example: + data: example data + key: value + type: object + required: + - value + type: object + PutAppsDatastoreItemRequestDataType: + default: items + description: Items resource type. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS + PutAppsDatastoreItemResponse: + description: The definition of `PutAppsDatastoreItemResponse` object. + properties: + data: + $ref: '#/components/schemas/PutAppsDatastoreItemResponseData' + type: object + PutAppsDatastoreItemResponseArray: + description: The definition of `PutAppsDatastoreItemResponseArray` object. + properties: + data: + description: The `PutAppsDatastoreItemResponseArray` `data`. + items: + $ref: '#/components/schemas/PutAppsDatastoreItemResponseData' + type: array + required: + - data + type: object + PutAppsDatastoreItemResponseData: + description: The definition of `PutAppsDatastoreItemResponseData` object. + properties: + id: + description: The `PutAppsDatastoreItemResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/PutAppsDatastoreItemResponseDataType' + required: + - type + type: object + PutAppsDatastoreItemResponseDataType: + default: items + description: Items resource type. + enum: + - items + example: items + type: string + x-enum-varnames: + - ITEMS Query: description: A data query used by an app. This can take the form of an external action, a data transformation, or a state variable. @@ -43552,6 +44165,44 @@ components: type: string type: array type: object + UpdateAppsDatastoreRequest: + description: The definition of `UpdateAppsDatastoreRequest` object. + properties: + data: + $ref: '#/components/schemas/UpdateAppsDatastoreRequestData' + type: object + UpdateAppsDatastoreRequestData: + description: The definition of `UpdateAppsDatastoreRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateAppsDatastoreRequestDataAttributes' + id: + description: The `UpdateAppsDatastoreRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/UpdateAppsDatastoreRequestDataType' + required: + - type + type: object + UpdateAppsDatastoreRequestDataAttributes: + description: The definition of `UpdateAppsDatastoreRequestDataAttributes` object. + properties: + description: + description: The `attributes` `description`. + type: string + name: + description: The `attributes` `name`. + type: string + type: object + UpdateAppsDatastoreRequestDataType: + default: datastores + description: Datastores resource type. + enum: + - datastores + example: datastores + type: string + x-enum-varnames: + - DATASTORES UpdateCustomFrameworkRequest: description: Request object to update a custom framework. properties: @@ -45493,6 +46144,499 @@ 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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + 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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create datastore + tags: + - Actions Datastores + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - apps_datastore_manage + /api/v2/actions-datastores/import: + post: + description: Creates a new datastore and populates it with items from the provided + data. + operationId: CreateDatastoreFromImport + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAppsDatastoreFromImportResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create datastore from import + tags: + - Actions Datastores + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - apps_datastore_manage + - apps_datastore_write + /api/v2/actions-datastores/{datastore_id}: + delete: + description: Deletes a datastore by its ID. + operationId: DeleteDatastore + parameters: + - description: The ID of the datastore. + 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 + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + 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 ID of the datastore. + 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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + 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 ID of the datastore. + 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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update datastore + tags: + - Actions Datastores + x-codegen-request-body-name: body + 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 ID of the datastore. + 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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete datastore item + tags: + - Actions Datastores + x-codegen-request-body-name: body + 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. + operationId: ListDatastoreItems + parameters: + - description: The ID of the datastore. + in: path + name: datastore_id + required: true + schema: + type: string + - description: Optional filter to filter the list of items. + in: query + name: filter + schema: + type: string + - description: Optional item key to filter the list of items. + in: query + name: item_key + schema: + type: string + - description: Optional limit to limit the number of items in the list. + in: query + name: page[limit] + schema: + format: int64 + type: integer + - description: Optional offset to offset the list of items. + in: query + name: page[offset] + schema: + format: int64 + type: integer + - description: Optional sort to sort the list of items. + 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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List datastore items + tags: + - Actions Datastores + x-permission: + operator: OR + permissions: + - apps_datastore_read + post: + description: Creates or replaces an item in a datastore by its key. + operationId: PutDatastoreItem + parameters: + - description: The ID of the datastore. + in: path + name: datastore_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PutAppsDatastoreItemRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PutAppsDatastoreItemResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Put datastore item + tags: + - Actions Datastores + x-codegen-request-body-name: body + 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: BulkPutDatastoreItems + parameters: + - description: The ID of the datastore. + 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' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Bulk put datastore items + tags: + - Actions Datastores + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - apps_datastore_write /api/v2/actions/app_key_registrations: get: description: List App Key Registrations @@ -68464,6 +69608,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-put-datastore-items-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..ff32017a5e73 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:18:59.568Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..849579e6de91 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Bad-Request-response.yml @@ -0,0 +1,84 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:18:59 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":"2311c2ef-1448-4dad-a67a-53cb3ea678be","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:18:59 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/2311c2ef-1448-4dad-a67a-53cb3ea678be + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2311c2ef-1448-4dad-a67a-53cb3ea678be","type":"datastores","attributes":{"created_at":"2025-08-11T22:18:59.68687Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:18:59.68687Z","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: Mon, 11 Aug 2025 22:18:59 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"values":[{"id":"key1","value":{"data":"example + data 1","key":"value"}},{"badPrimaryKey":"key2","value":{"data":"example data + 2","key":"value"}}]},"id":"2311c2ef-1448-4dad-a67a-53cb3ea678be","type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/2311c2ef-1448-4dad-a67a-53cb3ea678be/items/bulk + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"item key missing or invalid","detail":"item at + index 1: primary column \"id\" is missing"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +- recorded_at: Mon, 11 Aug 2025 22:18:59 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/2311c2ef-1448-4dad-a67a-53cb3ea678be + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Not-Found-response.frozen b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..3e8630a51e6f --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:00.202Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Not-Found-response.yml b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Not-Found-response.yml new file mode 100644 index 000000000000..4a68ed743508 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-Not-Found-response.yml @@ -0,0 +1,26 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:00 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"values":[{"primaryKey":"key1","value":{"data":"example + data 1","key":"value"}},{"primaryKey":"key2","value":{"data":"example data + 2","key":"value"}}]},"id":"70b87c26-886f-497a-bd9d-09f53bc9b40c","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":[{"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-put-datastore-items-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-OK-response.frozen new file mode 100644 index 000000000000..c4603f77e3ec --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:00.383Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-OK-response.yml new file mode 100644 index 000000000000..1f096cf959b6 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Bulk-put-datastore-items-returns-OK-response.yml @@ -0,0 +1,82 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:00 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":"d0b1264c-fc7f-4b8c-855e-ef7c433efe6f","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/d0b1264c-fc7f-4b8c-855e-ef7c433efe6f + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d0b1264c-fc7f-4b8c-855e-ef7c433efe6f","type":"datastores","attributes":{"created_at":"2025-08-11T22:19:00.513238Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:19:00.513238Z","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: Mon, 11 Aug 2025 22:19:00 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"values":[{"id":"key1","value":{"data":"example + data 1","key":"value"}},{"id":"key2","value":{"data":"example data 2","key":"value"}}]},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/d0b1264c-fc7f-4b8c-855e-ef7c433efe6f/items/bulk + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"a74b5936-79bf-43b4-b319-1f28357e72df","type":"items"},{"id":"cc12cffb-d035-4241-979a-e7ad9fe6b148","type":"items"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/d0b1264c-fc7f-4b8c-855e-ef7c433efe6f + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..68db3d09f9d0 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:00.998Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..ed5aac26050b --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-Bad-Request-response.yml @@ -0,0 +1,27 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:00 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"datastore-name","primary_column_name":"0invalid_name","values":[{"primaryKey":"key1","value":{"data":"example + data 1","key":"value"}},{"primaryKey":"key2","value":{"data":"example data + 2","key":"value"}}]},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/import + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"invalid column name","detail":"column name ''0invalid_name'' + does not start with a letter or an underscore","source":{"pointer":"/data/attributes/primary_column_name"}}]}' + 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-from-import-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-OK-response.frozen new file mode 100644 index 000000000000..cbd8bbb1f946 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:01.153Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-OK-response.yml new file mode 100644 index 000000000000..8e66bf7c65cf --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-from-import-returns-OK-response.yml @@ -0,0 +1,42 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:01 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"datastore-name","primary_column_name":"primaryKey","values":[{"primaryKey":"key1","value":{"data":"example + data 1","key":"value"}},{"primaryKey":"key2","value":{"data":"example data + 2","key":"value"}}]},"type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/import + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"cd30ef44-0088-43ac-925b-01f13f55b5ed","type":"datastores","attributes":{"item_count":2}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:01 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/cd30ef44-0088-43ac-925b-01f13f55b5ed + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..13136b6d0d07 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:01.482Z \ 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..1f23762b183d --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:01 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":[{"title":"invalid column name","detail":"column name ''0invalid_key'' + does not start with a letter or an underscore","source":{"pointer":"/data/attributes/primary_column_name"}}]}' + 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..eb481cb130c6 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:01.620Z \ 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..2a6e8dabf6e8 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Create-datastore-returns-OK-response.yml @@ -0,0 +1,40 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:01 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":"d57621df-a245-47e0-af1c-fb5aa84b113c","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:01 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/d57621df-a245-47e0-af1c-fb5aa84b113c + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..852d84264580 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:01.936Z \ 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..23895b43a3b6 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:01 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_key":"primaryKey"},"id":"invalid-uuid","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":[{"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..3cf5d0bc6b75 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:02.086Z \ 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..002be7157105 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-Not-Found-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:02 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"item_key":"primaryKey"},"id":"70b87c26-886f-497a-bd9d-09f53bc9b40c","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":[{"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..c0df22f8d957 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:02.248Z \ 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..eb902bb3f42a --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-item-returns-OK-response.yml @@ -0,0 +1,121 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:02 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":"74103e72-83a1-483a-82a0-ece193df3352","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:02 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/74103e72-83a1-483a-82a0-ece193df3352 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"74103e72-83a1-483a-82a0-ece193df3352","type":"datastores","attributes":{"created_at":"2025-08-11T22:19:02.37855Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:19:02.37855Z","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: Mon, 11 Aug 2025 22:19:02 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"value":{"data":"test-value","id":"test-key"}},"id":"74103e72-83a1-483a-82a0-ece193df3352","type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/74103e72-83a1-483a-82a0-ece193df3352/items + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"48241ef8-650f-494e-93f5-da1414376efe","type":"items"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:02 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/74103e72-83a1-483a-82a0-ece193df3352/items + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"48241ef8-650f-494e-93f5-da1414376efe","type":"items","attributes":{"created_at":"2025-08-11T22:19:02.680284Z","modified_at":"2025-08-11T22:19:02.680284Z","org_id":321813,"primary_column_name":"id","signature":"{\"signature\":\"{\\\"version\\\":2,\\\"algorithm\\\":\\\"ecdsa-p384\\\",\\\"pubkey\\\":\\\"3Sh//jFQJZ+uhUOwvHL8krXnbOjEFxMZrYnngo8J/AY=\\\",\\\"timestamp\\\":1754950742,\\\"proof\\\":\\\"MGYCMQC5kVpFCj7klWkFz2lhtv8aTE7OrYX2onKe4KIOKVjKdHDffVByBTZ2QtRr5ABr7kICMQDi+4pLo2jMvTWYWWC9cd17cmkvgMEciB0Jb9NWNaNMae4ny+xyObi2r2NPEDCp3Os=\\\"}\",\"version\":1}","store_id":"74103e72-83a1-483a-82a0-ece193df3352","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: Mon, 11 Aug 2025 22:19:02 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"id":"48241ef8-650f-494e-93f5-da1414376efe","item_key":"test-key"},"id":"74103e72-83a1-483a-82a0-ece193df3352","type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/74103e72-83a1-483a-82a0-ece193df3352/items + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"48241ef8-650f-494e-93f5-da1414376efe","type":"items"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:02 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/74103e72-83a1-483a-82a0-ece193df3352 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..e9de010d705c --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:03.140Z \ 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..bdecd1df09f5 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:03 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":[{"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..54d819a128b0 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-13T19:04:54.910Z \ 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..b64bc5cf3354 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Delete-datastore-returns-OK-response.yml @@ -0,0 +1,58 @@ +http_interactions: +- recorded_at: Wed, 13 Aug 2025 19:04:54 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":"f12a6a3b-ee1a-4388-a47b-d4aae4988a45","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 13 Aug 2025 19:04:54 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/f12a6a3b-ee1a-4388-a47b-d4aae4988a45 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"f12a6a3b-ee1a-4388-a47b-d4aae4988a45","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 13 Aug 2025 19:04:54 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/f12a6a3b-ee1a-4388-a47b-d4aae4988a45 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..7e5c67e915f3 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:03.850Z \ 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..544d580b8482 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,21 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:03 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":[{"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..e57c51b90b97 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:03.960Z \ 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..a4d18e9c750a --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:03 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":[{"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..400bb39c9107 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:04.095Z \ 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..58579747bd5a --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Get-datastore-returns-OK-response.yml @@ -0,0 +1,59 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:04 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":"0aeda3c9-fa45-4e5a-bb06-69c73b18e36a","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:04 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/0aeda3c9-fa45-4e5a-bb06-69c73b18e36a + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"0aeda3c9-fa45-4e5a-bb06-69c73b18e36a","type":"datastores","attributes":{"created_at":"2025-08-11T22:19:04.208564Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:19:04.208564Z","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: Mon, 11 Aug 2025 22:19:04 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/0aeda3c9-fa45-4e5a-bb06-69c73b18e36a + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..d8f002485591 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:04.532Z \ 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..ee491b5f89b4 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Bad-Request-response.yml @@ -0,0 +1,59 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:04 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":"ddb41c1d-51d8-4975-94b4-261e659dec74","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:04 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":[{"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_at: Mon, 11 Aug 2025 22:19:04 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/ddb41c1d-51d8-4975-94b4-261e659dec74 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..e2e9db5d4db4 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:04.951Z \ 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..73548c1a1c61 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:04 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":[{"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..d43a22a7f2d9 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:05.094Z \ 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..865b709363ff --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastore-items-returns-OK-response.yml @@ -0,0 +1,117 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:05 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":"750ca6cd-e032-451f-91c5-be07a26ed420","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:05 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/750ca6cd-e032-451f-91c5-be07a26ed420 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"750ca6cd-e032-451f-91c5-be07a26ed420","type":"datastores","attributes":{"created_at":"2025-08-11T22:19:05.19296Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:19:05.19296Z","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: Mon, 11 Aug 2025 22:19:05 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"value":{"data":"test-value","id":"test-key"}},"id":"750ca6cd-e032-451f-91c5-be07a26ed420","type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/750ca6cd-e032-451f-91c5-be07a26ed420/items + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d88904ef-386c-4723-a3b9-4e0d4ed2ea95","type":"items"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:05 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/750ca6cd-e032-451f-91c5-be07a26ed420/items + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"d88904ef-386c-4723-a3b9-4e0d4ed2ea95","type":"items","attributes":{"created_at":"2025-08-11T22:19:05.581035Z","modified_at":"2025-08-11T22:19:05.581035Z","org_id":321813,"primary_column_name":"id","signature":"{\"signature\":\"{\\\"version\\\":2,\\\"algorithm\\\":\\\"ecdsa-p384\\\",\\\"pubkey\\\":\\\"3Sh//jFQJZ+uhUOwvHL8krXnbOjEFxMZrYnngo8J/AY=\\\",\\\"timestamp\\\":1754950745,\\\"proof\\\":\\\"MGQCMH3EHN8dRcyYnlAGca1oavAiWREFIjqCYs26LJ0U7jnzVf3zNNzdnCHW+5p9CUoGKQIwMQ/hTuaHqQRKcaENqDr4tWhHbzTI+/KCW0ooyC8K1m6soAOZq1QHJi0b0BGbojPy\\\"}\",\"version\":1}","store_id":"750ca6cd-e032-451f-91c5-be07a26ed420","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: Mon, 11 Aug 2025 22:19:05 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/750ca6cd-e032-451f-91c5-be07a26ed420/items + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"d88904ef-386c-4723-a3b9-4e0d4ed2ea95","type":"items","attributes":{"created_at":"2025-08-11T22:19:05.581035Z","modified_at":"2025-08-11T22:19:05.581035Z","org_id":321813,"primary_column_name":"id","signature":"{\"signature\":\"{\\\"version\\\":2,\\\"algorithm\\\":\\\"ecdsa-p384\\\",\\\"pubkey\\\":\\\"3Sh//jFQJZ+uhUOwvHL8krXnbOjEFxMZrYnngo8J/AY=\\\",\\\"timestamp\\\":1754950745,\\\"proof\\\":\\\"MGQCMH3EHN8dRcyYnlAGca1oavAiWREFIjqCYs26LJ0U7jnzVf3zNNzdnCHW+5p9CUoGKQIwMQ/hTuaHqQRKcaENqDr4tWhHbzTI+/KCW0ooyC8K1m6soAOZq1QHJi0b0BGbojPy\\\"}\",\"version\":1}","store_id":"750ca6cd-e032-451f-91c5-be07a26ed420","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: Mon, 11 Aug 2025 22:19:05 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/750ca6cd-e032-451f-91c5-be07a26ed420 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..76746e320c55 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:06.049Z \ 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..9048895855c2 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/List-datastores-returns-OK-response.yml @@ -0,0 +1,60 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19:06 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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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"}},{"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":"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"}}]}' + 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/Put-datastore-item-returns-Bad-Request-response.frozen b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..1ef72235217e --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:06.188Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-Bad-Request-response.yml b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..e0d5ff5783c9 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-Bad-Request-response.yml @@ -0,0 +1,63 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19: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":"5d430898-fa17-4fe6-aab0-75f1b2880b9c","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:06 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"value":{"missing":"item-key"}},"type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/5d430898-fa17-4fe6-aab0-75f1b2880b9c/items + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"item key missing or invalid","detail":"item at + index 0: primary column \"id\" is missing"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +- recorded_at: Mon, 11 Aug 2025 22:19:06 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/5d430898-fa17-4fe6-aab0-75f1b2880b9c + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-OK-response.frozen b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-OK-response.frozen new file mode 100644 index 000000000000..b2ca12189e2e --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:19:06.617Z \ No newline at end of file diff --git a/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-OK-response.yml b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-OK-response.yml new file mode 100644 index 000000000000..77f236888efb --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Put-datastore-item-returns-OK-response.yml @@ -0,0 +1,81 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:19: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":"4bb0f4ff-bb80-45fe-ac06-73a66bb7b488","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:06 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/4bb0f4ff-bb80-45fe-ac06-73a66bb7b488 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"4bb0f4ff-bb80-45fe-ac06-73a66bb7b488","type":"datastores","attributes":{"created_at":"2025-08-11T22:19:06.69789Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:19:06.69789Z","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: Mon, 11 Aug 2025 22:19:06 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"value":{"data":"example data","id":"new-item-key","key":"value"}},"id":"e7e64418-b60c-4789-9612-895ac8423207","type":"items"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/actions-datastores/4bb0f4ff-bb80-45fe-ac06-73a66bb7b488/items + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"94a0f1d7-0049-4a89-bd8b-38d596feb328","type":"items"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:19:06 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/4bb0f4ff-bb80-45fe-ac06-73a66bb7b488 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +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..59f6fef8f803 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:25:45.331Z \ 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..2be81872e216 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:25:45 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":[{"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..b128b3af2388 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:26:28.062Z \ 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..6fbeb670042c --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-Not-Found-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:26:28 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":[{"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..e6d0964fb8e2 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-08-11T22:27:22.872Z \ 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..1c5290e15eb8 --- /dev/null +++ b/cassettes/features/v2/actions_datastores/Update-datastore-returns-OK-response.yml @@ -0,0 +1,82 @@ +http_interactions: +- recorded_at: Mon, 11 Aug 2025 22:27:22 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":"b7312b5f-ff05-4c96-972e-2d4d04ace106","type":"datastores"}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Mon, 11 Aug 2025 22:27:22 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/actions-datastores/b7312b5f-ff05-4c96-972e-2d4d04ace106 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b7312b5f-ff05-4c96-972e-2d4d04ace106","type":"datastores","attributes":{"created_at":"2025-08-11T22:27:23.001019Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:27:23.001019Z","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: Mon, 11 Aug 2025 22:27:22 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"updated name"},"id":"b7312b5f-ff05-4c96-972e-2d4d04ace106","type":"datastores"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/actions-datastores/b7312b5f-ff05-4c96-972e-2d4d04ace106 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"b7312b5f-ff05-4c96-972e-2d4d04ace106","type":"datastores","attributes":{"created_at":"2025-08-11T22:27:23.001019Z","creator_user_id":1445416,"creator_user_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","description":"","modified_at":"2025-08-11T22:27:23.321805Z","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: Mon, 11 Aug 2025 22:27:22 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/actions-datastores/b7312b5f-ff05-4c96-972e-2d4d04ace106 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 200 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/actions-datastores/BulkPutDatastoreItems.rb b/examples/v2/actions-datastores/BulkPutDatastoreItems.rb new file mode 100644 index 000000000000..45bf7d3eefc4 --- /dev/null +++ b/examples/v2/actions-datastores/BulkPutDatastoreItems.rb @@ -0,0 +1,25 @@ +# Bulk put 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_ATTRIBUTES_PRIMARY_COLUMN_NAME = ENV["DATASTORE_DATA_ATTRIBUTES_PRIMARY_COLUMN_NAME"] +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] + +body = DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequest.new({ + data: DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequestData.new({ + attributes: DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequestDataAttributes.new({ + values: [ + { + "28173b88-1a0e-001e-28c0-7664b6410518": "key1", "value": "{'data': 'example data 1', 'key': 'value'}", + }, + { + "28173b88-1a0e-001e-28c0-7664b6410518": "key2", "value": "{'data': 'example data 2', 'key': 'value'}", + }, + ], + }), + type: DatadogAPIClient::V2::BulkPutAppsDatastoreItemsRequestDataType::ITEMS, + }), +}) +p api_instance.bulk_put_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..e59c0f8fbc56 --- /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::CreateAppsDatastoreRequestDataType::DATASTORES, + }), +}) +p api_instance.create_datastore(body) diff --git a/examples/v2/actions-datastores/CreateDatastoreFromImport.rb b/examples/v2/actions-datastores/CreateDatastoreFromImport.rb new file mode 100644 index 000000000000..a012acf91a91 --- /dev/null +++ b/examples/v2/actions-datastores/CreateDatastoreFromImport.rb @@ -0,0 +1,23 @@ +# Create datastore from import returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::ActionsDatastoresAPI.new + +body = DatadogAPIClient::V2::CreateAppsDatastoreFromImportRequest.new({ + data: DatadogAPIClient::V2::CreateAppsDatastoreFromImportRequestData.new({ + attributes: DatadogAPIClient::V2::CreateAppsDatastoreFromImportRequestDataAttributes.new({ + name: "datastore-name", + primary_column_name: "primaryKey", + values: [ + { + "primaryKey": "key1", "value": "{'data': 'example data 1', 'key': 'value'}", + }, + { + "primaryKey": "key2", "value": "{'data': 'example data 2', 'key': 'value'}", + }, + ], + }), + type: DatadogAPIClient::V2::CreateAppsDatastoreFromImportRequestDataType::DATASTORES, + }), +}) +p api_instance.create_datastore_from_import(body) diff --git a/examples/v2/actions-datastores/DeleteDatastore.rb b/examples/v2/actions-datastores/DeleteDatastore.rb new file mode 100644 index 000000000000..fcffc2f28026 --- /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 + +# a "datastore" is created in the system +CREATED_DATASTORE_DATA_ID = ENV["CREATED_DATASTORE_DATA_ID"] +p api_instance.delete_datastore(CREATED_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..9ee35760c57b --- /dev/null +++ b/examples/v2/actions-datastores/DeleteDatastoreItem.rb @@ -0,0 +1,22 @@ +# 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"] + +# there are valid "datastore items" in the system +DATASTORE_ITEMS_DATA_0_ID = ENV["DATASTORE_ITEMS_DATA_0_ID"] + +body = DatadogAPIClient::V2::DeleteAppsDatastoreItemRequest.new({ + data: DatadogAPIClient::V2::DeleteAppsDatastoreItemRequestData.new({ + attributes: DatadogAPIClient::V2::DeleteAppsDatastoreItemRequestDataAttributes.new({ + id: DATASTORE_ITEMS_DATA_0_ID, + item_key: "test-key", + }), + type: DatadogAPIClient::V2::DeleteAppsDatastoreItemRequestDataType::ITEMS, + id: DATASTORE_DATA_ID, + }), +}) +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..a37f7d883cb2 --- /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 + +# a "datastore" is created in the system +CREATED_DATASTORE_DATA_ID = ENV["CREATED_DATASTORE_DATA_ID"] +p api_instance.get_datastore(CREATED_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/PutDatastoreItem.rb b/examples/v2/actions-datastores/PutDatastoreItem.rb new file mode 100644 index 000000000000..46b650896829 --- /dev/null +++ b/examples/v2/actions-datastores/PutDatastoreItem.rb @@ -0,0 +1,21 @@ +# Put 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_ATTRIBUTES_PRIMARY_COLUMN_NAME = ENV["DATASTORE_DATA_ATTRIBUTES_PRIMARY_COLUMN_NAME"] +DATASTORE_DATA_ID = ENV["DATASTORE_DATA_ID"] + +body = DatadogAPIClient::V2::PutAppsDatastoreItemRequest.new({ + data: DatadogAPIClient::V2::PutAppsDatastoreItemRequestData.new({ + attributes: DatadogAPIClient::V2::PutAppsDatastoreItemRequestDataAttributes.new({ + value: { + "28173b88-1a0e-001e-28c0-7664b6410518": "new-item-key", "data": "example data", "key": "value", + }, + }), + type: DatadogAPIClient::V2::PutAppsDatastoreItemRequestDataType::ITEMS, + id: "e7e64418-b60c-4789-9612-895ac8423207", + }), +}) +p api_instance.put_datastore_item(DATASTORE_DATA_ID, body) diff --git a/examples/v2/actions-datastores/UpdateDatastore.rb b/examples/v2/actions-datastores/UpdateDatastore.rb new file mode 100644 index 000000000000..c356f2502c0b --- /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::UpdateAppsDatastoreRequestDataType::DATASTORES, + id: DATASTORE_DATA_ID, + }), +}) +p api_instance.update_datastore(DATASTORE_DATA_ID, body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 039243aa5ad9..cb52faf4d31e 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -839,6 +839,42 @@ "user_handle" => "String", "body" => "User", }, + "v2.CreateDatastore" => { + "body" => "CreateAppsDatastoreRequest", + }, + "v2.CreateDatastoreFromImport" => { + "body" => "CreateAppsDatastoreFromImportRequest", + }, + "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.PutDatastoreItem" => { + "datastore_id" => "String", + "body" => "PutAppsDatastoreItemRequest", + }, + "v2.BulkPutDatastoreItems" => { + "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..eac17c569ab8 --- /dev/null +++ b/features/v2/actions_datastores.feature @@ -0,0 +1,248 @@ +@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 a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ActionsDatastores" API + + @team:DataDog/app-builder-backend + Scenario: Bulk put datastore items returns "Bad Request" response + Given new "BulkPutDatastoreItems" request + And a "datastore" is created in the system + 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": [{"{{datastore.data.attributes.primary_column_name}}": "key1", "value": {"data": "example data 1", "key": "value"}}, {"badPrimaryKey": "key2", "value": {"data": "example data 2", "key": "value"}}]}, "type": "items", "id": "{{datastore.data.id}}"}} + 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 put datastore items returns "Not Found" response + Given new "BulkPutDatastoreItems" request + And request contains "datastore_id" parameter with value "70b87c26-886f-497a-bd9d-09f53bc9b40c" + And body with value {"data": {"attributes": {"values": [{"primaryKey": "key1", "value": {"data": "example data 1", "key": "value"}}, {"primaryKey": "key2", "value": {"data": "example data 2", "key": "value"}}]}, "type": "items", "id": "70b87c26-886f-497a-bd9d-09f53bc9b40c"}} + 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 put datastore items returns "OK" response + Given new "BulkPutDatastoreItems" request + And a "datastore" is created in the system + 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": [{"{{datastore.data.attributes.primary_column_name}}": "key1", "value": {"data": "example data 1", "key": "value"}}, {"{{datastore.data.attributes.primary_column_name}}": "key2", "value": {"data": "example data 2", "key": "value"}}]}, "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 from import returns "Bad Request" response + Given new "CreateDatastoreFromImport" request + And body with value {"data": {"attributes": {"name": "datastore-name", "primary_column_name": "0invalid_name", "values": [{"primaryKey": "key1", "value": {"data": "example data 1", "key": "value"}}, {"primaryKey": "key2", "value": {"data": "example data 2", "key": "value"}}]}, "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 "invalid column name" + + @team:DataDog/app-builder-backend + Scenario: Create datastore from import returns "OK" response + Given new "CreateDatastoreFromImport" request + And body with value {"data": {"attributes": {"name": "datastore-name", "primary_column_name": "primaryKey", "values": [{"primaryKey": "key1", "value": {"data": "example data 1", "key": "value"}}, {"primaryKey": "key2", "value": {"data": "example data 2", "key": "value"}}]}, "type": "datastores"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.item_count" is equal to 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 "invalid column name" + + @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", "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: 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", "id": "70b87c26-886f-497a-bd9d-09f53bc9b40c"}} + 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: Delete datastore item returns "OK" response + Given new "DeleteDatastoreItem" request + And a "datastore" is created in the system + And there is a valid "datastore" in the system + And a "datastore item" is created in the system + And there are valid "datastore items" in the system + And request contains "datastore_id" parameter from "datastore.data.id" + And body with value {"data": {"attributes": {"id": "{{datastore_items.data[0].id}}", "item_key": "test-key"}, "type": "items", "id": "{{datastore.data.id}}"}} + 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 @team:DataDog/app-builder-backend + Scenario: Delete datastore returns "Not Found" response + Given new "DeleteDatastore" request + And request contains "datastore_id" parameter with value "f4822dc6-3c79-4963-8980-291a65d3b196" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Delete datastore returns "OK" response + Given new "DeleteDatastore" request + And a "datastore" is created in the system + And request contains "datastore_id" parameter from "created_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 a "datastore" is created in the system + And request contains "datastore_id" parameter from "created_datastore.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{created_datastore.data.id}}" + + @team:DataDog/app-builder-backend + Scenario: List datastore items returns "Bad Request" response + Given new "ListDatastoreItems" request + And a "datastore" is created in the system + 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" + + @team:DataDog/app-builder-backend + Scenario: List datastore items returns "OK" response + Given new "ListDatastoreItems" request + And a "datastore" is created in the system + And there is a valid "datastore" in the system + And a "datastore item" is created in the system + And there are valid "datastore items" 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 + And the response "data[0].id" is equal to "{{datastore_items.data[0].id}}" + + @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: Put datastore item returns "Bad Request" response + Given new "PutDatastoreItem" request + And a "datastore" is created in the system + And request contains "datastore_id" parameter from "created_datastore.data.id" + And body with value {"data": {"attributes": {"value": {"missing": "item-key"}}, "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: Put datastore item returns "OK" response + Given new "PutDatastoreItem" request + And a "datastore" is created in the system + 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": {"value": {"{{datastore.data.attributes.primary_column_name}}": "new-item-key", "data": "example data", "key": "value"}}, "type": "items", "id": "e7e64418-b60c-4789-9612-895ac8423207"}} + 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 a "datastore" is created in the system + 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 b6097093658a..561610254556 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1,4 +1,68 @@ [ + { + "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": "a \"datastore\" is created in the system", + "key": "created_datastore", + "tag": "Actions Datastores", + "operationId": "CreateDatastore" + }, + { + "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 \"values\": [],\n \"description\": \"\",\n \"org_access\": \"contributor\"\n }\n }\n}" + } + ], + "step": "there is a valid imported \"datastore\" in the system", + "key": "imported_datastore", + "tag": "Actions Datastores", + "operationId": "CreateDatastoreFromImport" + }, + { + "parameters": [ + { + "name": "datastore_id", + "value": "\"{{created_datastore.data.id}}\"" + } + ], + "step": "there is a valid \"datastore\" in the system", + "key": "datastore", + "tag": "Actions Datastores", + "operationId": "GetDatastore" + }, + { + "parameters": [ + { + "name": "datastore_id", + "value": "\"{{datastore.data.id}}\"" + } + ], + "step": "there are valid \"datastore items\" in the system", + "key": "datastore_items", + "tag": "Actions Datastores", + "operationId": "ListDatastoreItems" + }, + { + "parameters": [ + { + "name": "datastore_id", + "value": "\"{{datastore.data.id}}\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"items\",\n \"attributes\": {\n \"value\": {\n \"{{datastore.data.attributes.primary_column_name}}\": \"test-key\",\n \"data\": \"test-value\"\n }\n },\n \"id\": \"{{datastore.data.id}}\"\n }\n}" + } + ], + "step": "a \"datastore item\" is created in the system", + "key": "created_datastore_item", + "tag": "Actions Datastores", + "operationId": "PutDatastoreItem" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index fd14fad09365..8a815429a5f3 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1,4 +1,91 @@ { + "ListDatastores": { + "tag": "Actions Datastores", + "undo": { + "type": "safe" + } + }, + "CreateDatastore": { + "tag": "Actions Datastores", + "undo": { + "operationId": "DeleteDatastore", + "parameters": [ + { + "name": "datastore_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "CreateDatastoreFromImport": { + "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" + } + }, + "PutDatastoreItem": { + "tag": "Actions Datastores", + "undo": { + "operationId": "DeleteDatastoreItem", + "parameters": [ + { + "name": "datastore_id", + "origin": "request", + "source": "data.id" + }, + { + "name": "body", + "origin": "request", + "template": "{\n \"data\": {\n \"type\": \"items\",\n \"attributes\": {\n \"id\": \"{{data.id}}\",\n \"item_key\": \"test-key\"\n },\n \"id\": \"{{data.id}}\"\n }\n}" + } + ], + "type": "idempotent" + } + }, + "BulkPutDatastoreItems": { + "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 f308b274bb02..6d7db5522ab5 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1254,6 +1254,10 @@ 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.bulk_put_apps_datastore_items_request_data_type" => "BulkPutAppsDatastoreItemsRequestDataType", "v2.calculated_field" => "CalculatedField", "v2.cancel_data_deletion_response_body" => "CancelDataDeletionResponseBody", "v2.case" => "Case", @@ -1544,6 +1548,22 @@ def overrides "v2.create_app_request_data_attributes" => "CreateAppRequestDataAttributes", "v2.create_app_response" => "CreateAppResponse", "v2.create_app_response_data" => "CreateAppResponseData", + "v2.create_apps_datastore_from_import_request" => "CreateAppsDatastoreFromImportRequest", + "v2.create_apps_datastore_from_import_request_data" => "CreateAppsDatastoreFromImportRequestData", + "v2.create_apps_datastore_from_import_request_data_attributes" => "CreateAppsDatastoreFromImportRequestDataAttributes", + "v2.create_apps_datastore_from_import_request_data_attributes_primary_key_generation_strategy" => "CreateAppsDatastoreFromImportRequestDataAttributesPrimaryKeyGenerationStrategy", + "v2.create_apps_datastore_from_import_request_data_type" => "CreateAppsDatastoreFromImportRequestDataType", + "v2.create_apps_datastore_from_import_response" => "CreateAppsDatastoreFromImportResponse", + "v2.create_apps_datastore_from_import_response_data" => "CreateAppsDatastoreFromImportResponseData", + "v2.create_apps_datastore_from_import_response_data_attributes" => "CreateAppsDatastoreFromImportResponseDataAttributes", + "v2.create_apps_datastore_from_import_response_data_type" => "CreateAppsDatastoreFromImportResponseDataType", + "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_type" => "CreateAppsDatastoreRequestDataType", + "v2.create_apps_datastore_response" => "CreateAppsDatastoreResponse", + "v2.create_apps_datastore_response_data" => "CreateAppsDatastoreResponseData", + "v2.create_apps_datastore_response_data_type" => "CreateAppsDatastoreResponseDataType", "v2.create_custom_framework_request" => "CreateCustomFrameworkRequest", "v2.create_custom_framework_response" => "CreateCustomFrameworkResponse", "v2.create_data_deletion_request_body" => "CreateDataDeletionRequestBody", @@ -1690,11 +1710,24 @@ def overrides "v2.dataset_response_multi" => "DatasetResponseMulti", "v2.dataset_response_single" => "DatasetResponseSingle", "v2.dataset_update_request" => "DatasetUpdateRequest", + "v2.datastore" => "Datastore", + "v2.datastore_array" => "DatastoreArray", + "v2.datastore_data" => "DatastoreData", + "v2.datastore_data_attributes" => "DatastoreDataAttributes", + "v2.datastore_data_attributes_primary_key_generation_strategy" => "DatastoreDataAttributesPrimaryKeyGenerationStrategy", + "v2.datastore_data_type" => "DatastoreDataType", "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_request_data_type" => "DeleteAppsDatastoreItemRequestDataType", + "v2.delete_apps_datastore_item_response" => "DeleteAppsDatastoreItemResponse", + "v2.delete_apps_datastore_item_response_data" => "DeleteAppsDatastoreItemResponseData", + "v2.delete_apps_datastore_item_response_data_type" => "DeleteAppsDatastoreItemResponseDataType", "v2.delete_apps_request" => "DeleteAppsRequest", "v2.delete_apps_request_data_items" => "DeleteAppsRequestDataItems", "v2.delete_apps_response" => "DeleteAppsResponse", @@ -2244,6 +2277,14 @@ def overrides "v2.ip_allowlist_response" => "IPAllowlistResponse", "v2.ip_allowlist_type" => "IPAllowlistType", "v2.ip_allowlist_update_request" => "IPAllowlistUpdateRequest", + "v2.item_api_payload_array" => "ItemApiPayloadArray", + "v2.item_api_payload_data" => "ItemApiPayloadData", + "v2.item_api_payload_data_attributes" => "ItemApiPayloadDataAttributes", + "v2.item_api_payload_data_type" => "ItemApiPayloadDataType", + "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", @@ -2945,6 +2986,14 @@ def overrides "v2.project_response" => "ProjectResponse", "v2.projects_response" => "ProjectsResponse", "v2.publish_app_response" => "PublishAppResponse", + "v2.put_apps_datastore_item_request" => "PutAppsDatastoreItemRequest", + "v2.put_apps_datastore_item_request_data" => "PutAppsDatastoreItemRequestData", + "v2.put_apps_datastore_item_request_data_attributes" => "PutAppsDatastoreItemRequestDataAttributes", + "v2.put_apps_datastore_item_request_data_type" => "PutAppsDatastoreItemRequestDataType", + "v2.put_apps_datastore_item_response" => "PutAppsDatastoreItemResponse", + "v2.put_apps_datastore_item_response_array" => "PutAppsDatastoreItemResponseArray", + "v2.put_apps_datastore_item_response_data" => "PutAppsDatastoreItemResponseData", + "v2.put_apps_datastore_item_response_data_type" => "PutAppsDatastoreItemResponseDataType", "v2.query" => "Query", "v2.query_formula" => "QueryFormula", "v2.query_sort_order" => "QuerySortOrder", @@ -3684,6 +3733,10 @@ def overrides "v2.update_app_response" => "UpdateAppResponse", "v2.update_app_response_data" => "UpdateAppResponseData", "v2.update_app_response_data_attributes" => "UpdateAppResponseDataAttributes", + "v2.update_apps_datastore_request" => "UpdateAppsDatastoreRequest", + "v2.update_apps_datastore_request_data" => "UpdateAppsDatastoreRequestData", + "v2.update_apps_datastore_request_data_attributes" => "UpdateAppsDatastoreRequestDataAttributes", + "v2.update_apps_datastore_request_data_type" => "UpdateAppsDatastoreRequestDataType", "v2.update_custom_framework_request" => "UpdateCustomFrameworkRequest", "v2.update_custom_framework_response" => "UpdateCustomFrameworkResponse", "v2.update_open_api_response" => "UpdateOpenAPIResponse", @@ -3849,6 +3902,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..69aea2f4c05a --- /dev/null +++ b/lib/datadog_api_client/v2/api/actions_datastores_api.rb @@ -0,0 +1,713 @@ +=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 put datastore items. + # + # @see #bulk_put_datastore_items_with_http_info + def bulk_put_datastore_items(datastore_id, body, opts = {}) + data, _status_code, _headers = bulk_put_datastore_items_with_http_info(datastore_id, body, opts) + data + end + + # Bulk put datastore items. + # + # Creates or replaces multiple items in a datastore by their keys in a single operation. + # + # @param datastore_id [String] The ID of the datastore. + # @param body [BulkPutAppsDatastoreItemsRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(PutAppsDatastoreItemResponseArray, Integer, Hash)>] PutAppsDatastoreItemResponseArray data, response status code and response headers + def bulk_put_datastore_items_with_http_info(datastore_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.bulk_put_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_put_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_put_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_put_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_put_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 + + # Create datastore from import. + # + # @see #create_datastore_from_import_with_http_info + def create_datastore_from_import(body, opts = {}) + data, _status_code, _headers = create_datastore_from_import_with_http_info(body, opts) + data + end + + # Create datastore from import. + # + # Creates a new datastore and populates it with items from the provided data. + # + # @param body [CreateAppsDatastoreFromImportRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(CreateAppsDatastoreFromImportResponse, Integer, Hash)>] CreateAppsDatastoreFromImportResponse data, response status code and response headers + def create_datastore_from_import_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.create_datastore_from_import ...' + 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_from_import" + end + # resource path + local_var_path = '/api/v2/actions-datastores/import' + + # 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] || 'CreateAppsDatastoreFromImportResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_datastore_from_import, + :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_from_import\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 ID. + # + # @param datastore_id [String] The ID of the datastore. + # @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 ID of the datastore. + # @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 ID of the datastore. + # @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. + # + # @param datastore_id [String] The ID of the datastore. + # @param opts [Hash] the optional parameters + # @option opts [String] :filter Optional filter to filter the list of items. + # @option opts [String] :item_key Optional item key to filter the list of items. + # @option opts [Integer] :page_limit Optional limit to limit the number of items in the list. + # @option opts [Integer] :page_offset Optional offset to offset the list of items. + # @option opts [String] :sort Optional sort to sort the list of items. + # @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 + # 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 + + # Put datastore item. + # + # @see #put_datastore_item_with_http_info + def put_datastore_item(datastore_id, body, opts = {}) + data, _status_code, _headers = put_datastore_item_with_http_info(datastore_id, body, opts) + data + end + + # Put datastore item. + # + # Creates or replaces an item in a datastore by its key. + # + # @param datastore_id [String] The ID of the datastore. + # @param body [PutAppsDatastoreItemRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(PutAppsDatastoreItemResponse, Integer, Hash)>] PutAppsDatastoreItemResponse data, response status code and response headers + def put_datastore_item_with_http_info(datastore_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ActionsDatastoresAPI.put_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.put_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.put_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] || 'PutAppsDatastoreItemResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :put_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::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ActionsDatastoresAPI#put_datastore_item\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 ID of the datastore. + # @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 + 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..a1a9c1a89415 --- /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 + # The definition of `BulkPutAppsDatastoreItemsRequest` object. + class BulkPutAppsDatastoreItemsRequest + include BaseGenericModel + + # The definition of `BulkPutAppsDatastoreItemsRequestData` object. + 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..a18cf224cc4e --- /dev/null +++ b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_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 + # The definition of `BulkPutAppsDatastoreItemsRequestData` object. + class BulkPutAppsDatastoreItemsRequestData + include BaseGenericModel + + # The definition of `BulkPutAppsDatastoreItemsRequestDataAttributes` object. + attr_accessor :attributes + + # The `BulkPutAppsDatastoreItemsRequestData` `id`. + attr_accessor :id + + # Items resource type. + 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' => :'BulkPutAppsDatastoreItemsRequestDataAttributes', + :'id' => :'String', + :'type' => :'BulkPutAppsDatastoreItemsRequestDataType' + } + 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?(:'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/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..9e4038df73ca --- /dev/null +++ b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data_attributes.rb @@ -0,0 +1,135 @@ +=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 definition of `BulkPutAppsDatastoreItemsRequestDataAttributes` object. + class BulkPutAppsDatastoreItemsRequestDataAttributes + include BaseGenericModel + + # The `attributes` `conflict_mode`. + attr_accessor :conflict_mode + + # The `attributes` `values`. + 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' => :'String', + :'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? + 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 + @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/bulk_put_apps_datastore_items_request_data_type.rb b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_request_data_type.rb new file mode 100644 index 000000000000..dae58cf7dca8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/bulk_put_apps_datastore_items_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 + # Items resource type. + class BulkPutAppsDatastoreItemsRequestDataType + include BaseEnumModel + + ITEMS = "items".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request.rb new file mode 100644 index 000000000000..526db6a3a784 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_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 + # The definition of `CreateAppsDatastoreFromImportRequest` object. + class CreateAppsDatastoreFromImportRequest + include BaseGenericModel + + # The definition of `CreateAppsDatastoreFromImportRequestData` object. + 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' => :'CreateAppsDatastoreFromImportRequestData' + } + 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::CreateAppsDatastoreFromImportRequest` 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_from_import_request_data.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data.rb new file mode 100644 index 000000000000..e7ffe09a5a54 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_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 + # The definition of `CreateAppsDatastoreFromImportRequestData` object. + class CreateAppsDatastoreFromImportRequestData + include BaseGenericModel + + # The definition of `CreateAppsDatastoreFromImportRequestDataAttributes` object. + attr_accessor :attributes + + # The `CreateAppsDatastoreFromImportRequestData` `id`. + attr_accessor :id + + # Datastores resource type. + 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' => :'CreateAppsDatastoreFromImportRequestDataAttributes', + :'id' => :'String', + :'type' => :'CreateAppsDatastoreFromImportRequestDataType' + } + 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::CreateAppsDatastoreFromImportRequestData` 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_from_import_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data_attributes.rb new file mode 100644 index 000000000000..625a855c9fc8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data_attributes.rb @@ -0,0 +1,197 @@ +=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 definition of `CreateAppsDatastoreFromImportRequestDataAttributes` object. + class CreateAppsDatastoreFromImportRequestDataAttributes + include BaseGenericModel + + # The `attributes` `description`. + attr_accessor :description + + # The `attributes` `name`. + attr_reader :name + + # The `attributes` `org_access`. + attr_accessor :org_access + + # The `attributes` `primary_column_name`. + attr_reader :primary_column_name + + # The `attributes` `primary_key_generation_strategy`. + attr_accessor :primary_key_generation_strategy + + # The `attributes` `values`. + attr_reader :values + + 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', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'name' => :'String', + :'org_access' => :'String', + :'primary_column_name' => :'String', + :'primary_key_generation_strategy' => :'CreateAppsDatastoreFromImportRequestDataAttributesPrimaryKeyGenerationStrategy', + :'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::CreateAppsDatastoreFromImportRequestDataAttributes` 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 + + 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 @name.nil? + return false if @primary_column_name.nil? + return false if @values.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 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 + @primary_column_name = primary_column_name + 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 + @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 && + 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 && + values == o.values && + 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, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data_attributes_primary_key_generation_strategy.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data_attributes_primary_key_generation_strategy.rb new file mode 100644 index 000000000000..f4037c074f42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data_attributes_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 + # The `attributes` `primary_key_generation_strategy`. + class CreateAppsDatastoreFromImportRequestDataAttributesPrimaryKeyGenerationStrategy + include BaseEnumModel + + NONE = "none".freeze + UUID = "uuid".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data_type.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_request_data_type.rb new file mode 100644 index 000000000000..5aca24ee23ca --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_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 + # Datastores resource type. + class CreateAppsDatastoreFromImportRequestDataType + include BaseEnumModel + + DATASTORES = "datastores".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response.rb new file mode 100644 index 000000000000..b13db17978f0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_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 + # The definition of `CreateAppsDatastoreFromImportResponse` object. + class CreateAppsDatastoreFromImportResponse + include BaseGenericModel + + # The definition of `CreateAppsDatastoreFromImportResponseData` object. + 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' => :'CreateAppsDatastoreFromImportResponseData' + } + 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::CreateAppsDatastoreFromImportResponse` 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_from_import_response_data.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response_data.rb new file mode 100644 index 000000000000..64a91ac9a1bf --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response_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 + # The definition of `CreateAppsDatastoreFromImportResponseData` object. + class CreateAppsDatastoreFromImportResponseData + include BaseGenericModel + + # The definition of `CreateAppsDatastoreFromImportResponseDataAttributes` object. + attr_accessor :attributes + + # The `CreateAppsDatastoreFromImportResponseData` `id`. + attr_accessor :id + + # Datastores resource type. + 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' => :'CreateAppsDatastoreFromImportResponseDataAttributes', + :'id' => :'String', + :'type' => :'CreateAppsDatastoreFromImportResponseDataType' + } + 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::CreateAppsDatastoreFromImportResponseData` 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_from_import_response_data_attributes.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response_data_attributes.rb new file mode 100644 index 000000000000..0f652f48daab --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response_data_attributes.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 + # The definition of `CreateAppsDatastoreFromImportResponseDataAttributes` object. + class CreateAppsDatastoreFromImportResponseDataAttributes + include BaseGenericModel + + # The `attributes` `item_count`. + attr_accessor :item_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'item_count' => :'item_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'item_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::CreateAppsDatastoreFromImportResponseDataAttributes` 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?(:'item_count') + self.item_count = attributes[:'item_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 && + item_count == o.item_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [item_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response_data_type.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response_data_type.rb new file mode 100644 index 000000000000..4bcaa42995ea --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_from_import_response_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 + # Datastores resource type. + class CreateAppsDatastoreFromImportResponseDataType + include BaseEnumModel + + DATASTORES = "datastores".freeze + 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..d3c43fff93da --- /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 + # The definition of `CreateAppsDatastoreRequest` object. + class CreateAppsDatastoreRequest + include BaseGenericModel + + # The definition of `CreateAppsDatastoreRequestData` object. + 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..e79f3bd6b621 --- /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 + # The definition of `CreateAppsDatastoreRequestData` object. + class CreateAppsDatastoreRequestData + include BaseGenericModel + + # The definition of `CreateAppsDatastoreRequestDataAttributes` object. + attr_accessor :attributes + + # The `CreateAppsDatastoreRequestData` `id`. + attr_accessor :id + + # Datastores resource type. + 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' => :'CreateAppsDatastoreRequestDataType' + } + 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..10d42b43c874 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_attributes.rb @@ -0,0 +1,174 @@ +=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 definition of `CreateAppsDatastoreRequestDataAttributes` object. + class CreateAppsDatastoreRequestDataAttributes + include BaseGenericModel + + # The `attributes` `description`. + attr_accessor :description + + # The `attributes` `name`. + attr_reader :name + + # The `attributes` `org_access`. + attr_accessor :org_access + + # The `attributes` `primary_column_name`. + attr_reader :primary_column_name + + # The `attributes` `primary_key_generation_strategy`. + 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' => :'String', + :'primary_column_name' => :'String', + :'primary_key_generation_strategy' => :'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::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? + 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 + @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_type.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_request_data_type.rb new file mode 100644 index 000000000000..561598b9bc2c --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_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 + # Datastores resource type. + class CreateAppsDatastoreRequestDataType + include BaseEnumModel + + DATASTORES = "datastores".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..303b976db833 --- /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 + # The definition of `CreateAppsDatastoreResponse` object. + class CreateAppsDatastoreResponse + include BaseGenericModel + + # The definition of `CreateAppsDatastoreResponseData` object. + 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..f16956c8eede --- /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 definition of `CreateAppsDatastoreResponseData` object. + class CreateAppsDatastoreResponseData + include BaseGenericModel + + # The `CreateAppsDatastoreResponseData` `id`. + attr_accessor :id + + # Datastores resource type. + 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' => :'CreateAppsDatastoreResponseDataType' + } + 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/create_apps_datastore_response_data_type.rb b/lib/datadog_api_client/v2/models/create_apps_datastore_response_data_type.rb new file mode 100644 index 000000000000..c9ff0dcfbdf9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_apps_datastore_response_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 + # Datastores resource type. + class CreateAppsDatastoreResponseDataType + include BaseEnumModel + + DATASTORES = "datastores".freeze + 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..c374a2b18f7c --- /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 + # The definition of `Datastore` object. + class Datastore + include BaseGenericModel + + # The definition of `DatastoreData` object. + 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..4ce0d41cdc16 --- /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 + # The definition of `DatastoreArray` object. + class DatastoreArray + include BaseGenericModel + + # The `DatastoreArray` `data`. + 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..47a3656cd525 --- /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 + # The definition of `DatastoreData` object. + class DatastoreData + include BaseGenericModel + + # The definition of `DatastoreDataAttributes` object. + attr_accessor :attributes + + # The `DatastoreData` `id`. + attr_accessor :id + + # Datastores resource type. + 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..ac0cd61f3805 --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_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 + # The definition of `DatastoreDataAttributes` object. + class DatastoreDataAttributes + include BaseGenericModel + + # The `attributes` `created_at`. + attr_accessor :created_at + + # The `attributes` `creator_user_id`. + attr_accessor :creator_user_id + + # The `attributes` `creator_user_uuid`. + attr_accessor :creator_user_uuid + + # The `attributes` `description`. + attr_accessor :description + + # The `attributes` `modified_at`. + attr_accessor :modified_at + + # The `attributes` `name`. + attr_accessor :name + + # The `attributes` `org_id`. + attr_accessor :org_id + + # The `attributes` `primary_column_name`. + attr_accessor :primary_column_name + + # The `attributes` `primary_key_generation_strategy`. + 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' => :'DatastoreDataAttributesPrimaryKeyGenerationStrategy' + } + 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 + + # 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_attributes_primary_key_generation_strategy.rb b/lib/datadog_api_client/v2/models/datastore_data_attributes_primary_key_generation_strategy.rb new file mode 100644 index 000000000000..0e15492159af --- /dev/null +++ b/lib/datadog_api_client/v2/models/datastore_data_attributes_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 + # The `attributes` `primary_key_generation_strategy`. + class DatastoreDataAttributesPrimaryKeyGenerationStrategy + include BaseEnumModel + + NONE = "none".freeze + UUID = "uuid".freeze + 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..e8b554147d77 --- /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 + # Datastores resource type. + class DatastoreDataType + include BaseEnumModel + + DATASTORES = "datastores".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..0c6c0f69f3ef --- /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 + # The definition of `DeleteAppsDatastoreItemRequest` object. + class DeleteAppsDatastoreItemRequest + include BaseGenericModel + + # The definition of `DeleteAppsDatastoreItemRequestData` object. + 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..12a52b2b0a18 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_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 + # The definition of `DeleteAppsDatastoreItemRequestData` object. + class DeleteAppsDatastoreItemRequestData + include BaseGenericModel + + # The definition of `DeleteAppsDatastoreItemRequestDataAttributes` object. + attr_accessor :attributes + + # The `DeleteAppsDatastoreItemRequestData` `id`. + attr_accessor :id + + # Items resource type. + 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' => :'DeleteAppsDatastoreItemRequestDataAttributes', + :'id' => :'String', + :'type' => :'DeleteAppsDatastoreItemRequestDataType' + } + 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?(:'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/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..23d52722aa40 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data_attributes.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 definition of `DeleteAppsDatastoreItemRequestDataAttributes` object. + class DeleteAppsDatastoreItemRequestDataAttributes + include BaseGenericModel + + # The `item` `id`. + attr_accessor :id + + # The `attributes` `item_key`. + 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? + 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 + @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_request_data_type.rb b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_request_data_type.rb new file mode 100644 index 000000000000..b8b6a0d1ddcd --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_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 + # Items resource type. + class DeleteAppsDatastoreItemRequestDataType + include BaseEnumModel + + ITEMS = "items".freeze + 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..79f371d961d3 --- /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 + # The definition of `DeleteAppsDatastoreItemResponse` object. + class DeleteAppsDatastoreItemResponse + include BaseGenericModel + + # The definition of `DeleteAppsDatastoreItemResponseData` object. + 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..fb745414351b --- /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 + # The definition of `DeleteAppsDatastoreItemResponseData` object. + class DeleteAppsDatastoreItemResponseData + include BaseGenericModel + + # The `DeleteAppsDatastoreItemResponseData` `id`. + attr_accessor :id + + # Items resource type. + 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' => :'DeleteAppsDatastoreItemResponseDataType' + } + 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/delete_apps_datastore_item_response_data_type.rb b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_data_type.rb new file mode 100644 index 000000000000..22e5c1035947 --- /dev/null +++ b/lib/datadog_api_client/v2/models/delete_apps_datastore_item_response_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 + # Items resource type. + class DeleteAppsDatastoreItemResponseDataType + include BaseEnumModel + + ITEMS = "items".freeze + 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..c65e9954f29f --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_array.rb @@ -0,0 +1,135 @@ +=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 definition of `ItemApiPayloadArray` object. + class ItemApiPayloadArray + include BaseGenericModel + + # The `ItemApiPayloadArray` `data`. + attr_reader :data + + # The definition of `ItemApiPayloadMeta` object. + 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? + 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 && + 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..dbddd042f7d2 --- /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 + # The definition of `ItemApiPayloadData` object. + class ItemApiPayloadData + include BaseGenericModel + + # The definition of `ItemApiPayloadDataAttributes` object. + attr_accessor :attributes + + # The `ItemApiPayloadData` `id`. + attr_accessor :id + + # Items resource type. + 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' => :'ItemApiPayloadDataType' + } + 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..e5ab4e8a9d14 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_data_attributes.rb @@ -0,0 +1,165 @@ +=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 definition of `ItemApiPayloadDataAttributes` object. + class ItemApiPayloadDataAttributes + include BaseGenericModel + + # The `attributes` `created_at`. + attr_accessor :created_at + + # The `attributes` `modified_at`. + attr_accessor :modified_at + + # The `attributes` `org_id`. + attr_accessor :org_id + + # The `attributes` `primary_column_name`. + attr_accessor :primary_column_name + + # The `attributes` `signature`. + attr_accessor :signature + + # The `attributes` `store_id`. + attr_accessor :store_id + + # The `attributes` `value`. + 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 + + # 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_data_type.rb b/lib/datadog_api_client/v2/models/item_api_payload_data_type.rb new file mode 100644 index 000000000000..526a40964dd2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/item_api_payload_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 + # Items resource type. + class ItemApiPayloadDataType + include BaseEnumModel + + ITEMS = "items".freeze + 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..6da1c011fced --- /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 + # The definition of `ItemApiPayloadMeta` object. + class ItemApiPayloadMeta + include BaseGenericModel + + # The definition of `ItemApiPayloadMetaPage` object. + attr_accessor :page + + # The definition of `ItemApiPayloadMetaSchema` object. + 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..f95420b71a27 --- /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 + # The definition of `ItemApiPayloadMetaPage` object. + class ItemApiPayloadMetaPage + include BaseGenericModel + + # The `ItemApiPayloadMeta` `hasMore`. + attr_accessor :has_more + + # The `ItemApiPayloadMeta` `totalCount`. + attr_accessor :total_count + + # The `ItemApiPayloadMeta` `totalFilteredCount`. + 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..b97601ce5845 --- /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 + # The definition of `ItemApiPayloadMetaSchema` object. + class ItemApiPayloadMetaSchema + include BaseGenericModel + + # The `ItemApiPayloadMetaSchema` `fields`. + attr_accessor :fields + + # The `ItemApiPayloadMetaSchema` `primary_key`. + 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..7c1417185999 --- /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 + # The definition of `ItemApiPayloadMetaSchemaField` object. + class ItemApiPayloadMetaSchemaField + include BaseGenericModel + + # The `ItemApiPayloadMetaSchemaField` `name`. + attr_reader :name + + # The `ItemApiPayloadMetaSchemaField` `type`. + 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_request.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_request.rb new file mode 100644 index 000000000000..384cf3c29295 --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_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 + # The definition of `PutAppsDatastoreItemRequest` object. + class PutAppsDatastoreItemRequest + include BaseGenericModel + + # The definition of `PutAppsDatastoreItemRequestData` object. + 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' => :'PutAppsDatastoreItemRequestData' + } + 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::PutAppsDatastoreItemRequest` 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/put_apps_datastore_item_request_data.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_request_data.rb new file mode 100644 index 000000000000..15213dfc501d --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_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 + # The definition of `PutAppsDatastoreItemRequestData` object. + class PutAppsDatastoreItemRequestData + include BaseGenericModel + + # The definition of `PutAppsDatastoreItemRequestDataAttributes` object. + attr_accessor :attributes + + # The `PutAppsDatastoreItemRequestData` `id`. + attr_accessor :id + + # Items resource type. + 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' => :'PutAppsDatastoreItemRequestDataAttributes', + :'id' => :'String', + :'type' => :'PutAppsDatastoreItemRequestDataType' + } + 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::PutAppsDatastoreItemRequestData` 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/put_apps_datastore_item_request_data_attributes.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_request_data_attributes.rb new file mode 100644 index 000000000000..464d6856f901 --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_apps_datastore_item_request_data_attributes.rb @@ -0,0 +1,123 @@ +=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 definition of `PutAppsDatastoreItemRequestDataAttributes` object. + class PutAppsDatastoreItemRequestDataAttributes + include BaseGenericModel + + # The `attributes` `value`. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::PutAppsDatastoreItemRequestDataAttributes` 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?(:'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 @value.nil? + true + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/put_apps_datastore_item_request_data_type.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_request_data_type.rb new file mode 100644 index 000000000000..1a58436411ed --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_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 + # Items resource type. + class PutAppsDatastoreItemRequestDataType + include BaseEnumModel + + ITEMS = "items".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/put_apps_datastore_item_response.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response.rb new file mode 100644 index 000000000000..ee463dfb8366 --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_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 + # The definition of `PutAppsDatastoreItemResponse` object. + class PutAppsDatastoreItemResponse + include BaseGenericModel + + # The definition of `PutAppsDatastoreItemResponseData` object. + 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' => :'PutAppsDatastoreItemResponseData' + } + 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::PutAppsDatastoreItemResponse` 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/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..a3300c424f7f --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_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 + # The definition of `PutAppsDatastoreItemResponseArray` object. + class PutAppsDatastoreItemResponseArray + include BaseGenericModel + + # The `PutAppsDatastoreItemResponseArray` `data`. + 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? + 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/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..07f27896cda6 --- /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 + # The definition of `PutAppsDatastoreItemResponseData` object. + class PutAppsDatastoreItemResponseData + include BaseGenericModel + + # The `PutAppsDatastoreItemResponseData` `id`. + attr_accessor :id + + # Items resource type. + 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' => :'PutAppsDatastoreItemResponseDataType' + } + 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/put_apps_datastore_item_response_data_type.rb b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_data_type.rb new file mode 100644 index 000000000000..39f4dada9fb7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/put_apps_datastore_item_response_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 + # Items resource type. + class PutAppsDatastoreItemResponseDataType + 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..a8f29f5a4986 --- /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 + # The definition of `UpdateAppsDatastoreRequest` object. + class UpdateAppsDatastoreRequest + include BaseGenericModel + + # The definition of `UpdateAppsDatastoreRequestData` object. + 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..6029a0e80cf4 --- /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 + # The definition of `UpdateAppsDatastoreRequestData` object. + class UpdateAppsDatastoreRequestData + include BaseGenericModel + + # The definition of `UpdateAppsDatastoreRequestDataAttributes` object. + attr_accessor :attributes + + # The `UpdateAppsDatastoreRequestData` `id`. + attr_accessor :id + + # Datastores resource type. + 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' => :'UpdateAppsDatastoreRequestDataType' + } + 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..f4a5bab99a6c --- /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 + # The definition of `UpdateAppsDatastoreRequestDataAttributes` object. + class UpdateAppsDatastoreRequestDataAttributes + include BaseGenericModel + + # The `attributes` `description`. + attr_accessor :description + + # The `attributes` `name`. + 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 diff --git a/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_type.rb b/lib/datadog_api_client/v2/models/update_apps_datastore_request_data_type.rb new file mode 100644 index 000000000000..b6658351ac64 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_apps_datastore_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 + # Datastores resource type. + class UpdateAppsDatastoreRequestDataType + include BaseEnumModel + + DATASTORES = "datastores".freeze + end +end