diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6bc9597abb6..94f4594ca87 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12489,6 +12489,89 @@ components: required: - type type: object + CreateConnectionRequest: + example: + data: + attributes: + fields: + - description: Customer subscription tier from `CRM` + display_name: Customer Tier + id: customer_tier + source_name: subscription_tier + type: string + - description: Customer lifetime value in `USD` + display_name: Lifetime Value + id: lifetime_value + source_name: ltv + type: number + join_attribute: user_email + join_type: email + type: ref_table + id: crm-integration + type: connection_id + properties: + data: + $ref: '#/components/schemas/CreateConnectionRequestData' + type: object + CreateConnectionRequestData: + properties: + attributes: + $ref: '#/components/schemas/CreateConnectionRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/UpdateConnectionRequestDataType' + required: + - type + type: object + CreateConnectionRequestDataAttributes: + properties: + fields: + items: + $ref: '#/components/schemas/CreateConnectionRequestDataAttributesFieldsItems' + type: array + join_attribute: + example: '' + type: string + join_type: + example: '' + type: string + metadata: + additionalProperties: + type: string + type: object + type: + example: '' + type: string + required: + - join_attribute + - join_type + - type + type: object + CreateConnectionRequestDataAttributesFieldsItems: + properties: + description: + type: string + display_name: + type: string + groups: + items: + type: string + type: array + id: + example: '' + type: string + source_name: + example: '' + type: string + type: + example: '' + type: string + required: + - id + - source_name + - type + type: object CreateCustomFrameworkRequest: description: Request object to create a custom framework. properties: @@ -19701,6 +19784,140 @@ components: from the other indexes. type: string type: object + FacetInfoRequest: + example: + data: + attributes: + facet_id: first_browser_name + limit: 10 + search: + query: user_org_id:5001 AND first_country_code:US + term_search: + value: Chrome + id: facet_info_request + type: users_facet_info_request + properties: + data: + $ref: '#/components/schemas/FacetInfoRequestData' + type: object + FacetInfoRequestData: + properties: + attributes: + $ref: '#/components/schemas/FacetInfoRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/FacetInfoRequestDataType' + required: + - type + type: object + FacetInfoRequestDataAttributes: + properties: + facet_id: + example: '' + type: string + limit: + example: 0 + format: int64 + type: integer + search: + $ref: '#/components/schemas/FacetInfoRequestDataAttributesSearch' + term_search: + $ref: '#/components/schemas/FacetInfoRequestDataAttributesTermSearch' + required: + - facet_id + - limit + type: object + FacetInfoRequestDataAttributesSearch: + properties: + query: + type: string + type: object + FacetInfoRequestDataAttributesTermSearch: + properties: + value: + type: string + type: object + FacetInfoRequestDataType: + default: users_facet_info_request + description: Users facet info request resource type. + enum: + - users_facet_info_request + example: users_facet_info_request + type: string + x-enum-varnames: + - USERS_FACET_INFO_REQUEST + FacetInfoResponse: + example: + data: + attributes: + result: + values: + - count: 4892 + value: Chrome + - count: 2341 + value: Safari + - count: 1567 + value: Firefox + - count: 892 + value: Edge + - count: 234 + value: Opera + id: facet_info_response + type: users_facet_info + properties: + data: + $ref: '#/components/schemas/FacetInfoResponseData' + type: object + FacetInfoResponseData: + properties: + attributes: + $ref: '#/components/schemas/FacetInfoResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/FacetInfoResponseDataType' + required: + - type + type: object + FacetInfoResponseDataAttributes: + properties: + result: + $ref: '#/components/schemas/FacetInfoResponseDataAttributesResult' + type: object + FacetInfoResponseDataAttributesResult: + properties: + range: + $ref: '#/components/schemas/FacetInfoResponseDataAttributesResultRange' + values: + items: + $ref: '#/components/schemas/FacetInfoResponseDataAttributesResultValuesItems' + type: array + type: object + FacetInfoResponseDataAttributesResultRange: + properties: + max: + type: object + min: + type: object + type: object + FacetInfoResponseDataAttributesResultValuesItems: + properties: + count: + format: int64 + type: integer + value: + type: string + type: object + FacetInfoResponseDataType: + default: users_facet_info + description: Users facet info resource type. + enum: + - users_facet_info + example: users_facet_info + type: string + x-enum-varnames: + - USERS_FACET_INFO FastlyAPIKey: description: The definition of the `FastlyAPIKey` object. properties: @@ -22089,6 +22306,90 @@ components: - ASSIGNEE - CASE - TEAM_OWNERS + GetMappingResponse: + example: + data: + attributes: + attributes: + - attribute: user_id + description: Unique user identifier + display_name: User ID + groups: + - Identity + is_custom: false + type: string + - attribute: user_email + description: User email address + display_name: Email Address + groups: + - Identity + - Contact + is_custom: false + type: string + - attribute: first_country_code + description: The ISO code of the country for the user's first session + display_name: First Country Code + groups: + - Geography + is_custom: false + type: string + - attribute: '@customer_tier' + description: Customer subscription tier + display_name: Customer Tier + groups: + - Business + is_custom: true + type: string + id: get_mappings_response + type: get_mappings_response + properties: + data: + $ref: '#/components/schemas/GetMappingResponseData' + type: object + GetMappingResponseData: + properties: + attributes: + $ref: '#/components/schemas/GetMappingResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/GetMappingResponseDataType' + required: + - type + type: object + GetMappingResponseDataAttributes: + properties: + attributes: + items: + $ref: '#/components/schemas/GetMappingResponseDataAttributesAttributesItems' + type: array + type: object + GetMappingResponseDataAttributesAttributesItems: + properties: + attribute: + type: string + description: + type: string + display_name: + type: string + groups: + items: + type: string + type: array + is_custom: + type: boolean + type: + type: string + type: object + GetMappingResponseDataType: + default: get_mappings_response + description: Get mappings response resource type. + enum: + - get_mappings_response + example: get_mappings_response + type: string + x-enum-varnames: + - GET_MAPPINGS_RESPONSE GetMultipleRulesetsRequest: properties: data: @@ -27737,6 +28038,104 @@ components: required: - data type: object + ListConnectionsResponse: + example: + data: + attributes: + connections: + - created_at: '0001-01-01T00:00:00Z' + created_by: 00000000-0000-0000-0000-000000000000 + fields: + - description: Customer subscription tier + display_name: Customer Tier + groups: + - Business + - Subscription + id: customer_tier + source_name: subscription_tier + type: string + - description: Channel through which user signed up + display_name: Signup Source + groups: + - Marketing + - Attribution + id: signup_source + source_name: acquisition_channel + type: string + id: user-profiles-connection + join: + attribute: user_email + type: email + type: ref_table + updated_at: '0001-01-01T00:00:00Z' + updated_by: 00000000-0000-0000-0000-000000000000 + id: list_connections_response + type: list_connections_response + properties: + data: + $ref: '#/components/schemas/ListConnectionsResponseData' + type: object + ListConnectionsResponseData: + properties: + attributes: + $ref: '#/components/schemas/ListConnectionsResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/ListConnectionsResponseDataType' + required: + - type + type: object + ListConnectionsResponseDataAttributes: + properties: + connections: + items: + $ref: '#/components/schemas/ListConnectionsResponseDataAttributesConnectionsItems' + type: array + type: object + ListConnectionsResponseDataAttributesConnectionsItems: + properties: + created_at: + format: date-time + type: string + created_by: + type: string + fields: + items: + $ref: '#/components/schemas/CreateConnectionRequestDataAttributesFieldsItems' + type: array + id: + type: string + join: + $ref: '#/components/schemas/ListConnectionsResponseDataAttributesConnectionsItemsJoin' + metadata: + additionalProperties: + type: string + type: object + type: + type: string + updated_at: + format: date-time + type: string + updated_by: + type: string + type: object + ListConnectionsResponseDataAttributesConnectionsItemsJoin: + properties: + attribute: + type: string + type: + type: string + type: object + ListConnectionsResponseDataType: + default: list_connections_response + description: List connections response resource type. + enum: + - list_connections_response + example: list_connections_response + type: string + x-enum-varnames: + - LIST_CONNECTIONS_RESPONSE ListDevicesResponse: description: List devices response. properties: @@ -38196,6 +38595,153 @@ components: - $ref: '#/components/schemas/ActionQuery' - $ref: '#/components/schemas/DataTransform' - $ref: '#/components/schemas/StateVariable' + QueryAccountRequest: + example: + data: + attributes: + limit: 20 + query: plan_type:enterprise AND user_count:>100 AND subscription_status:active + select_columns: + - account_id + - account_name + - user_count + - plan_type + - subscription_status + - created_at + - mrr + - industry + sort: + field: user_count + order: DESC + wildcard_search_term: tech + id: query_account_request + type: query_account_request + properties: + data: + $ref: '#/components/schemas/QueryAccountRequestData' + type: object + QueryAccountRequestData: + properties: + attributes: + $ref: '#/components/schemas/QueryAccountRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/QueryAccountRequestDataType' + required: + - type + type: object + QueryAccountRequestDataAttributes: + properties: + limit: + format: int64 + type: integer + query: + type: string + select_columns: + items: + type: string + type: array + sort: + $ref: '#/components/schemas/QueryAccountRequestDataAttributesSort' + wildcard_search_term: + type: string + type: object + QueryAccountRequestDataAttributesSort: + properties: + field: + type: string + order: + type: string + type: object + QueryAccountRequestDataType: + default: query_account_request + description: Query account request resource type. + enum: + - query_account_request + example: query_account_request + type: string + x-enum-varnames: + - QUERY_ACCOUNT_REQUEST + QueryEventFilteredUsersRequest: + example: + data: + attributes: + event_query: + query: '@type:view AND @view.loading_time:>3000 AND @application.name:ecommerce-platform' + time_frame: + end: 1761309676 + start: 1760100076 + include_row_count: true + limit: 25 + query: user_org_id:5001 AND first_country_code:US AND first_browser_name:Chrome + select_columns: + - user_id + - user_email + - first_country_code + - first_browser_name + - events_count + - session_count + - error_count + - avg_loading_time + id: query_event_filtered_users_request + type: query_event_filtered_users_request + properties: + data: + $ref: '#/components/schemas/QueryEventFilteredUsersRequestData' + type: object + QueryEventFilteredUsersRequestData: + properties: + attributes: + $ref: '#/components/schemas/QueryEventFilteredUsersRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/QueryEventFilteredUsersRequestDataType' + required: + - type + type: object + QueryEventFilteredUsersRequestDataAttributes: + properties: + event_query: + $ref: '#/components/schemas/QueryEventFilteredUsersRequestDataAttributesEventQuery' + include_row_count: + type: boolean + limit: + format: int64 + type: integer + query: + type: string + select_columns: + items: + type: string + type: array + type: object + QueryEventFilteredUsersRequestDataAttributesEventQuery: + properties: + query: + type: string + time_frame: + $ref: '#/components/schemas/QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame' + type: object + QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame: + properties: + end: + format: int64 + type: integer + start: + format: int64 + type: integer + type: object + QueryEventFilteredUsersRequestDataType: + default: query_event_filtered_users_request + description: Query event filtered users request resource type. + enum: + - query_event_filtered_users_request + example: query_event_filtered_users_request + type: string + x-enum-varnames: + - QUERY_EVENT_FILTERED_USERS_REQUEST QueryFormula: description: A formula for calculation based on one or more queries. properties: @@ -38209,6 +38755,81 @@ components: required: - formula type: object + QueryResponse: + example: + data: + attributes: + hits: + - first_browser_name: Chrome + first_city: San Francisco + first_country_code: US + first_device_type: Desktop + last_seen: '2025-08-14T06:45:12.142Z' + session_count: 47 + user_created: '2024-12-15T08:42:33.287Z' + user_email: john.smith@techcorp.com + user_id: '150847' + user_name: John Smith + user_org_id: '5001' + - first_browser_name: Chrome + first_city: Austin + first_country_code: US + first_device_type: Desktop + last_seen: '2025-08-14T05:22:08.951Z' + session_count: 89 + user_created: '2024-11-28T14:17:45.634Z' + user_email: john.williams@techcorp.com + user_id: '150848' + user_name: John Williams + user_org_id: '5001' + - first_browser_name: Chrome + first_city: Seattle + first_country_code: US + first_device_type: Desktop + last_seen: '2025-08-14T04:18:34.726Z' + session_count: 23 + user_created: '2025-01-03T16:33:21.445Z' + user_email: john.jones@techcorp.com + user_id: '150849' + user_name: John Jones + user_org_id: '5001' + total: 147 + id: query_response + type: query_response + properties: + data: + $ref: '#/components/schemas/QueryResponseData' + type: object + QueryResponseData: + properties: + attributes: + $ref: '#/components/schemas/QueryResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/QueryResponseDataType' + required: + - type + type: object + QueryResponseDataAttributes: + properties: + hits: + items: + additionalProperties: {} + type: array + total: + format: int64 + type: integer + type: object + QueryResponseDataType: + default: query_response + description: Query response resource type. + enum: + - query_response + example: query_response + type: string + x-enum-varnames: + - QUERY_RESPONSE QuerySortOrder: default: desc description: Direction of sort. @@ -38219,6 +38840,74 @@ components: x-enum-varnames: - ASC - DESC + QueryUsersRequest: + example: + data: + attributes: + limit: 25 + query: user_email:*@techcorp.com AND first_country_code:US AND first_browser_name:Chrome + select_columns: + - user_id + - user_email + - user_name + - user_org_id + - first_country_code + - first_browser_name + - first_device_type + - last_seen + sort: + field: first_seen + order: DESC + wildcard_search_term: john + id: query_users_request + type: query_users_request + properties: + data: + $ref: '#/components/schemas/QueryUsersRequestData' + type: object + QueryUsersRequestData: + properties: + attributes: + $ref: '#/components/schemas/QueryUsersRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/QueryUsersRequestDataType' + required: + - type + type: object + QueryUsersRequestDataAttributes: + properties: + limit: + format: int64 + type: integer + query: + type: string + select_columns: + items: + type: string + type: array + sort: + $ref: '#/components/schemas/QueryUsersRequestDataAttributesSort' + wildcard_search_term: + type: string + type: object + QueryUsersRequestDataAttributesSort: + properties: + field: + type: string + order: + type: string + type: object + QueryUsersRequestDataType: + default: query_users_request + description: Query users request resource type. + enum: + - query_users_request + example: query_users_request + type: string + x-enum-varnames: + - QUERY_USERS_REQUEST RUMAggregateBucketValue: description: A bucket value, can be either a timeseries or a single value. oneOf: @@ -52083,6 +52772,88 @@ components: description: The display name of the datastore. type: string type: object + UpdateConnectionRequest: + example: + data: + attributes: + fields_to_add: + - description: Net Promoter Score from customer surveys + display_name: NPS Score + groups: + - Satisfaction + - Metrics + id: nps_score + source_name: net_promoter_score + type: number + fields_to_delete: + - old_revenue_field + fields_to_update: + - field_id: lifetime_value + updated_display_name: Customer Lifetime Value (`USD`) + updated_groups: + - Financial + - Metrics + id: crm-integration + type: connection_id + properties: + data: + $ref: '#/components/schemas/UpdateConnectionRequestData' + type: object + UpdateConnectionRequestData: + properties: + attributes: + $ref: '#/components/schemas/UpdateConnectionRequestDataAttributes' + id: + example: '' + type: string + type: + $ref: '#/components/schemas/UpdateConnectionRequestDataType' + required: + - type + - id + type: object + UpdateConnectionRequestDataAttributes: + properties: + fields_to_add: + items: + $ref: '#/components/schemas/CreateConnectionRequestDataAttributesFieldsItems' + type: array + fields_to_delete: + items: + type: string + type: array + fields_to_update: + items: + $ref: '#/components/schemas/UpdateConnectionRequestDataAttributesFieldsToUpdateItems' + type: array + type: object + UpdateConnectionRequestDataAttributesFieldsToUpdateItems: + properties: + field_id: + example: '' + type: string + updated_description: + type: string + updated_display_name: + type: string + updated_field_id: + type: string + updated_groups: + items: + type: string + type: array + required: + - field_id + type: object + UpdateConnectionRequestDataType: + default: connection_id + description: Connection id resource type. + enum: + - connection_id + example: connection_id + type: string + x-enum-varnames: + - CONNECTION_ID UpdateCustomFrameworkRequest: description: Request object to update a custom framework. properties: @@ -70940,6 +71711,298 @@ paths: x-permission: operator: OPEN permissions: [] + /api/v2/product-analytics/accounts/facet_info: + post: + description: Get facet information for account attributes including possible + values and counts + operationId: GetAccountFacetInfo + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacetInfoRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FacetInfoResponse' + description: Successful response with facet information + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get account facet info + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/accounts/query: + post: + description: Query accounts with flexible filtering by account properties + operationId: QueryAccounts + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryAccountRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + description: Successful response with account data + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Query accounts + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/users/event_filtered_query: + post: + description: Query users filtered by both user properties and event platform + data + operationId: QueryEventFilteredUsers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryEventFilteredUsersRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + description: Successful response with filtered user data + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Query event filtered users + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/users/facet_info: + post: + description: Get facet information for user attributes including possible values + and counts + operationId: GetUserFacetInfo + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FacetInfoRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FacetInfoResponse' + description: Successful response with facet information + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get user facet info + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/users/query: + post: + description: Query users with flexible filtering by user properties, with optional + wildcard search + operationId: QueryUsers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QueryUsersRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/QueryResponse' + description: Successful response with user data + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Query users + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/{entity}/mapping: + get: + description: Get entity mapping configuration including all available attributes + and their properties + operationId: GetMapping + parameters: + - description: The entity for which to get the mapping + in: path + name: entity + required: true + schema: + example: users + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetMappingResponse' + description: Successful response with entity mapping configuration + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get mapping + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/{entity}/mapping/connection: + post: + description: Create a new data connection and its fields for an entity + operationId: CreateConnection + parameters: + - description: The entity for which to create the connection + in: path + name: entity + required: true + schema: + example: users + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConnectionRequest' + required: true + responses: + '201': + description: Connection created successfully + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create connection + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + put: + description: Update an existing data connection by adding, updating, or deleting + fields + operationId: UpdateConnection + parameters: + - description: The entity for which to update the connection + in: path + name: entity + required: true + schema: + example: users + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateConnectionRequest' + required: true + responses: + '200': + description: Connection updated successfully + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update connection + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/{entity}/mapping/connection/{id}: + delete: + description: Delete an existing data connection for an entity + operationId: DeleteConnection + parameters: + - description: The connection ID to delete + in: path + name: id + required: true + schema: + example: connection-id-123 + type: string + - description: The entity for which to delete the connection + in: path + name: entity + required: true + schema: + example: users + type: string + responses: + '204': + description: Connection deleted successfully + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete connection + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/product-analytics/{entity}/mapping/connections: + get: + description: List all data connections for an entity + operationId: ListConnections + parameters: + - description: The entity for which to list connections + in: path + name: entity + required: true + schema: + example: users + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ListConnectionsResponse' + description: Successful response with list of connections + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List connections + tags: + - Rum Audience Management + x-unstable: '**Note**: This endpoint may be subject to changes.' /api/v2/query/scalar: post: description: 'Query scalar values (as seen on Query Value, Table, and Toplist @@ -81770,6 +82833,8 @@ tags: [Pipelines page](https://app.datadoghq.com/logs/pipelines).' name: Roles +- description: Auto-generated tag Rum Audience Management + name: Rum Audience Management - description: Manage configuration of [rum-based metrics](https://app.datadoghq.com/rum/generate-metrics) for your organization. externalDocs: diff --git a/examples/v2/rum-audience-management/CreateConnection.java b/examples/v2/rum-audience-management/CreateConnection.java new file mode 100644 index 00000000000..aceea4a2ed3 --- /dev/null +++ b/examples/v2/rum-audience-management/CreateConnection.java @@ -0,0 +1,55 @@ +// Create connection returns "Connection created successfully" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.CreateConnectionRequest; +import com.datadog.api.client.v2.model.CreateConnectionRequestData; +import com.datadog.api.client.v2.model.CreateConnectionRequestDataAttributes; +import com.datadog.api.client.v2.model.CreateConnectionRequestDataAttributesFieldsItems; +import com.datadog.api.client.v2.model.UpdateConnectionRequestDataType; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createConnection", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + CreateConnectionRequest body = + new CreateConnectionRequest() + .data( + new CreateConnectionRequestData() + .attributes( + new CreateConnectionRequestDataAttributes() + .fields( + Arrays.asList( + new CreateConnectionRequestDataAttributesFieldsItems() + .description("Customer subscription tier from `CRM`") + .displayName("Customer Tier") + .id("customer_tier") + .sourceName("subscription_tier") + .type("string"), + new CreateConnectionRequestDataAttributesFieldsItems() + .description("Customer lifetime value in `USD`") + .displayName("Lifetime Value") + .id("lifetime_value") + .sourceName("ltv") + .type("number"))) + .joinAttribute("user_email") + .joinType("email") + .type("ref_table")) + .id("crm-integration") + .type(UpdateConnectionRequestDataType.CONNECTION_ID)); + + try { + apiInstance.createConnection("users", body); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#createConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/DeleteConnection.java b/examples/v2/rum-audience-management/DeleteConnection.java new file mode 100644 index 00000000000..cc152257a5c --- /dev/null +++ b/examples/v2/rum-audience-management/DeleteConnection.java @@ -0,0 +1,23 @@ +// Delete connection returns "Connection deleted successfully" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteConnection", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + try { + apiInstance.deleteConnection("connection-id-123", "users"); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#deleteConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/GetAccountFacetInfo.java b/examples/v2/rum-audience-management/GetAccountFacetInfo.java new file mode 100644 index 00000000000..b5c6c190b77 --- /dev/null +++ b/examples/v2/rum-audience-management/GetAccountFacetInfo.java @@ -0,0 +1,47 @@ +// Get account facet info returns "Successful response with facet information" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.FacetInfoRequest; +import com.datadog.api.client.v2.model.FacetInfoRequestData; +import com.datadog.api.client.v2.model.FacetInfoRequestDataAttributes; +import com.datadog.api.client.v2.model.FacetInfoRequestDataAttributesSearch; +import com.datadog.api.client.v2.model.FacetInfoRequestDataAttributesTermSearch; +import com.datadog.api.client.v2.model.FacetInfoRequestDataType; +import com.datadog.api.client.v2.model.FacetInfoResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getAccountFacetInfo", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + FacetInfoRequest body = + new FacetInfoRequest() + .data( + new FacetInfoRequestData() + .attributes( + new FacetInfoRequestDataAttributes() + .facetId("first_browser_name") + .limit(10L) + .search( + new FacetInfoRequestDataAttributesSearch() + .query("user_org_id:5001 AND first_country_code:US")) + .termSearch( + new FacetInfoRequestDataAttributesTermSearch().value("Chrome"))) + .id("facet_info_request") + .type(FacetInfoRequestDataType.USERS_FACET_INFO_REQUEST)); + + try { + FacetInfoResponse result = apiInstance.getAccountFacetInfo(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#getAccountFacetInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/GetMapping.java b/examples/v2/rum-audience-management/GetMapping.java new file mode 100644 index 00000000000..3fbd455edbd --- /dev/null +++ b/examples/v2/rum-audience-management/GetMapping.java @@ -0,0 +1,25 @@ +// Get mapping returns "Successful response with entity mapping configuration" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.GetMappingResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getMapping", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + try { + GetMappingResponse result = apiInstance.getMapping("users"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#getMapping"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/GetUserFacetInfo.java b/examples/v2/rum-audience-management/GetUserFacetInfo.java new file mode 100644 index 00000000000..f9ea311f12a --- /dev/null +++ b/examples/v2/rum-audience-management/GetUserFacetInfo.java @@ -0,0 +1,47 @@ +// Get user facet info returns "Successful response with facet information" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.FacetInfoRequest; +import com.datadog.api.client.v2.model.FacetInfoRequestData; +import com.datadog.api.client.v2.model.FacetInfoRequestDataAttributes; +import com.datadog.api.client.v2.model.FacetInfoRequestDataAttributesSearch; +import com.datadog.api.client.v2.model.FacetInfoRequestDataAttributesTermSearch; +import com.datadog.api.client.v2.model.FacetInfoRequestDataType; +import com.datadog.api.client.v2.model.FacetInfoResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getUserFacetInfo", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + FacetInfoRequest body = + new FacetInfoRequest() + .data( + new FacetInfoRequestData() + .attributes( + new FacetInfoRequestDataAttributes() + .facetId("first_browser_name") + .limit(10L) + .search( + new FacetInfoRequestDataAttributesSearch() + .query("user_org_id:5001 AND first_country_code:US")) + .termSearch( + new FacetInfoRequestDataAttributesTermSearch().value("Chrome"))) + .id("facet_info_request") + .type(FacetInfoRequestDataType.USERS_FACET_INFO_REQUEST)); + + try { + FacetInfoResponse result = apiInstance.getUserFacetInfo(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#getUserFacetInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/ListConnections.java b/examples/v2/rum-audience-management/ListConnections.java new file mode 100644 index 00000000000..e175a4e5b8c --- /dev/null +++ b/examples/v2/rum-audience-management/ListConnections.java @@ -0,0 +1,25 @@ +// List connections returns "Successful response with list of connections" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.ListConnectionsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listConnections", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + try { + ListConnectionsResponse result = apiInstance.listConnections("users"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#listConnections"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/QueryAccounts.java b/examples/v2/rum-audience-management/QueryAccounts.java new file mode 100644 index 00000000000..c4d51edb470 --- /dev/null +++ b/examples/v2/rum-audience-management/QueryAccounts.java @@ -0,0 +1,59 @@ +// Query accounts returns "Successful response with account data" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.QueryAccountRequest; +import com.datadog.api.client.v2.model.QueryAccountRequestData; +import com.datadog.api.client.v2.model.QueryAccountRequestDataAttributes; +import com.datadog.api.client.v2.model.QueryAccountRequestDataAttributesSort; +import com.datadog.api.client.v2.model.QueryAccountRequestDataType; +import com.datadog.api.client.v2.model.QueryResponse; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.queryAccounts", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + QueryAccountRequest body = + new QueryAccountRequest() + .data( + new QueryAccountRequestData() + .attributes( + new QueryAccountRequestDataAttributes() + .limit(20L) + .query( + "plan_type:enterprise AND user_count:>100 AND" + + " subscription_status:active") + .selectColumns( + Arrays.asList( + "account_id", + "account_name", + "user_count", + "plan_type", + "subscription_status", + "created_at", + "mrr", + "industry")) + .sort( + new QueryAccountRequestDataAttributesSort() + .field("user_count") + .order("DESC")) + .wildcardSearchTerm("tech")) + .id("query_account_request") + .type(QueryAccountRequestDataType.QUERY_ACCOUNT_REQUEST)); + + try { + QueryResponse result = apiInstance.queryAccounts(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#queryAccounts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/QueryEventFilteredUsers.java b/examples/v2/rum-audience-management/QueryEventFilteredUsers.java new file mode 100644 index 00000000000..3a72708f116 --- /dev/null +++ b/examples/v2/rum-audience-management/QueryEventFilteredUsers.java @@ -0,0 +1,66 @@ +// Query event filtered users returns "Successful response with filtered user data" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.QueryEventFilteredUsersRequest; +import com.datadog.api.client.v2.model.QueryEventFilteredUsersRequestData; +import com.datadog.api.client.v2.model.QueryEventFilteredUsersRequestDataAttributes; +import com.datadog.api.client.v2.model.QueryEventFilteredUsersRequestDataAttributesEventQuery; +import com.datadog.api.client.v2.model.QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame; +import com.datadog.api.client.v2.model.QueryEventFilteredUsersRequestDataType; +import com.datadog.api.client.v2.model.QueryResponse; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.queryEventFilteredUsers", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + QueryEventFilteredUsersRequest body = + new QueryEventFilteredUsersRequest() + .data( + new QueryEventFilteredUsersRequestData() + .attributes( + new QueryEventFilteredUsersRequestDataAttributes() + .eventQuery( + new QueryEventFilteredUsersRequestDataAttributesEventQuery() + .query( + "@type:view AND @view.loading_time:>3000 AND" + + " @application.name:ecommerce-platform") + .timeFrame( + new QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame() + .end(1761309676L) + .start(1760100076L))) + .includeRowCount(true) + .limit(25L) + .query( + "user_org_id:5001 AND first_country_code:US AND" + + " first_browser_name:Chrome") + .selectColumns( + Arrays.asList( + "user_id", + "user_email", + "first_country_code", + "first_browser_name", + "events_count", + "session_count", + "error_count", + "avg_loading_time"))) + .id("query_event_filtered_users_request") + .type( + QueryEventFilteredUsersRequestDataType.QUERY_EVENT_FILTERED_USERS_REQUEST)); + + try { + QueryResponse result = apiInstance.queryEventFilteredUsers(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#queryEventFilteredUsers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/QueryUsers.java b/examples/v2/rum-audience-management/QueryUsers.java new file mode 100644 index 00000000000..24725ed1238 --- /dev/null +++ b/examples/v2/rum-audience-management/QueryUsers.java @@ -0,0 +1,59 @@ +// Query users returns "Successful response with user data" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.QueryResponse; +import com.datadog.api.client.v2.model.QueryUsersRequest; +import com.datadog.api.client.v2.model.QueryUsersRequestData; +import com.datadog.api.client.v2.model.QueryUsersRequestDataAttributes; +import com.datadog.api.client.v2.model.QueryUsersRequestDataAttributesSort; +import com.datadog.api.client.v2.model.QueryUsersRequestDataType; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.queryUsers", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + QueryUsersRequest body = + new QueryUsersRequest() + .data( + new QueryUsersRequestData() + .attributes( + new QueryUsersRequestDataAttributes() + .limit(25L) + .query( + "user_email:*@techcorp.com AND first_country_code:US AND" + + " first_browser_name:Chrome") + .selectColumns( + Arrays.asList( + "user_id", + "user_email", + "user_name", + "user_org_id", + "first_country_code", + "first_browser_name", + "first_device_type", + "last_seen")) + .sort( + new QueryUsersRequestDataAttributesSort() + .field("first_seen") + .order("DESC")) + .wildcardSearchTerm("john")) + .id("query_users_request") + .type(QueryUsersRequestDataType.QUERY_USERS_REQUEST)); + + try { + QueryResponse result = apiInstance.queryUsers(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#queryUsers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-audience-management/UpdateConnection.java b/examples/v2/rum-audience-management/UpdateConnection.java new file mode 100644 index 00000000000..9ea97eba268 --- /dev/null +++ b/examples/v2/rum-audience-management/UpdateConnection.java @@ -0,0 +1,56 @@ +// Update connection returns "Connection updated successfully" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumAudienceManagementApi; +import com.datadog.api.client.v2.model.CreateConnectionRequestDataAttributesFieldsItems; +import com.datadog.api.client.v2.model.UpdateConnectionRequest; +import com.datadog.api.client.v2.model.UpdateConnectionRequestData; +import com.datadog.api.client.v2.model.UpdateConnectionRequestDataAttributes; +import com.datadog.api.client.v2.model.UpdateConnectionRequestDataAttributesFieldsToUpdateItems; +import com.datadog.api.client.v2.model.UpdateConnectionRequestDataType; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateConnection", true); + RumAudienceManagementApi apiInstance = new RumAudienceManagementApi(defaultClient); + + UpdateConnectionRequest body = + new UpdateConnectionRequest() + .data( + new UpdateConnectionRequestData() + .attributes( + new UpdateConnectionRequestDataAttributes() + .fieldsToAdd( + Collections.singletonList( + new CreateConnectionRequestDataAttributesFieldsItems() + .description("Net Promoter Score from customer surveys") + .displayName("NPS Score") + .groups(Arrays.asList("Satisfaction", "Metrics")) + .id("nps_score") + .sourceName("net_promoter_score") + .type("number"))) + .fieldsToDelete(Collections.singletonList("old_revenue_field")) + .fieldsToUpdate( + Collections.singletonList( + new UpdateConnectionRequestDataAttributesFieldsToUpdateItems() + .fieldId("lifetime_value") + .updatedDisplayName("Customer Lifetime Value (`USD`)") + .updatedGroups(Arrays.asList("Financial", "Metrics"))))) + .id("crm-integration") + .type(UpdateConnectionRequestDataType.CONNECTION_ID)); + + try { + apiInstance.updateConnection("users", body); + } catch (ApiException e) { + System.err.println("Exception when calling RumAudienceManagementApi#updateConnection"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 790a403d960..86942c2362d 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -769,6 +769,16 @@ public class ApiClient { put("v2.validateExistingMonitorUserTemplate", false); put("v2.validateMonitorUserTemplate", false); put("v2.listRoleTemplates", false); + put("v2.createConnection", false); + put("v2.deleteConnection", false); + put("v2.getAccountFacetInfo", false); + put("v2.getMapping", false); + put("v2.getUserFacetInfo", false); + put("v2.listConnections", false); + put("v2.queryAccounts", false); + put("v2.queryEventFilteredUsers", false); + put("v2.queryUsers", false); + put("v2.updateConnection", false); put("v2.createPipeline", false); put("v2.deletePipeline", false); put("v2.getPipeline", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/RumAudienceManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/RumAudienceManagementApi.java new file mode 100644 index 00000000000..1546c58d57a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumAudienceManagementApi.java @@ -0,0 +1,1590 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.CreateConnectionRequest; +import com.datadog.api.client.v2.model.FacetInfoRequest; +import com.datadog.api.client.v2.model.FacetInfoResponse; +import com.datadog.api.client.v2.model.GetMappingResponse; +import com.datadog.api.client.v2.model.ListConnectionsResponse; +import com.datadog.api.client.v2.model.QueryAccountRequest; +import com.datadog.api.client.v2.model.QueryEventFilteredUsersRequest; +import com.datadog.api.client.v2.model.QueryResponse; +import com.datadog.api.client.v2.model.QueryUsersRequest; +import com.datadog.api.client.v2.model.UpdateConnectionRequest; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumAudienceManagementApi { + private ApiClient apiClient; + + public RumAudienceManagementApi() { + this(ApiClient.getDefaultApiClient()); + } + + public RumAudienceManagementApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create connection. + * + *

