From f15169a785f44c223f1202c0d6af1ca9b720670d Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:33:51 +0000 Subject: [PATCH] Sync 'audience_management.yaml' files with backend (#2755) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 1065 +++++++++++++++++ .../CreateConnection.rb | 36 + .../DeleteConnection.rb | 8 + .../GetAccountFacetInfo.rb | 25 + .../v2/rum-audience-management/GetMapping.rb | 8 + .../GetUserFacetInfo.rb | 25 + .../ListConnections.rb | 8 + .../rum-audience-management/QueryAccounts.rb | 34 + .../QueryEventFilteredUsers.rb | 37 + .../v2/rum-audience-management/QueryUsers.rb | 34 + .../UpdateConnection.rb | 43 + features/scenarios_model_mapping.rb | 33 + features/v2/rum_audience_management.feature | 91 ++ features/v2/undo.json | 81 ++ lib/datadog_api_client/configuration.rb | 10 + lib/datadog_api_client/inflector.rb | 54 + .../v2/api/rum_audience_management_api.rb | 765 ++++++++++++ .../v2/models/create_connection_request.rb | 105 ++ .../models/create_connection_request_data.rb | 143 +++ ...eate_connection_request_data_attributes.rb | 187 +++ ...on_request_data_attributes_fields_items.rb | 197 +++ .../v2/models/facet_info_request.rb | 105 ++ .../v2/models/facet_info_request_data.rb | 143 +++ .../facet_info_request_data_attributes.rb | 164 +++ ...cet_info_request_data_attributes_search.rb | 105 ++ ...nfo_request_data_attributes_term_search.rb | 105 ++ .../v2/models/facet_info_request_data_type.rb | 26 + .../v2/models/facet_info_response.rb | 105 ++ .../v2/models/facet_info_response_data.rb | 143 +++ .../facet_info_response_data_attributes.rb | 105 ++ ...et_info_response_data_attributes_result.rb | 117 ++ ...o_response_data_attributes_result_range.rb | 115 ++ ...nse_data_attributes_result_values_items.rb | 115 ++ .../models/facet_info_response_data_type.rb | 26 + .../v2/models/get_mapping_response.rb | 105 ++ .../v2/models/get_mapping_response_data.rb | 143 +++ .../get_mapping_response_data_attributes.rb | 107 ++ ...sponse_data_attributes_attributes_items.rb | 157 +++ .../models/get_mapping_response_data_type.rb | 26 + .../v2/models/list_connections_response.rb | 105 ++ .../models/list_connections_response_data.rb | 143 +++ ...st_connections_response_data_attributes.rb | 107 ++ ...ponse_data_attributes_connections_items.rb | 187 +++ ..._data_attributes_connections_items_join.rb | 115 ++ .../list_connections_response_data_type.rb | 26 + .../v2/models/query_account_request.rb | 105 ++ .../v2/models/query_account_request_data.rb | 143 +++ .../query_account_request_data_attributes.rb | 147 +++ ...ry_account_request_data_attributes_sort.rb | 115 ++ .../models/query_account_request_data_type.rb | 26 + .../query_event_filtered_users_request.rb | 105 ++ ...query_event_filtered_users_request_data.rb | 143 +++ ..._filtered_users_request_data_attributes.rb | 147 +++ ...ers_request_data_attributes_event_query.rb | 115 ++ ..._data_attributes_event_query_time_frame.rb | 115 ++ ..._event_filtered_users_request_data_type.rb | 26 + .../v2/models/query_response.rb | 105 ++ .../v2/models/query_response_data.rb | 143 +++ .../models/query_response_data_attributes.rb | 117 ++ .../v2/models/query_response_data_type.rb | 26 + .../v2/models/query_users_request.rb | 105 ++ .../v2/models/query_users_request_data.rb | 143 +++ .../query_users_request_data_attributes.rb | 147 +++ ...uery_users_request_data_attributes_sort.rb | 115 ++ .../models/query_users_request_data_type.rb | 26 + .../v2/models/update_connection_request.rb | 105 ++ .../models/update_connection_request_data.rb | 154 +++ ...date_connection_request_data_attributes.rb | 131 ++ ..._data_attributes_fields_to_update_items.rb | 165 +++ .../update_connection_request_data_type.rb | 26 + 70 files changed, 8279 insertions(+) create mode 100644 examples/v2/rum-audience-management/CreateConnection.rb create mode 100644 examples/v2/rum-audience-management/DeleteConnection.rb create mode 100644 examples/v2/rum-audience-management/GetAccountFacetInfo.rb create mode 100644 examples/v2/rum-audience-management/GetMapping.rb create mode 100644 examples/v2/rum-audience-management/GetUserFacetInfo.rb create mode 100644 examples/v2/rum-audience-management/ListConnections.rb create mode 100644 examples/v2/rum-audience-management/QueryAccounts.rb create mode 100644 examples/v2/rum-audience-management/QueryEventFilteredUsers.rb create mode 100644 examples/v2/rum-audience-management/QueryUsers.rb create mode 100644 examples/v2/rum-audience-management/UpdateConnection.rb create mode 100644 features/v2/rum_audience_management.feature create mode 100644 lib/datadog_api_client/v2/api/rum_audience_management_api.rb create mode 100644 lib/datadog_api_client/v2/models/create_connection_request.rb create mode 100644 lib/datadog_api_client/v2/models/create_connection_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/create_connection_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/create_connection_request_data_attributes_fields_items.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_request.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_request_data_attributes_search.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_request_data_attributes_term_search.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_response.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_range.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_values_items.rb create mode 100644 lib/datadog_api_client/v2/models/facet_info_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/get_mapping_response.rb create mode 100644 lib/datadog_api_client/v2/models/get_mapping_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/get_mapping_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/get_mapping_response_data_attributes_attributes_items.rb create mode 100644 lib/datadog_api_client/v2/models/get_mapping_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/list_connections_response.rb create mode 100644 lib/datadog_api_client/v2/models/list_connections_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/list_connections_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items.rb create mode 100644 lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items_join.rb create mode 100644 lib/datadog_api_client/v2/models/list_connections_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/query_account_request.rb create mode 100644 lib/datadog_api_client/v2/models/query_account_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/query_account_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/query_account_request_data_attributes_sort.rb create mode 100644 lib/datadog_api_client/v2/models/query_account_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/query_event_filtered_users_request.rb create mode 100644 lib/datadog_api_client/v2/models/query_event_filtered_users_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query.rb create mode 100644 lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query_time_frame.rb create mode 100644 lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/query_response.rb create mode 100644 lib/datadog_api_client/v2/models/query_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/query_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/query_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/query_users_request.rb create mode 100644 lib/datadog_api_client/v2/models/query_users_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/query_users_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/query_users_request_data_attributes_sort.rb create mode 100644 lib/datadog_api_client/v2/models/query_users_request_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/update_connection_request.rb create mode 100644 lib/datadog_api_client/v2/models/update_connection_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/update_connection_request_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/update_connection_request_data_attributes_fields_to_update_items.rb create mode 100644 lib/datadog_api_client/v2/models/update_connection_request_data_type.rb 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.rb b/examples/v2/rum-audience-management/CreateConnection.rb new file mode 100644 index 00000000000..e51fc17e9df --- /dev/null +++ b/examples/v2/rum-audience-management/CreateConnection.rb @@ -0,0 +1,36 @@ +# Create connection returns "Connection created successfully" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_connection".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new + +body = DatadogAPIClient::V2::CreateConnectionRequest.new({ + data: DatadogAPIClient::V2::CreateConnectionRequestData.new({ + attributes: DatadogAPIClient::V2::CreateConnectionRequestDataAttributes.new({ + fields: [ + DatadogAPIClient::V2::CreateConnectionRequestDataAttributesFieldsItems.new({ + description: "Customer subscription tier from `CRM`", + display_name: "Customer Tier", + id: "customer_tier", + source_name: "subscription_tier", + type: "string", + }), + DatadogAPIClient::V2::CreateConnectionRequestDataAttributesFieldsItems.new({ + 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: DatadogAPIClient::V2::UpdateConnectionRequestDataType::CONNECTION_ID, + }), +}) +p api_instance.create_connection("users", body) diff --git a/examples/v2/rum-audience-management/DeleteConnection.rb b/examples/v2/rum-audience-management/DeleteConnection.rb new file mode 100644 index 00000000000..18436fcd91a --- /dev/null +++ b/examples/v2/rum-audience-management/DeleteConnection.rb @@ -0,0 +1,8 @@ +# Delete connection returns "Connection deleted successfully" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_connection".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new +api_instance.delete_connection("connection-id-123", "users") diff --git a/examples/v2/rum-audience-management/GetAccountFacetInfo.rb b/examples/v2/rum-audience-management/GetAccountFacetInfo.rb new file mode 100644 index 00000000000..c9919fb4be9 --- /dev/null +++ b/examples/v2/rum-audience-management/GetAccountFacetInfo.rb @@ -0,0 +1,25 @@ +# Get account facet info returns "Successful response with facet information" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_account_facet_info".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new + +body = DatadogAPIClient::V2::FacetInfoRequest.new({ + data: DatadogAPIClient::V2::FacetInfoRequestData.new({ + attributes: DatadogAPIClient::V2::FacetInfoRequestDataAttributes.new({ + facet_id: "first_browser_name", + limit: 10, + search: DatadogAPIClient::V2::FacetInfoRequestDataAttributesSearch.new({ + query: "user_org_id:5001 AND first_country_code:US", + }), + term_search: DatadogAPIClient::V2::FacetInfoRequestDataAttributesTermSearch.new({ + value: "Chrome", + }), + }), + id: "facet_info_request", + type: DatadogAPIClient::V2::FacetInfoRequestDataType::USERS_FACET_INFO_REQUEST, + }), +}) +p api_instance.get_account_facet_info(body) diff --git a/examples/v2/rum-audience-management/GetMapping.rb b/examples/v2/rum-audience-management/GetMapping.rb new file mode 100644 index 00000000000..2353294cab9 --- /dev/null +++ b/examples/v2/rum-audience-management/GetMapping.rb @@ -0,0 +1,8 @@ +# Get mapping returns "Successful response with entity mapping configuration" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_mapping".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new +p api_instance.get_mapping("users") diff --git a/examples/v2/rum-audience-management/GetUserFacetInfo.rb b/examples/v2/rum-audience-management/GetUserFacetInfo.rb new file mode 100644 index 00000000000..dcb9b0474b1 --- /dev/null +++ b/examples/v2/rum-audience-management/GetUserFacetInfo.rb @@ -0,0 +1,25 @@ +# Get user facet info returns "Successful response with facet information" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_user_facet_info".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new + +body = DatadogAPIClient::V2::FacetInfoRequest.new({ + data: DatadogAPIClient::V2::FacetInfoRequestData.new({ + attributes: DatadogAPIClient::V2::FacetInfoRequestDataAttributes.new({ + facet_id: "first_browser_name", + limit: 10, + search: DatadogAPIClient::V2::FacetInfoRequestDataAttributesSearch.new({ + query: "user_org_id:5001 AND first_country_code:US", + }), + term_search: DatadogAPIClient::V2::FacetInfoRequestDataAttributesTermSearch.new({ + value: "Chrome", + }), + }), + id: "facet_info_request", + type: DatadogAPIClient::V2::FacetInfoRequestDataType::USERS_FACET_INFO_REQUEST, + }), +}) +p api_instance.get_user_facet_info(body) diff --git a/examples/v2/rum-audience-management/ListConnections.rb b/examples/v2/rum-audience-management/ListConnections.rb new file mode 100644 index 00000000000..3f0c7e32dc1 --- /dev/null +++ b/examples/v2/rum-audience-management/ListConnections.rb @@ -0,0 +1,8 @@ +# List connections returns "Successful response with list of connections" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_connections".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new +p api_instance.list_connections("users") diff --git a/examples/v2/rum-audience-management/QueryAccounts.rb b/examples/v2/rum-audience-management/QueryAccounts.rb new file mode 100644 index 00000000000..7d8daa3e16c --- /dev/null +++ b/examples/v2/rum-audience-management/QueryAccounts.rb @@ -0,0 +1,34 @@ +# Query accounts returns "Successful response with account data" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.query_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new + +body = DatadogAPIClient::V2::QueryAccountRequest.new({ + data: DatadogAPIClient::V2::QueryAccountRequestData.new({ + attributes: DatadogAPIClient::V2::QueryAccountRequestDataAttributes.new({ + 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: DatadogAPIClient::V2::QueryAccountRequestDataAttributesSort.new({ + field: "user_count", + order: "DESC", + }), + wildcard_search_term: "tech", + }), + id: "query_account_request", + type: DatadogAPIClient::V2::QueryAccountRequestDataType::QUERY_ACCOUNT_REQUEST, + }), +}) +p api_instance.query_accounts(body) diff --git a/examples/v2/rum-audience-management/QueryEventFilteredUsers.rb b/examples/v2/rum-audience-management/QueryEventFilteredUsers.rb new file mode 100644 index 00000000000..abf126a00fe --- /dev/null +++ b/examples/v2/rum-audience-management/QueryEventFilteredUsers.rb @@ -0,0 +1,37 @@ +# Query event filtered users returns "Successful response with filtered user data" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.query_event_filtered_users".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new + +body = DatadogAPIClient::V2::QueryEventFilteredUsersRequest.new({ + data: DatadogAPIClient::V2::QueryEventFilteredUsersRequestData.new({ + attributes: DatadogAPIClient::V2::QueryEventFilteredUsersRequestDataAttributes.new({ + event_query: DatadogAPIClient::V2::QueryEventFilteredUsersRequestDataAttributesEventQuery.new({ + query: "@type:view AND @view.loading_time:>3000 AND @application.name:ecommerce-platform", + time_frame: DatadogAPIClient::V2::QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame.new({ + _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: DatadogAPIClient::V2::QueryEventFilteredUsersRequestDataType::QUERY_EVENT_FILTERED_USERS_REQUEST, + }), +}) +p api_instance.query_event_filtered_users(body) diff --git a/examples/v2/rum-audience-management/QueryUsers.rb b/examples/v2/rum-audience-management/QueryUsers.rb new file mode 100644 index 00000000000..eb70d905912 --- /dev/null +++ b/examples/v2/rum-audience-management/QueryUsers.rb @@ -0,0 +1,34 @@ +# Query users returns "Successful response with user data" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.query_users".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new + +body = DatadogAPIClient::V2::QueryUsersRequest.new({ + data: DatadogAPIClient::V2::QueryUsersRequestData.new({ + attributes: DatadogAPIClient::V2::QueryUsersRequestDataAttributes.new({ + 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: DatadogAPIClient::V2::QueryUsersRequestDataAttributesSort.new({ + field: "first_seen", + order: "DESC", + }), + wildcard_search_term: "john", + }), + id: "query_users_request", + type: DatadogAPIClient::V2::QueryUsersRequestDataType::QUERY_USERS_REQUEST, + }), +}) +p api_instance.query_users(body) diff --git a/examples/v2/rum-audience-management/UpdateConnection.rb b/examples/v2/rum-audience-management/UpdateConnection.rb new file mode 100644 index 00000000000..1ed71e5e3f0 --- /dev/null +++ b/examples/v2/rum-audience-management/UpdateConnection.rb @@ -0,0 +1,43 @@ +# Update connection returns "Connection updated successfully" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_connection".to_sym] = true +end +api_instance = DatadogAPIClient::V2::RumAudienceManagementAPI.new + +body = DatadogAPIClient::V2::UpdateConnectionRequest.new({ + data: DatadogAPIClient::V2::UpdateConnectionRequestData.new({ + attributes: DatadogAPIClient::V2::UpdateConnectionRequestDataAttributes.new({ + fields_to_add: [ + DatadogAPIClient::V2::CreateConnectionRequestDataAttributesFieldsItems.new({ + 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: [ + DatadogAPIClient::V2::UpdateConnectionRequestDataAttributesFieldsToUpdateItems.new({ + field_id: "lifetime_value", + updated_display_name: "Customer Lifetime Value (`USD`)", + updated_groups: [ + "Financial", + "Metrics", + ], + }), + ], + }), + id: "crm-integration", + type: DatadogAPIClient::V2::UpdateConnectionRequestDataType::CONNECTION_ID, + }), +}) +p api_instance.update_connection("users", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index c2363cbeaf4..c8d3a2560aa 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2647,6 +2647,39 @@ "page_limit" => "Integer", "page_cursor" => "String", }, + "v2.GetAccountFacetInfo" => { + "body" => "FacetInfoRequest", + }, + "v2.QueryAccounts" => { + "body" => "QueryAccountRequest", + }, + "v2.QueryEventFilteredUsers" => { + "body" => "QueryEventFilteredUsersRequest", + }, + "v2.GetUserFacetInfo" => { + "body" => "FacetInfoRequest", + }, + "v2.QueryUsers" => { + "body" => "QueryUsersRequest", + }, + "v2.GetMapping" => { + "entity" => "String", + }, + "v2.CreateConnection" => { + "entity" => "String", + "body" => "CreateConnectionRequest", + }, + "v2.UpdateConnection" => { + "entity" => "String", + "body" => "UpdateConnectionRequest", + }, + "v2.DeleteConnection" => { + "id" => "String", + "entity" => "String", + }, + "v2.ListConnections" => { + "entity" => "String", + }, "v2.ListTables" => { "page_limit" => "Integer", "page_offset" => "Integer", diff --git a/features/v2/rum_audience_management.feature b/features/v2/rum_audience_management.feature new file mode 100644 index 00000000000..ffc36531932 --- /dev/null +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 1865379ddbe..77d6db57a87 100644 --- a/features/v2/undo.json +++ b/features/v2/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": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index fdc24843a85..bcc19a48e6a 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -271,6 +271,16 @@ def initialize "v2.validate_existing_monitor_user_template": false, "v2.validate_monitor_user_template": false, "v2.list_role_templates": false, + "v2.create_connection": false, + "v2.delete_connection": false, + "v2.get_account_facet_info": false, + "v2.get_mapping": false, + "v2.get_user_facet_info": false, + "v2.list_connections": false, + "v2.query_accounts": false, + "v2.query_event_filtered_users": false, + "v2.query_users": false, + "v2.update_connection": false, "v2.create_pipeline": false, "v2.delete_pipeline": false, "v2.get_pipeline": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 820104ace4b..c6095196b72 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1651,6 +1651,10 @@ def overrides "v2.create_apps_datastore_request_data_attributes_org_access" => "CreateAppsDatastoreRequestDataAttributesOrgAccess", "v2.create_apps_datastore_response" => "CreateAppsDatastoreResponse", "v2.create_apps_datastore_response_data" => "CreateAppsDatastoreResponseData", + "v2.create_connection_request" => "CreateConnectionRequest", + "v2.create_connection_request_data" => "CreateConnectionRequestData", + "v2.create_connection_request_data_attributes" => "CreateConnectionRequestDataAttributes", + "v2.create_connection_request_data_attributes_fields_items" => "CreateConnectionRequestDataAttributesFieldsItems", "v2.create_custom_framework_request" => "CreateCustomFrameworkRequest", "v2.create_custom_framework_response" => "CreateCustomFrameworkResponse", "v2.create_data_deletion_request_body" => "CreateDataDeletionRequestBody", @@ -2116,6 +2120,19 @@ def overrides "v2.event_system_attributes_category" => "EventSystemAttributesCategory", "v2.event_system_attributes_integration_id" => "EventSystemAttributesIntegrationId", "v2.event_type" => "EventType", + "v2.facet_info_request" => "FacetInfoRequest", + "v2.facet_info_request_data" => "FacetInfoRequestData", + "v2.facet_info_request_data_attributes" => "FacetInfoRequestDataAttributes", + "v2.facet_info_request_data_attributes_search" => "FacetInfoRequestDataAttributesSearch", + "v2.facet_info_request_data_attributes_term_search" => "FacetInfoRequestDataAttributesTermSearch", + "v2.facet_info_request_data_type" => "FacetInfoRequestDataType", + "v2.facet_info_response" => "FacetInfoResponse", + "v2.facet_info_response_data" => "FacetInfoResponseData", + "v2.facet_info_response_data_attributes" => "FacetInfoResponseDataAttributes", + "v2.facet_info_response_data_attributes_result" => "FacetInfoResponseDataAttributesResult", + "v2.facet_info_response_data_attributes_result_range" => "FacetInfoResponseDataAttributesResultRange", + "v2.facet_info_response_data_attributes_result_values_items" => "FacetInfoResponseDataAttributesResultValuesItems", + "v2.facet_info_response_data_type" => "FacetInfoResponseDataType", "v2.fastly_accoun_response_attributes" => "FastlyAccounResponseAttributes", "v2.fastly_account_create_request" => "FastlyAccountCreateRequest", "v2.fastly_account_create_request_attributes" => "FastlyAccountCreateRequestAttributes", @@ -2270,6 +2287,11 @@ def overrides "v2.get_interfaces_data" => "GetInterfacesData", "v2.get_interfaces_response" => "GetInterfacesResponse", "v2.get_issue_include_query_parameter_item" => "GetIssueIncludeQueryParameterItem", + "v2.get_mapping_response" => "GetMappingResponse", + "v2.get_mapping_response_data" => "GetMappingResponseData", + "v2.get_mapping_response_data_attributes" => "GetMappingResponseDataAttributes", + "v2.get_mapping_response_data_attributes_attributes_items" => "GetMappingResponseDataAttributesAttributesItems", + "v2.get_mapping_response_data_type" => "GetMappingResponseDataType", "v2.get_multiple_rulesets_request" => "GetMultipleRulesetsRequest", "v2.get_multiple_rulesets_request_data" => "GetMultipleRulesetsRequestData", "v2.get_multiple_rulesets_request_data_attributes" => "GetMultipleRulesetsRequestDataAttributes", @@ -2640,6 +2662,12 @@ def overrides "v2.list_apps_response_meta" => "ListAppsResponseMeta", "v2.list_apps_response_meta_page" => "ListAppsResponseMetaPage", "v2.list_assets_sbo_ms_response" => "ListAssetsSBOMsResponse", + "v2.list_connections_response" => "ListConnectionsResponse", + "v2.list_connections_response_data" => "ListConnectionsResponseData", + "v2.list_connections_response_data_attributes" => "ListConnectionsResponseDataAttributes", + "v2.list_connections_response_data_attributes_connections_items" => "ListConnectionsResponseDataAttributesConnectionsItems", + "v2.list_connections_response_data_attributes_connections_items_join" => "ListConnectionsResponseDataAttributesConnectionsItemsJoin", + "v2.list_connections_response_data_type" => "ListConnectionsResponseDataType", "v2.list_devices_response" => "ListDevicesResponse", "v2.list_devices_response_metadata" => "ListDevicesResponseMetadata", "v2.list_devices_response_metadata_page" => "ListDevicesResponseMetadataPage", @@ -3337,8 +3365,28 @@ def overrides "v2.put_apps_datastore_item_response_data" => "PutAppsDatastoreItemResponseData", "v2.put_incident_notification_rule_request" => "PutIncidentNotificationRuleRequest", "v2.query" => "Query", + "v2.query_account_request" => "QueryAccountRequest", + "v2.query_account_request_data" => "QueryAccountRequestData", + "v2.query_account_request_data_attributes" => "QueryAccountRequestDataAttributes", + "v2.query_account_request_data_attributes_sort" => "QueryAccountRequestDataAttributesSort", + "v2.query_account_request_data_type" => "QueryAccountRequestDataType", + "v2.query_event_filtered_users_request" => "QueryEventFilteredUsersRequest", + "v2.query_event_filtered_users_request_data" => "QueryEventFilteredUsersRequestData", + "v2.query_event_filtered_users_request_data_attributes" => "QueryEventFilteredUsersRequestDataAttributes", + "v2.query_event_filtered_users_request_data_attributes_event_query" => "QueryEventFilteredUsersRequestDataAttributesEventQuery", + "v2.query_event_filtered_users_request_data_attributes_event_query_time_frame" => "QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame", + "v2.query_event_filtered_users_request_data_type" => "QueryEventFilteredUsersRequestDataType", "v2.query_formula" => "QueryFormula", + "v2.query_response" => "QueryResponse", + "v2.query_response_data" => "QueryResponseData", + "v2.query_response_data_attributes" => "QueryResponseDataAttributes", + "v2.query_response_data_type" => "QueryResponseDataType", "v2.query_sort_order" => "QuerySortOrder", + "v2.query_users_request" => "QueryUsersRequest", + "v2.query_users_request_data" => "QueryUsersRequestData", + "v2.query_users_request_data_attributes" => "QueryUsersRequestDataAttributes", + "v2.query_users_request_data_attributes_sort" => "QueryUsersRequestDataAttributesSort", + "v2.query_users_request_data_type" => "QueryUsersRequestDataType", "v2.readiness_gate" => "ReadinessGate", "v2.readiness_gate_threshold_type" => "ReadinessGateThresholdType", "v2.recommendation_attributes" => "RecommendationAttributes", @@ -4224,6 +4272,11 @@ def overrides "v2.update_apps_datastore_request" => "UpdateAppsDatastoreRequest", "v2.update_apps_datastore_request_data" => "UpdateAppsDatastoreRequestData", "v2.update_apps_datastore_request_data_attributes" => "UpdateAppsDatastoreRequestDataAttributes", + "v2.update_connection_request" => "UpdateConnectionRequest", + "v2.update_connection_request_data" => "UpdateConnectionRequestData", + "v2.update_connection_request_data_attributes" => "UpdateConnectionRequestDataAttributes", + "v2.update_connection_request_data_attributes_fields_to_update_items" => "UpdateConnectionRequestDataAttributesFieldsToUpdateItems", + "v2.update_connection_request_data_type" => "UpdateConnectionRequestDataType", "v2.update_custom_framework_request" => "UpdateCustomFrameworkRequest", "v2.update_custom_framework_response" => "UpdateCustomFrameworkResponse", "v2.update_open_api_response" => "UpdateOpenAPIResponse", @@ -4468,6 +4521,7 @@ def overrides "v2.restriction_policies_api" => "RestrictionPoliciesAPI", "v2.roles_api" => "RolesAPI", "v2.rum_api" => "RUMAPI", + "v2.rum_audience_management_api" => "RumAudienceManagementAPI", "v2.rum_metrics_api" => "RumMetricsAPI", "v2.rum_retention_filters_api" => "RumRetentionFiltersAPI", "v2.security_monitoring_api" => "SecurityMonitoringAPI", diff --git a/lib/datadog_api_client/v2/api/rum_audience_management_api.rb b/lib/datadog_api_client/v2/api/rum_audience_management_api.rb new file mode 100644 index 00000000000..f32b1a3e9e9 --- /dev/null +++ b/lib/datadog_api_client/v2/api/rum_audience_management_api.rb @@ -0,0 +1,765 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class RumAudienceManagementAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create connection. + # + # @see #create_connection_with_http_info + def create_connection(entity, body, opts = {}) + create_connection_with_http_info(entity, body, opts) + nil + end + + # Create connection. + # + # Create a new data connection and its fields for an entity + # + # @param entity [String] The entity for which to create the connection + # @param body [CreateConnectionRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def create_connection_with_http_info(entity, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_connection".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_connection") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_connection")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.create_connection ...' + end + # verify the required parameter 'entity' is set + if @api_client.config.client_side_validation && entity.nil? + fail ArgumentError, "Missing the required parameter 'entity' when calling RumAudienceManagementAPI.create_connection" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumAudienceManagementAPI.create_connection" + end + # resource path + local_var_path = '/api/v2/product-analytics/{entity}/mapping/connection'.sub('{entity}', CGI.escape(entity.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_connection, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#create_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete connection. + # + # @see #delete_connection_with_http_info + def delete_connection(id, entity, opts = {}) + delete_connection_with_http_info(id, entity, opts) + nil + end + + # Delete connection. + # + # Delete an existing data connection for an entity + # + # @param id [String] The connection ID to delete + # @param entity [String] The entity for which to delete the connection + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_connection_with_http_info(id, entity, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_connection".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_connection") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_connection")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.delete_connection ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling RumAudienceManagementAPI.delete_connection" + end + # verify the required parameter 'entity' is set + if @api_client.config.client_side_validation && entity.nil? + fail ArgumentError, "Missing the required parameter 'entity' when calling RumAudienceManagementAPI.delete_connection" + end + # resource path + local_var_path = '/api/v2/product-analytics/{entity}/mapping/connection/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')).sub('{entity}', CGI.escape(entity.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_connection, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#delete_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get account facet info. + # + # @see #get_account_facet_info_with_http_info + def get_account_facet_info(body, opts = {}) + data, _status_code, _headers = get_account_facet_info_with_http_info(body, opts) + data + end + + # Get account facet info. + # + # Get facet information for account attributes including possible values and counts + # + # @param body [FacetInfoRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(FacetInfoResponse, Integer, Hash)>] FacetInfoResponse data, response status code and response headers + def get_account_facet_info_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_account_facet_info".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_account_facet_info") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_account_facet_info")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.get_account_facet_info ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumAudienceManagementAPI.get_account_facet_info" + end + # resource path + local_var_path = '/api/v2/product-analytics/accounts/facet_info' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'FacetInfoResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_account_facet_info, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#get_account_facet_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get mapping. + # + # @see #get_mapping_with_http_info + def get_mapping(entity, opts = {}) + data, _status_code, _headers = get_mapping_with_http_info(entity, opts) + data + end + + # Get mapping. + # + # Get entity mapping configuration including all available attributes and their properties + # + # @param entity [String] The entity for which to get the mapping + # @param opts [Hash] the optional parameters + # @return [Array<(GetMappingResponse, Integer, Hash)>] GetMappingResponse data, response status code and response headers + def get_mapping_with_http_info(entity, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_mapping".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_mapping") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_mapping")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.get_mapping ...' + end + # verify the required parameter 'entity' is set + if @api_client.config.client_side_validation && entity.nil? + fail ArgumentError, "Missing the required parameter 'entity' when calling RumAudienceManagementAPI.get_mapping" + end + # resource path + local_var_path = '/api/v2/product-analytics/{entity}/mapping'.sub('{entity}', CGI.escape(entity.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'GetMappingResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_mapping, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#get_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get user facet info. + # + # @see #get_user_facet_info_with_http_info + def get_user_facet_info(body, opts = {}) + data, _status_code, _headers = get_user_facet_info_with_http_info(body, opts) + data + end + + # Get user facet info. + # + # Get facet information for user attributes including possible values and counts + # + # @param body [FacetInfoRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(FacetInfoResponse, Integer, Hash)>] FacetInfoResponse data, response status code and response headers + def get_user_facet_info_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_user_facet_info".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_user_facet_info") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_user_facet_info")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.get_user_facet_info ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumAudienceManagementAPI.get_user_facet_info" + end + # resource path + local_var_path = '/api/v2/product-analytics/users/facet_info' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'FacetInfoResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_user_facet_info, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#get_user_facet_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List connections. + # + # @see #list_connections_with_http_info + def list_connections(entity, opts = {}) + data, _status_code, _headers = list_connections_with_http_info(entity, opts) + data + end + + # List connections. + # + # List all data connections for an entity + # + # @param entity [String] The entity for which to list connections + # @param opts [Hash] the optional parameters + # @return [Array<(ListConnectionsResponse, Integer, Hash)>] ListConnectionsResponse data, response status code and response headers + def list_connections_with_http_info(entity, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.list_connections ...' + end + # verify the required parameter 'entity' is set + if @api_client.config.client_side_validation && entity.nil? + fail ArgumentError, "Missing the required parameter 'entity' when calling RumAudienceManagementAPI.list_connections" + end + # resource path + local_var_path = '/api/v2/product-analytics/{entity}/mapping/connections'.sub('{entity}', CGI.escape(entity.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListConnectionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#list_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Query accounts. + # + # @see #query_accounts_with_http_info + def query_accounts(body, opts = {}) + data, _status_code, _headers = query_accounts_with_http_info(body, opts) + data + end + + # Query accounts. + # + # Query accounts with flexible filtering by account properties + # + # @param body [QueryAccountRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(QueryResponse, Integer, Hash)>] QueryResponse data, response status code and response headers + def query_accounts_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.query_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.query_accounts ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumAudienceManagementAPI.query_accounts" + end + # resource path + local_var_path = '/api/v2/product-analytics/accounts/query' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'QueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :query_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#query_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Query event filtered users. + # + # @see #query_event_filtered_users_with_http_info + def query_event_filtered_users(body, opts = {}) + data, _status_code, _headers = query_event_filtered_users_with_http_info(body, opts) + data + end + + # Query event filtered users. + # + # Query users filtered by both user properties and event platform data + # + # @param body [QueryEventFilteredUsersRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(QueryResponse, Integer, Hash)>] QueryResponse data, response status code and response headers + def query_event_filtered_users_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.query_event_filtered_users".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_event_filtered_users") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_event_filtered_users")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.query_event_filtered_users ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumAudienceManagementAPI.query_event_filtered_users" + end + # resource path + local_var_path = '/api/v2/product-analytics/users/event_filtered_query' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'QueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :query_event_filtered_users, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#query_event_filtered_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Query users. + # + # @see #query_users_with_http_info + def query_users(body, opts = {}) + data, _status_code, _headers = query_users_with_http_info(body, opts) + data + end + + # Query users. + # + # Query users with flexible filtering by user properties, with optional wildcard search + # + # @param body [QueryUsersRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(QueryResponse, Integer, Hash)>] QueryResponse data, response status code and response headers + def query_users_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.query_users".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.query_users") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.query_users")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.query_users ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumAudienceManagementAPI.query_users" + end + # resource path + local_var_path = '/api/v2/product-analytics/users/query' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'QueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :query_users, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#query_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update connection. + # + # @see #update_connection_with_http_info + def update_connection(entity, body, opts = {}) + update_connection_with_http_info(entity, body, opts) + nil + end + + # Update connection. + # + # Update an existing data connection by adding, updating, or deleting fields + # + # @param entity [String] The entity for which to update the connection + # @param body [UpdateConnectionRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def update_connection_with_http_info(entity, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_connection".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_connection") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_connection")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RumAudienceManagementAPI.update_connection ...' + end + # verify the required parameter 'entity' is set + if @api_client.config.client_side_validation && entity.nil? + fail ArgumentError, "Missing the required parameter 'entity' when calling RumAudienceManagementAPI.update_connection" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RumAudienceManagementAPI.update_connection" + end + # resource path + local_var_path = '/api/v2/product-analytics/{entity}/mapping/connection'.sub('{entity}', CGI.escape(entity.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_connection, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RumAudienceManagementAPI#update_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_connection_request.rb b/lib/datadog_api_client/v2/models/create_connection_request.rb new file mode 100644 index 00000000000..f19b0dd7bda --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_connection_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateConnectionRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateConnectionRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateConnectionRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_connection_request_data.rb b/lib/datadog_api_client/v2/models/create_connection_request_data.rb new file mode 100644 index 00000000000..023d9f71b94 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_connection_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateConnectionRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Connection id resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateConnectionRequestDataAttributes', + :'id' => :'String', + :'type' => :'UpdateConnectionRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateConnectionRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_connection_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_connection_request_data_attributes.rb new file mode 100644 index 00000000000..e1c415a9aa7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_connection_request_data_attributes.rb @@ -0,0 +1,187 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateConnectionRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :fields + + # + attr_reader :join_attribute + + # + attr_reader :join_type + + # + attr_accessor :metadata + + # + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fields' => :'fields', + :'join_attribute' => :'join_attribute', + :'join_type' => :'join_type', + :'metadata' => :'metadata', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fields' => :'Array', + :'join_attribute' => :'String', + :'join_type' => :'String', + :'metadata' => :'Hash', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateConnectionRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + end + + if attributes.key?(:'join_attribute') + self.join_attribute = attributes[:'join_attribute'] + end + + if attributes.key?(:'join_type') + self.join_type = attributes[:'join_type'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @join_attribute.nil? + return false if @join_type.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param join_attribute [Object] Object to be assigned + # @!visibility private + def join_attribute=(join_attribute) + if join_attribute.nil? + fail ArgumentError, 'invalid value for "join_attribute", join_attribute cannot be nil.' + end + @join_attribute = join_attribute + end + + # Custom attribute writer method with validation + # @param join_type [Object] Object to be assigned + # @!visibility private + def join_type=(join_type) + if join_type.nil? + fail ArgumentError, 'invalid value for "join_type", join_type cannot be nil.' + end + @join_type = join_type + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fields == o.fields && + join_attribute == o.join_attribute && + join_type == o.join_type && + metadata == o.metadata && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fields, join_attribute, join_type, metadata, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_connection_request_data_attributes_fields_items.rb b/lib/datadog_api_client/v2/models/create_connection_request_data_attributes_fields_items.rb new file mode 100644 index 00000000000..d77cc21e642 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_connection_request_data_attributes_fields_items.rb @@ -0,0 +1,197 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateConnectionRequestDataAttributesFieldsItems + include BaseGenericModel + + # + attr_accessor :description + + # + attr_accessor :display_name + + # + attr_accessor :groups + + # + attr_reader :id + + # + attr_reader :source_name + + # + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'display_name' => :'display_name', + :'groups' => :'groups', + :'id' => :'id', + :'source_name' => :'source_name', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'display_name' => :'String', + :'groups' => :'Array', + :'id' => :'String', + :'source_name' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateConnectionRequestDataAttributesFieldsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'source_name') + self.source_name = attributes[:'source_name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @source_name.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param source_name [Object] Object to be assigned + # @!visibility private + def source_name=(source_name) + if source_name.nil? + fail ArgumentError, 'invalid value for "source_name", source_name cannot be nil.' + end + @source_name = source_name + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + display_name == o.display_name && + groups == o.groups && + id == o.id && + source_name == o.source_name && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, display_name, groups, id, source_name, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_request.rb b/lib/datadog_api_client/v2/models/facet_info_request.rb new file mode 100644 index 00000000000..13eccb80c04 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'FacetInfoRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_request_data.rb b/lib/datadog_api_client/v2/models/facet_info_request_data.rb new file mode 100644 index 00000000000..36686b70590 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Users facet info request resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'FacetInfoRequestDataAttributes', + :'id' => :'String', + :'type' => :'FacetInfoRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_request_data_attributes.rb b/lib/datadog_api_client/v2/models/facet_info_request_data_attributes.rb new file mode 100644 index 00000000000..24c06173ef9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_request_data_attributes.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoRequestDataAttributes + include BaseGenericModel + + # + attr_reader :facet_id + + # + attr_reader :limit + + # + attr_accessor :search + + # + attr_accessor :term_search + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'facet_id' => :'facet_id', + :'limit' => :'limit', + :'search' => :'search', + :'term_search' => :'term_search' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'facet_id' => :'String', + :'limit' => :'Integer', + :'search' => :'FacetInfoRequestDataAttributesSearch', + :'term_search' => :'FacetInfoRequestDataAttributesTermSearch' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'facet_id') + self.facet_id = attributes[:'facet_id'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'term_search') + self.term_search = attributes[:'term_search'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @facet_id.nil? + return false if @limit.nil? + true + end + + # Custom attribute writer method with validation + # @param facet_id [Object] Object to be assigned + # @!visibility private + def facet_id=(facet_id) + if facet_id.nil? + fail ArgumentError, 'invalid value for "facet_id", facet_id cannot be nil.' + end + @facet_id = facet_id + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if limit.nil? + fail ArgumentError, 'invalid value for "limit", limit cannot be nil.' + end + @limit = limit + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + facet_id == o.facet_id && + limit == o.limit && + search == o.search && + term_search == o.term_search && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [facet_id, limit, search, term_search, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_request_data_attributes_search.rb b/lib/datadog_api_client/v2/models/facet_info_request_data_attributes_search.rb new file mode 100644 index 00000000000..fdc9b987509 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_request_data_attributes_search.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoRequestDataAttributesSearch + include BaseGenericModel + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoRequestDataAttributesSearch` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_request_data_attributes_term_search.rb b/lib/datadog_api_client/v2/models/facet_info_request_data_attributes_term_search.rb new file mode 100644 index 00000000000..8942ad52272 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_request_data_attributes_term_search.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoRequestDataAttributesTermSearch + include BaseGenericModel + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoRequestDataAttributesTermSearch` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_request_data_type.rb b/lib/datadog_api_client/v2/models/facet_info_request_data_type.rb new file mode 100644 index 00000000000..f3dfdacc359 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Users facet info request resource type. + class FacetInfoRequestDataType + include BaseEnumModel + + USERS_FACET_INFO_REQUEST = "users_facet_info_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_response.rb b/lib/datadog_api_client/v2/models/facet_info_response.rb new file mode 100644 index 00000000000..169b8daa6b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoResponse + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'FacetInfoResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_response_data.rb b/lib/datadog_api_client/v2/models/facet_info_response_data.rb new file mode 100644 index 00000000000..d78394d953c --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Users facet info resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'FacetInfoResponseDataAttributes', + :'id' => :'String', + :'type' => :'FacetInfoResponseDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_response_data_attributes.rb b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes.rb new file mode 100644 index 00000000000..e38568c449b --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :result + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'result' => :'result' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'result' => :'FacetInfoResponseDataAttributesResult' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'result') + self.result = attributes[:'result'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + result == o.result && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [result, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result.rb b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result.rb new file mode 100644 index 00000000000..26fdc416fe4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoResponseDataAttributesResult + include BaseGenericModel + + # + attr_accessor :range + + # + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'range' => :'range', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'range' => :'FacetInfoResponseDataAttributesResultRange', + :'values' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoResponseDataAttributesResult` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'range') + self.range = attributes[:'range'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + range == o.range && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [range, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_range.rb b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_range.rb new file mode 100644 index 00000000000..a4e2f0ccda6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_range.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoResponseDataAttributesResultRange + include BaseGenericModel + + # + attr_accessor :max + + # + attr_accessor :min + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'max' => :'max', + :'min' => :'min' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'max' => :'Object', + :'min' => :'Object' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoResponseDataAttributesResultRange` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + max == o.max && + min == o.min && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [max, min, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_values_items.rb b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_values_items.rb new file mode 100644 index 00000000000..087d8e53ed7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_response_data_attributes_result_values_items.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FacetInfoResponseDataAttributesResultValuesItems + include BaseGenericModel + + # + attr_accessor :count + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'count' => :'count', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'count' => :'Integer', + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FacetInfoResponseDataAttributesResultValuesItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + count == o.count && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [count, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/facet_info_response_data_type.rb b/lib/datadog_api_client/v2/models/facet_info_response_data_type.rb new file mode 100644 index 00000000000..a8d7e3dd925 --- /dev/null +++ b/lib/datadog_api_client/v2/models/facet_info_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Users facet info resource type. + class FacetInfoResponseDataType + include BaseEnumModel + + USERS_FACET_INFO = "users_facet_info".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/get_mapping_response.rb b/lib/datadog_api_client/v2/models/get_mapping_response.rb new file mode 100644 index 00000000000..0aae336d304 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_mapping_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetMappingResponse + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'GetMappingResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetMappingResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_mapping_response_data.rb b/lib/datadog_api_client/v2/models/get_mapping_response_data.rb new file mode 100644 index 00000000000..35490f587db --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_mapping_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetMappingResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Get mappings response resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'GetMappingResponseDataAttributes', + :'id' => :'String', + :'type' => :'GetMappingResponseDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetMappingResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_mapping_response_data_attributes.rb b/lib/datadog_api_client/v2/models/get_mapping_response_data_attributes.rb new file mode 100644 index 00000000000..85d526d3d8f --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_mapping_response_data_attributes.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetMappingResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :attributes + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetMappingResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + if (value = attributes[:'attributes']).is_a?(Array) + self.attributes = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_mapping_response_data_attributes_attributes_items.rb b/lib/datadog_api_client/v2/models/get_mapping_response_data_attributes_attributes_items.rb new file mode 100644 index 00000000000..f76c2a2bb51 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_mapping_response_data_attributes_attributes_items.rb @@ -0,0 +1,157 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetMappingResponseDataAttributesAttributesItems + include BaseGenericModel + + # + attr_accessor :attribute + + # + attr_accessor :description + + # + attr_accessor :display_name + + # + attr_accessor :groups + + # + attr_accessor :is_custom + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attribute' => :'attribute', + :'description' => :'description', + :'display_name' => :'display_name', + :'groups' => :'groups', + :'is_custom' => :'is_custom', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attribute' => :'String', + :'description' => :'String', + :'display_name' => :'String', + :'groups' => :'Array', + :'is_custom' => :'Boolean', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetMappingResponseDataAttributesAttributesItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attribute') + self.attribute = attributes[:'attribute'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = value + end + end + + if attributes.key?(:'is_custom') + self.is_custom = attributes[:'is_custom'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attribute == o.attribute && + description == o.description && + display_name == o.display_name && + groups == o.groups && + is_custom == o.is_custom && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attribute, description, display_name, groups, is_custom, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_mapping_response_data_type.rb b/lib/datadog_api_client/v2/models/get_mapping_response_data_type.rb new file mode 100644 index 00000000000..10a6c707e96 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_mapping_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Get mappings response resource type. + class GetMappingResponseDataType + include BaseEnumModel + + GET_MAPPINGS_RESPONSE = "get_mappings_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/list_connections_response.rb b/lib/datadog_api_client/v2/models/list_connections_response.rb new file mode 100644 index 00000000000..e665912fa8b --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connections_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ListConnectionsResponse + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ListConnectionsResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListConnectionsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_connections_response_data.rb b/lib/datadog_api_client/v2/models/list_connections_response_data.rb new file mode 100644 index 00000000000..561c2da1fcf --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connections_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ListConnectionsResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # List connections response resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ListConnectionsResponseDataAttributes', + :'id' => :'String', + :'type' => :'ListConnectionsResponseDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListConnectionsResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_connections_response_data_attributes.rb b/lib/datadog_api_client/v2/models/list_connections_response_data_attributes.rb new file mode 100644 index 00000000000..907b0614c29 --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connections_response_data_attributes.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ListConnectionsResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :connections + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'connections' => :'connections' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'connections' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListConnectionsResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'connections') + if (value = attributes[:'connections']).is_a?(Array) + self.connections = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connections == o.connections && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [connections, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items.rb b/lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items.rb new file mode 100644 index 00000000000..243dfb11fcf --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items.rb @@ -0,0 +1,187 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ListConnectionsResponseDataAttributesConnectionsItems + include BaseGenericModel + + # + attr_accessor :created_at + + # + attr_accessor :created_by + + # + attr_accessor :fields + + # + attr_accessor :id + + # + attr_accessor :join + + # + attr_accessor :metadata + + # + attr_accessor :type + + # + attr_accessor :updated_at + + # + attr_accessor :updated_by + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'fields' => :'fields', + :'id' => :'id', + :'join' => :'join', + :'metadata' => :'metadata', + :'type' => :'type', + :'updated_at' => :'updated_at', + :'updated_by' => :'updated_by' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'created_by' => :'String', + :'fields' => :'Array', + :'id' => :'String', + :'join' => :'ListConnectionsResponseDataAttributesConnectionsItemsJoin', + :'metadata' => :'Hash', + :'type' => :'String', + :'updated_at' => :'Time', + :'updated_by' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListConnectionsResponseDataAttributesConnectionsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'join') + self.join = attributes[:'join'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'updated_by') + self.updated_by = attributes[:'updated_by'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_at == o.created_at && + created_by == o.created_by && + fields == o.fields && + id == o.id && + join == o.join && + metadata == o.metadata && + type == o.type && + updated_at == o.updated_at && + updated_by == o.updated_by && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, created_by, fields, id, join, metadata, type, updated_at, updated_by, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items_join.rb b/lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items_join.rb new file mode 100644 index 00000000000..8f6db2118e0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connections_response_data_attributes_connections_items_join.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ListConnectionsResponseDataAttributesConnectionsItemsJoin + include BaseGenericModel + + # + attr_accessor :attribute + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attribute' => :'attribute', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attribute' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListConnectionsResponseDataAttributesConnectionsItemsJoin` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attribute') + self.attribute = attributes[:'attribute'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attribute == o.attribute && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attribute, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_connections_response_data_type.rb b/lib/datadog_api_client/v2/models/list_connections_response_data_type.rb new file mode 100644 index 00000000000..861aafd4472 --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_connections_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # List connections response resource type. + class ListConnectionsResponseDataType + include BaseEnumModel + + LIST_CONNECTIONS_RESPONSE = "list_connections_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/query_account_request.rb b/lib/datadog_api_client/v2/models/query_account_request.rb new file mode 100644 index 00000000000..c04ae623ca5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_account_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryAccountRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'QueryAccountRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryAccountRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_account_request_data.rb b/lib/datadog_api_client/v2/models/query_account_request_data.rb new file mode 100644 index 00000000000..6f47cc7e9ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_account_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryAccountRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Query account request resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'QueryAccountRequestDataAttributes', + :'id' => :'String', + :'type' => :'QueryAccountRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryAccountRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_account_request_data_attributes.rb b/lib/datadog_api_client/v2/models/query_account_request_data_attributes.rb new file mode 100644 index 00000000000..1a5c5a5f2ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_account_request_data_attributes.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryAccountRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :limit + + # + attr_accessor :query + + # + attr_accessor :select_columns + + # + attr_accessor :sort + + # + attr_accessor :wildcard_search_term + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit' => :'limit', + :'query' => :'query', + :'select_columns' => :'select_columns', + :'sort' => :'sort', + :'wildcard_search_term' => :'wildcard_search_term' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit' => :'Integer', + :'query' => :'String', + :'select_columns' => :'Array', + :'sort' => :'QueryAccountRequestDataAttributesSort', + :'wildcard_search_term' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryAccountRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'select_columns') + if (value = attributes[:'select_columns']).is_a?(Array) + self.select_columns = value + end + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'wildcard_search_term') + self.wildcard_search_term = attributes[:'wildcard_search_term'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + limit == o.limit && + query == o.query && + select_columns == o.select_columns && + sort == o.sort && + wildcard_search_term == o.wildcard_search_term && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit, query, select_columns, sort, wildcard_search_term, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_account_request_data_attributes_sort.rb b/lib/datadog_api_client/v2/models/query_account_request_data_attributes_sort.rb new file mode 100644 index 00000000000..2bc4a37fa1f --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_account_request_data_attributes_sort.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryAccountRequestDataAttributesSort + include BaseGenericModel + + # + attr_accessor :field + + # + attr_accessor :order + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'field' => :'field', + :'order' => :'order' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'field' => :'String', + :'order' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryAccountRequestDataAttributesSort` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + order == o.order && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [field, order, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_account_request_data_type.rb b/lib/datadog_api_client/v2/models/query_account_request_data_type.rb new file mode 100644 index 00000000000..2a1f10861cc --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_account_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Query account request resource type. + class QueryAccountRequestDataType + include BaseEnumModel + + QUERY_ACCOUNT_REQUEST = "query_account_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/query_event_filtered_users_request.rb b/lib/datadog_api_client/v2/models/query_event_filtered_users_request.rb new file mode 100644 index 00000000000..c4c69d46d77 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_event_filtered_users_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryEventFilteredUsersRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'QueryEventFilteredUsersRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryEventFilteredUsersRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data.rb b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data.rb new file mode 100644 index 00000000000..e86a3095021 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryEventFilteredUsersRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Query event filtered users request resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'QueryEventFilteredUsersRequestDataAttributes', + :'id' => :'String', + :'type' => :'QueryEventFilteredUsersRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryEventFilteredUsersRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes.rb b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes.rb new file mode 100644 index 00000000000..48a1c658868 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryEventFilteredUsersRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :event_query + + # + attr_accessor :include_row_count + + # + attr_accessor :limit + + # + attr_accessor :query + + # + attr_accessor :select_columns + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'event_query' => :'event_query', + :'include_row_count' => :'include_row_count', + :'limit' => :'limit', + :'query' => :'query', + :'select_columns' => :'select_columns' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'event_query' => :'QueryEventFilteredUsersRequestDataAttributesEventQuery', + :'include_row_count' => :'Boolean', + :'limit' => :'Integer', + :'query' => :'String', + :'select_columns' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryEventFilteredUsersRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'event_query') + self.event_query = attributes[:'event_query'] + end + + if attributes.key?(:'include_row_count') + self.include_row_count = attributes[:'include_row_count'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'select_columns') + if (value = attributes[:'select_columns']).is_a?(Array) + self.select_columns = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event_query == o.event_query && + include_row_count == o.include_row_count && + limit == o.limit && + query == o.query && + select_columns == o.select_columns && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [event_query, include_row_count, limit, query, select_columns, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query.rb b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query.rb new file mode 100644 index 00000000000..f165af4b60d --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryEventFilteredUsersRequestDataAttributesEventQuery + include BaseGenericModel + + # + attr_accessor :query + + # + attr_accessor :time_frame + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query', + :'time_frame' => :'time_frame' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'String', + :'time_frame' => :'QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryEventFilteredUsersRequestDataAttributesEventQuery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'time_frame') + self.time_frame = attributes[:'time_frame'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query && + time_frame == o.time_frame && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, time_frame, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query_time_frame.rb b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query_time_frame.rb new file mode 100644 index 00000000000..a6c349ebf72 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_attributes_event_query_time_frame.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame + include BaseGenericModel + + # + attr_accessor :_end + + # + attr_accessor :start + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'_end' => :'end', + :'start' => :'start' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'_end' => :'Integer', + :'start' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryEventFilteredUsersRequestDataAttributesEventQueryTimeFrame` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'_end') + self._end = attributes[:'_end'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _end == o._end && + start == o.start && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [_end, start, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_type.rb b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_type.rb new file mode 100644 index 00000000000..3ab17179c34 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_event_filtered_users_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Query event filtered users request resource type. + class QueryEventFilteredUsersRequestDataType + include BaseEnumModel + + QUERY_EVENT_FILTERED_USERS_REQUEST = "query_event_filtered_users_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/query_response.rb b/lib/datadog_api_client/v2/models/query_response.rb new file mode 100644 index 00000000000..079241fe22d --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryResponse + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'QueryResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_response_data.rb b/lib/datadog_api_client/v2/models/query_response_data.rb new file mode 100644 index 00000000000..8b1fc923866 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_response_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Query response resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'QueryResponseDataAttributes', + :'id' => :'String', + :'type' => :'QueryResponseDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_response_data_attributes.rb b/lib/datadog_api_client/v2/models/query_response_data_attributes.rb new file mode 100644 index 00000000000..3f3190d88dd --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_response_data_attributes.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :hits + + # + attr_accessor :total + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hits' => :'hits', + :'total' => :'total' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hits' => :'Array>', + :'total' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'hits') + if (value = attributes[:'hits']).is_a?(Array) + self.hits = value + end + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hits == o.hits && + total == o.total && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hits, total, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_response_data_type.rb b/lib/datadog_api_client/v2/models/query_response_data_type.rb new file mode 100644 index 00000000000..f40c4123292 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Query response resource type. + class QueryResponseDataType + include BaseEnumModel + + QUERY_RESPONSE = "query_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/query_users_request.rb b/lib/datadog_api_client/v2/models/query_users_request.rb new file mode 100644 index 00000000000..a81e8e34f88 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_users_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryUsersRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'QueryUsersRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryUsersRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_users_request_data.rb b/lib/datadog_api_client/v2/models/query_users_request_data.rb new file mode 100644 index 00000000000..4ab805f2d0b --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_users_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryUsersRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # Query users request resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'QueryUsersRequestDataAttributes', + :'id' => :'String', + :'type' => :'QueryUsersRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryUsersRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_users_request_data_attributes.rb b/lib/datadog_api_client/v2/models/query_users_request_data_attributes.rb new file mode 100644 index 00000000000..c81ef853295 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_users_request_data_attributes.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryUsersRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :limit + + # + attr_accessor :query + + # + attr_accessor :select_columns + + # + attr_accessor :sort + + # + attr_accessor :wildcard_search_term + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit' => :'limit', + :'query' => :'query', + :'select_columns' => :'select_columns', + :'sort' => :'sort', + :'wildcard_search_term' => :'wildcard_search_term' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit' => :'Integer', + :'query' => :'String', + :'select_columns' => :'Array', + :'sort' => :'QueryUsersRequestDataAttributesSort', + :'wildcard_search_term' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryUsersRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'select_columns') + if (value = attributes[:'select_columns']).is_a?(Array) + self.select_columns = value + end + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'wildcard_search_term') + self.wildcard_search_term = attributes[:'wildcard_search_term'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + limit == o.limit && + query == o.query && + select_columns == o.select_columns && + sort == o.sort && + wildcard_search_term == o.wildcard_search_term && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit, query, select_columns, sort, wildcard_search_term, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_users_request_data_attributes_sort.rb b/lib/datadog_api_client/v2/models/query_users_request_data_attributes_sort.rb new file mode 100644 index 00000000000..27249139ed2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_users_request_data_attributes_sort.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class QueryUsersRequestDataAttributesSort + include BaseGenericModel + + # + attr_accessor :field + + # + attr_accessor :order + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'field' => :'field', + :'order' => :'order' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'field' => :'String', + :'order' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::QueryUsersRequestDataAttributesSort` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + order == o.order && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [field, order, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/query_users_request_data_type.rb b/lib/datadog_api_client/v2/models/query_users_request_data_type.rb new file mode 100644 index 00000000000..0385f52026a --- /dev/null +++ b/lib/datadog_api_client/v2/models/query_users_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Query users request resource type. + class QueryUsersRequestDataType + include BaseEnumModel + + QUERY_USERS_REQUEST = "query_users_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/update_connection_request.rb b/lib/datadog_api_client/v2/models/update_connection_request.rb new file mode 100644 index 00000000000..65d5752e97f --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_connection_request.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateConnectionRequest + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'UpdateConnectionRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateConnectionRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_connection_request_data.rb b/lib/datadog_api_client/v2/models/update_connection_request_data.rb new file mode 100644 index 00000000000..5e6bbc44fb1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_connection_request_data.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateConnectionRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_reader :id + + # Connection id resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'UpdateConnectionRequestDataAttributes', + :'id' => :'String', + :'type' => :'UpdateConnectionRequestDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateConnectionRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_connection_request_data_attributes.rb b/lib/datadog_api_client/v2/models/update_connection_request_data_attributes.rb new file mode 100644 index 00000000000..a4fcf2d82af --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_connection_request_data_attributes.rb @@ -0,0 +1,131 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateConnectionRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :fields_to_add + + # + attr_accessor :fields_to_delete + + # + attr_accessor :fields_to_update + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fields_to_add' => :'fields_to_add', + :'fields_to_delete' => :'fields_to_delete', + :'fields_to_update' => :'fields_to_update' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fields_to_add' => :'Array', + :'fields_to_delete' => :'Array', + :'fields_to_update' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateConnectionRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'fields_to_add') + if (value = attributes[:'fields_to_add']).is_a?(Array) + self.fields_to_add = value + end + end + + if attributes.key?(:'fields_to_delete') + if (value = attributes[:'fields_to_delete']).is_a?(Array) + self.fields_to_delete = value + end + end + + if attributes.key?(:'fields_to_update') + if (value = attributes[:'fields_to_update']).is_a?(Array) + self.fields_to_update = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fields_to_add == o.fields_to_add && + fields_to_delete == o.fields_to_delete && + fields_to_update == o.fields_to_update && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fields_to_add, fields_to_delete, fields_to_update, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_connection_request_data_attributes_fields_to_update_items.rb b/lib/datadog_api_client/v2/models/update_connection_request_data_attributes_fields_to_update_items.rb new file mode 100644 index 00000000000..4b827db8470 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_connection_request_data_attributes_fields_to_update_items.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateConnectionRequestDataAttributesFieldsToUpdateItems + include BaseGenericModel + + # + attr_reader :field_id + + # + attr_accessor :updated_description + + # + attr_accessor :updated_display_name + + # + attr_accessor :updated_field_id + + # + attr_accessor :updated_groups + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'field_id' => :'field_id', + :'updated_description' => :'updated_description', + :'updated_display_name' => :'updated_display_name', + :'updated_field_id' => :'updated_field_id', + :'updated_groups' => :'updated_groups' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'field_id' => :'String', + :'updated_description' => :'String', + :'updated_display_name' => :'String', + :'updated_field_id' => :'String', + :'updated_groups' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateConnectionRequestDataAttributesFieldsToUpdateItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'field_id') + self.field_id = attributes[:'field_id'] + end + + if attributes.key?(:'updated_description') + self.updated_description = attributes[:'updated_description'] + end + + if attributes.key?(:'updated_display_name') + self.updated_display_name = attributes[:'updated_display_name'] + end + + if attributes.key?(:'updated_field_id') + self.updated_field_id = attributes[:'updated_field_id'] + end + + if attributes.key?(:'updated_groups') + if (value = attributes[:'updated_groups']).is_a?(Array) + self.updated_groups = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @field_id.nil? + true + end + + # Custom attribute writer method with validation + # @param field_id [Object] Object to be assigned + # @!visibility private + def field_id=(field_id) + if field_id.nil? + fail ArgumentError, 'invalid value for "field_id", field_id cannot be nil.' + end + @field_id = field_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field_id == o.field_id && + updated_description == o.updated_description && + updated_display_name == o.updated_display_name && + updated_field_id == o.updated_field_id && + updated_groups == o.updated_groups && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [field_id, updated_description, updated_display_name, updated_field_id, updated_groups, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_connection_request_data_type.rb b/lib/datadog_api_client/v2/models/update_connection_request_data_type.rb new file mode 100644 index 00000000000..80977061f2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_connection_request_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Connection id resource type. + class UpdateConnectionRequestDataType + include BaseEnumModel + + CONNECTION_ID = "connection_id".freeze + end +end