See {@link #createConnectionWithHttpInfo}. + * + * @param entity The entity for which to create the connection (required) + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void createConnection(String entity, CreateConnectionRequest body) throws ApiException { + createConnectionWithHttpInfo(entity, body); + } + + /** + * Create connection. + * + *

See {@link #createConnectionWithHttpInfoAsync}. + * + * @param entity The entity for which to create the connection (required) + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture createConnectionAsync( + String entity, CreateConnectionRequest body) { + return createConnectionWithHttpInfoAsync(entity, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new data connection and its fields for an entity + * + * @param entity The entity for which to create the connection (required) + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Connection created successfully -
429 Too many requests -
+ */ + public ApiResponse createConnectionWithHttpInfo(String entity, CreateConnectionRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createConnection"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'entity' is set + if (entity == null) { + throw new ApiException( + 400, "Missing the required parameter 'entity' when calling createConnection"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createConnection"); + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connection" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.createConnection", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Create connection. + * + *

See {@link #createConnectionWithHttpInfo}. + * + * @param entity The entity for which to create the connection (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> createConnectionWithHttpInfoAsync( + String entity, CreateConnectionRequest body) { + // Check if unstable operation is enabled + String operationId = "createConnection"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'entity' is set + if (entity == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'entity' when calling createConnection")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createConnection")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connection" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.createConnection", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete connection. + * + *

See {@link #deleteConnectionWithHttpInfo}. + * + * @param id The connection ID to delete (required) + * @param entity The entity for which to delete the connection (required) + * @throws ApiException if fails to make API call + */ + public void deleteConnection(String id, String entity) throws ApiException { + deleteConnectionWithHttpInfo(id, entity); + } + + /** + * Delete connection. + * + *

See {@link #deleteConnectionWithHttpInfoAsync}. + * + * @param id The connection ID to delete (required) + * @param entity The entity for which to delete the connection (required) + * @return CompletableFuture + */ + public CompletableFuture deleteConnectionAsync(String id, String entity) { + return deleteConnectionWithHttpInfoAsync(id, entity) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an existing data connection for an entity + * + * @param id The connection ID to delete (required) + * @param entity The entity for which to delete the connection (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 Connection deleted successfully -
429 Too many requests -
+ */ + public ApiResponse deleteConnectionWithHttpInfo(String id, String entity) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteConnection"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling deleteConnection"); + } + + // verify the required parameter 'entity' is set + if (entity == null) { + throw new ApiException( + 400, "Missing the required parameter 'entity' when calling deleteConnection"); + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connection/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.deleteConnection", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete connection. + * + *

See {@link #deleteConnectionWithHttpInfo}. + * + * @param id The connection ID to delete (required) + * @param entity The entity for which to delete the connection (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteConnectionWithHttpInfoAsync( + String id, String entity) { + // Check if unstable operation is enabled + String operationId = "deleteConnection"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'id' is set + if (id == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling deleteConnection")); + return result; + } + + // verify the required parameter 'entity' is set + if (entity == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'entity' when calling deleteConnection")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connection/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.deleteConnection", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get account facet info. + * + *

See {@link #getAccountFacetInfoWithHttpInfo}. + * + * @param body (required) + * @return FacetInfoResponse + * @throws ApiException if fails to make API call + */ + public FacetInfoResponse getAccountFacetInfo(FacetInfoRequest body) throws ApiException { + return getAccountFacetInfoWithHttpInfo(body).getData(); + } + + /** + * Get account facet info. + * + *

See {@link #getAccountFacetInfoWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<FacetInfoResponse> + */ + public CompletableFuture getAccountFacetInfoAsync(FacetInfoRequest body) { + return getAccountFacetInfoWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get facet information for account attributes including possible values and counts + * + * @param body (required) + * @return ApiResponse<FacetInfoResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Successful response with facet information -
429 Too many requests -
+ */ + public ApiResponse getAccountFacetInfoWithHttpInfo(FacetInfoRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getAccountFacetInfo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling getAccountFacetInfo"); + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/accounts/facet_info"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.getAccountFacetInfo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get account facet info. + * + *

See {@link #getAccountFacetInfoWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<FacetInfoResponse>> + */ + public CompletableFuture> getAccountFacetInfoWithHttpInfoAsync( + FacetInfoRequest body) { + // Check if unstable operation is enabled + String operationId = "getAccountFacetInfo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling getAccountFacetInfo")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/accounts/facet_info"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.getAccountFacetInfo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get mapping. + * + *

See {@link #getMappingWithHttpInfo}. + * + * @param entity The entity for which to get the mapping (required) + * @return GetMappingResponse + * @throws ApiException if fails to make API call + */ + public GetMappingResponse getMapping(String entity) throws ApiException { + return getMappingWithHttpInfo(entity).getData(); + } + + /** + * Get mapping. + * + *

See {@link #getMappingWithHttpInfoAsync}. + * + * @param entity The entity for which to get the mapping (required) + * @return CompletableFuture<GetMappingResponse> + */ + public CompletableFuture getMappingAsync(String entity) { + return getMappingWithHttpInfoAsync(entity) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get entity mapping configuration including all available attributes and their properties + * + * @param entity The entity for which to get the mapping (required) + * @return ApiResponse<GetMappingResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Successful response with entity mapping configuration -
429 Too many requests -
+ */ + public ApiResponse getMappingWithHttpInfo(String entity) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'entity' is set + if (entity == null) { + throw new ApiException( + 400, "Missing the required parameter 'entity' when calling getMapping"); + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.getMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get mapping. + * + *

See {@link #getMappingWithHttpInfo}. + * + * @param entity The entity for which to get the mapping (required) + * @return CompletableFuture<ApiResponse<GetMappingResponse>> + */ + public CompletableFuture> getMappingWithHttpInfoAsync( + String entity) { + // Check if unstable operation is enabled + String operationId = "getMapping"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'entity' is set + if (entity == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'entity' when calling getMapping")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.getMapping", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get user facet info. + * + *

See {@link #getUserFacetInfoWithHttpInfo}. + * + * @param body (required) + * @return FacetInfoResponse + * @throws ApiException if fails to make API call + */ + public FacetInfoResponse getUserFacetInfo(FacetInfoRequest body) throws ApiException { + return getUserFacetInfoWithHttpInfo(body).getData(); + } + + /** + * Get user facet info. + * + *

See {@link #getUserFacetInfoWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<FacetInfoResponse> + */ + public CompletableFuture getUserFacetInfoAsync(FacetInfoRequest body) { + return getUserFacetInfoWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get facet information for user attributes including possible values and counts + * + * @param body (required) + * @return ApiResponse<FacetInfoResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Successful response with facet information -
429 Too many requests -
+ */ + public ApiResponse getUserFacetInfoWithHttpInfo(FacetInfoRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getUserFacetInfo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling getUserFacetInfo"); + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/users/facet_info"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.getUserFacetInfo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get user facet info. + * + *

See {@link #getUserFacetInfoWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<FacetInfoResponse>> + */ + public CompletableFuture> getUserFacetInfoWithHttpInfoAsync( + FacetInfoRequest body) { + // Check if unstable operation is enabled + String operationId = "getUserFacetInfo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling getUserFacetInfo")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/users/facet_info"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.getUserFacetInfo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List connections. + * + *

See {@link #listConnectionsWithHttpInfo}. + * + * @param entity The entity for which to list connections (required) + * @return ListConnectionsResponse + * @throws ApiException if fails to make API call + */ + public ListConnectionsResponse listConnections(String entity) throws ApiException { + return listConnectionsWithHttpInfo(entity).getData(); + } + + /** + * List connections. + * + *

See {@link #listConnectionsWithHttpInfoAsync}. + * + * @param entity The entity for which to list connections (required) + * @return CompletableFuture<ListConnectionsResponse> + */ + public CompletableFuture listConnectionsAsync(String entity) { + return listConnectionsWithHttpInfoAsync(entity) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all data connections for an entity + * + * @param entity The entity for which to list connections (required) + * @return ApiResponse<ListConnectionsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Successful response with list of connections -
429 Too many requests -
+ */ + public ApiResponse listConnectionsWithHttpInfo(String entity) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listConnections"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'entity' is set + if (entity == null) { + throw new ApiException( + 400, "Missing the required parameter 'entity' when calling listConnections"); + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connections" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.listConnections", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List connections. + * + *

See {@link #listConnectionsWithHttpInfo}. + * + * @param entity The entity for which to list connections (required) + * @return CompletableFuture<ApiResponse<ListConnectionsResponse>> + */ + public CompletableFuture> listConnectionsWithHttpInfoAsync( + String entity) { + // Check if unstable operation is enabled + String operationId = "listConnections"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'entity' is set + if (entity == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'entity' when calling listConnections")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connections" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.listConnections", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Query accounts. + * + *

See {@link #queryAccountsWithHttpInfo}. + * + * @param body (required) + * @return QueryResponse + * @throws ApiException if fails to make API call + */ + public QueryResponse queryAccounts(QueryAccountRequest body) throws ApiException { + return queryAccountsWithHttpInfo(body).getData(); + } + + /** + * Query accounts. + * + *

See {@link #queryAccountsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<QueryResponse> + */ + public CompletableFuture queryAccountsAsync(QueryAccountRequest body) { + return queryAccountsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Query accounts with flexible filtering by account properties + * + * @param body (required) + * @return ApiResponse<QueryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Successful response with account data -
429 Too many requests -
+ */ + public ApiResponse queryAccountsWithHttpInfo(QueryAccountRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "queryAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling queryAccounts"); + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/accounts/query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.queryAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Query accounts. + * + *

See {@link #queryAccountsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<QueryResponse>> + */ + public CompletableFuture> queryAccountsWithHttpInfoAsync( + QueryAccountRequest body) { + // Check if unstable operation is enabled + String operationId = "queryAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling queryAccounts")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/accounts/query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.queryAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Query event filtered users. + * + *

See {@link #queryEventFilteredUsersWithHttpInfo}. + * + * @param body (required) + * @return QueryResponse + * @throws ApiException if fails to make API call + */ + public QueryResponse queryEventFilteredUsers(QueryEventFilteredUsersRequest body) + throws ApiException { + return queryEventFilteredUsersWithHttpInfo(body).getData(); + } + + /** + * Query event filtered users. + * + *

See {@link #queryEventFilteredUsersWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<QueryResponse> + */ + public CompletableFuture queryEventFilteredUsersAsync( + QueryEventFilteredUsersRequest body) { + return queryEventFilteredUsersWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Query users filtered by both user properties and event platform data + * + * @param body (required) + * @return ApiResponse<QueryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Successful response with filtered user data -
429 Too many requests -
+ */ + public ApiResponse queryEventFilteredUsersWithHttpInfo( + QueryEventFilteredUsersRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "queryEventFilteredUsers"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling queryEventFilteredUsers"); + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/users/event_filtered_query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.queryEventFilteredUsers", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Query event filtered users. + * + *

See {@link #queryEventFilteredUsersWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<QueryResponse>> + */ + public CompletableFuture> queryEventFilteredUsersWithHttpInfoAsync( + QueryEventFilteredUsersRequest body) { + // Check if unstable operation is enabled + String operationId = "queryEventFilteredUsers"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling queryEventFilteredUsers")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/users/event_filtered_query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.queryEventFilteredUsers", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Query users. + * + *

See {@link #queryUsersWithHttpInfo}. + * + * @param body (required) + * @return QueryResponse + * @throws ApiException if fails to make API call + */ + public QueryResponse queryUsers(QueryUsersRequest body) throws ApiException { + return queryUsersWithHttpInfo(body).getData(); + } + + /** + * Query users. + * + *

See {@link #queryUsersWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<QueryResponse> + */ + public CompletableFuture queryUsersAsync(QueryUsersRequest body) { + return queryUsersWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Query users with flexible filtering by user properties, with optional wildcard search + * + * @param body (required) + * @return ApiResponse<QueryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Successful response with user data -
429 Too many requests -
+ */ + public ApiResponse queryUsersWithHttpInfo(QueryUsersRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "queryUsers"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling queryUsers"); + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/users/query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.queryUsers", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Query users. + * + *

See {@link #queryUsersWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<QueryResponse>> + */ + public CompletableFuture> queryUsersWithHttpInfoAsync( + QueryUsersRequest body) { + // Check if unstable operation is enabled + String operationId = "queryUsers"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'body' when calling queryUsers")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/users/query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.queryUsers", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update connection. + * + *

See {@link #updateConnectionWithHttpInfo}. + * + * @param entity The entity for which to update the connection (required) + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void updateConnection(String entity, UpdateConnectionRequest body) throws ApiException { + updateConnectionWithHttpInfo(entity, body); + } + + /** + * Update connection. + * + *

See {@link #updateConnectionWithHttpInfoAsync}. + * + * @param entity The entity for which to update the connection (required) + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture updateConnectionAsync( + String entity, UpdateConnectionRequest body) { + return updateConnectionWithHttpInfoAsync(entity, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing data connection by adding, updating, or deleting fields + * + * @param entity The entity for which to update the connection (required) + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Connection updated successfully -
429 Too many requests -
+ */ + public ApiResponse updateConnectionWithHttpInfo(String entity, UpdateConnectionRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateConnection"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'entity' is set + if (entity == null) { + throw new ApiException( + 400, "Missing the required parameter 'entity' when calling updateConnection"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateConnection"); + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connection" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.updateConnection", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Update connection. + * + *

See {@link #updateConnectionWithHttpInfo}. + * + * @param entity The entity for which to update the connection (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> updateConnectionWithHttpInfoAsync( + String entity, UpdateConnectionRequest body) { + // Check if unstable operation is enabled + String operationId = "updateConnection"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'entity' is set + if (entity == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'entity' when calling updateConnection")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateConnection")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/product-analytics/{entity}/mapping/connection" + .replaceAll("\\{" + "entity" + "\\}", apiClient.escapeString(entity.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumAudienceManagementApi.updateConnection", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequest.java new file mode 100644 index 00000000000..41eb89dcaca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequest.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({CreateConnectionRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateConnectionRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateConnectionRequestData data; + + public CreateConnectionRequest data(CreateConnectionRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateConnectionRequestData getData() { + return data; + } + + public void setData(CreateConnectionRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateConnectionRequest + */ + @JsonAnySetter + public CreateConnectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateConnectionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionRequest createConnectionRequest = (CreateConnectionRequest) o; + return Objects.equals(this.data, createConnectionRequest.data) + && Objects.equals(this.additionalProperties, createConnectionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestData.java new file mode 100644 index 00000000000..9721872d943 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestData.java @@ -0,0 +1,207 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + CreateConnectionRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateConnectionRequestData.JSON_PROPERTY_ID, + CreateConnectionRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateConnectionRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateConnectionRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private UpdateConnectionRequestDataType type = UpdateConnectionRequestDataType.CONNECTION_ID; + + public CreateConnectionRequestData() {} + + @JsonCreator + public CreateConnectionRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + UpdateConnectionRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateConnectionRequestData attributes(CreateConnectionRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateConnectionRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateConnectionRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateConnectionRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CreateConnectionRequestData type(UpdateConnectionRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Connection id resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpdateConnectionRequestDataType getType() { + return type; + } + + public void setType(UpdateConnectionRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateConnectionRequestData + */ + @JsonAnySetter + public CreateConnectionRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateConnectionRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionRequestData createConnectionRequestData = (CreateConnectionRequestData) o; + return Objects.equals(this.attributes, createConnectionRequestData.attributes) + && Objects.equals(this.id, createConnectionRequestData.id) + && Objects.equals(this.type, createConnectionRequestData.type) + && Objects.equals( + this.additionalProperties, createConnectionRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestDataAttributes.java new file mode 100644 index 00000000000..1760f148c75 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestDataAttributes.java @@ -0,0 +1,281 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + CreateConnectionRequestDataAttributes.JSON_PROPERTY_FIELDS, + CreateConnectionRequestDataAttributes.JSON_PROPERTY_JOIN_ATTRIBUTE, + CreateConnectionRequestDataAttributes.JSON_PROPERTY_JOIN_TYPE, + CreateConnectionRequestDataAttributes.JSON_PROPERTY_METADATA, + CreateConnectionRequestDataAttributes.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateConnectionRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELDS = "fields"; + private List fields = null; + + public static final String JSON_PROPERTY_JOIN_ATTRIBUTE = "join_attribute"; + private String joinAttribute; + + public static final String JSON_PROPERTY_JOIN_TYPE = "join_type"; + private String joinType; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public CreateConnectionRequestDataAttributes() {} + + @JsonCreator + public CreateConnectionRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_JOIN_ATTRIBUTE) String joinAttribute, + @JsonProperty(required = true, value = JSON_PROPERTY_JOIN_TYPE) String joinType, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.joinAttribute = joinAttribute; + this.joinType = joinType; + this.type = type; + } + + public CreateConnectionRequestDataAttributes fields( + List fields) { + this.fields = fields; + for (CreateConnectionRequestDataAttributesFieldsItems item : fields) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateConnectionRequestDataAttributes addFieldsItem( + CreateConnectionRequestDataAttributesFieldsItems fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + this.unparsed |= fieldsItem.unparsed; + return this; + } + + /** + * Getfields + * + * @return fields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public CreateConnectionRequestDataAttributes joinAttribute(String joinAttribute) { + this.joinAttribute = joinAttribute; + return this; + } + + /** + * GetjoinAttribute + * + * @return joinAttribute + */ + @JsonProperty(JSON_PROPERTY_JOIN_ATTRIBUTE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJoinAttribute() { + return joinAttribute; + } + + public void setJoinAttribute(String joinAttribute) { + this.joinAttribute = joinAttribute; + } + + public CreateConnectionRequestDataAttributes joinType(String joinType) { + this.joinType = joinType; + return this; + } + + /** + * GetjoinType + * + * @return joinType + */ + @JsonProperty(JSON_PROPERTY_JOIN_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJoinType() { + return joinType; + } + + public void setJoinType(String joinType) { + this.joinType = joinType; + } + + public CreateConnectionRequestDataAttributes metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public CreateConnectionRequestDataAttributes putMetadataItem(String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Getmetadata + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public CreateConnectionRequestDataAttributes type(String type) { + this.type = type; + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateConnectionRequestDataAttributes + */ + @JsonAnySetter + public CreateConnectionRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateConnectionRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionRequestDataAttributes createConnectionRequestDataAttributes = + (CreateConnectionRequestDataAttributes) o; + return Objects.equals(this.fields, createConnectionRequestDataAttributes.fields) + && Objects.equals(this.joinAttribute, createConnectionRequestDataAttributes.joinAttribute) + && Objects.equals(this.joinType, createConnectionRequestDataAttributes.joinType) + && Objects.equals(this.metadata, createConnectionRequestDataAttributes.metadata) + && Objects.equals(this.type, createConnectionRequestDataAttributes.type) + && Objects.equals( + this.additionalProperties, createConnectionRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(fields, joinAttribute, joinType, metadata, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionRequestDataAttributes {\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" joinAttribute: ").append(toIndentedString(joinAttribute)).append("\n"); + sb.append(" joinType: ").append(toIndentedString(joinType)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestDataAttributesFieldsItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestDataAttributesFieldsItems.java new file mode 100644 index 00000000000..f28f8da52d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateConnectionRequestDataAttributesFieldsItems.java @@ -0,0 +1,301 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + CreateConnectionRequestDataAttributesFieldsItems.JSON_PROPERTY_DESCRIPTION, + CreateConnectionRequestDataAttributesFieldsItems.JSON_PROPERTY_DISPLAY_NAME, + CreateConnectionRequestDataAttributesFieldsItems.JSON_PROPERTY_GROUPS, + CreateConnectionRequestDataAttributesFieldsItems.JSON_PROPERTY_ID, + CreateConnectionRequestDataAttributesFieldsItems.JSON_PROPERTY_SOURCE_NAME, + CreateConnectionRequestDataAttributesFieldsItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateConnectionRequestDataAttributesFieldsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_GROUPS = "groups"; + private List groups = null; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_SOURCE_NAME = "source_name"; + private String sourceName; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public CreateConnectionRequestDataAttributesFieldsItems() {} + + @JsonCreator + public CreateConnectionRequestDataAttributesFieldsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_NAME) String sourceName, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.id = id; + this.sourceName = sourceName; + this.type = type; + } + + public CreateConnectionRequestDataAttributesFieldsItems description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public CreateConnectionRequestDataAttributesFieldsItems displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * GetdisplayName + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public CreateConnectionRequestDataAttributesFieldsItems groups(List groups) { + this.groups = groups; + return this; + } + + public CreateConnectionRequestDataAttributesFieldsItems addGroupsItem(String groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Getgroups + * + * @return groups + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } + + public void setGroups(List groups) { + this.groups = groups; + } + + public CreateConnectionRequestDataAttributesFieldsItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CreateConnectionRequestDataAttributesFieldsItems sourceName(String sourceName) { + this.sourceName = sourceName; + return this; + } + + /** + * GetsourceName + * + * @return sourceName + */ + @JsonProperty(JSON_PROPERTY_SOURCE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceName() { + return sourceName; + } + + public void setSourceName(String sourceName) { + this.sourceName = sourceName; + } + + public CreateConnectionRequestDataAttributesFieldsItems type(String type) { + this.type = type; + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateConnectionRequestDataAttributesFieldsItems + */ + @JsonAnySetter + public CreateConnectionRequestDataAttributesFieldsItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateConnectionRequestDataAttributesFieldsItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateConnectionRequestDataAttributesFieldsItems + createConnectionRequestDataAttributesFieldsItems = + (CreateConnectionRequestDataAttributesFieldsItems) o; + return Objects.equals( + this.description, createConnectionRequestDataAttributesFieldsItems.description) + && Objects.equals( + this.displayName, createConnectionRequestDataAttributesFieldsItems.displayName) + && Objects.equals(this.groups, createConnectionRequestDataAttributesFieldsItems.groups) + && Objects.equals(this.id, createConnectionRequestDataAttributesFieldsItems.id) + && Objects.equals( + this.sourceName, createConnectionRequestDataAttributesFieldsItems.sourceName) + && Objects.equals(this.type, createConnectionRequestDataAttributesFieldsItems.type) + && Objects.equals( + this.additionalProperties, + createConnectionRequestDataAttributesFieldsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + description, displayName, groups, id, sourceName, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateConnectionRequestDataAttributesFieldsItems {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" sourceName: ").append(toIndentedString(sourceName)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequest.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequest.java new file mode 100644 index 00000000000..b54a0d7fa80 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequest.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({FacetInfoRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FacetInfoRequestData data; + + public FacetInfoRequest data(FacetInfoRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoRequestData getData() { + return data; + } + + public void setData(FacetInfoRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoRequest + */ + @JsonAnySetter + public FacetInfoRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoRequest facetInfoRequest = (FacetInfoRequest) o; + return Objects.equals(this.data, facetInfoRequest.data) + && Objects.equals(this.additionalProperties, facetInfoRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestData.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestData.java new file mode 100644 index 00000000000..8c21f4413cb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestData.java @@ -0,0 +1,205 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + FacetInfoRequestData.JSON_PROPERTY_ATTRIBUTES, + FacetInfoRequestData.JSON_PROPERTY_ID, + FacetInfoRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FacetInfoRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FacetInfoRequestDataType type = FacetInfoRequestDataType.USERS_FACET_INFO_REQUEST; + + public FacetInfoRequestData() {} + + @JsonCreator + public FacetInfoRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FacetInfoRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FacetInfoRequestData attributes(FacetInfoRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FacetInfoRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public FacetInfoRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public FacetInfoRequestData type(FacetInfoRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users facet info request resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FacetInfoRequestDataType getType() { + return type; + } + + public void setType(FacetInfoRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoRequestData + */ + @JsonAnySetter + public FacetInfoRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoRequestData facetInfoRequestData = (FacetInfoRequestData) o; + return Objects.equals(this.attributes, facetInfoRequestData.attributes) + && Objects.equals(this.id, facetInfoRequestData.id) + && Objects.equals(this.type, facetInfoRequestData.type) + && Objects.equals(this.additionalProperties, facetInfoRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributes.java new file mode 100644 index 00000000000..0613ea90984 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributes.java @@ -0,0 +1,232 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + FacetInfoRequestDataAttributes.JSON_PROPERTY_FACET_ID, + FacetInfoRequestDataAttributes.JSON_PROPERTY_LIMIT, + FacetInfoRequestDataAttributes.JSON_PROPERTY_SEARCH, + FacetInfoRequestDataAttributes.JSON_PROPERTY_TERM_SEARCH +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FACET_ID = "facet_id"; + private String facetId; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_SEARCH = "search"; + private FacetInfoRequestDataAttributesSearch search; + + public static final String JSON_PROPERTY_TERM_SEARCH = "term_search"; + private FacetInfoRequestDataAttributesTermSearch termSearch; + + public FacetInfoRequestDataAttributes() {} + + @JsonCreator + public FacetInfoRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FACET_ID) String facetId, + @JsonProperty(required = true, value = JSON_PROPERTY_LIMIT) Long limit) { + this.facetId = facetId; + this.limit = limit; + } + + public FacetInfoRequestDataAttributes facetId(String facetId) { + this.facetId = facetId; + return this; + } + + /** + * GetfacetId + * + * @return facetId + */ + @JsonProperty(JSON_PROPERTY_FACET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFacetId() { + return facetId; + } + + public void setFacetId(String facetId) { + this.facetId = facetId; + } + + public FacetInfoRequestDataAttributes limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Getlimit + * + * @return limit + */ + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public FacetInfoRequestDataAttributes search(FacetInfoRequestDataAttributesSearch search) { + this.search = search; + this.unparsed |= search.unparsed; + return this; + } + + /** + * Getsearch + * + * @return search + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoRequestDataAttributesSearch getSearch() { + return search; + } + + public void setSearch(FacetInfoRequestDataAttributesSearch search) { + this.search = search; + } + + public FacetInfoRequestDataAttributes termSearch( + FacetInfoRequestDataAttributesTermSearch termSearch) { + this.termSearch = termSearch; + this.unparsed |= termSearch.unparsed; + return this; + } + + /** + * GettermSearch + * + * @return termSearch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TERM_SEARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoRequestDataAttributesTermSearch getTermSearch() { + return termSearch; + } + + public void setTermSearch(FacetInfoRequestDataAttributesTermSearch termSearch) { + this.termSearch = termSearch; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoRequestDataAttributes + */ + @JsonAnySetter + public FacetInfoRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoRequestDataAttributes facetInfoRequestDataAttributes = + (FacetInfoRequestDataAttributes) o; + return Objects.equals(this.facetId, facetInfoRequestDataAttributes.facetId) + && Objects.equals(this.limit, facetInfoRequestDataAttributes.limit) + && Objects.equals(this.search, facetInfoRequestDataAttributes.search) + && Objects.equals(this.termSearch, facetInfoRequestDataAttributes.termSearch) + && Objects.equals( + this.additionalProperties, facetInfoRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(facetId, limit, search, termSearch, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoRequestDataAttributes {\n"); + sb.append(" facetId: ").append(toIndentedString(facetId)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" search: ").append(toIndentedString(search)).append("\n"); + sb.append(" termSearch: ").append(toIndentedString(termSearch)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributesSearch.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributesSearch.java new file mode 100644 index 00000000000..2358bbd3f33 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributesSearch.java @@ -0,0 +1,137 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({FacetInfoRequestDataAttributesSearch.JSON_PROPERTY_QUERY}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoRequestDataAttributesSearch { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public FacetInfoRequestDataAttributesSearch query(String query) { + this.query = query; + return this; + } + + /** + * Getquery + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoRequestDataAttributesSearch + */ + @JsonAnySetter + public FacetInfoRequestDataAttributesSearch putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoRequestDataAttributesSearch object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoRequestDataAttributesSearch facetInfoRequestDataAttributesSearch = + (FacetInfoRequestDataAttributesSearch) o; + return Objects.equals(this.query, facetInfoRequestDataAttributesSearch.query) + && Objects.equals( + this.additionalProperties, facetInfoRequestDataAttributesSearch.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoRequestDataAttributesSearch {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributesTermSearch.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributesTermSearch.java new file mode 100644 index 00000000000..dc11fa3b360 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataAttributesTermSearch.java @@ -0,0 +1,138 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({FacetInfoRequestDataAttributesTermSearch.JSON_PROPERTY_VALUE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoRequestDataAttributesTermSearch { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public FacetInfoRequestDataAttributesTermSearch value(String value) { + this.value = value; + return this; + } + + /** + * Getvalue + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoRequestDataAttributesTermSearch + */ + @JsonAnySetter + public FacetInfoRequestDataAttributesTermSearch putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoRequestDataAttributesTermSearch object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoRequestDataAttributesTermSearch facetInfoRequestDataAttributesTermSearch = + (FacetInfoRequestDataAttributesTermSearch) o; + return Objects.equals(this.value, facetInfoRequestDataAttributesTermSearch.value) + && Objects.equals( + this.additionalProperties, + facetInfoRequestDataAttributesTermSearch.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoRequestDataAttributesTermSearch {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataType.java new file mode 100644 index 00000000000..ad7749a6401 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoRequestDataType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Users facet info request resource type. */ +@JsonSerialize(using = FacetInfoRequestDataType.FacetInfoRequestDataTypeSerializer.class) +public class FacetInfoRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("users_facet_info_request")); + + public static final FacetInfoRequestDataType USERS_FACET_INFO_REQUEST = + new FacetInfoRequestDataType("users_facet_info_request"); + + FacetInfoRequestDataType(String value) { + super(value, allowedValues); + } + + public static class FacetInfoRequestDataTypeSerializer + extends StdSerializer { + public FacetInfoRequestDataTypeSerializer(Class t) { + super(t); + } + + public FacetInfoRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + FacetInfoRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FacetInfoRequestDataType fromValue(String value) { + return new FacetInfoRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponse.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponse.java new file mode 100644 index 00000000000..fd5db972705 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponse.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({FacetInfoResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FacetInfoResponseData data; + + public FacetInfoResponse data(FacetInfoResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoResponseData getData() { + return data; + } + + public void setData(FacetInfoResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoResponse + */ + @JsonAnySetter + public FacetInfoResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoResponse facetInfoResponse = (FacetInfoResponse) o; + return Objects.equals(this.data, facetInfoResponse.data) + && Objects.equals(this.additionalProperties, facetInfoResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseData.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseData.java new file mode 100644 index 00000000000..6530bf8c4eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseData.java @@ -0,0 +1,205 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + FacetInfoResponseData.JSON_PROPERTY_ATTRIBUTES, + FacetInfoResponseData.JSON_PROPERTY_ID, + FacetInfoResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FacetInfoResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FacetInfoResponseDataType type = FacetInfoResponseDataType.USERS_FACET_INFO; + + public FacetInfoResponseData() {} + + @JsonCreator + public FacetInfoResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FacetInfoResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FacetInfoResponseData attributes(FacetInfoResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FacetInfoResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public FacetInfoResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public FacetInfoResponseData type(FacetInfoResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Users facet info resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FacetInfoResponseDataType getType() { + return type; + } + + public void setType(FacetInfoResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoResponseData + */ + @JsonAnySetter + public FacetInfoResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoResponseData facetInfoResponseData = (FacetInfoResponseData) o; + return Objects.equals(this.attributes, facetInfoResponseData.attributes) + && Objects.equals(this.id, facetInfoResponseData.id) + && Objects.equals(this.type, facetInfoResponseData.type) + && Objects.equals(this.additionalProperties, facetInfoResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributes.java new file mode 100644 index 00000000000..571d34d9284 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributes.java @@ -0,0 +1,138 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({FacetInfoResponseDataAttributes.JSON_PROPERTY_RESULT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESULT = "result"; + private FacetInfoResponseDataAttributesResult result; + + public FacetInfoResponseDataAttributes result(FacetInfoResponseDataAttributesResult result) { + this.result = result; + this.unparsed |= result.unparsed; + return this; + } + + /** + * Getresult + * + * @return result + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoResponseDataAttributesResult getResult() { + return result; + } + + public void setResult(FacetInfoResponseDataAttributesResult result) { + this.result = result; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoResponseDataAttributes + */ + @JsonAnySetter + public FacetInfoResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoResponseDataAttributes facetInfoResponseDataAttributes = + (FacetInfoResponseDataAttributes) o; + return Objects.equals(this.result, facetInfoResponseDataAttributes.result) + && Objects.equals( + this.additionalProperties, facetInfoResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(result, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoResponseDataAttributes {\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResult.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResult.java new file mode 100644 index 00000000000..b48e11ec179 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResult.java @@ -0,0 +1,184 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + FacetInfoResponseDataAttributesResult.JSON_PROPERTY_RANGE, + FacetInfoResponseDataAttributesResult.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoResponseDataAttributesResult { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RANGE = "range"; + private FacetInfoResponseDataAttributesResultRange range; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = null; + + public FacetInfoResponseDataAttributesResult range( + FacetInfoResponseDataAttributesResultRange range) { + this.range = range; + this.unparsed |= range.unparsed; + return this; + } + + /** + * Getrange + * + * @return range + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FacetInfoResponseDataAttributesResultRange getRange() { + return range; + } + + public void setRange(FacetInfoResponseDataAttributesResultRange range) { + this.range = range; + } + + public FacetInfoResponseDataAttributesResult values( + List values) { + this.values = values; + for (FacetInfoResponseDataAttributesResultValuesItems item : values) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FacetInfoResponseDataAttributesResult addValuesItem( + FacetInfoResponseDataAttributesResultValuesItems valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + this.unparsed |= valuesItem.unparsed; + return this; + } + + /** + * Getvalues + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoResponseDataAttributesResult + */ + @JsonAnySetter + public FacetInfoResponseDataAttributesResult putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoResponseDataAttributesResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoResponseDataAttributesResult facetInfoResponseDataAttributesResult = + (FacetInfoResponseDataAttributesResult) o; + return Objects.equals(this.range, facetInfoResponseDataAttributesResult.range) + && Objects.equals(this.values, facetInfoResponseDataAttributesResult.values) + && Objects.equals( + this.additionalProperties, facetInfoResponseDataAttributesResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(range, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoResponseDataAttributesResult {\n"); + sb.append(" range: ").append(toIndentedString(range)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResultRange.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResultRange.java new file mode 100644 index 00000000000..9c257a20c5f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResultRange.java @@ -0,0 +1,168 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + FacetInfoResponseDataAttributesResultRange.JSON_PROPERTY_MAX, + FacetInfoResponseDataAttributesResultRange.JSON_PROPERTY_MIN +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoResponseDataAttributesResultRange { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MAX = "max"; + private Object max; + + public static final String JSON_PROPERTY_MIN = "min"; + private Object min; + + public FacetInfoResponseDataAttributesResultRange max(Object max) { + this.max = max; + return this; + } + + /** + * Getmax + * + * @return max + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getMax() { + return max; + } + + public void setMax(Object max) { + this.max = max; + } + + public FacetInfoResponseDataAttributesResultRange min(Object min) { + this.min = min; + return this; + } + + /** + * Getmin + * + * @return min + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Object getMin() { + return min; + } + + public void setMin(Object min) { + this.min = min; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoResponseDataAttributesResultRange + */ + @JsonAnySetter + public FacetInfoResponseDataAttributesResultRange putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoResponseDataAttributesResultRange object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoResponseDataAttributesResultRange facetInfoResponseDataAttributesResultRange = + (FacetInfoResponseDataAttributesResultRange) o; + return Objects.equals(this.max, facetInfoResponseDataAttributesResultRange.max) + && Objects.equals(this.min, facetInfoResponseDataAttributesResultRange.min) + && Objects.equals( + this.additionalProperties, + facetInfoResponseDataAttributesResultRange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(max, min, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoResponseDataAttributesResultRange {\n"); + sb.append(" max: ").append(toIndentedString(max)).append("\n"); + sb.append(" min: ").append(toIndentedString(min)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResultValuesItems.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResultValuesItems.java new file mode 100644 index 00000000000..573fdcb0943 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataAttributesResultValuesItems.java @@ -0,0 +1,169 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + FacetInfoResponseDataAttributesResultValuesItems.JSON_PROPERTY_COUNT, + FacetInfoResponseDataAttributesResultValuesItems.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FacetInfoResponseDataAttributesResultValuesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COUNT = "count"; + private Long count; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public FacetInfoResponseDataAttributesResultValuesItems count(Long count) { + this.count = count; + return this; + } + + /** + * Getcount + * + * @return count + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getCount() { + return count; + } + + public void setCount(Long count) { + this.count = count; + } + + public FacetInfoResponseDataAttributesResultValuesItems value(String value) { + this.value = value; + return this; + } + + /** + * Getvalue + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FacetInfoResponseDataAttributesResultValuesItems + */ + @JsonAnySetter + public FacetInfoResponseDataAttributesResultValuesItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FacetInfoResponseDataAttributesResultValuesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FacetInfoResponseDataAttributesResultValuesItems + facetInfoResponseDataAttributesResultValuesItems = + (FacetInfoResponseDataAttributesResultValuesItems) o; + return Objects.equals(this.count, facetInfoResponseDataAttributesResultValuesItems.count) + && Objects.equals(this.value, facetInfoResponseDataAttributesResultValuesItems.value) + && Objects.equals( + this.additionalProperties, + facetInfoResponseDataAttributesResultValuesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(count, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FacetInfoResponseDataAttributesResultValuesItems {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataType.java new file mode 100644 index 00000000000..13338a6a6ea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FacetInfoResponseDataType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Users facet info resource type. */ +@JsonSerialize(using = FacetInfoResponseDataType.FacetInfoResponseDataTypeSerializer.class) +public class FacetInfoResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("users_facet_info")); + + public static final FacetInfoResponseDataType USERS_FACET_INFO = + new FacetInfoResponseDataType("users_facet_info"); + + FacetInfoResponseDataType(String value) { + super(value, allowedValues); + } + + public static class FacetInfoResponseDataTypeSerializer + extends StdSerializer { + public FacetInfoResponseDataTypeSerializer(Class t) { + super(t); + } + + public FacetInfoResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + FacetInfoResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FacetInfoResponseDataType fromValue(String value) { + return new FacetInfoResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMappingResponse.java b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponse.java new file mode 100644 index 00000000000..8b5c55c15d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponse.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({GetMappingResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMappingResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GetMappingResponseData data; + + public GetMappingResponse data(GetMappingResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GetMappingResponseData getData() { + return data; + } + + public void setData(GetMappingResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetMappingResponse + */ + @JsonAnySetter + public GetMappingResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetMappingResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMappingResponse getMappingResponse = (GetMappingResponse) o; + return Objects.equals(this.data, getMappingResponse.data) + && Objects.equals(this.additionalProperties, getMappingResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMappingResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseData.java b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseData.java new file mode 100644 index 00000000000..89f611f0a71 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseData.java @@ -0,0 +1,205 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + GetMappingResponseData.JSON_PROPERTY_ATTRIBUTES, + GetMappingResponseData.JSON_PROPERTY_ID, + GetMappingResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMappingResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GetMappingResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GetMappingResponseDataType type = GetMappingResponseDataType.GET_MAPPINGS_RESPONSE; + + public GetMappingResponseData() {} + + @JsonCreator + public GetMappingResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) GetMappingResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GetMappingResponseData attributes(GetMappingResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GetMappingResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GetMappingResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public GetMappingResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public GetMappingResponseData type(GetMappingResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Get mappings response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetMappingResponseDataType getType() { + return type; + } + + public void setType(GetMappingResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetMappingResponseData + */ + @JsonAnySetter + public GetMappingResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetMappingResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMappingResponseData getMappingResponseData = (GetMappingResponseData) o; + return Objects.equals(this.attributes, getMappingResponseData.attributes) + && Objects.equals(this.id, getMappingResponseData.id) + && Objects.equals(this.type, getMappingResponseData.type) + && Objects.equals(this.additionalProperties, getMappingResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMappingResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataAttributes.java new file mode 100644 index 00000000000..98d99c89c64 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataAttributes.java @@ -0,0 +1,153 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({GetMappingResponseDataAttributes.JSON_PROPERTY_ATTRIBUTES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMappingResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private List attributes = null; + + public GetMappingResponseDataAttributes attributes( + List attributes) { + this.attributes = attributes; + for (GetMappingResponseDataAttributesAttributesItems item : attributes) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GetMappingResponseDataAttributes addAttributesItem( + GetMappingResponseDataAttributesAttributesItems attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + this.unparsed |= attributesItem.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttributes() { + return attributes; + } + + public void setAttributes(List attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetMappingResponseDataAttributes + */ + @JsonAnySetter + public GetMappingResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetMappingResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMappingResponseDataAttributes getMappingResponseDataAttributes = + (GetMappingResponseDataAttributes) o; + return Objects.equals(this.attributes, getMappingResponseDataAttributes.attributes) + && Objects.equals( + this.additionalProperties, getMappingResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMappingResponseDataAttributes {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataAttributesAttributesItems.java b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataAttributesAttributesItems.java new file mode 100644 index 00000000000..cb44269941c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataAttributesAttributesItems.java @@ -0,0 +1,290 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + GetMappingResponseDataAttributesAttributesItems.JSON_PROPERTY_ATTRIBUTE, + GetMappingResponseDataAttributesAttributesItems.JSON_PROPERTY_DESCRIPTION, + GetMappingResponseDataAttributesAttributesItems.JSON_PROPERTY_DISPLAY_NAME, + GetMappingResponseDataAttributesAttributesItems.JSON_PROPERTY_GROUPS, + GetMappingResponseDataAttributesAttributesItems.JSON_PROPERTY_IS_CUSTOM, + GetMappingResponseDataAttributesAttributesItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetMappingResponseDataAttributesAttributesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTE = "attribute"; + private String attribute; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_GROUPS = "groups"; + private List groups = null; + + public static final String JSON_PROPERTY_IS_CUSTOM = "is_custom"; + private Boolean isCustom; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public GetMappingResponseDataAttributesAttributesItems attribute(String attribute) { + this.attribute = attribute; + return this; + } + + /** + * Getattribute + * + * @return attribute + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public GetMappingResponseDataAttributesAttributesItems description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public GetMappingResponseDataAttributesAttributesItems displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * GetdisplayName + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public GetMappingResponseDataAttributesAttributesItems groups(List groups) { + this.groups = groups; + return this; + } + + public GetMappingResponseDataAttributesAttributesItems addGroupsItem(String groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + return this; + } + + /** + * Getgroups + * + * @return groups + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } + + public void setGroups(List groups) { + this.groups = groups; + } + + public GetMappingResponseDataAttributesAttributesItems isCustom(Boolean isCustom) { + this.isCustom = isCustom; + return this; + } + + /** + * GetisCustom + * + * @return isCustom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_CUSTOM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsCustom() { + return isCustom; + } + + public void setIsCustom(Boolean isCustom) { + this.isCustom = isCustom; + } + + public GetMappingResponseDataAttributesAttributesItems type(String type) { + this.type = type; + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetMappingResponseDataAttributesAttributesItems + */ + @JsonAnySetter + public GetMappingResponseDataAttributesAttributesItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetMappingResponseDataAttributesAttributesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetMappingResponseDataAttributesAttributesItems + getMappingResponseDataAttributesAttributesItems = + (GetMappingResponseDataAttributesAttributesItems) o; + return Objects.equals(this.attribute, getMappingResponseDataAttributesAttributesItems.attribute) + && Objects.equals( + this.description, getMappingResponseDataAttributesAttributesItems.description) + && Objects.equals( + this.displayName, getMappingResponseDataAttributesAttributesItems.displayName) + && Objects.equals(this.groups, getMappingResponseDataAttributesAttributesItems.groups) + && Objects.equals(this.isCustom, getMappingResponseDataAttributesAttributesItems.isCustom) + && Objects.equals(this.type, getMappingResponseDataAttributesAttributesItems.type) + && Objects.equals( + this.additionalProperties, + getMappingResponseDataAttributesAttributesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + attribute, description, displayName, groups, isCustom, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetMappingResponseDataAttributesAttributesItems {\n"); + sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" isCustom: ").append(toIndentedString(isCustom)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataType.java new file mode 100644 index 00000000000..dd6f43ca774 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetMappingResponseDataType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Get mappings response resource type. */ +@JsonSerialize(using = GetMappingResponseDataType.GetMappingResponseDataTypeSerializer.class) +public class GetMappingResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_mappings_response")); + + public static final GetMappingResponseDataType GET_MAPPINGS_RESPONSE = + new GetMappingResponseDataType("get_mappings_response"); + + GetMappingResponseDataType(String value) { + super(value, allowedValues); + } + + public static class GetMappingResponseDataTypeSerializer + extends StdSerializer { + public GetMappingResponseDataTypeSerializer(Class t) { + super(t); + } + + public GetMappingResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GetMappingResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GetMappingResponseDataType fromValue(String value) { + return new GetMappingResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponse.java new file mode 100644 index 00000000000..199cbbf6a6d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponse.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ListConnectionsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListConnectionsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ListConnectionsResponseData data; + + public ListConnectionsResponse data(ListConnectionsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ListConnectionsResponseData getData() { + return data; + } + + public void setData(ListConnectionsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListConnectionsResponse + */ + @JsonAnySetter + public ListConnectionsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ListConnectionsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionsResponse listConnectionsResponse = (ListConnectionsResponse) o; + return Objects.equals(this.data, listConnectionsResponse.data) + && Objects.equals(this.additionalProperties, listConnectionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseData.java new file mode 100644 index 00000000000..e5cfeaf7c80 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseData.java @@ -0,0 +1,208 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + ListConnectionsResponseData.JSON_PROPERTY_ATTRIBUTES, + ListConnectionsResponseData.JSON_PROPERTY_ID, + ListConnectionsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListConnectionsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ListConnectionsResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ListConnectionsResponseDataType type = + ListConnectionsResponseDataType.LIST_CONNECTIONS_RESPONSE; + + public ListConnectionsResponseData() {} + + @JsonCreator + public ListConnectionsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ListConnectionsResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ListConnectionsResponseData attributes(ListConnectionsResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ListConnectionsResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ListConnectionsResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public ListConnectionsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ListConnectionsResponseData type(ListConnectionsResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * List connections response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ListConnectionsResponseDataType getType() { + return type; + } + + public void setType(ListConnectionsResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListConnectionsResponseData + */ + @JsonAnySetter + public ListConnectionsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ListConnectionsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionsResponseData listConnectionsResponseData = (ListConnectionsResponseData) o; + return Objects.equals(this.attributes, listConnectionsResponseData.attributes) + && Objects.equals(this.id, listConnectionsResponseData.id) + && Objects.equals(this.type, listConnectionsResponseData.type) + && Objects.equals( + this.additionalProperties, listConnectionsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributes.java new file mode 100644 index 00000000000..c43611a5ef8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributes.java @@ -0,0 +1,154 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ListConnectionsResponseDataAttributes.JSON_PROPERTY_CONNECTIONS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListConnectionsResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONNECTIONS = "connections"; + private List connections = null; + + public ListConnectionsResponseDataAttributes connections( + List connections) { + this.connections = connections; + for (ListConnectionsResponseDataAttributesConnectionsItems item : connections) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListConnectionsResponseDataAttributes addConnectionsItem( + ListConnectionsResponseDataAttributesConnectionsItems connectionsItem) { + if (this.connections == null) { + this.connections = new ArrayList<>(); + } + this.connections.add(connectionsItem); + this.unparsed |= connectionsItem.unparsed; + return this; + } + + /** + * Getconnections + * + * @return connections + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONNECTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConnections() { + return connections; + } + + public void setConnections( + List connections) { + this.connections = connections; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListConnectionsResponseDataAttributes + */ + @JsonAnySetter + public ListConnectionsResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ListConnectionsResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionsResponseDataAttributes listConnectionsResponseDataAttributes = + (ListConnectionsResponseDataAttributes) o; + return Objects.equals(this.connections, listConnectionsResponseDataAttributes.connections) + && Objects.equals( + this.additionalProperties, listConnectionsResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(connections, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionsResponseDataAttributes {\n"); + sb.append(" connections: ").append(toIndentedString(connections)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributesConnectionsItems.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributesConnectionsItems.java new file mode 100644 index 00000000000..3021ccf7d4a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributesConnectionsItems.java @@ -0,0 +1,404 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_CREATED_AT, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_CREATED_BY, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_FIELDS, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_ID, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_JOIN, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_METADATA, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_TYPE, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_UPDATED_AT, + ListConnectionsResponseDataAttributesConnectionsItems.JSON_PROPERTY_UPDATED_BY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListConnectionsResponseDataAttributesConnectionsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_FIELDS = "fields"; + private List fields = null; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_JOIN = "join"; + private ListConnectionsResponseDataAttributesConnectionsItemsJoin join; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + private String updatedBy; + + public ListConnectionsResponseDataAttributesConnectionsItems createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * GetcreatedAt + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public ListConnectionsResponseDataAttributesConnectionsItems createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * GetcreatedBy + * + * @return createdBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public ListConnectionsResponseDataAttributesConnectionsItems fields( + List fields) { + this.fields = fields; + for (CreateConnectionRequestDataAttributesFieldsItems item : fields) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListConnectionsResponseDataAttributesConnectionsItems addFieldsItem( + CreateConnectionRequestDataAttributesFieldsItems fieldsItem) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.add(fieldsItem); + this.unparsed |= fieldsItem.unparsed; + return this; + } + + /** + * Getfields + * + * @return fields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFields() { + return fields; + } + + public void setFields(List fields) { + this.fields = fields; + } + + public ListConnectionsResponseDataAttributesConnectionsItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ListConnectionsResponseDataAttributesConnectionsItems join( + ListConnectionsResponseDataAttributesConnectionsItemsJoin join) { + this.join = join; + this.unparsed |= join.unparsed; + return this; + } + + /** + * Getjoin + * + * @return join + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JOIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ListConnectionsResponseDataAttributesConnectionsItemsJoin getJoin() { + return join; + } + + public void setJoin(ListConnectionsResponseDataAttributesConnectionsItemsJoin join) { + this.join = join; + } + + public ListConnectionsResponseDataAttributesConnectionsItems metadata( + Map metadata) { + this.metadata = metadata; + return this; + } + + public ListConnectionsResponseDataAttributesConnectionsItems putMetadataItem( + String key, String metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Getmetadata + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getMetadata() { + return metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + public ListConnectionsResponseDataAttributesConnectionsItems type(String type) { + this.type = type; + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ListConnectionsResponseDataAttributesConnectionsItems updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * GetupdatedAt + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public ListConnectionsResponseDataAttributesConnectionsItems updatedBy(String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + /** + * GetupdatedBy + * + * @return updatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListConnectionsResponseDataAttributesConnectionsItems + */ + @JsonAnySetter + public ListConnectionsResponseDataAttributesConnectionsItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ListConnectionsResponseDataAttributesConnectionsItems object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionsResponseDataAttributesConnectionsItems + listConnectionsResponseDataAttributesConnectionsItems = + (ListConnectionsResponseDataAttributesConnectionsItems) o; + return Objects.equals( + this.createdAt, listConnectionsResponseDataAttributesConnectionsItems.createdAt) + && Objects.equals( + this.createdBy, listConnectionsResponseDataAttributesConnectionsItems.createdBy) + && Objects.equals(this.fields, listConnectionsResponseDataAttributesConnectionsItems.fields) + && Objects.equals(this.id, listConnectionsResponseDataAttributesConnectionsItems.id) + && Objects.equals(this.join, listConnectionsResponseDataAttributesConnectionsItems.join) + && Objects.equals( + this.metadata, listConnectionsResponseDataAttributesConnectionsItems.metadata) + && Objects.equals(this.type, listConnectionsResponseDataAttributesConnectionsItems.type) + && Objects.equals( + this.updatedAt, listConnectionsResponseDataAttributesConnectionsItems.updatedAt) + && Objects.equals( + this.updatedBy, listConnectionsResponseDataAttributesConnectionsItems.updatedBy) + && Objects.equals( + this.additionalProperties, + listConnectionsResponseDataAttributesConnectionsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + fields, + id, + join, + metadata, + type, + updatedAt, + updatedBy, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionsResponseDataAttributesConnectionsItems {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" join: ").append(toIndentedString(join)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributesConnectionsItemsJoin.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributesConnectionsItemsJoin.java new file mode 100644 index 00000000000..1f2dabc0441 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataAttributesConnectionsItemsJoin.java @@ -0,0 +1,173 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + ListConnectionsResponseDataAttributesConnectionsItemsJoin.JSON_PROPERTY_ATTRIBUTE, + ListConnectionsResponseDataAttributesConnectionsItemsJoin.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListConnectionsResponseDataAttributesConnectionsItemsJoin { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTE = "attribute"; + private String attribute; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public ListConnectionsResponseDataAttributesConnectionsItemsJoin attribute(String attribute) { + this.attribute = attribute; + return this; + } + + /** + * Getattribute + * + * @return attribute + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAttribute() { + return attribute; + } + + public void setAttribute(String attribute) { + this.attribute = attribute; + } + + public ListConnectionsResponseDataAttributesConnectionsItemsJoin type(String type) { + this.type = type; + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListConnectionsResponseDataAttributesConnectionsItemsJoin + */ + @JsonAnySetter + public ListConnectionsResponseDataAttributesConnectionsItemsJoin putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ListConnectionsResponseDataAttributesConnectionsItemsJoin object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListConnectionsResponseDataAttributesConnectionsItemsJoin + listConnectionsResponseDataAttributesConnectionsItemsJoin = + (ListConnectionsResponseDataAttributesConnectionsItemsJoin) o; + return Objects.equals( + this.attribute, listConnectionsResponseDataAttributesConnectionsItemsJoin.attribute) + && Objects.equals(this.type, listConnectionsResponseDataAttributesConnectionsItemsJoin.type) + && Objects.equals( + this.additionalProperties, + listConnectionsResponseDataAttributesConnectionsItemsJoin.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attribute, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListConnectionsResponseDataAttributesConnectionsItemsJoin {\n"); + sb.append(" attribute: ").append(toIndentedString(attribute)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataType.java new file mode 100644 index 00000000000..c02645cbc64 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListConnectionsResponseDataType.java @@ -0,0 +1,58 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** List connections response resource type. */ +@JsonSerialize( + using = ListConnectionsResponseDataType.ListConnectionsResponseDataTypeSerializer.class) +public class ListConnectionsResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("list_connections_response")); + + public static final ListConnectionsResponseDataType LIST_CONNECTIONS_RESPONSE = + new ListConnectionsResponseDataType("list_connections_response"); + + ListConnectionsResponseDataType(String value) { + super(value, allowedValues); + } + + public static class ListConnectionsResponseDataTypeSerializer + extends StdSerializer { + public ListConnectionsResponseDataTypeSerializer(Class t) { + super(t); + } + + public ListConnectionsResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ListConnectionsResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ListConnectionsResponseDataType fromValue(String value) { + return new ListConnectionsResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequest.java b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequest.java new file mode 100644 index 00000000000..03ee419b736 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequest.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({QueryAccountRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryAccountRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private QueryAccountRequestData data; + + public QueryAccountRequest data(QueryAccountRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryAccountRequestData getData() { + return data; + } + + public void setData(QueryAccountRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryAccountRequest + */ + @JsonAnySetter + public QueryAccountRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryAccountRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryAccountRequest queryAccountRequest = (QueryAccountRequest) o; + return Objects.equals(this.data, queryAccountRequest.data) + && Objects.equals(this.additionalProperties, queryAccountRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryAccountRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestData.java b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestData.java new file mode 100644 index 00000000000..0ef1996e845 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestData.java @@ -0,0 +1,205 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryAccountRequestData.JSON_PROPERTY_ATTRIBUTES, + QueryAccountRequestData.JSON_PROPERTY_ID, + QueryAccountRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryAccountRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private QueryAccountRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private QueryAccountRequestDataType type = QueryAccountRequestDataType.QUERY_ACCOUNT_REQUEST; + + public QueryAccountRequestData() {} + + @JsonCreator + public QueryAccountRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) QueryAccountRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public QueryAccountRequestData attributes(QueryAccountRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryAccountRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(QueryAccountRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public QueryAccountRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public QueryAccountRequestData type(QueryAccountRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Query account request resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueryAccountRequestDataType getType() { + return type; + } + + public void setType(QueryAccountRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryAccountRequestData + */ + @JsonAnySetter + public QueryAccountRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryAccountRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryAccountRequestData queryAccountRequestData = (QueryAccountRequestData) o; + return Objects.equals(this.attributes, queryAccountRequestData.attributes) + && Objects.equals(this.id, queryAccountRequestData.id) + && Objects.equals(this.type, queryAccountRequestData.type) + && Objects.equals(this.additionalProperties, queryAccountRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryAccountRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataAttributes.java new file mode 100644 index 00000000000..2ed4a6d5d6c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataAttributes.java @@ -0,0 +1,260 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryAccountRequestDataAttributes.JSON_PROPERTY_LIMIT, + QueryAccountRequestDataAttributes.JSON_PROPERTY_QUERY, + QueryAccountRequestDataAttributes.JSON_PROPERTY_SELECT_COLUMNS, + QueryAccountRequestDataAttributes.JSON_PROPERTY_SORT, + QueryAccountRequestDataAttributes.JSON_PROPERTY_WILDCARD_SEARCH_TERM +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryAccountRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_SELECT_COLUMNS = "select_columns"; + private List selectColumns = null; + + public static final String JSON_PROPERTY_SORT = "sort"; + private QueryAccountRequestDataAttributesSort sort; + + public static final String JSON_PROPERTY_WILDCARD_SEARCH_TERM = "wildcard_search_term"; + private String wildcardSearchTerm; + + public QueryAccountRequestDataAttributes limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Getlimit + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public QueryAccountRequestDataAttributes query(String query) { + this.query = query; + return this; + } + + /** + * Getquery + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public QueryAccountRequestDataAttributes selectColumns(List selectColumns) { + this.selectColumns = selectColumns; + return this; + } + + public QueryAccountRequestDataAttributes addSelectColumnsItem(String selectColumnsItem) { + if (this.selectColumns == null) { + this.selectColumns = new ArrayList<>(); + } + this.selectColumns.add(selectColumnsItem); + return this; + } + + /** + * GetselectColumns + * + * @return selectColumns + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSelectColumns() { + return selectColumns; + } + + public void setSelectColumns(List selectColumns) { + this.selectColumns = selectColumns; + } + + public QueryAccountRequestDataAttributes sort(QueryAccountRequestDataAttributesSort sort) { + this.sort = sort; + this.unparsed |= sort.unparsed; + return this; + } + + /** + * Getsort + * + * @return sort + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryAccountRequestDataAttributesSort getSort() { + return sort; + } + + public void setSort(QueryAccountRequestDataAttributesSort sort) { + this.sort = sort; + } + + public QueryAccountRequestDataAttributes wildcardSearchTerm(String wildcardSearchTerm) { + this.wildcardSearchTerm = wildcardSearchTerm; + return this; + } + + /** + * GetwildcardSearchTerm + * + * @return wildcardSearchTerm + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WILDCARD_SEARCH_TERM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWildcardSearchTerm() { + return wildcardSearchTerm; + } + + public void setWildcardSearchTerm(String wildcardSearchTerm) { + this.wildcardSearchTerm = wildcardSearchTerm; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryAccountRequestDataAttributes + */ + @JsonAnySetter + public QueryAccountRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryAccountRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryAccountRequestDataAttributes queryAccountRequestDataAttributes = + (QueryAccountRequestDataAttributes) o; + return Objects.equals(this.limit, queryAccountRequestDataAttributes.limit) + && Objects.equals(this.query, queryAccountRequestDataAttributes.query) + && Objects.equals(this.selectColumns, queryAccountRequestDataAttributes.selectColumns) + && Objects.equals(this.sort, queryAccountRequestDataAttributes.sort) + && Objects.equals( + this.wildcardSearchTerm, queryAccountRequestDataAttributes.wildcardSearchTerm) + && Objects.equals( + this.additionalProperties, queryAccountRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + limit, query, selectColumns, sort, wildcardSearchTerm, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryAccountRequestDataAttributes {\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" selectColumns: ").append(toIndentedString(selectColumns)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" wildcardSearchTerm: ").append(toIndentedString(wildcardSearchTerm)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataAttributesSort.java b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataAttributesSort.java new file mode 100644 index 00000000000..96a21c4f38b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataAttributesSort.java @@ -0,0 +1,166 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryAccountRequestDataAttributesSort.JSON_PROPERTY_FIELD, + QueryAccountRequestDataAttributesSort.JSON_PROPERTY_ORDER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryAccountRequestDataAttributesSort { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + public static final String JSON_PROPERTY_ORDER = "order"; + private String order; + + public QueryAccountRequestDataAttributesSort field(String field) { + this.field = field; + return this; + } + + /** + * Getfield + * + * @return field + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + public QueryAccountRequestDataAttributesSort order(String order) { + this.order = order; + return this; + } + + /** + * Getorder + * + * @return order + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrder() { + return order; + } + + public void setOrder(String order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryAccountRequestDataAttributesSort + */ + @JsonAnySetter + public QueryAccountRequestDataAttributesSort putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryAccountRequestDataAttributesSort object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryAccountRequestDataAttributesSort queryAccountRequestDataAttributesSort = + (QueryAccountRequestDataAttributesSort) o; + return Objects.equals(this.field, queryAccountRequestDataAttributesSort.field) + && Objects.equals(this.order, queryAccountRequestDataAttributesSort.order) + && Objects.equals( + this.additionalProperties, queryAccountRequestDataAttributesSort.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(field, order, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryAccountRequestDataAttributesSort {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataType.java new file mode 100644 index 00000000000..3aeea9818ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryAccountRequestDataType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Query account request resource type. */ +@JsonSerialize(using = QueryAccountRequestDataType.QueryAccountRequestDataTypeSerializer.class) +public class QueryAccountRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("query_account_request")); + + public static final QueryAccountRequestDataType QUERY_ACCOUNT_REQUEST = + new QueryAccountRequestDataType("query_account_request"); + + QueryAccountRequestDataType(String value) { + super(value, allowedValues); + } + + public static class QueryAccountRequestDataTypeSerializer + extends StdSerializer { + public QueryAccountRequestDataTypeSerializer(Class t) { + super(t); + } + + public QueryAccountRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + QueryAccountRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static QueryAccountRequestDataType fromValue(String value) { + return new QueryAccountRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequest.java b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequest.java new file mode 100644 index 00000000000..1ab86409613 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequest.java @@ -0,0 +1,138 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({QueryEventFilteredUsersRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryEventFilteredUsersRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private QueryEventFilteredUsersRequestData data; + + public QueryEventFilteredUsersRequest data(QueryEventFilteredUsersRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryEventFilteredUsersRequestData getData() { + return data; + } + + public void setData(QueryEventFilteredUsersRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryEventFilteredUsersRequest + */ + @JsonAnySetter + public QueryEventFilteredUsersRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryEventFilteredUsersRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryEventFilteredUsersRequest queryEventFilteredUsersRequest = + (QueryEventFilteredUsersRequest) o; + return Objects.equals(this.data, queryEventFilteredUsersRequest.data) + && Objects.equals( + this.additionalProperties, queryEventFilteredUsersRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryEventFilteredUsersRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestData.java b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestData.java new file mode 100644 index 00000000000..32c9ef3456b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestData.java @@ -0,0 +1,210 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryEventFilteredUsersRequestData.JSON_PROPERTY_ATTRIBUTES, + QueryEventFilteredUsersRequestData.JSON_PROPERTY_ID, + QueryEventFilteredUsersRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryEventFilteredUsersRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private QueryEventFilteredUsersRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private QueryEventFilteredUsersRequestDataType type = + QueryEventFilteredUsersRequestDataType.QUERY_EVENT_FILTERED_USERS_REQUEST; + + public QueryEventFilteredUsersRequestData() {} + + @JsonCreator + public QueryEventFilteredUsersRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + QueryEventFilteredUsersRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public QueryEventFilteredUsersRequestData attributes( + QueryEventFilteredUsersRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryEventFilteredUsersRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(QueryEventFilteredUsersRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public QueryEventFilteredUsersRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public QueryEventFilteredUsersRequestData type(QueryEventFilteredUsersRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Query event filtered users request resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueryEventFilteredUsersRequestDataType getType() { + return type; + } + + public void setType(QueryEventFilteredUsersRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryEventFilteredUsersRequestData + */ + @JsonAnySetter + public QueryEventFilteredUsersRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryEventFilteredUsersRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryEventFilteredUsersRequestData queryEventFilteredUsersRequestData = + (QueryEventFilteredUsersRequestData) o; + return Objects.equals(this.attributes, queryEventFilteredUsersRequestData.attributes) + && Objects.equals(this.id, queryEventFilteredUsersRequestData.id) + && Objects.equals(this.type, queryEventFilteredUsersRequestData.type) + && Objects.equals( + this.additionalProperties, queryEventFilteredUsersRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryEventFilteredUsersRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributes.java new file mode 100644 index 00000000000..3092afd4ff6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributes.java @@ -0,0 +1,265 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryEventFilteredUsersRequestDataAttributes.JSON_PROPERTY_EVENT_QUERY, + QueryEventFilteredUsersRequestDataAttributes.JSON_PROPERTY_INCLUDE_ROW_COUNT, + QueryEventFilteredUsersRequestDataAttributes.JSON_PROPERTY_LIMIT, + QueryEventFilteredUsersRequestDataAttributes.JSON_PROPERTY_QUERY, + QueryEventFilteredUsersRequestDataAttributes.JSON_PROPERTY_SELECT_COLUMNS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryEventFilteredUsersRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENT_QUERY = "event_query"; + private QueryEventFilteredUsersRequestDataAttributesEventQuery eventQuery; + + public static final String JSON_PROPERTY_INCLUDE_ROW_COUNT = "include_row_count"; + private Boolean includeRowCount; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_SELECT_COLUMNS = "select_columns"; + private List selectColumns = null; + + public QueryEventFilteredUsersRequestDataAttributes eventQuery( + QueryEventFilteredUsersRequestDataAttributesEventQuery eventQuery) { + this.eventQuery = eventQuery; + this.unparsed |= eventQuery.unparsed; + return this; + } + + /** + * GeteventQuery + * + * @return eventQuery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryEventFilteredUsersRequestDataAttributesEventQuery getEventQuery() { + return eventQuery; + } + + public void setEventQuery(QueryEventFilteredUsersRequestDataAttributesEventQuery eventQuery) { + this.eventQuery = eventQuery; + } + + public QueryEventFilteredUsersRequestDataAttributes includeRowCount(Boolean includeRowCount) { + this.includeRowCount = includeRowCount; + return this; + } + + /** + * GetincludeRowCount + * + * @return includeRowCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE_ROW_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIncludeRowCount() { + return includeRowCount; + } + + public void setIncludeRowCount(Boolean includeRowCount) { + this.includeRowCount = includeRowCount; + } + + public QueryEventFilteredUsersRequestDataAttributes limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Getlimit + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public QueryEventFilteredUsersRequestDataAttributes query(String query) { + this.query = query; + return this; + } + + /** + * Getquery + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public QueryEventFilteredUsersRequestDataAttributes selectColumns(List selectColumns) { + this.selectColumns = selectColumns; + return this; + } + + public QueryEventFilteredUsersRequestDataAttributes addSelectColumnsItem( + String selectColumnsItem) { + if (this.selectColumns == null) { + this.selectColumns = new ArrayList<>(); + } + this.selectColumns.add(selectColumnsItem); + return this; + } + + /** + * GetselectColumns + * + * @return selectColumns + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSelectColumns() { + return selectColumns; + } + + public void setSelectColumns(List selectColumns) { + this.selectColumns = selectColumns; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryEventFilteredUsersRequestDataAttributes + */ + @JsonAnySetter + public QueryEventFilteredUsersRequestDataAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryEventFilteredUsersRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryEventFilteredUsersRequestDataAttributes queryEventFilteredUsersRequestDataAttributes = + (QueryEventFilteredUsersRequestDataAttributes) o; + return Objects.equals(this.eventQuery, queryEventFilteredUsersRequestDataAttributes.eventQuery) + && Objects.equals( + this.includeRowCount, queryEventFilteredUsersRequestDataAttributes.includeRowCount) + && Objects.equals(this.limit, queryEventFilteredUsersRequestDataAttributes.limit) + && Objects.equals(this.query, queryEventFilteredUsersRequestDataAttributes.query) + && Objects.equals( + this.selectColumns, queryEventFilteredUsersRequestDataAttributes.selectColumns) + && Objects.equals( + this.additionalProperties, + queryEventFilteredUsersRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + eventQuery, includeRowCount, limit, query, selectColumns, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryEventFilteredUsersRequestDataAttributes {\n"); + sb.append(" eventQuery: ").append(toIndentedString(eventQuery)).append("\n"); + sb.append(" includeRowCount: ").append(toIndentedString(includeRowCount)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" selectColumns: ").append(toIndentedString(selectColumns)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributesEventQuery.java b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributesEventQuery.java new file mode 100644 index 00000000000..8d9f3f2903b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributesEventQuery.java @@ -0,0 +1,176 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryEventFilteredUsersRequestDataAttributesEventQuery.JSON_PROPERTY_QUERY, + QueryEventFilteredUsersRequestDataAttributesEventQuery.JSON_PROPERTY_TIME_FRAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryEventFilteredUsersRequestDataAttributesEventQuery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_TIME_FRAME = "time_frame"; + private QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame timeFrame; + + public QueryEventFilteredUsersRequestDataAttributesEventQuery query(String query) { + this.query = query; + return this; + } + + /** + * Getquery + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public QueryEventFilteredUsersRequestDataAttributesEventQuery timeFrame( + QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame timeFrame) { + this.timeFrame = timeFrame; + this.unparsed |= timeFrame.unparsed; + return this; + } + + /** + * GettimeFrame + * + * @return timeFrame + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME_FRAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame getTimeFrame() { + return timeFrame; + } + + public void setTimeFrame( + QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame timeFrame) { + this.timeFrame = timeFrame; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryEventFilteredUsersRequestDataAttributesEventQuery + */ + @JsonAnySetter + public QueryEventFilteredUsersRequestDataAttributesEventQuery putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this QueryEventFilteredUsersRequestDataAttributesEventQuery object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryEventFilteredUsersRequestDataAttributesEventQuery + queryEventFilteredUsersRequestDataAttributesEventQuery = + (QueryEventFilteredUsersRequestDataAttributesEventQuery) o; + return Objects.equals(this.query, queryEventFilteredUsersRequestDataAttributesEventQuery.query) + && Objects.equals( + this.timeFrame, queryEventFilteredUsersRequestDataAttributesEventQuery.timeFrame) + && Objects.equals( + this.additionalProperties, + queryEventFilteredUsersRequestDataAttributesEventQuery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(query, timeFrame, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryEventFilteredUsersRequestDataAttributesEventQuery {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" timeFrame: ").append(toIndentedString(timeFrame)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.java b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.java new file mode 100644 index 00000000000..0c761993618 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.java @@ -0,0 +1,174 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.JSON_PROPERTY_END, + QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.JSON_PROPERTY_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_END = "end"; + private Long end; + + public static final String JSON_PROPERTY_START = "start"; + private Long start; + + public QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame end(Long end) { + this.end = end; + return this; + } + + /** + * Getend + * + * @return end + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnd() { + return end; + } + + public void setEnd(Long end) { + this.end = end; + } + + public QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame start(Long start) { + this.start = start; + return this; + } + + /** + * Getstart + * + * @return start + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getStart() { + return start; + } + + public void setStart(Long start) { + this.start = start; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame + */ + @JsonAnySetter + public QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame + queryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame = + (QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame) o; + return Objects.equals( + this.end, queryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.end) + && Objects.equals( + this.start, queryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.start) + && Objects.equals( + this.additionalProperties, + queryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(end, start, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame {\n"); + sb.append(" end: ").append(toIndentedString(end)).append("\n"); + sb.append(" start: ").append(toIndentedString(start)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataType.java new file mode 100644 index 00000000000..3f4b1f3f801 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryEventFilteredUsersRequestDataType.java @@ -0,0 +1,63 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Query event filtered users request resource type. */ +@JsonSerialize( + using = + QueryEventFilteredUsersRequestDataType.QueryEventFilteredUsersRequestDataTypeSerializer + .class) +public class QueryEventFilteredUsersRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("query_event_filtered_users_request")); + + public static final QueryEventFilteredUsersRequestDataType QUERY_EVENT_FILTERED_USERS_REQUEST = + new QueryEventFilteredUsersRequestDataType("query_event_filtered_users_request"); + + QueryEventFilteredUsersRequestDataType(String value) { + super(value, allowedValues); + } + + public static class QueryEventFilteredUsersRequestDataTypeSerializer + extends StdSerializer { + public QueryEventFilteredUsersRequestDataTypeSerializer( + Class t) { + super(t); + } + + public QueryEventFilteredUsersRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + QueryEventFilteredUsersRequestDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static QueryEventFilteredUsersRequestDataType fromValue(String value) { + return new QueryEventFilteredUsersRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryResponse.java b/src/main/java/com/datadog/api/client/v2/model/QueryResponse.java new file mode 100644 index 00000000000..28c6bdf8161 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryResponse.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({QueryResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private QueryResponseData data; + + public QueryResponse data(QueryResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryResponseData getData() { + return data; + } + + public void setData(QueryResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryResponse + */ + @JsonAnySetter + public QueryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryResponse queryResponse = (QueryResponse) o; + return Objects.equals(this.data, queryResponse.data) + && Objects.equals(this.additionalProperties, queryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryResponseData.java b/src/main/java/com/datadog/api/client/v2/model/QueryResponseData.java new file mode 100644 index 00000000000..49ab9ba2b9c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryResponseData.java @@ -0,0 +1,205 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryResponseData.JSON_PROPERTY_ATTRIBUTES, + QueryResponseData.JSON_PROPERTY_ID, + QueryResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private QueryResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private QueryResponseDataType type = QueryResponseDataType.QUERY_RESPONSE; + + public QueryResponseData() {} + + @JsonCreator + public QueryResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) QueryResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public QueryResponseData attributes(QueryResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(QueryResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public QueryResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public QueryResponseData type(QueryResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Query response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueryResponseDataType getType() { + return type; + } + + public void setType(QueryResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryResponseData + */ + @JsonAnySetter + public QueryResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryResponseData queryResponseData = (QueryResponseData) o; + return Objects.equals(this.attributes, queryResponseData.attributes) + && Objects.equals(this.id, queryResponseData.id) + && Objects.equals(this.type, queryResponseData.type) + && Objects.equals(this.additionalProperties, queryResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/QueryResponseDataAttributes.java new file mode 100644 index 00000000000..0c585bd924b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryResponseDataAttributes.java @@ -0,0 +1,175 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryResponseDataAttributes.JSON_PROPERTY_HITS, + QueryResponseDataAttributes.JSON_PROPERTY_TOTAL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HITS = "hits"; + private List> hits = null; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Long total; + + public QueryResponseDataAttributes hits(List> hits) { + this.hits = hits; + return this; + } + + public QueryResponseDataAttributes addHitsItem(Map hitsItem) { + if (this.hits == null) { + this.hits = new ArrayList<>(); + } + this.hits.add(hitsItem); + return this; + } + + /** + * Gethits + * + * @return hits + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HITS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getHits() { + return hits; + } + + public void setHits(List> hits) { + this.hits = hits; + } + + public QueryResponseDataAttributes total(Long total) { + this.total = total; + return this; + } + + /** + * Gettotal + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotal() { + return total; + } + + public void setTotal(Long total) { + this.total = total; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryResponseDataAttributes + */ + @JsonAnySetter + public QueryResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryResponseDataAttributes queryResponseDataAttributes = (QueryResponseDataAttributes) o; + return Objects.equals(this.hits, queryResponseDataAttributes.hits) + && Objects.equals(this.total, queryResponseDataAttributes.total) + && Objects.equals( + this.additionalProperties, queryResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(hits, total, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryResponseDataAttributes {\n"); + sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/QueryResponseDataType.java new file mode 100644 index 00000000000..9a7a92ac8d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryResponseDataType.java @@ -0,0 +1,56 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Query response resource type. */ +@JsonSerialize(using = QueryResponseDataType.QueryResponseDataTypeSerializer.class) +public class QueryResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("query_response")); + + public static final QueryResponseDataType QUERY_RESPONSE = + new QueryResponseDataType("query_response"); + + QueryResponseDataType(String value) { + super(value, allowedValues); + } + + public static class QueryResponseDataTypeSerializer extends StdSerializer { + public QueryResponseDataTypeSerializer(Class t) { + super(t); + } + + public QueryResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + QueryResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static QueryResponseDataType fromValue(String value) { + return new QueryResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequest.java b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequest.java new file mode 100644 index 00000000000..38b188d04f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequest.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({QueryUsersRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryUsersRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private QueryUsersRequestData data; + + public QueryUsersRequest data(QueryUsersRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryUsersRequestData getData() { + return data; + } + + public void setData(QueryUsersRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryUsersRequest + */ + @JsonAnySetter + public QueryUsersRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryUsersRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryUsersRequest queryUsersRequest = (QueryUsersRequest) o; + return Objects.equals(this.data, queryUsersRequest.data) + && Objects.equals(this.additionalProperties, queryUsersRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryUsersRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestData.java b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestData.java new file mode 100644 index 00000000000..d600f6ab624 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestData.java @@ -0,0 +1,205 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryUsersRequestData.JSON_PROPERTY_ATTRIBUTES, + QueryUsersRequestData.JSON_PROPERTY_ID, + QueryUsersRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryUsersRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private QueryUsersRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private QueryUsersRequestDataType type = QueryUsersRequestDataType.QUERY_USERS_REQUEST; + + public QueryUsersRequestData() {} + + @JsonCreator + public QueryUsersRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) QueryUsersRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public QueryUsersRequestData attributes(QueryUsersRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryUsersRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(QueryUsersRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public QueryUsersRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public QueryUsersRequestData type(QueryUsersRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Query users request resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public QueryUsersRequestDataType getType() { + return type; + } + + public void setType(QueryUsersRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryUsersRequestData + */ + @JsonAnySetter + public QueryUsersRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryUsersRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryUsersRequestData queryUsersRequestData = (QueryUsersRequestData) o; + return Objects.equals(this.attributes, queryUsersRequestData.attributes) + && Objects.equals(this.id, queryUsersRequestData.id) + && Objects.equals(this.type, queryUsersRequestData.type) + && Objects.equals(this.additionalProperties, queryUsersRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryUsersRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataAttributes.java new file mode 100644 index 00000000000..25a20015415 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataAttributes.java @@ -0,0 +1,260 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryUsersRequestDataAttributes.JSON_PROPERTY_LIMIT, + QueryUsersRequestDataAttributes.JSON_PROPERTY_QUERY, + QueryUsersRequestDataAttributes.JSON_PROPERTY_SELECT_COLUMNS, + QueryUsersRequestDataAttributes.JSON_PROPERTY_SORT, + QueryUsersRequestDataAttributes.JSON_PROPERTY_WILDCARD_SEARCH_TERM +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryUsersRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_SELECT_COLUMNS = "select_columns"; + private List selectColumns = null; + + public static final String JSON_PROPERTY_SORT = "sort"; + private QueryUsersRequestDataAttributesSort sort; + + public static final String JSON_PROPERTY_WILDCARD_SEARCH_TERM = "wildcard_search_term"; + private String wildcardSearchTerm; + + public QueryUsersRequestDataAttributes limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Getlimit + * + * @return limit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public QueryUsersRequestDataAttributes query(String query) { + this.query = query; + return this; + } + + /** + * Getquery + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public QueryUsersRequestDataAttributes selectColumns(List selectColumns) { + this.selectColumns = selectColumns; + return this; + } + + public QueryUsersRequestDataAttributes addSelectColumnsItem(String selectColumnsItem) { + if (this.selectColumns == null) { + this.selectColumns = new ArrayList<>(); + } + this.selectColumns.add(selectColumnsItem); + return this; + } + + /** + * GetselectColumns + * + * @return selectColumns + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SELECT_COLUMNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSelectColumns() { + return selectColumns; + } + + public void setSelectColumns(List selectColumns) { + this.selectColumns = selectColumns; + } + + public QueryUsersRequestDataAttributes sort(QueryUsersRequestDataAttributesSort sort) { + this.sort = sort; + this.unparsed |= sort.unparsed; + return this; + } + + /** + * Getsort + * + * @return sort + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QueryUsersRequestDataAttributesSort getSort() { + return sort; + } + + public void setSort(QueryUsersRequestDataAttributesSort sort) { + this.sort = sort; + } + + public QueryUsersRequestDataAttributes wildcardSearchTerm(String wildcardSearchTerm) { + this.wildcardSearchTerm = wildcardSearchTerm; + return this; + } + + /** + * GetwildcardSearchTerm + * + * @return wildcardSearchTerm + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WILDCARD_SEARCH_TERM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWildcardSearchTerm() { + return wildcardSearchTerm; + } + + public void setWildcardSearchTerm(String wildcardSearchTerm) { + this.wildcardSearchTerm = wildcardSearchTerm; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryUsersRequestDataAttributes + */ + @JsonAnySetter + public QueryUsersRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryUsersRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryUsersRequestDataAttributes queryUsersRequestDataAttributes = + (QueryUsersRequestDataAttributes) o; + return Objects.equals(this.limit, queryUsersRequestDataAttributes.limit) + && Objects.equals(this.query, queryUsersRequestDataAttributes.query) + && Objects.equals(this.selectColumns, queryUsersRequestDataAttributes.selectColumns) + && Objects.equals(this.sort, queryUsersRequestDataAttributes.sort) + && Objects.equals( + this.wildcardSearchTerm, queryUsersRequestDataAttributes.wildcardSearchTerm) + && Objects.equals( + this.additionalProperties, queryUsersRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + limit, query, selectColumns, sort, wildcardSearchTerm, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryUsersRequestDataAttributes {\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" selectColumns: ").append(toIndentedString(selectColumns)).append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" wildcardSearchTerm: ").append(toIndentedString(wildcardSearchTerm)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataAttributesSort.java b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataAttributesSort.java new file mode 100644 index 00000000000..976da6913cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataAttributesSort.java @@ -0,0 +1,166 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + QueryUsersRequestDataAttributesSort.JSON_PROPERTY_FIELD, + QueryUsersRequestDataAttributesSort.JSON_PROPERTY_ORDER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class QueryUsersRequestDataAttributesSort { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + public static final String JSON_PROPERTY_ORDER = "order"; + private String order; + + public QueryUsersRequestDataAttributesSort field(String field) { + this.field = field; + return this; + } + + /** + * Getfield + * + * @return field + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + public QueryUsersRequestDataAttributesSort order(String order) { + this.order = order; + return this; + } + + /** + * Getorder + * + * @return order + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrder() { + return order; + } + + public void setOrder(String order) { + this.order = order; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return QueryUsersRequestDataAttributesSort + */ + @JsonAnySetter + public QueryUsersRequestDataAttributesSort putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this QueryUsersRequestDataAttributesSort object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QueryUsersRequestDataAttributesSort queryUsersRequestDataAttributesSort = + (QueryUsersRequestDataAttributesSort) o; + return Objects.equals(this.field, queryUsersRequestDataAttributesSort.field) + && Objects.equals(this.order, queryUsersRequestDataAttributesSort.order) + && Objects.equals( + this.additionalProperties, queryUsersRequestDataAttributesSort.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(field, order, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QueryUsersRequestDataAttributesSort {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataType.java new file mode 100644 index 00000000000..9e588a8fa77 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/QueryUsersRequestDataType.java @@ -0,0 +1,57 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Query users request resource type. */ +@JsonSerialize(using = QueryUsersRequestDataType.QueryUsersRequestDataTypeSerializer.class) +public class QueryUsersRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("query_users_request")); + + public static final QueryUsersRequestDataType QUERY_USERS_REQUEST = + new QueryUsersRequestDataType("query_users_request"); + + QueryUsersRequestDataType(String value) { + super(value, allowedValues); + } + + public static class QueryUsersRequestDataTypeSerializer + extends StdSerializer { + public QueryUsersRequestDataTypeSerializer(Class t) { + super(t); + } + + public QueryUsersRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + QueryUsersRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static QueryUsersRequestDataType fromValue(String value) { + return new QueryUsersRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequest.java new file mode 100644 index 00000000000..5dc17471362 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequest.java @@ -0,0 +1,136 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({UpdateConnectionRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateConnectionRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateConnectionRequestData data; + + public UpdateConnectionRequest data(UpdateConnectionRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UpdateConnectionRequestData getData() { + return data; + } + + public void setData(UpdateConnectionRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateConnectionRequest + */ + @JsonAnySetter + public UpdateConnectionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateConnectionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionRequest updateConnectionRequest = (UpdateConnectionRequest) o; + return Objects.equals(this.data, updateConnectionRequest.data) + && Objects.equals(this.additionalProperties, updateConnectionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestData.java b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestData.java new file mode 100644 index 00000000000..056893ca08b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestData.java @@ -0,0 +1,208 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + UpdateConnectionRequestData.JSON_PROPERTY_ATTRIBUTES, + UpdateConnectionRequestData.JSON_PROPERTY_ID, + UpdateConnectionRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateConnectionRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateConnectionRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private UpdateConnectionRequestDataType type = UpdateConnectionRequestDataType.CONNECTION_ID; + + public UpdateConnectionRequestData() {} + + @JsonCreator + public UpdateConnectionRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + UpdateConnectionRequestDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public UpdateConnectionRequestData attributes(UpdateConnectionRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UpdateConnectionRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(UpdateConnectionRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public UpdateConnectionRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public UpdateConnectionRequestData type(UpdateConnectionRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Connection id resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpdateConnectionRequestDataType getType() { + return type; + } + + public void setType(UpdateConnectionRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateConnectionRequestData + */ + @JsonAnySetter + public UpdateConnectionRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateConnectionRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionRequestData updateConnectionRequestData = (UpdateConnectionRequestData) o; + return Objects.equals(this.attributes, updateConnectionRequestData.attributes) + && Objects.equals(this.id, updateConnectionRequestData.id) + && Objects.equals(this.type, updateConnectionRequestData.type) + && Objects.equals( + this.additionalProperties, updateConnectionRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataAttributes.java new file mode 100644 index 00000000000..02e45400c38 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataAttributes.java @@ -0,0 +1,232 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + UpdateConnectionRequestDataAttributes.JSON_PROPERTY_FIELDS_TO_ADD, + UpdateConnectionRequestDataAttributes.JSON_PROPERTY_FIELDS_TO_DELETE, + UpdateConnectionRequestDataAttributes.JSON_PROPERTY_FIELDS_TO_UPDATE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateConnectionRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELDS_TO_ADD = "fields_to_add"; + private List fieldsToAdd = null; + + public static final String JSON_PROPERTY_FIELDS_TO_DELETE = "fields_to_delete"; + private List fieldsToDelete = null; + + public static final String JSON_PROPERTY_FIELDS_TO_UPDATE = "fields_to_update"; + private List fieldsToUpdate = null; + + public UpdateConnectionRequestDataAttributes fieldsToAdd( + List fieldsToAdd) { + this.fieldsToAdd = fieldsToAdd; + for (CreateConnectionRequestDataAttributesFieldsItems item : fieldsToAdd) { + this.unparsed |= item.unparsed; + } + return this; + } + + public UpdateConnectionRequestDataAttributes addFieldsToAddItem( + CreateConnectionRequestDataAttributesFieldsItems fieldsToAddItem) { + if (this.fieldsToAdd == null) { + this.fieldsToAdd = new ArrayList<>(); + } + this.fieldsToAdd.add(fieldsToAddItem); + this.unparsed |= fieldsToAddItem.unparsed; + return this; + } + + /** + * GetfieldsToAdd + * + * @return fieldsToAdd + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS_TO_ADD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFieldsToAdd() { + return fieldsToAdd; + } + + public void setFieldsToAdd(List fieldsToAdd) { + this.fieldsToAdd = fieldsToAdd; + } + + public UpdateConnectionRequestDataAttributes fieldsToDelete(List fieldsToDelete) { + this.fieldsToDelete = fieldsToDelete; + return this; + } + + public UpdateConnectionRequestDataAttributes addFieldsToDeleteItem(String fieldsToDeleteItem) { + if (this.fieldsToDelete == null) { + this.fieldsToDelete = new ArrayList<>(); + } + this.fieldsToDelete.add(fieldsToDeleteItem); + return this; + } + + /** + * GetfieldsToDelete + * + * @return fieldsToDelete + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS_TO_DELETE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFieldsToDelete() { + return fieldsToDelete; + } + + public void setFieldsToDelete(List fieldsToDelete) { + this.fieldsToDelete = fieldsToDelete; + } + + public UpdateConnectionRequestDataAttributes fieldsToUpdate( + List fieldsToUpdate) { + this.fieldsToUpdate = fieldsToUpdate; + for (UpdateConnectionRequestDataAttributesFieldsToUpdateItems item : fieldsToUpdate) { + this.unparsed |= item.unparsed; + } + return this; + } + + public UpdateConnectionRequestDataAttributes addFieldsToUpdateItem( + UpdateConnectionRequestDataAttributesFieldsToUpdateItems fieldsToUpdateItem) { + if (this.fieldsToUpdate == null) { + this.fieldsToUpdate = new ArrayList<>(); + } + this.fieldsToUpdate.add(fieldsToUpdateItem); + this.unparsed |= fieldsToUpdateItem.unparsed; + return this; + } + + /** + * GetfieldsToUpdate + * + * @return fieldsToUpdate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELDS_TO_UPDATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFieldsToUpdate() { + return fieldsToUpdate; + } + + public void setFieldsToUpdate( + List fieldsToUpdate) { + this.fieldsToUpdate = fieldsToUpdate; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateConnectionRequestDataAttributes + */ + @JsonAnySetter + public UpdateConnectionRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateConnectionRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionRequestDataAttributes updateConnectionRequestDataAttributes = + (UpdateConnectionRequestDataAttributes) o; + return Objects.equals(this.fieldsToAdd, updateConnectionRequestDataAttributes.fieldsToAdd) + && Objects.equals(this.fieldsToDelete, updateConnectionRequestDataAttributes.fieldsToDelete) + && Objects.equals(this.fieldsToUpdate, updateConnectionRequestDataAttributes.fieldsToUpdate) + && Objects.equals( + this.additionalProperties, updateConnectionRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(fieldsToAdd, fieldsToDelete, fieldsToUpdate, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionRequestDataAttributes {\n"); + sb.append(" fieldsToAdd: ").append(toIndentedString(fieldsToAdd)).append("\n"); + sb.append(" fieldsToDelete: ").append(toIndentedString(fieldsToDelete)).append("\n"); + sb.append(" fieldsToUpdate: ").append(toIndentedString(fieldsToUpdate)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataAttributesFieldsToUpdateItems.java b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataAttributesFieldsToUpdateItems.java new file mode 100644 index 00000000000..edf47523bcb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataAttributesFieldsToUpdateItems.java @@ -0,0 +1,291 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + UpdateConnectionRequestDataAttributesFieldsToUpdateItems.JSON_PROPERTY_FIELD_ID, + UpdateConnectionRequestDataAttributesFieldsToUpdateItems.JSON_PROPERTY_UPDATED_DESCRIPTION, + UpdateConnectionRequestDataAttributesFieldsToUpdateItems.JSON_PROPERTY_UPDATED_DISPLAY_NAME, + UpdateConnectionRequestDataAttributesFieldsToUpdateItems.JSON_PROPERTY_UPDATED_FIELD_ID, + UpdateConnectionRequestDataAttributesFieldsToUpdateItems.JSON_PROPERTY_UPDATED_GROUPS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateConnectionRequestDataAttributesFieldsToUpdateItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELD_ID = "field_id"; + private String fieldId; + + public static final String JSON_PROPERTY_UPDATED_DESCRIPTION = "updated_description"; + private String updatedDescription; + + public static final String JSON_PROPERTY_UPDATED_DISPLAY_NAME = "updated_display_name"; + private String updatedDisplayName; + + public static final String JSON_PROPERTY_UPDATED_FIELD_ID = "updated_field_id"; + private String updatedFieldId; + + public static final String JSON_PROPERTY_UPDATED_GROUPS = "updated_groups"; + private List updatedGroups = null; + + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems() {} + + @JsonCreator + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems( + @JsonProperty(required = true, value = JSON_PROPERTY_FIELD_ID) String fieldId) { + this.fieldId = fieldId; + } + + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems fieldId(String fieldId) { + this.fieldId = fieldId; + return this; + } + + /** + * GetfieldId + * + * @return fieldId + */ + @JsonProperty(JSON_PROPERTY_FIELD_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFieldId() { + return fieldId; + } + + public void setFieldId(String fieldId) { + this.fieldId = fieldId; + } + + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems updatedDescription( + String updatedDescription) { + this.updatedDescription = updatedDescription; + return this; + } + + /** + * GetupdatedDescription + * + * @return updatedDescription + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedDescription() { + return updatedDescription; + } + + public void setUpdatedDescription(String updatedDescription) { + this.updatedDescription = updatedDescription; + } + + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems updatedDisplayName( + String updatedDisplayName) { + this.updatedDisplayName = updatedDisplayName; + return this; + } + + /** + * GetupdatedDisplayName + * + * @return updatedDisplayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedDisplayName() { + return updatedDisplayName; + } + + public void setUpdatedDisplayName(String updatedDisplayName) { + this.updatedDisplayName = updatedDisplayName; + } + + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems updatedFieldId( + String updatedFieldId) { + this.updatedFieldId = updatedFieldId; + return this; + } + + /** + * GetupdatedFieldId + * + * @return updatedFieldId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_FIELD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedFieldId() { + return updatedFieldId; + } + + public void setUpdatedFieldId(String updatedFieldId) { + this.updatedFieldId = updatedFieldId; + } + + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems updatedGroups( + List updatedGroups) { + this.updatedGroups = updatedGroups; + return this; + } + + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems addUpdatedGroupsItem( + String updatedGroupsItem) { + if (this.updatedGroups == null) { + this.updatedGroups = new ArrayList<>(); + } + this.updatedGroups.add(updatedGroupsItem); + return this; + } + + /** + * GetupdatedGroups + * + * @return updatedGroups + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUpdatedGroups() { + return updatedGroups; + } + + public void setUpdatedGroups(List updatedGroups) { + this.updatedGroups = updatedGroups; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateConnectionRequestDataAttributesFieldsToUpdateItems + */ + @JsonAnySetter + public UpdateConnectionRequestDataAttributesFieldsToUpdateItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this UpdateConnectionRequestDataAttributesFieldsToUpdateItems object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateConnectionRequestDataAttributesFieldsToUpdateItems + updateConnectionRequestDataAttributesFieldsToUpdateItems = + (UpdateConnectionRequestDataAttributesFieldsToUpdateItems) o; + return Objects.equals( + this.fieldId, updateConnectionRequestDataAttributesFieldsToUpdateItems.fieldId) + && Objects.equals( + this.updatedDescription, + updateConnectionRequestDataAttributesFieldsToUpdateItems.updatedDescription) + && Objects.equals( + this.updatedDisplayName, + updateConnectionRequestDataAttributesFieldsToUpdateItems.updatedDisplayName) + && Objects.equals( + this.updatedFieldId, + updateConnectionRequestDataAttributesFieldsToUpdateItems.updatedFieldId) + && Objects.equals( + this.updatedGroups, + updateConnectionRequestDataAttributesFieldsToUpdateItems.updatedGroups) + && Objects.equals( + this.additionalProperties, + updateConnectionRequestDataAttributesFieldsToUpdateItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + fieldId, + updatedDescription, + updatedDisplayName, + updatedFieldId, + updatedGroups, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateConnectionRequestDataAttributesFieldsToUpdateItems {\n"); + sb.append(" fieldId: ").append(toIndentedString(fieldId)).append("\n"); + sb.append(" updatedDescription: ").append(toIndentedString(updatedDescription)).append("\n"); + sb.append(" updatedDisplayName: ").append(toIndentedString(updatedDisplayName)).append("\n"); + sb.append(" updatedFieldId: ").append(toIndentedString(updatedFieldId)).append("\n"); + sb.append(" updatedGroups: ").append(toIndentedString(updatedGroups)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataType.java new file mode 100644 index 00000000000..2483e56c1fe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateConnectionRequestDataType.java @@ -0,0 +1,58 @@ +/* + * 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 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Connection id resource type. */ +@JsonSerialize( + using = UpdateConnectionRequestDataType.UpdateConnectionRequestDataTypeSerializer.class) +public class UpdateConnectionRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("connection_id")); + + public static final UpdateConnectionRequestDataType CONNECTION_ID = + new UpdateConnectionRequestDataType("connection_id"); + + UpdateConnectionRequestDataType(String value) { + super(value, allowedValues); + } + + public static class UpdateConnectionRequestDataTypeSerializer + extends StdSerializer { + public UpdateConnectionRequestDataTypeSerializer(Class t) { + super(t); + } + + public UpdateConnectionRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + UpdateConnectionRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static UpdateConnectionRequestDataType fromValue(String value) { + return new UpdateConnectionRequestDataType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_audience_management.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_audience_management.feature new file mode 100644 index 00000000000..ffc36531932 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_audience_management.feature @@ -0,0 +1,91 @@ +@endpoint(rum-audience-management) @endpoint(rum-audience-management-v2) +Feature: Rum Audience Management + Auto-generated tag Rum Audience Management + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RumAudienceManagement" API + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Create connection returns "Connection created successfully" response + Given operation "CreateConnection" enabled + And new "CreateConnection" request + And request contains "entity" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"fields": [{"description": "Customer subscription tier from `CRM`", "display_name": "Customer Tier", "id": "customer_tier", "source_name": "subscription_tier", "type": "string"}, {"description": "Customer lifetime value in `USD`", "display_name": "Lifetime Value", "id": "lifetime_value", "source_name": "ltv", "type": "number"}], "join_attribute": "user_email", "join_type": "email", "type": "ref_table"}, "id": "crm-integration", "type": "connection_id"}} + When the request is sent + Then the response status is 201 Connection created successfully + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Delete connection returns "Connection deleted successfully" response + Given operation "DeleteConnection" enabled + And new "DeleteConnection" request + And request contains "id" parameter from "REPLACE.ME" + And request contains "entity" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 Connection deleted successfully + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Get account facet info returns "Successful response with facet information" response + Given operation "GetAccountFacetInfo" enabled + And new "GetAccountFacetInfo" request + And body with value {"data": {"attributes": {"facet_id": "first_browser_name", "limit": 10, "search": {"query": "user_org_id:5001 AND first_country_code:US"}, "term_search": {"value": "Chrome"}}, "id": "facet_info_request", "type": "users_facet_info_request"}} + When the request is sent + Then the response status is 200 Successful response with facet information + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Get mapping returns "Successful response with entity mapping configuration" response + Given operation "GetMapping" enabled + And new "GetMapping" request + And request contains "entity" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 Successful response with entity mapping configuration + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Get user facet info returns "Successful response with facet information" response + Given operation "GetUserFacetInfo" enabled + And new "GetUserFacetInfo" request + And body with value {"data": {"attributes": {"facet_id": "first_browser_name", "limit": 10, "search": {"query": "user_org_id:5001 AND first_country_code:US"}, "term_search": {"value": "Chrome"}}, "id": "facet_info_request", "type": "users_facet_info_request"}} + When the request is sent + Then the response status is 200 Successful response with facet information + + @generated @skip @team:DataDog/audience-management-backend + Scenario: List connections returns "Successful response with list of connections" response + Given operation "ListConnections" enabled + And new "ListConnections" request + And request contains "entity" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 Successful response with list of connections + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Query accounts returns "Successful response with account data" response + Given operation "QueryAccounts" enabled + And new "QueryAccounts" request + And body with value {"data": {"attributes": {"limit": 20, "query": "plan_type:enterprise AND user_count:>100 AND subscription_status:active", "select_columns": ["account_id", "account_name", "user_count", "plan_type", "subscription_status", "created_at", "mrr", "industry"], "sort": {"field": "user_count", "order": "DESC"}, "wildcard_search_term": "tech"}, "id": "query_account_request", "type": "query_account_request"}} + When the request is sent + Then the response status is 200 Successful response with account data + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Query event filtered users returns "Successful response with filtered user data" response + Given operation "QueryEventFilteredUsers" enabled + And new "QueryEventFilteredUsers" request + And body with value {"data": {"attributes": {"event_query": {"query": "@type:view AND @view.loading_time:>3000 AND @application.name:ecommerce-platform", "time_frame": {"end": 1761309676, "start": 1760100076}}, "include_row_count": true, "limit": 25, "query": "user_org_id:5001 AND first_country_code:US AND first_browser_name:Chrome", "select_columns": ["user_id", "user_email", "first_country_code", "first_browser_name", "events_count", "session_count", "error_count", "avg_loading_time"]}, "id": "query_event_filtered_users_request", "type": "query_event_filtered_users_request"}} + When the request is sent + Then the response status is 200 Successful response with filtered user data + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Query users returns "Successful response with user data" response + Given operation "QueryUsers" enabled + And new "QueryUsers" request + And body with value {"data": {"attributes": {"limit": 25, "query": "user_email:*@techcorp.com AND first_country_code:US AND first_browser_name:Chrome", "select_columns": ["user_id", "user_email", "user_name", "user_org_id", "first_country_code", "first_browser_name", "first_device_type", "last_seen"], "sort": {"field": "first_seen", "order": "DESC"}, "wildcard_search_term": "john"}, "id": "query_users_request", "type": "query_users_request"}} + When the request is sent + Then the response status is 200 Successful response with user data + + @generated @skip @team:DataDog/audience-management-backend + Scenario: Update connection returns "Connection updated successfully" response + Given operation "UpdateConnection" enabled + And new "UpdateConnection" request + And request contains "entity" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"fields_to_add": [{"description": "Net Promoter Score from customer surveys", "display_name": "NPS Score", "groups": ["Satisfaction", "Metrics"], "id": "nps_score", "source_name": "net_promoter_score", "type": "number"}], "fields_to_delete": ["old_revenue_field"], "fields_to_update": [{"field_id": "lifetime_value", "updated_display_name": "Customer Lifetime Value (`USD`)", "updated_groups": ["Financial", "Metrics"]}]}, "id": "crm-integration", "type": "connection_id"}} + When the request is sent + Then the response status is 200 Connection updated successfully diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 1865379ddbe..77d6db57a87 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -2813,6 +2813,87 @@ "type": "safe" } }, + "GetAccountFacetInfo": { + "tag": "Rum Audience Management", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "QueryAccounts": { + "tag": "Rum Audience Management", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "QueryEventFilteredUsers": { + "tag": "Rum Audience Management", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "GetUserFacetInfo": { + "tag": "Rum Audience Management", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "QueryUsers": { + "tag": "Rum Audience Management", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "GetMapping": { + "tag": "Rum Audience Management", + "undo": { + "type": "safe" + } + }, + "CreateConnection": { + "tag": "Rum Audience Management", + "undo": { + "operationId": "DeleteConnection", + "parameters": [ + { + "name": "id", + "source": "" + }, + { + "name": "entity", + "source": "" + } + ], + "type": "unsafe" + } + }, + "UpdateConnection": { + "tag": "Rum Audience Management", + "undo": { + "type": "idempotent" + } + }, + "DeleteConnection": { + "tag": "Rum Audience Management", + "undo": { + "type": "idempotent" + } + }, + "ListConnections": { + "tag": "Rum Audience Management", + "undo": { + "type": "safe" + } + }, "QueryScalarData": { "tag": "Metrics", "undo": {