diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 93efc78e5a9..f95a76690c8 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -20823,6 +20823,326 @@ components: - name - requirements type: object + FunnelRequest: + example: + data: + attributes: + data_source: rum + enforced_execution_type: '' + request_id: '' + search: + cross_session_filter: '' + query_string: '@type:view' + steps: + - facet: '@view.name' + step_filter: '' + value: /apm/home + - facet: '@view.name' + step_filter: '' + value: /apm/traces + subquery_id: '' + time: + from: 1756425600000 + to: 1756857600000 + id: funnel_request + type: funnel_request + properties: + data: + $ref: '#/components/schemas/FunnelRequestData' + type: object + FunnelRequestData: + properties: + attributes: + $ref: '#/components/schemas/FunnelRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/FunnelRequestDataType' + required: + - type + type: object + FunnelRequestDataAttributes: + properties: + data_source: + type: string + enforced_execution_type: + type: string + request_id: + type: string + search: + $ref: '#/components/schemas/FunnelRequestDataAttributesSearch' + time: + $ref: '#/components/schemas/FunnelRequestDataAttributesTime' + type: object + FunnelRequestDataAttributesSearch: + properties: + cross_session_filter: + type: string + query_string: + type: string + steps: + items: + $ref: '#/components/schemas/FunnelRequestDataAttributesSearchStepsItems' + type: array + subquery_id: + type: string + type: object + FunnelRequestDataAttributesSearchStepsItems: + properties: + facet: + type: string + step_filter: + type: string + value: + type: string + type: object + FunnelRequestDataAttributesTime: + properties: + from: + format: int64 + type: integer + to: + format: int64 + type: integer + type: object + FunnelRequestDataType: + default: funnel_request + enum: + - funnel_request + example: funnel_request + type: string + x-enum-varnames: + - FUNNEL_REQUEST + FunnelResponse: + example: + data: + attributes: + end_to_end_conversion_rate: 0.1161386890038228 + funnel_steps: + - label: '@type:view @view.name:/apm/home' + value: 284608 + - label: '@type:view @view.name:/apm/traces' + value: 33054 + initial_count: 3925047 + id: funnel_response + type: funnel_response + properties: + data: + $ref: '#/components/schemas/FunnelResponseData' + type: object + FunnelResponseData: + properties: + attributes: + $ref: '#/components/schemas/FunnelResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/FunnelResponseDataType' + required: + - type + type: object + FunnelResponseDataAttributes: + properties: + end_to_end_conversion_rate: + format: double + type: number + end_to_end_elapsed_time: + $ref: '#/components/schemas/FunnelResponseElapsedTime' + funnel_steps: + items: + $ref: '#/components/schemas/FunnelResponseDataAttributesFunnelStepsItems' + type: array + initial_count: + format: int64 + type: integer + type: object + FunnelResponseDataAttributesFunnelStepsItems: + properties: + elapsed_time_to_next_step: + $ref: '#/components/schemas/FunnelResponseElapsedTime' + label: + type: string + value: + format: int64 + type: integer + type: object + FunnelResponseDataType: + default: funnel_response + enum: + - funnel_response + example: funnel_response + type: string + x-enum-varnames: + - FUNNEL_RESPONSE + FunnelResponseElapsedTime: + properties: + avg: + format: int64 + type: integer + max: + format: int64 + type: integer + min: + format: int64 + type: integer + p5: + format: int64 + type: integer + p50: + format: int64 + type: integer + p95: + format: int64 + type: integer + type: object + FunnelSuggestionRequest: + example: + data: + attributes: + data_source: '' + search: + cross_session_filter: '' + query_string: '@type:view' + steps: + - facet: '@view.name' + step_filter: '' + value: /apm/home + subquery_id: '' + term_search: + query: apm + time: + from: 1756425600000 + to: 1756857600000 + id: funnel_suggestion_request + type: funnel_suggestion_request + properties: + data: + $ref: '#/components/schemas/FunnelSuggestionRequestData' + type: object + FunnelSuggestionRequestData: + properties: + attributes: + $ref: '#/components/schemas/FunnelSuggestionRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/FunnelSuggestionRequestDataType' + required: + - type + type: object + FunnelSuggestionRequestDataAttributes: + properties: + data_source: + type: string + search: + $ref: '#/components/schemas/FunnelSuggestionRequestDataAttributesSearch' + term_search: + $ref: '#/components/schemas/FunnelSuggestionRequestDataAttributesTermSearch' + time: + $ref: '#/components/schemas/FunnelSuggestionRequestDataAttributesTime' + type: object + FunnelSuggestionRequestDataAttributesSearch: + properties: + cross_session_filter: + type: string + query_string: + type: string + steps: + items: + $ref: '#/components/schemas/FunnelSuggestionRequestDataAttributesSearchStepsItems' + type: array + subquery_id: + type: string + type: object + FunnelSuggestionRequestDataAttributesSearchStepsItems: + properties: + facet: + type: string + step_filter: + type: string + value: + type: string + type: object + FunnelSuggestionRequestDataAttributesTermSearch: + properties: + query: + type: string + type: object + FunnelSuggestionRequestDataAttributesTime: + properties: + from: + format: int64 + type: integer + to: + format: int64 + type: integer + type: object + FunnelSuggestionRequestDataType: + default: funnel_suggestion_request + enum: + - funnel_suggestion_request + example: funnel_suggestion_request + type: string + x-enum-varnames: + - FUNNEL_SUGGESTION_REQUEST + FunnelSuggestionResponse: + example: + data: + attributes: + actions: + - name: view_trace_details + - name: filter_by_service + - name: analyze_performance + views: + - name: /apm/traces + - name: /apm/services + - name: /apm/service-map + id: funnel_suggestion_response + type: funnel_suggestion_response + properties: + data: + $ref: '#/components/schemas/FunnelSuggestionResponseData' + type: object + FunnelSuggestionResponseData: + properties: + attributes: + $ref: '#/components/schemas/FunnelSuggestionResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/FunnelSuggestionResponseDataType' + required: + - type + type: object + FunnelSuggestionResponseDataAttributes: + properties: + actions: + items: + $ref: '#/components/schemas/FunnelSuggestionResponseDataAttributesActionsItems' + type: array + views: + items: + $ref: '#/components/schemas/FunnelSuggestionResponseDataAttributesViewsItems' + type: array + type: object + FunnelSuggestionResponseDataAttributesActionsItems: + properties: + name: + type: string + type: object + FunnelSuggestionResponseDataAttributesViewsItems: + properties: + name: + type: string + type: object + FunnelSuggestionResponseDataType: + default: funnel_suggestion_response + enum: + - funnel_suggestion_response + example: funnel_suggestion_response + type: string + x-enum-varnames: + - FUNNEL_SUGGESTION_RESPONSE GCPCredentials: description: The definition of the `GCPCredentials` object. oneOf: @@ -21735,6 +22055,369 @@ components: type: string type: array type: object + GetCohortRequest: + properties: + data: + $ref: '#/components/schemas/GetCohortRequestData' + type: object + GetCohortRequestData: + properties: + attributes: + $ref: '#/components/schemas/GetCohortRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/GetCohortRequestDataType' + required: + - type + type: object + GetCohortRequestDataAttributes: + properties: + data_source: + type: string + definition: + $ref: '#/components/schemas/GetCohortRequestDataAttributesDefinition' + enforced_execution_type: + type: string + request_id: + type: string + time: + $ref: '#/components/schemas/GetCohortRequestDataAttributesTime' + window_size: + type: string + type: object + GetCohortRequestDataAttributesDefinition: + properties: + audience_filters: + $ref: '#/components/schemas/GetCohortRequestDataAttributesDefinitionAudienceFilters' + inclusion_search: + type: string + return_search: + type: string + segment_id: + type: string + type: object + GetCohortRequestDataAttributesDefinitionAudienceFilters: + properties: + accounts: + items: + $ref: '#/components/schemas/GetCohortRequestDataAttributesDefinitionAudienceFiltersAccountsItems' + type: array + formula: + type: string + segments: + items: + $ref: '#/components/schemas/GetCohortRequestDataAttributesDefinitionAudienceFiltersSegmentsItems' + type: array + users: + items: + $ref: '#/components/schemas/GetCohortRequestDataAttributesDefinitionAudienceFiltersUsersItems' + type: array + type: object + GetCohortRequestDataAttributesDefinitionAudienceFiltersAccountsItems: + properties: + name: + example: '' + type: string + query: + type: string + required: + - name + type: object + GetCohortRequestDataAttributesDefinitionAudienceFiltersSegmentsItems: + properties: + name: + example: '' + type: string + segment_id: + example: '' + type: string + required: + - name + - segment_id + type: object + GetCohortRequestDataAttributesDefinitionAudienceFiltersUsersItems: + properties: + name: + example: '' + type: string + query: + type: string + required: + - name + type: object + GetCohortRequestDataAttributesTime: + properties: + from: + format: int64 + type: integer + to: + format: int64 + type: integer + type: object + GetCohortRequestDataType: + default: cohort_request + enum: + - cohort_request + example: cohort_request + type: string + x-enum-varnames: + - COHORT_REQUEST + GetCohortResponse: + example: + data: + attributes: + cohorts: + - cohort: '2024-01-01' + cohort_size: 1000 + start_time: 1704067200000 + values: + - absolute_value: 1000 + end_time: 1704672000000 + relative_value: 100 + start_time: 1704067200000 + window: 0 + - absolute_value: 750 + end_time: 1705276800000 + relative_value: 75 + start_time: 1704672000000 + window: 1 + - absolute_value: 600 + end_time: 1705881600000 + relative_value: 60 + start_time: 1705276800000 + window: 2 + id: cohort_response + type: cohort_response + properties: + data: + $ref: '#/components/schemas/GetCohortResponseData' + type: object + GetCohortResponseData: + properties: + attributes: + $ref: '#/components/schemas/GetCohortResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/GetCohortResponseDataType' + required: + - type + type: object + GetCohortResponseDataAttributes: + properties: + cohorts: + items: + $ref: '#/components/schemas/GetCohortResponseDataAttributesCohortsItems' + type: array + type: object + GetCohortResponseDataAttributesCohortsItems: + properties: + cohort: + type: string + cohort_size: + format: int64 + type: integer + start_time: + format: int64 + type: integer + values: + items: + $ref: '#/components/schemas/GetCohortResponseDataAttributesCohortsItemsValuesItems' + type: array + type: object + GetCohortResponseDataAttributesCohortsItemsValuesItems: + properties: + absolute_value: + format: int64 + type: integer + end_time: + format: int64 + type: integer + relative_value: + format: double + type: number + start_time: + format: int64 + type: integer + window: + format: int64 + type: integer + type: object + GetCohortResponseDataType: + default: cohort_response + enum: + - cohort_response + example: cohort_response + type: string + x-enum-varnames: + - COHORT_RESPONSE + GetCohortUsersRequest: + properties: + data: + $ref: '#/components/schemas/GetCohortUsersRequestData' + type: object + GetCohortUsersRequestData: + properties: + attributes: + $ref: '#/components/schemas/GetCohortUsersRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/GetCohortUsersRequestDataType' + required: + - type + type: object + GetCohortUsersRequestDataAttributes: + properties: + data_source: + type: string + definition: + $ref: '#/components/schemas/GetCohortUsersRequestDataAttributesDefinition' + execution: + format: int64 + type: integer + time: + $ref: '#/components/schemas/GetCohortUsersRequestDataAttributesTime' + user_selection: + type: string + window_size: + type: string + type: object + GetCohortUsersRequestDataAttributesDefinition: + properties: + audience_filters: + $ref: '#/components/schemas/GetCohortUsersRequestDataAttributesDefinitionAudienceFilters' + cohort: + type: string + inclusion_search: + type: string + return_search: + type: string + segment_id: + type: string + window: + format: int64 + type: integer + type: object + GetCohortUsersRequestDataAttributesDefinitionAudienceFilters: + properties: + accounts: + items: + $ref: '#/components/schemas/GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersAccountsItems' + type: array + formula: + type: string + segments: + items: + $ref: '#/components/schemas/GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersSegmentsItems' + type: array + users: + items: + $ref: '#/components/schemas/GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersUsersItems' + type: array + type: object + GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersAccountsItems: + properties: + name: + example: '' + type: string + query: + type: string + required: + - name + type: object + GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersSegmentsItems: + properties: + name: + example: '' + type: string + segment_id: + example: '' + type: string + required: + - name + - segment_id + type: object + GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersUsersItems: + properties: + name: + example: '' + type: string + query: + type: string + required: + - name + type: object + GetCohortUsersRequestDataAttributesTime: + properties: + from: + format: int64 + type: integer + to: + format: int64 + type: integer + type: object + GetCohortUsersRequestDataType: + default: cohort_users_request + enum: + - cohort_users_request + example: cohort_users_request + type: string + x-enum-varnames: + - COHORT_USERS_REQUEST + GetCohortUsersResponse: + example: + data: + attributes: + users: + - email: user@example.com + id: user123 + name: John Doe + - email: jane@example.com + id: user456 + name: Jane Smith + id: cohort_users_response + type: cohort_users_response + properties: + data: + $ref: '#/components/schemas/GetCohortUsersResponseData' + type: object + GetCohortUsersResponseData: + properties: + attributes: + $ref: '#/components/schemas/GetCohortUsersResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/GetCohortUsersResponseDataType' + required: + - type + type: object + GetCohortUsersResponseDataAttributes: + properties: + users: + items: + $ref: '#/components/schemas/GetCohortUsersResponseDataAttributesUsersItems' + type: array + type: object + GetCohortUsersResponseDataAttributesUsersItems: + properties: + email: + type: string + id: + type: string + name: + type: string + type: object + GetCohortUsersResponseDataType: + default: cohort_users_response + enum: + - cohort_users_response + example: cohort_users_response + type: string + x-enum-varnames: + - COHORT_USERS_RESPONSE GetCustomFrameworkResponse: description: Response object to get a custom framework. properties: @@ -42312,6 +42995,294 @@ components: example: report_id type: string type: object + SankeyRequest: + example: + data: + attributes: + data_source: '' + definition: + entries_per_step: 10 + number_of_steps: 5 + source: '@view.name' + target: '@view.name' + enforced_execution_type: '' + request_id: '' + sampling: + enabled: true + search: + audience_filters: {} + query: '@type:view @application.id:*' + subquery_id: '' + time: + from: 1756425600000 + to: 1756857600000 + id: sankey_request + type: sankey_request + properties: + data: + $ref: '#/components/schemas/SankeyRequestData' + type: object + SankeyRequestData: + properties: + attributes: + $ref: '#/components/schemas/SankeyRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/SankeyRequestDataType' + required: + - type + type: object + SankeyRequestDataAttributes: + properties: + data_source: + type: string + definition: + $ref: '#/components/schemas/SankeyRequestDataAttributesDefinition' + enforced_execution_type: + type: string + request_id: + type: string + sampling: + $ref: '#/components/schemas/SankeyRequestDataAttributesSampling' + search: + $ref: '#/components/schemas/SankeyRequestDataAttributesSearch' + time: + $ref: '#/components/schemas/SankeyRequestDataAttributesTime' + type: object + SankeyRequestDataAttributesDefinition: + properties: + entries_per_step: + format: int64 + type: integer + number_of_steps: + format: int64 + type: integer + source: + type: string + target: + type: string + type: object + SankeyRequestDataAttributesSampling: + properties: + enabled: + description: The `sampling` `enabled`. + type: boolean + type: object + SankeyRequestDataAttributesSearch: + properties: + audience_filters: + $ref: '#/components/schemas/SankeyRequestDataAttributesSearchAudienceFilters' + occurrences: + $ref: '#/components/schemas/SankeyRequestDataAttributesSearchOccurrences' + query: + type: string + subquery_id: + type: string + type: object + SankeyRequestDataAttributesSearchAudienceFilters: + properties: + accounts: + items: + $ref: '#/components/schemas/SankeyRequestDataAttributesSearchAudienceFiltersAccountsItems' + type: array + formula: + type: string + segments: + items: + $ref: '#/components/schemas/SankeyRequestDataAttributesSearchAudienceFiltersSegmentsItems' + type: array + users: + items: + $ref: '#/components/schemas/SankeyRequestDataAttributesSearchAudienceFiltersUsersItems' + type: array + type: object + SankeyRequestDataAttributesSearchAudienceFiltersAccountsItems: + properties: + name: + example: '' + type: string + query: + type: string + required: + - name + type: object + SankeyRequestDataAttributesSearchAudienceFiltersSegmentsItems: + properties: + name: + example: '' + type: string + segment_id: + example: '' + type: string + required: + - name + - segment_id + type: object + SankeyRequestDataAttributesSearchAudienceFiltersUsersItems: + properties: + name: + example: '' + type: string + query: + type: string + required: + - name + type: object + SankeyRequestDataAttributesSearchOccurrences: + properties: + meta: + additionalProperties: + type: string + type: object + operator: + example: '' + type: string + value: + example: '' + type: string + required: + - operator + - value + type: object + SankeyRequestDataAttributesTime: + properties: + from: + format: int64 + type: integer + to: + format: int64 + type: integer + type: object + SankeyRequestDataType: + default: sankey_request + enum: + - sankey_request + example: sankey_request + type: string + x-enum-varnames: + - SANKEY_REQUEST + SankeyResponse: + example: + data: + attributes: + links: + - column: 0 + id: apm_home-to-apm_traces + source: apm_home + target: apm_traces + value: 33054 + nodes: + - aggregated_nodes: null + column: 0 + id: apm_home + incoming_value: 0 + name: /apm/home + outgoing_value: 33054 + type: regular + value: 284608 + - aggregated_nodes: null + column: 1 + id: apm_traces + incoming_value: 33054 + name: /apm/traces + outgoing_value: 15000 + type: regular + value: 33054 + id: sankey_response + type: sankey_response + properties: + data: + $ref: '#/components/schemas/SankeyResponseData' + type: object + SankeyResponseData: + properties: + attributes: + $ref: '#/components/schemas/SankeyResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/SankeyResponseDataType' + required: + - type + type: object + SankeyResponseDataAttributes: + properties: + links: + items: + $ref: '#/components/schemas/SankeyResponseDataAttributesLinksItems' + type: array + nodes: + items: + $ref: '#/components/schemas/SankeyResponseDataAttributesNodesItems' + type: array + type: object + SankeyResponseDataAttributesLinksItems: + properties: + column: + format: int64 + type: integer + id: + type: string + source: + type: string + target: + type: string + value: + format: int64 + type: integer + type: object + SankeyResponseDataAttributesNodesItems: + properties: + aggregated_nodes: + items: + $ref: '#/components/schemas/SankeyResponseDataAttributesNodesItemsAggregatedNodesItems' + type: array + column: + format: int64 + type: integer + id: + type: string + incoming_value: + format: int64 + type: integer + name: + type: string + outgoing_value: + format: int64 + type: integer + type: + type: string + value: + format: int64 + type: integer + type: object + SankeyResponseDataAttributesNodesItemsAggregatedNodesItems: + properties: + id: + type: string + incoming_value: + format: int64 + type: integer + name: + type: string + outgoing_value: + format: int64 + type: integer + type: + type: string + value: + format: int64 + type: integer + type: object + SankeyResponseDataType: + default: sankey_response + enum: + - sankey_response + example: sankey_response + type: string + x-enum-varnames: + - SANKEY_RESPONSE ScaRequest: properties: data: @@ -45944,6 +46915,229 @@ components: required: - securityTrigger type: object + Segment: + example: + data: + attributes: + created_at: '0001-01-01T00:00:00Z' + created_by: + handle: '' + id: '' + uuid: '' + data_query: + event_platform: + - facet: '@usr.id' + from: '2025-08-01' + name: high_value_users + query: '@type:view @view.name:/logs @usr.session_duration:>300000' + to: '2025-09-01' + description: Users who frequently visit logs and have high session duration + modified_at: '0001-01-01T00:00:00Z' + modified_by: + handle: '' + id: '' + uuid: '' + name: High-Value Users + org_id: 123456 + source: 0 + tags: + - high-value + - logs + - active + version: 1 + id: segment-12345 + type: segment + properties: + data: + $ref: '#/components/schemas/SegmentData' + type: object + SegmentArray: + properties: + data: + items: + $ref: '#/components/schemas/SegmentData' + type: array + required: + - data + type: object + SegmentData: + properties: + attributes: + $ref: '#/components/schemas/SegmentDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/SegmentDataType' + required: + - type + type: object + SegmentDataAttributes: + properties: + created_at: + format: date-time + type: string + created_by: + $ref: '#/components/schemas/SegmentDataSource' + data_query: + $ref: '#/components/schemas/SegmentDataAttributesDataQuery' + description: + type: string + disabled_at: + format: date-time + type: string + disabled_by: + $ref: '#/components/schemas/SegmentDataSource' + materialization_row_count: + format: int64 + type: integer + materialized_at: + type: string + modified_at: + format: date-time + type: string + modified_by: + $ref: '#/components/schemas/SegmentDataSource' + name: + example: '' + type: string + org_id: + format: int64 + type: integer + source: + format: int64 + type: integer + tags: + items: + type: string + type: array + version: + format: int64 + type: integer + required: + - data_query + - name + type: object + SegmentDataAttributesDataQuery: + properties: + combination: + type: string + event_platform: + items: + $ref: '#/components/schemas/SegmentDataAttributesDataQueryEventPlatformItems' + type: array + reference_table: + items: + $ref: '#/components/schemas/SegmentDataAttributesDataQueryReferenceTableItems' + type: array + static: + items: + $ref: '#/components/schemas/SegmentDataAttributesDataQueryStaticItems' + type: array + user_store: + items: + $ref: '#/components/schemas/SegmentDataAttributesDataQueryUserStoreItems' + type: array + type: object + SegmentDataAttributesDataQueryEventPlatformItems: + properties: + facet: + example: '' + type: string + from: + type: string + name: + type: string + query: + type: string + to: + type: string + required: + - facet + type: object + SegmentDataAttributesDataQueryReferenceTableItems: + properties: + columns: + items: + $ref: '#/components/schemas/SegmentDataAttributesDataQueryReferenceTableItemsColumnsItems' + type: array + filter_query: + type: string + join_condition: + $ref: '#/components/schemas/SegmentDataAttributesDataQueryReferenceTableItemsJoinCondition' + name: + type: string + table_name: + example: '' + type: string + required: + - join_condition + - table_name + type: object + SegmentDataAttributesDataQueryReferenceTableItemsColumnsItems: + properties: + alias: + type: string + name: + type: string + type: object + SegmentDataAttributesDataQueryReferenceTableItemsJoinCondition: + properties: + column_name: + example: '' + type: string + facet: + type: string + required: + - column_name + type: object + SegmentDataAttributesDataQueryStaticItems: + properties: + id: + type: string + name: + type: string + user_count: + format: int64 + minimum: 0 + type: integer + type: object + SegmentDataAttributesDataQueryUserStoreItems: + properties: + facet: + type: string + name: + type: string + query: + type: string + type: object + SegmentDataSource: + properties: + handle: + example: '' + type: string + icon: + type: string + id: + example: '' + type: string + name: + type: string + uuid: + example: '' + type: string + required: + - handle + - id + - uuid + type: object + SegmentDataType: + default: segment + enum: + - segment + example: segment + type: string + x-enum-varnames: + - SEGMENT Selectors: description: 'Selectors are used to filter security issues for which notifications should be generated. @@ -73028,6 +74222,54 @@ paths: operator: OR permissions: - rum_apps_write + /api/v2/rum/cohort: + post: + description: Analyze user cohorts for retention and conversion analysis + operationId: GetRumCohort + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetCohortRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetCohortResponse' + description: Successful response with cohort analysis data + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: Get rum cohort + tags: + - Cohort + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/rum/cohort/users: + post: + description: Get users within a specific cohort for retention analysis + operationId: GetRumCohortUsers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetCohortUsersRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetCohortUsersResponse' + description: Successful response with cohort users + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: Get rum cohort users + tags: + - Cohort + x-unstable: '**Note**: This endpoint may be subject to changes.' /api/v2/rum/config/metrics: get: description: Get the list of configured rum-based metrics with their definitions. @@ -73282,6 +74524,134 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/rum/funnel: + post: + description: Analyze conversion funnels to understand user drop-off patterns + operationId: GetRumFunnel + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FunnelRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FunnelResponse' + description: Successful response with funnel analysis data + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: Get rum funnel + tags: + - Funnel + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/rum/funnel/new_step_suggestions: + post: + description: Get suggested steps for building conversion funnels + operationId: GetRumFunnelStepSuggestions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FunnelSuggestionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FunnelSuggestionResponse' + description: Successful response with funnel step suggestions + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: Get rum funnel step suggestions + tags: + - Funnel + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/rum/sankey: + post: + description: Generate Sankey diagrams to visualize user flow paths and drop-off + points + operationId: GetRumSankey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SankeyRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SankeyResponse' + description: Successful response with Sankey diagram data + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: Get rum sankey + tags: + - User Flow + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/rum/segment: + get: + description: List all available user segments for audience targeting + operationId: ListRumSegments + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SegmentArray' + description: Successful response with list of segments + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: List rum segments + tags: + - Segments + x-unstable: '**Note**: This endpoint may be subject to changes.' + post: + description: Create a new user segment for audience targeting + operationId: CreateRumSegment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Segment' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Segment' + description: Segment created successfully + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: Create rum segment + tags: + - Segments + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/rum/segment/initialize: + post: + description: Initialize default segments for a new organization + operationId: InitializeRumSegments + responses: + '200': + description: Default segments created successfully + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: [] + summary: Initialize rum segments + tags: + - Segments + x-unstable: '**Note**: This endpoint may be subject to changes.' /api/v2/saml_configurations/idp_metadata: post: description: 'Endpoint for uploading IdP metadata for SAML setup. @@ -81252,6 +82622,8 @@ tags: API. See the [Cloudflare integration page](https://docs.datadoghq.com/integrations/cloudflare/) for more information. name: Cloudflare Integration +- description: API for Cohort. + name: Cohort - description: Manage your Datadog Confluent Cloud integration accounts and account resources directly through the Datadog API. See the [Confluent Cloud page](https://docs.datadoghq.com/integrations/confluent_cloud/) for more information. @@ -81335,6 +82707,8 @@ tags: that apply configuration changes to multiple hosts at once.' name: Fleet Automation +- description: API for funnel. + name: Funnel - description: 'Configure your Datadog-Google Cloud Platform (GCP) integration directly through the Datadog API. Read more about the [Datadog-Google Cloud Platform integration](https://docs.datadoghq.com/integrations/google_cloud_platform).' @@ -81556,6 +82930,8 @@ tags: See the [Datadog Security page](https://docs.datadoghq.com/security/) for more information. name: Security Monitoring +- description: API for segments. + name: Segments - description: Create, update, delete, and retrieve sensitive data scanner groups and rules. See the [Sensitive Data Scanner page](https://docs.datadoghq.com/sensitive_data_scanner/) for more information. @@ -81643,6 +83019,8 @@ tags: description: Find out more at url: https://docs.datadoghq.com/account_management/billing/usage_details/ name: Usage Metering +- description: API for user flow. + name: User Flow - description: Create, edit, and disable users. externalDocs: url: https://docs.datadoghq.com/account_management/users diff --git a/examples/v2/cohort/GetRumCohort.rb b/examples/v2/cohort/GetRumCohort.rb new file mode 100644 index 00000000000..dec7d9527f8 --- /dev/null +++ b/examples/v2/cohort/GetRumCohort.rb @@ -0,0 +1,37 @@ +# Get rum cohort returns "Successful response with cohort analysis data" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_rum_cohort".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CohortAPI.new + +body = DatadogAPIClient::V2::GetCohortRequest.new({ + data: DatadogAPIClient::V2::GetCohortRequestData.new({ + attributes: DatadogAPIClient::V2::GetCohortRequestDataAttributes.new({ + definition: DatadogAPIClient::V2::GetCohortRequestDataAttributesDefinition.new({ + audience_filters: DatadogAPIClient::V2::GetCohortRequestDataAttributesDefinitionAudienceFilters.new({ + accounts: [ + DatadogAPIClient::V2::GetCohortRequestDataAttributesDefinitionAudienceFiltersAccountsItems.new({ + name: "", + }), + ], + segments: [ + DatadogAPIClient::V2::GetCohortRequestDataAttributesDefinitionAudienceFiltersSegmentsItems.new({ + name: "", + segment_id: "", + }), + ], + users: [ + DatadogAPIClient::V2::GetCohortRequestDataAttributesDefinitionAudienceFiltersUsersItems.new({ + name: "", + }), + ], + }), + }), + time: DatadogAPIClient::V2::GetCohortRequestDataAttributesTime.new({}), + }), + type: DatadogAPIClient::V2::GetCohortRequestDataType::COHORT_REQUEST, + }), +}) +p api_instance.get_rum_cohort(body) diff --git a/examples/v2/cohort/GetRumCohortUsers.rb b/examples/v2/cohort/GetRumCohortUsers.rb new file mode 100644 index 00000000000..99ceb3c6108 --- /dev/null +++ b/examples/v2/cohort/GetRumCohortUsers.rb @@ -0,0 +1,37 @@ +# Get rum cohort users returns "Successful response with cohort users" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_rum_cohort_users".to_sym] = true +end +api_instance = DatadogAPIClient::V2::CohortAPI.new + +body = DatadogAPIClient::V2::GetCohortUsersRequest.new({ + data: DatadogAPIClient::V2::GetCohortUsersRequestData.new({ + attributes: DatadogAPIClient::V2::GetCohortUsersRequestDataAttributes.new({ + definition: DatadogAPIClient::V2::GetCohortUsersRequestDataAttributesDefinition.new({ + audience_filters: DatadogAPIClient::V2::GetCohortUsersRequestDataAttributesDefinitionAudienceFilters.new({ + accounts: [ + DatadogAPIClient::V2::GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersAccountsItems.new({ + name: "", + }), + ], + segments: [ + DatadogAPIClient::V2::GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersSegmentsItems.new({ + name: "", + segment_id: "", + }), + ], + users: [ + DatadogAPIClient::V2::GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersUsersItems.new({ + name: "", + }), + ], + }), + }), + time: DatadogAPIClient::V2::GetCohortUsersRequestDataAttributesTime.new({}), + }), + type: DatadogAPIClient::V2::GetCohortUsersRequestDataType::COHORT_USERS_REQUEST, + }), +}) +p api_instance.get_rum_cohort_users(body) diff --git a/examples/v2/funnel/GetRumFunnel.rb b/examples/v2/funnel/GetRumFunnel.rb new file mode 100644 index 00000000000..08b0f1a580e --- /dev/null +++ b/examples/v2/funnel/GetRumFunnel.rb @@ -0,0 +1,41 @@ +# Get rum funnel returns "Successful response with funnel analysis data" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_rum_funnel".to_sym] = true +end +api_instance = DatadogAPIClient::V2::FunnelAPI.new + +body = DatadogAPIClient::V2::FunnelRequest.new({ + data: DatadogAPIClient::V2::FunnelRequestData.new({ + attributes: DatadogAPIClient::V2::FunnelRequestDataAttributes.new({ + data_source: "rum", + enforced_execution_type: "", + request_id: "", + search: DatadogAPIClient::V2::FunnelRequestDataAttributesSearch.new({ + cross_session_filter: "", + query_string: "@type:view", + steps: [ + DatadogAPIClient::V2::FunnelRequestDataAttributesSearchStepsItems.new({ + facet: "@view.name", + step_filter: "", + value: "/apm/home", + }), + DatadogAPIClient::V2::FunnelRequestDataAttributesSearchStepsItems.new({ + facet: "@view.name", + step_filter: "", + value: "/apm/traces", + }), + ], + subquery_id: "", + }), + time: DatadogAPIClient::V2::FunnelRequestDataAttributesTime.new({ + from: 1756425600000, + to: 1756857600000, + }), + }), + id: "funnel_request", + type: DatadogAPIClient::V2::FunnelRequestDataType::FUNNEL_REQUEST, + }), +}) +p api_instance.get_rum_funnel(body) diff --git a/examples/v2/funnel/GetRumFunnelStepSuggestions.rb b/examples/v2/funnel/GetRumFunnelStepSuggestions.rb new file mode 100644 index 00000000000..33a6e3197c5 --- /dev/null +++ b/examples/v2/funnel/GetRumFunnelStepSuggestions.rb @@ -0,0 +1,37 @@ +# Get rum funnel step suggestions returns "Successful response with funnel step suggestions" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_rum_funnel_step_suggestions".to_sym] = true +end +api_instance = DatadogAPIClient::V2::FunnelAPI.new + +body = DatadogAPIClient::V2::FunnelSuggestionRequest.new({ + data: DatadogAPIClient::V2::FunnelSuggestionRequestData.new({ + attributes: DatadogAPIClient::V2::FunnelSuggestionRequestDataAttributes.new({ + data_source: "", + search: DatadogAPIClient::V2::FunnelSuggestionRequestDataAttributesSearch.new({ + cross_session_filter: "", + query_string: "@type:view", + steps: [ + DatadogAPIClient::V2::FunnelSuggestionRequestDataAttributesSearchStepsItems.new({ + facet: "@view.name", + step_filter: "", + value: "/apm/home", + }), + ], + subquery_id: "", + }), + term_search: DatadogAPIClient::V2::FunnelSuggestionRequestDataAttributesTermSearch.new({ + query: "apm", + }), + time: DatadogAPIClient::V2::FunnelSuggestionRequestDataAttributesTime.new({ + from: 1756425600000, + to: 1756857600000, + }), + }), + id: "funnel_suggestion_request", + type: DatadogAPIClient::V2::FunnelSuggestionRequestDataType::FUNNEL_SUGGESTION_REQUEST, + }), +}) +p api_instance.get_rum_funnel_step_suggestions(body) diff --git a/examples/v2/segments/CreateRumSegment.rb b/examples/v2/segments/CreateRumSegment.rb new file mode 100644 index 00000000000..6b08bf5e2e3 --- /dev/null +++ b/examples/v2/segments/CreateRumSegment.rb @@ -0,0 +1,50 @@ +# Create rum segment returns "Segment created successfully" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_rum_segment".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SegmentsAPI.new + +body = DatadogAPIClient::V2::Segment.new({ + data: DatadogAPIClient::V2::SegmentData.new({ + attributes: DatadogAPIClient::V2::SegmentDataAttributes.new({ + created_at: "0001-01-01T00:00:00Z", + created_by: DatadogAPIClient::V2::SegmentDataSource.new({ + handle: "", + id: "", + uuid: "", + }), + data_query: DatadogAPIClient::V2::SegmentDataAttributesDataQuery.new({ + event_platform: [ + DatadogAPIClient::V2::SegmentDataAttributesDataQueryEventPlatformItems.new({ + facet: "@usr.id", + from: "2025-08-01", + name: "high_value_users", + query: "@type:view @view.name:/logs @usr.session_duration:>300000", + to: "2025-09-01", + }), + ], + }), + description: "Users who frequently visit logs and have high session duration", + modified_at: "0001-01-01T00:00:00Z", + modified_by: DatadogAPIClient::V2::SegmentDataSource.new({ + handle: "", + id: "", + uuid: "", + }), + name: "High-Value Users", + org_id: 123456, + source: 0, + tags: [ + "high-value", + "logs", + "active", + ], + version: 1, + }), + id: "segment-12345", + type: DatadogAPIClient::V2::SegmentDataType::SEGMENT, + }), +}) +p api_instance.create_rum_segment(body) diff --git a/examples/v2/segments/InitializeRumSegments.rb b/examples/v2/segments/InitializeRumSegments.rb new file mode 100644 index 00000000000..3bad36b3cc9 --- /dev/null +++ b/examples/v2/segments/InitializeRumSegments.rb @@ -0,0 +1,8 @@ +# Initialize rum segments returns "Default segments created successfully" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.initialize_rum_segments".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SegmentsAPI.new +p api_instance.initialize_rum_segments() diff --git a/examples/v2/segments/ListRumSegments.rb b/examples/v2/segments/ListRumSegments.rb new file mode 100644 index 00000000000..9864ef98ad5 --- /dev/null +++ b/examples/v2/segments/ListRumSegments.rb @@ -0,0 +1,8 @@ +# List rum segments returns "Successful response with list of segments" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_rum_segments".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SegmentsAPI.new +p api_instance.list_rum_segments() diff --git a/examples/v2/user-flow/GetRumSankey.rb b/examples/v2/user-flow/GetRumSankey.rb new file mode 100644 index 00000000000..d58ffe0c9c4 --- /dev/null +++ b/examples/v2/user-flow/GetRumSankey.rb @@ -0,0 +1,38 @@ +# Get rum sankey returns "Successful response with Sankey diagram data" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_rum_sankey".to_sym] = true +end +api_instance = DatadogAPIClient::V2::UserFlowAPI.new + +body = DatadogAPIClient::V2::SankeyRequest.new({ + data: DatadogAPIClient::V2::SankeyRequestData.new({ + attributes: DatadogAPIClient::V2::SankeyRequestDataAttributes.new({ + data_source: "", + definition: DatadogAPIClient::V2::SankeyRequestDataAttributesDefinition.new({ + entries_per_step: 10, + number_of_steps: 5, + source: "@view.name", + target: "@view.name", + }), + enforced_execution_type: "", + request_id: "", + sampling: DatadogAPIClient::V2::SankeyRequestDataAttributesSampling.new({ + enabled: true, + }), + search: DatadogAPIClient::V2::SankeyRequestDataAttributesSearch.new({ + audience_filters: DatadogAPIClient::V2::SankeyRequestDataAttributesSearchAudienceFilters.new({}), + query: "@type:view @application.id:*", + subquery_id: "", + }), + time: DatadogAPIClient::V2::SankeyRequestDataAttributesTime.new({ + from: 1756425600000, + to: 1756857600000, + }), + }), + id: "sankey_request", + type: DatadogAPIClient::V2::SankeyRequestDataType::SANKEY_REQUEST, + }), +}) +p api_instance.get_rum_sankey(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 0471d8cb9c4..0fcd7069c61 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2828,6 +2828,12 @@ "rf_id" => "String", "body" => "RumRetentionFilterUpdateRequest", }, + "v2.GetRumCohort" => { + "body" => "GetCohortRequest", + }, + "v2.GetRumCohortUsers" => { + "body" => "GetCohortUsersRequest", + }, "v2.CreateRumMetric" => { "body" => "RumMetricCreateRequest", }, @@ -2841,6 +2847,18 @@ "metric_id" => "String", "body" => "RumMetricUpdateRequest", }, + "v2.GetRumFunnel" => { + "body" => "FunnelRequest", + }, + "v2.GetRumFunnelStepSuggestions" => { + "body" => "FunnelSuggestionRequest", + }, + "v2.GetRumSankey" => { + "body" => "SankeyRequest", + }, + "v2.CreateRumSegment" => { + "body" => "Segment", + }, "v2.ListScorecardOutcomes" => { "page_size" => "Integer", "page_offset" => "Integer", diff --git a/features/v2/cohort.feature b/features/v2/cohort.feature new file mode 100644 index 00000000000..8ca5e7bbdd9 --- /dev/null +++ b/features/v2/cohort.feature @@ -0,0 +1,24 @@ +@endpoint(cohort) @endpoint(cohort-v2) +Feature: Cohort + API for Cohort. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Cohort" API + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Get rum cohort returns "Successful response with cohort analysis data" response + Given operation "GetRumCohort" enabled + And new "GetRumCohort" request + And body with value {"data": {"attributes": {"definition": {"audience_filters": {"accounts": [{"name": ""}], "segments": [{"name": "", "segment_id": ""}], "users": [{"name": ""}]}}, "time": {}}, "type": "cohort_request"}} + When the request is sent + Then the response status is 200 Successful response with cohort analysis data + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Get rum cohort users returns "Successful response with cohort users" response + Given operation "GetRumCohortUsers" enabled + And new "GetRumCohortUsers" request + And body with value {"data": {"attributes": {"definition": {"audience_filters": {"accounts": [{"name": ""}], "segments": [{"name": "", "segment_id": ""}], "users": [{"name": ""}]}}, "time": {}}, "type": "cohort_users_request"}} + When the request is sent + Then the response status is 200 Successful response with cohort users diff --git a/features/v2/funnel.feature b/features/v2/funnel.feature new file mode 100644 index 00000000000..929450400fe --- /dev/null +++ b/features/v2/funnel.feature @@ -0,0 +1,24 @@ +@endpoint(funnel) @endpoint(funnel-v2) +Feature: Funnel + API for funnel. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Funnel" API + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Get rum funnel returns "Successful response with funnel analysis data" response + Given operation "GetRumFunnel" enabled + And new "GetRumFunnel" request + And body with value {"data": {"attributes": {"data_source": "rum", "enforced_execution_type": "", "request_id": "", "search": {"cross_session_filter": "", "query_string": "@type:view", "steps": [{"facet": "@view.name", "step_filter": "", "value": "/apm/home"}, {"facet": "@view.name", "step_filter": "", "value": "/apm/traces"}], "subquery_id": ""}, "time": {"from": 1756425600000, "to": 1756857600000}}, "id": "funnel_request", "type": "funnel_request"}} + When the request is sent + Then the response status is 200 Successful response with funnel analysis data + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Get rum funnel step suggestions returns "Successful response with funnel step suggestions" response + Given operation "GetRumFunnelStepSuggestions" enabled + And new "GetRumFunnelStepSuggestions" request + And body with value {"data": {"attributes": {"data_source": "", "search": {"cross_session_filter": "", "query_string": "@type:view", "steps": [{"facet": "@view.name", "step_filter": "", "value": "/apm/home"}], "subquery_id": ""}, "term_search": {"query": "apm"}, "time": {"from": 1756425600000, "to": 1756857600000}}, "id": "funnel_suggestion_request", "type": "funnel_suggestion_request"}} + When the request is sent + Then the response status is 200 Successful response with funnel step suggestions diff --git a/features/v2/segments.feature b/features/v2/segments.feature new file mode 100644 index 00000000000..95cc467d6d6 --- /dev/null +++ b/features/v2/segments.feature @@ -0,0 +1,30 @@ +@endpoint(segments) @endpoint(segments-v2) +Feature: Segments + API for segments. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Segments" API + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Create rum segment returns "Segment created successfully" response + Given operation "CreateRumSegment" enabled + And new "CreateRumSegment" request + And body with value {"data": {"attributes": {"created_at": "0001-01-01T00:00:00Z", "created_by": {"handle": "", "id": "", "uuid": ""}, "data_query": {"event_platform": [{"facet": "@usr.id", "from": "2025-08-01", "name": "high_value_users", "query": "@type:view @view.name:/logs @usr.session_duration:>300000", "to": "2025-09-01"}]}, "description": "Users who frequently visit logs and have high session duration", "modified_at": "0001-01-01T00:00:00Z", "modified_by": {"handle": "", "id": "", "uuid": ""}, "name": "High-Value Users", "org_id": 123456, "source": 0, "tags": ["high-value", "logs", "active"], "version": 1}, "id": "segment-12345", "type": "segment"}} + When the request is sent + Then the response status is 201 Segment created successfully + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Initialize rum segments returns "Default segments created successfully" response + Given operation "InitializeRumSegments" enabled + And new "InitializeRumSegments" request + When the request is sent + Then the response status is 200 Default segments created successfully + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: List rum segments returns "Successful response with list of segments" response + Given operation "ListRumSegments" enabled + And new "ListRumSegments" request + When the request is sent + Then the response status is 200 Successful response with list of segments diff --git a/features/v2/undo.json b/features/v2/undo.json index f4a7f9e7f8d..f019e40f8b6 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3254,6 +3254,18 @@ "type": "idempotent" } }, + "GetRumCohort": { + "tag": "Cohort", + "undo": { + "type": "safe" + } + }, + "GetRumCohortUsers": { + "tag": "Cohort", + "undo": { + "type": "safe" + } + }, "ListRumMetrics": { "tag": "Rum Metrics", "undo": { @@ -3303,6 +3315,42 @@ "type": "safe" } }, + "GetRumFunnel": { + "tag": "Funnel", + "undo": { + "type": "safe" + } + }, + "GetRumFunnelStepSuggestions": { + "tag": "Funnel", + "undo": { + "type": "safe" + } + }, + "GetRumSankey": { + "tag": "User Flow", + "undo": { + "type": "safe" + } + }, + "ListRumSegments": { + "tag": "Segments", + "undo": { + "type": "safe" + } + }, + "CreateRumSegment": { + "tag": "Segments", + "undo": { + "type": "safe" + } + }, + "InitializeRumSegments": { + "tag": "Segments", + "undo": { + "type": "safe" + } + }, "UploadIdPMetadata": { "tag": "Organizations", "undo": { diff --git a/features/v2/user_flow.feature b/features/v2/user_flow.feature new file mode 100644 index 00000000000..6dca1f69876 --- /dev/null +++ b/features/v2/user_flow.feature @@ -0,0 +1,14 @@ +@endpoint(user-flow) @endpoint(user-flow-v2) +Feature: User Flow + API for user flow. + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Get rum sankey returns "Successful response with Sankey diagram data" response + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "UserFlow" API + And operation "GetRumSankey" enabled + And new "GetRumSankey" request + And body with value {"data": {"attributes": {"data_source": "", "definition": {"entries_per_step": 10, "number_of_steps": 5, "source": "@view.name", "target": "@view.name"}, "enforced_execution_type": "", "request_id": "", "sampling": {"enabled": true}, "search": {"audience_filters": {}, "query": "@type:view @application.id:*", "subquery_id": ""}, "time": {"from": 1756425600000, "to": 1756857600000}}, "id": "sankey_request", "type": "sankey_request"}} + When the request is sent + Then the response status is 200 Successful response with Sankey diagram data diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index fdc24843a85..b13b22b7dee 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -277,6 +277,14 @@ def initialize "v2.list_pipelines": false, "v2.update_pipeline": false, "v2.validate_pipeline": false, + "v2.get_rum_cohort": false, + "v2.get_rum_cohort_users": false, + "v2.get_rum_funnel": false, + "v2.get_rum_funnel_step_suggestions": false, + "v2.get_rum_sankey": false, + "v2.create_rum_segment": false, + "v2.initialize_rum_segments": false, + "v2.list_rum_segments": false, "v2.create_scorecard_outcomes_batch": false, "v2.create_scorecard_rule": false, "v2.delete_scorecard_rule": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 45fd03dd5ed..e921bb79b06 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2178,6 +2178,33 @@ def overrides "v2.full_application_key_attributes" => "FullApplicationKeyAttributes", "v2.full_custom_framework_data" => "FullCustomFrameworkData", "v2.full_custom_framework_data_attributes" => "FullCustomFrameworkDataAttributes", + "v2.funnel_request" => "FunnelRequest", + "v2.funnel_request_data" => "FunnelRequestData", + "v2.funnel_request_data_attributes" => "FunnelRequestDataAttributes", + "v2.funnel_request_data_attributes_search" => "FunnelRequestDataAttributesSearch", + "v2.funnel_request_data_attributes_search_steps_items" => "FunnelRequestDataAttributesSearchStepsItems", + "v2.funnel_request_data_attributes_time" => "FunnelRequestDataAttributesTime", + "v2.funnel_request_data_type" => "FunnelRequestDataType", + "v2.funnel_response" => "FunnelResponse", + "v2.funnel_response_data" => "FunnelResponseData", + "v2.funnel_response_data_attributes" => "FunnelResponseDataAttributes", + "v2.funnel_response_data_attributes_funnel_steps_items" => "FunnelResponseDataAttributesFunnelStepsItems", + "v2.funnel_response_data_type" => "FunnelResponseDataType", + "v2.funnel_response_elapsed_time" => "FunnelResponseElapsedTime", + "v2.funnel_suggestion_request" => "FunnelSuggestionRequest", + "v2.funnel_suggestion_request_data" => "FunnelSuggestionRequestData", + "v2.funnel_suggestion_request_data_attributes" => "FunnelSuggestionRequestDataAttributes", + "v2.funnel_suggestion_request_data_attributes_search" => "FunnelSuggestionRequestDataAttributesSearch", + "v2.funnel_suggestion_request_data_attributes_search_steps_items" => "FunnelSuggestionRequestDataAttributesSearchStepsItems", + "v2.funnel_suggestion_request_data_attributes_term_search" => "FunnelSuggestionRequestDataAttributesTermSearch", + "v2.funnel_suggestion_request_data_attributes_time" => "FunnelSuggestionRequestDataAttributesTime", + "v2.funnel_suggestion_request_data_type" => "FunnelSuggestionRequestDataType", + "v2.funnel_suggestion_response" => "FunnelSuggestionResponse", + "v2.funnel_suggestion_response_data" => "FunnelSuggestionResponseData", + "v2.funnel_suggestion_response_data_attributes" => "FunnelSuggestionResponseDataAttributes", + "v2.funnel_suggestion_response_data_attributes_actions_items" => "FunnelSuggestionResponseDataAttributesActionsItems", + "v2.funnel_suggestion_response_data_attributes_views_items" => "FunnelSuggestionResponseDataAttributesViewsItems", + "v2.funnel_suggestion_response_data_type" => "FunnelSuggestionResponseDataType", "v2.gcp_credentials" => "GCPCredentials", "v2.gcp_credentials_update" => "GCPCredentialsUpdate", "v2.gcp_integration" => "GCPIntegration", @@ -2242,6 +2269,37 @@ def overrides "v2.get_app_response" => "GetAppResponse", "v2.get_app_response_data" => "GetAppResponseData", "v2.get_app_response_data_attributes" => "GetAppResponseDataAttributes", + "v2.get_cohort_request" => "GetCohortRequest", + "v2.get_cohort_request_data" => "GetCohortRequestData", + "v2.get_cohort_request_data_attributes" => "GetCohortRequestDataAttributes", + "v2.get_cohort_request_data_attributes_definition" => "GetCohortRequestDataAttributesDefinition", + "v2.get_cohort_request_data_attributes_definition_audience_filters" => "GetCohortRequestDataAttributesDefinitionAudienceFilters", + "v2.get_cohort_request_data_attributes_definition_audience_filters_accounts_items" => "GetCohortRequestDataAttributesDefinitionAudienceFiltersAccountsItems", + "v2.get_cohort_request_data_attributes_definition_audience_filters_segments_items" => "GetCohortRequestDataAttributesDefinitionAudienceFiltersSegmentsItems", + "v2.get_cohort_request_data_attributes_definition_audience_filters_users_items" => "GetCohortRequestDataAttributesDefinitionAudienceFiltersUsersItems", + "v2.get_cohort_request_data_attributes_time" => "GetCohortRequestDataAttributesTime", + "v2.get_cohort_request_data_type" => "GetCohortRequestDataType", + "v2.get_cohort_response" => "GetCohortResponse", + "v2.get_cohort_response_data" => "GetCohortResponseData", + "v2.get_cohort_response_data_attributes" => "GetCohortResponseDataAttributes", + "v2.get_cohort_response_data_attributes_cohorts_items" => "GetCohortResponseDataAttributesCohortsItems", + "v2.get_cohort_response_data_attributes_cohorts_items_values_items" => "GetCohortResponseDataAttributesCohortsItemsValuesItems", + "v2.get_cohort_response_data_type" => "GetCohortResponseDataType", + "v2.get_cohort_users_request" => "GetCohortUsersRequest", + "v2.get_cohort_users_request_data" => "GetCohortUsersRequestData", + "v2.get_cohort_users_request_data_attributes" => "GetCohortUsersRequestDataAttributes", + "v2.get_cohort_users_request_data_attributes_definition" => "GetCohortUsersRequestDataAttributesDefinition", + "v2.get_cohort_users_request_data_attributes_definition_audience_filters" => "GetCohortUsersRequestDataAttributesDefinitionAudienceFilters", + "v2.get_cohort_users_request_data_attributes_definition_audience_filters_accounts_items" => "GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersAccountsItems", + "v2.get_cohort_users_request_data_attributes_definition_audience_filters_segments_items" => "GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersSegmentsItems", + "v2.get_cohort_users_request_data_attributes_definition_audience_filters_users_items" => "GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersUsersItems", + "v2.get_cohort_users_request_data_attributes_time" => "GetCohortUsersRequestDataAttributesTime", + "v2.get_cohort_users_request_data_type" => "GetCohortUsersRequestDataType", + "v2.get_cohort_users_response" => "GetCohortUsersResponse", + "v2.get_cohort_users_response_data" => "GetCohortUsersResponseData", + "v2.get_cohort_users_response_data_attributes" => "GetCohortUsersResponseDataAttributes", + "v2.get_cohort_users_response_data_attributes_users_items" => "GetCohortUsersResponseDataAttributesUsersItems", + "v2.get_cohort_users_response_data_type" => "GetCohortUsersResponseDataType", "v2.get_custom_framework_response" => "GetCustomFrameworkResponse", "v2.get_data_deletions_response_body" => "GetDataDeletionsResponseBody", "v2.get_device_attributes" => "GetDeviceAttributes", @@ -3595,6 +3653,26 @@ def overrides "v2.saml_assertion_attribute" => "SAMLAssertionAttribute", "v2.saml_assertion_attribute_attributes" => "SAMLAssertionAttributeAttributes", "v2.saml_assertion_attributes_type" => "SAMLAssertionAttributesType", + "v2.sankey_request" => "SankeyRequest", + "v2.sankey_request_data" => "SankeyRequestData", + "v2.sankey_request_data_attributes" => "SankeyRequestDataAttributes", + "v2.sankey_request_data_attributes_definition" => "SankeyRequestDataAttributesDefinition", + "v2.sankey_request_data_attributes_sampling" => "SankeyRequestDataAttributesSampling", + "v2.sankey_request_data_attributes_search" => "SankeyRequestDataAttributesSearch", + "v2.sankey_request_data_attributes_search_audience_filters" => "SankeyRequestDataAttributesSearchAudienceFilters", + "v2.sankey_request_data_attributes_search_audience_filters_accounts_items" => "SankeyRequestDataAttributesSearchAudienceFiltersAccountsItems", + "v2.sankey_request_data_attributes_search_audience_filters_segments_items" => "SankeyRequestDataAttributesSearchAudienceFiltersSegmentsItems", + "v2.sankey_request_data_attributes_search_audience_filters_users_items" => "SankeyRequestDataAttributesSearchAudienceFiltersUsersItems", + "v2.sankey_request_data_attributes_search_occurrences" => "SankeyRequestDataAttributesSearchOccurrences", + "v2.sankey_request_data_attributes_time" => "SankeyRequestDataAttributesTime", + "v2.sankey_request_data_type" => "SankeyRequestDataType", + "v2.sankey_response" => "SankeyResponse", + "v2.sankey_response_data" => "SankeyResponseData", + "v2.sankey_response_data_attributes" => "SankeyResponseDataAttributes", + "v2.sankey_response_data_attributes_links_items" => "SankeyResponseDataAttributesLinksItems", + "v2.sankey_response_data_attributes_nodes_items" => "SankeyResponseDataAttributesNodesItems", + "v2.sankey_response_data_attributes_nodes_items_aggregated_nodes_items" => "SankeyResponseDataAttributesNodesItemsAggregatedNodesItems", + "v2.sankey_response_data_type" => "SankeyResponseDataType", "v2.sbom" => "SBOM", "v2.sbom_attributes" => "SBOMAttributes", "v2.sbom_component" => "SBOMComponent", @@ -3804,6 +3882,19 @@ def overrides "v2.security_monitoring_user" => "SecurityMonitoringUser", "v2.security_trigger" => "SecurityTrigger", "v2.security_trigger_wrapper" => "SecurityTriggerWrapper", + "v2.segment" => "Segment", + "v2.segment_array" => "SegmentArray", + "v2.segment_data" => "SegmentData", + "v2.segment_data_attributes" => "SegmentDataAttributes", + "v2.segment_data_attributes_data_query" => "SegmentDataAttributesDataQuery", + "v2.segment_data_attributes_data_query_event_platform_items" => "SegmentDataAttributesDataQueryEventPlatformItems", + "v2.segment_data_attributes_data_query_reference_table_items" => "SegmentDataAttributesDataQueryReferenceTableItems", + "v2.segment_data_attributes_data_query_reference_table_items_columns_items" => "SegmentDataAttributesDataQueryReferenceTableItemsColumnsItems", + "v2.segment_data_attributes_data_query_reference_table_items_join_condition" => "SegmentDataAttributesDataQueryReferenceTableItemsJoinCondition", + "v2.segment_data_attributes_data_query_static_items" => "SegmentDataAttributesDataQueryStaticItems", + "v2.segment_data_attributes_data_query_user_store_items" => "SegmentDataAttributesDataQueryUserStoreItems", + "v2.segment_data_source" => "SegmentDataSource", + "v2.segment_data_type" => "SegmentDataType", "v2.selectors" => "Selectors", "v2.self_service_trigger_wrapper" => "SelfServiceTriggerWrapper", "v2.send_slack_message_action" => "SendSlackMessageAction", @@ -4405,6 +4496,7 @@ def overrides "v2.cloud_cost_management_api" => "CloudCostManagementAPI", "v2.cloud_network_monitoring_api" => "CloudNetworkMonitoringAPI", "v2.cloudflare_integration_api" => "CloudflareIntegrationAPI", + "v2.cohort_api" => "CohortAPI", "v2.confluent_cloud_api" => "ConfluentCloudAPI", "v2.container_images_api" => "ContainerImagesAPI", "v2.containers_api" => "ContainersAPI", @@ -4421,6 +4513,7 @@ def overrides "v2.events_api" => "EventsAPI", "v2.fastly_integration_api" => "FastlyIntegrationAPI", "v2.fleet_automation_api" => "FleetAutomationAPI", + "v2.funnel_api" => "FunnelAPI", "v2.gcp_integration_api" => "GCPIntegrationAPI", "v2.incident_services_api" => "IncidentServicesAPI", "v2.incident_teams_api" => "IncidentTeamsAPI", @@ -4451,6 +4544,7 @@ def overrides "v2.rum_metrics_api" => "RumMetricsAPI", "v2.rum_retention_filters_api" => "RumRetentionFiltersAPI", "v2.security_monitoring_api" => "SecurityMonitoringAPI", + "v2.segments_api" => "SegmentsAPI", "v2.sensitive_data_scanner_api" => "SensitiveDataScannerAPI", "v2.service_accounts_api" => "ServiceAccountsAPI", "v2.service_definition_api" => "ServiceDefinitionAPI", @@ -4465,6 +4559,7 @@ def overrides "v2.teams_api" => "TeamsAPI", "v2.test_optimization_api" => "TestOptimizationAPI", "v2.usage_metering_api" => "UsageMeteringAPI", + "v2.user_flow_api" => "UserFlowAPI", "v2.users_api" => "UsersAPI", "v2.workflow_automation_api" => "WorkflowAutomationAPI" } diff --git a/lib/datadog_api_client/v2/api/cohort_api.rb b/lib/datadog_api_client/v2/api/cohort_api.rb new file mode 100644 index 00000000000..389ed512f42 --- /dev/null +++ b/lib/datadog_api_client/v2/api/cohort_api.rb @@ -0,0 +1,172 @@ +=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 CohortAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Get rum cohort. + # + # @see #get_rum_cohort_with_http_info + def get_rum_cohort(body, opts = {}) + data, _status_code, _headers = get_rum_cohort_with_http_info(body, opts) + data + end + + # Get rum cohort. + # + # Analyze user cohorts for retention and conversion analysis + # + # @param body [GetCohortRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(GetCohortResponse, Integer, Hash)>] GetCohortResponse data, response status code and response headers + def get_rum_cohort_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_cohort".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_cohort") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_cohort")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CohortAPI.get_rum_cohort ...' + 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 CohortAPI.get_rum_cohort" + end + # resource path + local_var_path = '/api/v2/rum/cohort' + + # 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] || 'GetCohortResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :get_rum_cohort, + :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: CohortAPI#get_rum_cohort\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get rum cohort users. + # + # @see #get_rum_cohort_users_with_http_info + def get_rum_cohort_users(body, opts = {}) + data, _status_code, _headers = get_rum_cohort_users_with_http_info(body, opts) + data + end + + # Get rum cohort users. + # + # Get users within a specific cohort for retention analysis + # + # @param body [GetCohortUsersRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(GetCohortUsersResponse, Integer, Hash)>] GetCohortUsersResponse data, response status code and response headers + def get_rum_cohort_users_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_cohort_users".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_cohort_users") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_cohort_users")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CohortAPI.get_rum_cohort_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 CohortAPI.get_rum_cohort_users" + end + # resource path + local_var_path = '/api/v2/rum/cohort/users' + + # 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] || 'GetCohortUsersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :get_rum_cohort_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: CohortAPI#get_rum_cohort_users\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/api/funnel_api.rb b/lib/datadog_api_client/v2/api/funnel_api.rb new file mode 100644 index 00000000000..5fdc4c539e7 --- /dev/null +++ b/lib/datadog_api_client/v2/api/funnel_api.rb @@ -0,0 +1,172 @@ +=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 FunnelAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Get rum funnel. + # + # @see #get_rum_funnel_with_http_info + def get_rum_funnel(body, opts = {}) + data, _status_code, _headers = get_rum_funnel_with_http_info(body, opts) + data + end + + # Get rum funnel. + # + # Analyze conversion funnels to understand user drop-off patterns + # + # @param body [FunnelRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(FunnelResponse, Integer, Hash)>] FunnelResponse data, response status code and response headers + def get_rum_funnel_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_funnel".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_funnel") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_funnel")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunnelAPI.get_rum_funnel ...' + 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 FunnelAPI.get_rum_funnel" + end + # resource path + local_var_path = '/api/v2/rum/funnel' + + # 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] || 'FunnelResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :get_rum_funnel, + :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: FunnelAPI#get_rum_funnel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get rum funnel step suggestions. + # + # @see #get_rum_funnel_step_suggestions_with_http_info + def get_rum_funnel_step_suggestions(body, opts = {}) + data, _status_code, _headers = get_rum_funnel_step_suggestions_with_http_info(body, opts) + data + end + + # Get rum funnel step suggestions. + # + # Get suggested steps for building conversion funnels + # + # @param body [FunnelSuggestionRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(FunnelSuggestionResponse, Integer, Hash)>] FunnelSuggestionResponse data, response status code and response headers + def get_rum_funnel_step_suggestions_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_funnel_step_suggestions".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_funnel_step_suggestions") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_funnel_step_suggestions")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FunnelAPI.get_rum_funnel_step_suggestions ...' + 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 FunnelAPI.get_rum_funnel_step_suggestions" + end + # resource path + local_var_path = '/api/v2/rum/funnel/new_step_suggestions' + + # 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] || 'FunnelSuggestionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :get_rum_funnel_step_suggestions, + :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: FunnelAPI#get_rum_funnel_step_suggestions\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/api/segments_api.rb b/lib/datadog_api_client/v2/api/segments_api.rb new file mode 100644 index 00000000000..8b5283c5e4b --- /dev/null +++ b/lib/datadog_api_client/v2/api/segments_api.rb @@ -0,0 +1,231 @@ +=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 SegmentsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create rum segment. + # + # @see #create_rum_segment_with_http_info + def create_rum_segment(body, opts = {}) + data, _status_code, _headers = create_rum_segment_with_http_info(body, opts) + data + end + + # Create rum segment. + # + # Create a new user segment for audience targeting + # + # @param body [Segment] + # @param opts [Hash] the optional parameters + # @return [Array<(Segment, Integer, Hash)>] Segment data, response status code and response headers + def create_rum_segment_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_rum_segment".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_rum_segment") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_rum_segment")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SegmentsAPI.create_rum_segment ...' + 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 SegmentsAPI.create_rum_segment" + end + # resource path + local_var_path = '/api/v2/rum/segment' + + # 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] || 'Segment' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :create_rum_segment, + :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: SegmentsAPI#create_rum_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Initialize rum segments. + # + # @see #initialize_rum_segments_with_http_info + def initialize_rum_segments(opts = {}) + initialize_rum_segments_with_http_info(opts) + nil + end + + # Initialize rum segments. + # + # Initialize default segments for a new organization + # + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def initialize_rum_segments_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.initialize_rum_segments".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.initialize_rum_segments") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.initialize_rum_segments")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SegmentsAPI.initialize_rum_segments ...' + end + # resource path + local_var_path = '/api/v2/rum/segment/initialize' + + # 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] || [] + + new_options = opts.merge( + :operation => :initialize_rum_segments, + :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: SegmentsAPI#initialize_rum_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List rum segments. + # + # @see #list_rum_segments_with_http_info + def list_rum_segments(opts = {}) + data, _status_code, _headers = list_rum_segments_with_http_info(opts) + data + end + + # List rum segments. + # + # List all available user segments for audience targeting + # + # @param opts [Hash] the optional parameters + # @return [Array<(SegmentArray, Integer, Hash)>] SegmentArray data, response status code and response headers + def list_rum_segments_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_rum_segments".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_rum_segments") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_rum_segments")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SegmentsAPI.list_rum_segments ...' + end + # resource path + local_var_path = '/api/v2/rum/segment' + + # 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] || 'SegmentArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :list_rum_segments, + :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: SegmentsAPI#list_rum_segments\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/api/user_flow_api.rb b/lib/datadog_api_client/v2/api/user_flow_api.rb new file mode 100644 index 00000000000..0d5f106032c --- /dev/null +++ b/lib/datadog_api_client/v2/api/user_flow_api.rb @@ -0,0 +1,99 @@ +=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 UserFlowAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Get rum sankey. + # + # @see #get_rum_sankey_with_http_info + def get_rum_sankey(body, opts = {}) + data, _status_code, _headers = get_rum_sankey_with_http_info(body, opts) + data + end + + # Get rum sankey. + # + # Generate Sankey diagrams to visualize user flow paths and drop-off points + # + # @param body [SankeyRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(SankeyResponse, Integer, Hash)>] SankeyResponse data, response status code and response headers + def get_rum_sankey_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_rum_sankey".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_rum_sankey") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_rum_sankey")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: UserFlowAPI.get_rum_sankey ...' + 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 UserFlowAPI.get_rum_sankey" + end + # resource path + local_var_path = '/api/v2/rum/sankey' + + # 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] || 'SankeyResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :get_rum_sankey, + :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: UserFlowAPI#get_rum_sankey\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/funnel_request.rb b/lib/datadog_api_client/v2/models/funnel_request.rb new file mode 100644 index 00000000000..a05bc97735d --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_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 FunnelRequest + 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' => :'FunnelRequestData' + } + 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::FunnelRequest` 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/funnel_request_data.rb b/lib/datadog_api_client/v2/models/funnel_request_data.rb new file mode 100644 index 00000000000..383290f2ab1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_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 FunnelRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'FunnelRequestDataAttributes', + :'id' => :'String', + :'type' => :'FunnelRequestDataType' + } + 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::FunnelRequestData` 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/funnel_request_data_attributes.rb b/lib/datadog_api_client/v2/models/funnel_request_data_attributes.rb new file mode 100644 index 00000000000..79b811f68ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_request_data_attributes.rb @@ -0,0 +1,145 @@ +=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 FunnelRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :data_source + + # + attr_accessor :enforced_execution_type + + # + attr_accessor :request_id + + # + attr_accessor :search + + # + attr_accessor :time + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data_source' => :'data_source', + :'enforced_execution_type' => :'enforced_execution_type', + :'request_id' => :'request_id', + :'search' => :'search', + :'time' => :'time' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'String', + :'enforced_execution_type' => :'String', + :'request_id' => :'String', + :'search' => :'FunnelRequestDataAttributesSearch', + :'time' => :'FunnelRequestDataAttributesTime' + } + 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::FunnelRequestDataAttributes` 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_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'enforced_execution_type') + self.enforced_execution_type = attributes[:'enforced_execution_type'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + 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_source == o.data_source && + enforced_execution_type == o.enforced_execution_type && + request_id == o.request_id && + search == o.search && + time == o.time && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, enforced_execution_type, request_id, search, time, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_request_data_attributes_search.rb b/lib/datadog_api_client/v2/models/funnel_request_data_attributes_search.rb new file mode 100644 index 00000000000..58574639afa --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_request_data_attributes_search.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FunnelRequestDataAttributesSearch + include BaseGenericModel + + # + attr_accessor :cross_session_filter + + # + attr_accessor :query_string + + # + attr_accessor :steps + + # + attr_accessor :subquery_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cross_session_filter' => :'cross_session_filter', + :'query_string' => :'query_string', + :'steps' => :'steps', + :'subquery_id' => :'subquery_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cross_session_filter' => :'String', + :'query_string' => :'String', + :'steps' => :'Array', + :'subquery_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FunnelRequestDataAttributesSearch` 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?(:'cross_session_filter') + self.cross_session_filter = attributes[:'cross_session_filter'] + end + + if attributes.key?(:'query_string') + self.query_string = attributes[:'query_string'] + end + + if attributes.key?(:'steps') + if (value = attributes[:'steps']).is_a?(Array) + self.steps = value + end + end + + if attributes.key?(:'subquery_id') + self.subquery_id = attributes[:'subquery_id'] + 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 && + cross_session_filter == o.cross_session_filter && + query_string == o.query_string && + steps == o.steps && + subquery_id == o.subquery_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cross_session_filter, query_string, steps, subquery_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_request_data_attributes_search_steps_items.rb b/lib/datadog_api_client/v2/models/funnel_request_data_attributes_search_steps_items.rb new file mode 100644 index 00000000000..678fca3ba0f --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_request_data_attributes_search_steps_items.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FunnelRequestDataAttributesSearchStepsItems + include BaseGenericModel + + # + attr_accessor :facet + + # + attr_accessor :step_filter + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'facet' => :'facet', + :'step_filter' => :'step_filter', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'facet' => :'String', + :'step_filter' => :'String', + :'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::FunnelRequestDataAttributesSearchStepsItems` 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') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'step_filter') + self.step_filter = attributes[:'step_filter'] + 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 && + facet == o.facet && + step_filter == o.step_filter && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [facet, step_filter, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_request_data_attributes_time.rb b/lib/datadog_api_client/v2/models/funnel_request_data_attributes_time.rb new file mode 100644 index 00000000000..5f1b6ae9d2e --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_request_data_attributes_time.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 FunnelRequestDataAttributesTime + include BaseGenericModel + + # + attr_accessor :from + + # + attr_accessor :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'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::FunnelRequestDataAttributesTime` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_request_data_type.rb b/lib/datadog_api_client/v2/models/funnel_request_data_type.rb new file mode 100644 index 00000000000..dfa3843cf2b --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_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 + # + class FunnelRequestDataType + include BaseEnumModel + + FUNNEL_REQUEST = "funnel_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_response.rb b/lib/datadog_api_client/v2/models/funnel_response.rb new file mode 100644 index 00000000000..830957664a1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_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 FunnelResponse + 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' => :'FunnelResponseData' + } + 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::FunnelResponse` 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/funnel_response_data.rb b/lib/datadog_api_client/v2/models/funnel_response_data.rb new file mode 100644 index 00000000000..510c0555e69 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_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 FunnelResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'FunnelResponseDataAttributes', + :'id' => :'String', + :'type' => :'FunnelResponseDataType' + } + 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::FunnelResponseData` 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/funnel_response_data_attributes.rb b/lib/datadog_api_client/v2/models/funnel_response_data_attributes.rb new file mode 100644 index 00000000000..b89a8491b2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_response_data_attributes.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FunnelResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :end_to_end_conversion_rate + + # + attr_accessor :end_to_end_elapsed_time + + # + attr_accessor :funnel_steps + + # + attr_accessor :initial_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'end_to_end_conversion_rate' => :'end_to_end_conversion_rate', + :'end_to_end_elapsed_time' => :'end_to_end_elapsed_time', + :'funnel_steps' => :'funnel_steps', + :'initial_count' => :'initial_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'end_to_end_conversion_rate' => :'Float', + :'end_to_end_elapsed_time' => :'FunnelResponseElapsedTime', + :'funnel_steps' => :'Array', + :'initial_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FunnelResponseDataAttributes` 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_to_end_conversion_rate') + self.end_to_end_conversion_rate = attributes[:'end_to_end_conversion_rate'] + end + + if attributes.key?(:'end_to_end_elapsed_time') + self.end_to_end_elapsed_time = attributes[:'end_to_end_elapsed_time'] + end + + if attributes.key?(:'funnel_steps') + if (value = attributes[:'funnel_steps']).is_a?(Array) + self.funnel_steps = value + end + end + + if attributes.key?(:'initial_count') + self.initial_count = attributes[:'initial_count'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + end_to_end_conversion_rate == o.end_to_end_conversion_rate && + end_to_end_elapsed_time == o.end_to_end_elapsed_time && + funnel_steps == o.funnel_steps && + initial_count == o.initial_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [end_to_end_conversion_rate, end_to_end_elapsed_time, funnel_steps, initial_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_response_data_attributes_funnel_steps_items.rb b/lib/datadog_api_client/v2/models/funnel_response_data_attributes_funnel_steps_items.rb new file mode 100644 index 00000000000..63e3fe9d838 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_response_data_attributes_funnel_steps_items.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FunnelResponseDataAttributesFunnelStepsItems + include BaseGenericModel + + # + attr_accessor :elapsed_time_to_next_step + + # + attr_accessor :label + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'elapsed_time_to_next_step' => :'elapsed_time_to_next_step', + :'label' => :'label', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'elapsed_time_to_next_step' => :'FunnelResponseElapsedTime', + :'label' => :'String', + :'value' => :'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::FunnelResponseDataAttributesFunnelStepsItems` 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?(:'elapsed_time_to_next_step') + self.elapsed_time_to_next_step = attributes[:'elapsed_time_to_next_step'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + 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 && + elapsed_time_to_next_step == o.elapsed_time_to_next_step && + label == o.label && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [elapsed_time_to_next_step, label, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_response_data_type.rb b/lib/datadog_api_client/v2/models/funnel_response_data_type.rb new file mode 100644 index 00000000000..525fca12462 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_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 + # + class FunnelResponseDataType + include BaseEnumModel + + FUNNEL_RESPONSE = "funnel_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_response_elapsed_time.rb b/lib/datadog_api_client/v2/models/funnel_response_elapsed_time.rb new file mode 100644 index 00000000000..ffd999caed8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_response_elapsed_time.rb @@ -0,0 +1,155 @@ +=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 FunnelResponseElapsedTime + include BaseGenericModel + + # + attr_accessor :avg + + # + attr_accessor :max + + # + attr_accessor :min + + # + attr_accessor :p5 + + # + attr_accessor :p50 + + # + attr_accessor :p95 + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg' => :'avg', + :'max' => :'max', + :'min' => :'min', + :'p5' => :'p5', + :'p50' => :'p50', + :'p95' => :'p95' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg' => :'Integer', + :'max' => :'Integer', + :'min' => :'Integer', + :'p5' => :'Integer', + :'p50' => :'Integer', + :'p95' => :'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::FunnelResponseElapsedTime` 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?(:'avg') + self.avg = attributes[:'avg'] + end + + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + end + + if attributes.key?(:'p5') + self.p5 = attributes[:'p5'] + end + + if attributes.key?(:'p50') + self.p50 = attributes[:'p50'] + end + + if attributes.key?(:'p95') + self.p95 = attributes[:'p95'] + 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 && + avg == o.avg && + max == o.max && + min == o.min && + p5 == o.p5 && + p50 == o.p50 && + p95 == o.p95 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg, max, min, p5, p50, p95, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_request.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request.rb new file mode 100644 index 00000000000..69ff18ed914 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_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 FunnelSuggestionRequest + 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' => :'FunnelSuggestionRequestData' + } + 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::FunnelSuggestionRequest` 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/funnel_suggestion_request_data.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data.rb new file mode 100644 index 00000000000..25ed8b68882 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_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 FunnelSuggestionRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'FunnelSuggestionRequestDataAttributes', + :'id' => :'String', + :'type' => :'FunnelSuggestionRequestDataType' + } + 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::FunnelSuggestionRequestData` 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/funnel_suggestion_request_data_attributes.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes.rb new file mode 100644 index 00000000000..3176308d004 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FunnelSuggestionRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :data_source + + # + attr_accessor :search + + # + attr_accessor :term_search + + # + attr_accessor :time + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data_source' => :'data_source', + :'search' => :'search', + :'term_search' => :'term_search', + :'time' => :'time' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'String', + :'search' => :'FunnelSuggestionRequestDataAttributesSearch', + :'term_search' => :'FunnelSuggestionRequestDataAttributesTermSearch', + :'time' => :'FunnelSuggestionRequestDataAttributesTime' + } + 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::FunnelSuggestionRequestDataAttributes` 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_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'term_search') + self.term_search = attributes[:'term_search'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + 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_source == o.data_source && + search == o.search && + term_search == o.term_search && + time == o.time && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, search, term_search, time, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_search.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_search.rb new file mode 100644 index 00000000000..4299f7baf9e --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_search.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FunnelSuggestionRequestDataAttributesSearch + include BaseGenericModel + + # + attr_accessor :cross_session_filter + + # + attr_accessor :query_string + + # + attr_accessor :steps + + # + attr_accessor :subquery_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cross_session_filter' => :'cross_session_filter', + :'query_string' => :'query_string', + :'steps' => :'steps', + :'subquery_id' => :'subquery_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cross_session_filter' => :'String', + :'query_string' => :'String', + :'steps' => :'Array', + :'subquery_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FunnelSuggestionRequestDataAttributesSearch` 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?(:'cross_session_filter') + self.cross_session_filter = attributes[:'cross_session_filter'] + end + + if attributes.key?(:'query_string') + self.query_string = attributes[:'query_string'] + end + + if attributes.key?(:'steps') + if (value = attributes[:'steps']).is_a?(Array) + self.steps = value + end + end + + if attributes.key?(:'subquery_id') + self.subquery_id = attributes[:'subquery_id'] + 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 && + cross_session_filter == o.cross_session_filter && + query_string == o.query_string && + steps == o.steps && + subquery_id == o.subquery_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cross_session_filter, query_string, steps, subquery_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_search_steps_items.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_search_steps_items.rb new file mode 100644 index 00000000000..2e181e3deee --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_search_steps_items.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class FunnelSuggestionRequestDataAttributesSearchStepsItems + include BaseGenericModel + + # + attr_accessor :facet + + # + attr_accessor :step_filter + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'facet' => :'facet', + :'step_filter' => :'step_filter', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'facet' => :'String', + :'step_filter' => :'String', + :'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::FunnelSuggestionRequestDataAttributesSearchStepsItems` 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') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'step_filter') + self.step_filter = attributes[:'step_filter'] + 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 && + facet == o.facet && + step_filter == o.step_filter && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [facet, step_filter, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_term_search.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_term_search.rb new file mode 100644 index 00000000000..af2049684f4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_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 FunnelSuggestionRequestDataAttributesTermSearch + 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::FunnelSuggestionRequestDataAttributesTermSearch` 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/funnel_suggestion_request_data_attributes_time.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_time.rb new file mode 100644 index 00000000000..7e768f23ef9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_attributes_time.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 FunnelSuggestionRequestDataAttributesTime + include BaseGenericModel + + # + attr_accessor :from + + # + attr_accessor :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'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::FunnelSuggestionRequestDataAttributesTime` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_type.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_request_data_type.rb new file mode 100644 index 00000000000..e6d1611a6f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_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 + # + class FunnelSuggestionRequestDataType + include BaseEnumModel + + FUNNEL_SUGGESTION_REQUEST = "funnel_suggestion_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_response.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_response.rb new file mode 100644 index 00000000000..f3416ca6562 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_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 FunnelSuggestionResponse + 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' => :'FunnelSuggestionResponseData' + } + 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::FunnelSuggestionResponse` 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/funnel_suggestion_response_data.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data.rb new file mode 100644 index 00000000000..3b5599e40af --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_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 FunnelSuggestionResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'FunnelSuggestionResponseDataAttributes', + :'id' => :'String', + :'type' => :'FunnelSuggestionResponseDataType' + } + 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::FunnelSuggestionResponseData` 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/funnel_suggestion_response_data_attributes.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes.rb new file mode 100644 index 00000000000..dd2c2085c0e --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes.rb @@ -0,0 +1,119 @@ +=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 FunnelSuggestionResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :actions + + # + attr_accessor :views + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'actions' => :'actions', + :'views' => :'views' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'actions' => :'Array', + :'views' => :'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::FunnelSuggestionResponseDataAttributes` 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?(:'actions') + if (value = attributes[:'actions']).is_a?(Array) + self.actions = value + end + end + + if attributes.key?(:'views') + if (value = attributes[:'views']).is_a?(Array) + self.views = 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 && + actions == o.actions && + views == o.views && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [actions, views, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes_actions_items.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes_actions_items.rb new file mode 100644 index 00000000000..9fa6ff62285 --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes_actions_items.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 FunnelSuggestionResponseDataAttributesActionsItems + include BaseGenericModel + + # + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FunnelSuggestionResponseDataAttributesActionsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes_views_items.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes_views_items.rb new file mode 100644 index 00000000000..df7b2dcea5b --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_attributes_views_items.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 FunnelSuggestionResponseDataAttributesViewsItems + include BaseGenericModel + + # + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FunnelSuggestionResponseDataAttributesViewsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_type.rb b/lib/datadog_api_client/v2/models/funnel_suggestion_response_data_type.rb new file mode 100644 index 00000000000..23720c3251b --- /dev/null +++ b/lib/datadog_api_client/v2/models/funnel_suggestion_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 + # + class FunnelSuggestionResponseDataType + include BaseEnumModel + + FUNNEL_SUGGESTION_RESPONSE = "funnel_suggestion_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request.rb b/lib/datadog_api_client/v2/models/get_cohort_request.rb new file mode 100644 index 00000000000..97cf4e38053 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 GetCohortRequest + 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' => :'GetCohortRequestData' + } + 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::GetCohortRequest` 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_cohort_request_data.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data.rb new file mode 100644 index 00000000000..f452c846b6d --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 GetCohortRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'GetCohortRequestDataAttributes', + :'id' => :'String', + :'type' => :'GetCohortRequestDataType' + } + 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::GetCohortRequestData` 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_cohort_request_data_attributes.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes.rb new file mode 100644 index 00000000000..b766397f92a --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes.rb @@ -0,0 +1,155 @@ +=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 GetCohortRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :data_source + + # + attr_accessor :definition + + # + attr_accessor :enforced_execution_type + + # + attr_accessor :request_id + + # + attr_accessor :time + + # + attr_accessor :window_size + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data_source' => :'data_source', + :'definition' => :'definition', + :'enforced_execution_type' => :'enforced_execution_type', + :'request_id' => :'request_id', + :'time' => :'time', + :'window_size' => :'window_size' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'String', + :'definition' => :'GetCohortRequestDataAttributesDefinition', + :'enforced_execution_type' => :'String', + :'request_id' => :'String', + :'time' => :'GetCohortRequestDataAttributesTime', + :'window_size' => :'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::GetCohortRequestDataAttributes` 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_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'definition') + self.definition = attributes[:'definition'] + end + + if attributes.key?(:'enforced_execution_type') + self.enforced_execution_type = attributes[:'enforced_execution_type'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'window_size') + self.window_size = attributes[:'window_size'] + 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_source == o.data_source && + definition == o.definition && + enforced_execution_type == o.enforced_execution_type && + request_id == o.request_id && + time == o.time && + window_size == o.window_size && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, definition, enforced_execution_type, request_id, time, window_size, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition.rb new file mode 100644 index 00000000000..3ac17728d2b --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortRequestDataAttributesDefinition + include BaseGenericModel + + # + attr_accessor :audience_filters + + # + attr_accessor :inclusion_search + + # + attr_accessor :return_search + + # + attr_accessor :segment_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'audience_filters' => :'audience_filters', + :'inclusion_search' => :'inclusion_search', + :'return_search' => :'return_search', + :'segment_id' => :'segment_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'audience_filters' => :'GetCohortRequestDataAttributesDefinitionAudienceFilters', + :'inclusion_search' => :'String', + :'return_search' => :'String', + :'segment_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetCohortRequestDataAttributesDefinition` 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?(:'audience_filters') + self.audience_filters = attributes[:'audience_filters'] + end + + if attributes.key?(:'inclusion_search') + self.inclusion_search = attributes[:'inclusion_search'] + end + + if attributes.key?(:'return_search') + self.return_search = attributes[:'return_search'] + end + + if attributes.key?(:'segment_id') + self.segment_id = attributes[:'segment_id'] + 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 && + audience_filters == o.audience_filters && + inclusion_search == o.inclusion_search && + return_search == o.return_search && + segment_id == o.segment_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [audience_filters, inclusion_search, return_search, segment_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters.rb new file mode 100644 index 00000000000..e4c99dd5f37 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters.rb @@ -0,0 +1,141 @@ +=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 GetCohortRequestDataAttributesDefinitionAudienceFilters + include BaseGenericModel + + # + attr_accessor :accounts + + # + attr_accessor :formula + + # + attr_accessor :segments + + # + attr_accessor :users + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'accounts' => :'accounts', + :'formula' => :'formula', + :'segments' => :'segments', + :'users' => :'users' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'accounts' => :'Array', + :'formula' => :'String', + :'segments' => :'Array', + :'users' => :'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::GetCohortRequestDataAttributesDefinitionAudienceFilters` 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?(:'accounts') + if (value = attributes[:'accounts']).is_a?(Array) + self.accounts = value + end + end + + if attributes.key?(:'formula') + self.formula = attributes[:'formula'] + end + + if attributes.key?(:'segments') + if (value = attributes[:'segments']).is_a?(Array) + self.segments = value + end + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = 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 && + accounts == o.accounts && + formula == o.formula && + segments == o.segments && + users == o.users && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [accounts, formula, segments, users, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_accounts_items.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_accounts_items.rb new file mode 100644 index 00000000000..20e46142632 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_accounts_items.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortRequestDataAttributesDefinitionAudienceFiltersAccountsItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'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::GetCohortRequestDataAttributesDefinitionAudienceFiltersAccountsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_segments_items.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_segments_items.rb new file mode 100644 index 00000000000..28fcefff6bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_segments_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortRequestDataAttributesDefinitionAudienceFiltersSegmentsItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_reader :segment_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'segment_id' => :'segment_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'segment_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetCohortRequestDataAttributesDefinitionAudienceFiltersSegmentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'segment_id') + self.segment_id = attributes[:'segment_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @segment_id.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param segment_id [Object] Object to be assigned + # @!visibility private + def segment_id=(segment_id) + if segment_id.nil? + fail ArgumentError, 'invalid value for "segment_id", segment_id cannot be nil.' + end + @segment_id = segment_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 && + name == o.name && + segment_id == o.segment_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, segment_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_users_items.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_users_items.rb new file mode 100644 index 00000000000..4da8d426445 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_definition_audience_filters_users_items.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortRequestDataAttributesDefinitionAudienceFiltersUsersItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'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::GetCohortRequestDataAttributesDefinitionAudienceFiltersUsersItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_time.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_time.rb new file mode 100644 index 00000000000..03366286ebb --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_request_data_attributes_time.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 GetCohortRequestDataAttributesTime + include BaseGenericModel + + # + attr_accessor :from + + # + attr_accessor :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'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::GetCohortRequestDataAttributesTime` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_request_data_type.rb b/lib/datadog_api_client/v2/models/get_cohort_request_data_type.rb new file mode 100644 index 00000000000..828aa28a35e --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 + # + class GetCohortRequestDataType + include BaseEnumModel + + COHORT_REQUEST = "cohort_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_response.rb b/lib/datadog_api_client/v2/models/get_cohort_response.rb new file mode 100644 index 00000000000..d8fda4a87ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 GetCohortResponse + 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' => :'GetCohortResponseData' + } + 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::GetCohortResponse` 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_cohort_response_data.rb b/lib/datadog_api_client/v2/models/get_cohort_response_data.rb new file mode 100644 index 00000000000..fe43f869dc3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 GetCohortResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'GetCohortResponseDataAttributes', + :'id' => :'String', + :'type' => :'GetCohortResponseDataType' + } + 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::GetCohortResponseData` 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_cohort_response_data_attributes.rb b/lib/datadog_api_client/v2/models/get_cohort_response_data_attributes.rb new file mode 100644 index 00000000000..9d27004fbbd --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 GetCohortResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :cohorts + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cohorts' => :'cohorts' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cohorts' => :'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::GetCohortResponseDataAttributes` 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?(:'cohorts') + if (value = attributes[:'cohorts']).is_a?(Array) + self.cohorts = 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 && + cohorts == o.cohorts && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cohorts, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_response_data_attributes_cohorts_items.rb b/lib/datadog_api_client/v2/models/get_cohort_response_data_attributes_cohorts_items.rb new file mode 100644 index 00000000000..eb1d6f4410e --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_response_data_attributes_cohorts_items.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortResponseDataAttributesCohortsItems + include BaseGenericModel + + # + attr_accessor :cohort + + # + attr_accessor :cohort_size + + # + attr_accessor :start_time + + # + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cohort' => :'cohort', + :'cohort_size' => :'cohort_size', + :'start_time' => :'start_time', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cohort' => :'String', + :'cohort_size' => :'Integer', + :'start_time' => :'Integer', + :'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::GetCohortResponseDataAttributesCohortsItems` 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?(:'cohort') + self.cohort = attributes[:'cohort'] + end + + if attributes.key?(:'cohort_size') + self.cohort_size = attributes[:'cohort_size'] + end + + if attributes.key?(:'start_time') + self.start_time = attributes[:'start_time'] + 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 && + cohort == o.cohort && + cohort_size == o.cohort_size && + start_time == o.start_time && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cohort, cohort_size, start_time, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_response_data_attributes_cohorts_items_values_items.rb b/lib/datadog_api_client/v2/models/get_cohort_response_data_attributes_cohorts_items_values_items.rb new file mode 100644 index 00000000000..023745737f8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_response_data_attributes_cohorts_items_values_items.rb @@ -0,0 +1,145 @@ +=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 GetCohortResponseDataAttributesCohortsItemsValuesItems + include BaseGenericModel + + # + attr_accessor :absolute_value + + # + attr_accessor :end_time + + # + attr_accessor :relative_value + + # + attr_accessor :start_time + + # + attr_accessor :window + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'absolute_value' => :'absolute_value', + :'end_time' => :'end_time', + :'relative_value' => :'relative_value', + :'start_time' => :'start_time', + :'window' => :'window' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'absolute_value' => :'Integer', + :'end_time' => :'Integer', + :'relative_value' => :'Float', + :'start_time' => :'Integer', + :'window' => :'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::GetCohortResponseDataAttributesCohortsItemsValuesItems` 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?(:'absolute_value') + self.absolute_value = attributes[:'absolute_value'] + end + + if attributes.key?(:'end_time') + self.end_time = attributes[:'end_time'] + end + + if attributes.key?(:'relative_value') + self.relative_value = attributes[:'relative_value'] + end + + if attributes.key?(:'start_time') + self.start_time = attributes[:'start_time'] + end + + if attributes.key?(:'window') + self.window = attributes[:'window'] + 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 && + absolute_value == o.absolute_value && + end_time == o.end_time && + relative_value == o.relative_value && + start_time == o.start_time && + window == o.window && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [absolute_value, end_time, relative_value, start_time, window, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_response_data_type.rb b/lib/datadog_api_client/v2/models/get_cohort_response_data_type.rb new file mode 100644 index 00000000000..eda29c748cb --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 + # + class GetCohortResponseDataType + include BaseEnumModel + + COHORT_RESPONSE = "cohort_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request.rb new file mode 100644 index 00000000000..962c51d0d5b --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 GetCohortUsersRequest + 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' => :'GetCohortUsersRequestData' + } + 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::GetCohortUsersRequest` 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_cohort_users_request_data.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data.rb new file mode 100644 index 00000000000..8a827986b63 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 GetCohortUsersRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'GetCohortUsersRequestDataAttributes', + :'id' => :'String', + :'type' => :'GetCohortUsersRequestDataType' + } + 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::GetCohortUsersRequestData` 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_cohort_users_request_data_attributes.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes.rb new file mode 100644 index 00000000000..bdeebb7bd03 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes.rb @@ -0,0 +1,155 @@ +=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 GetCohortUsersRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :data_source + + # + attr_accessor :definition + + # + attr_accessor :execution + + # + attr_accessor :time + + # + attr_accessor :user_selection + + # + attr_accessor :window_size + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data_source' => :'data_source', + :'definition' => :'definition', + :'execution' => :'execution', + :'time' => :'time', + :'user_selection' => :'user_selection', + :'window_size' => :'window_size' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'String', + :'definition' => :'GetCohortUsersRequestDataAttributesDefinition', + :'execution' => :'Integer', + :'time' => :'GetCohortUsersRequestDataAttributesTime', + :'user_selection' => :'String', + :'window_size' => :'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::GetCohortUsersRequestDataAttributes` 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_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'definition') + self.definition = attributes[:'definition'] + end + + if attributes.key?(:'execution') + self.execution = attributes[:'execution'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'user_selection') + self.user_selection = attributes[:'user_selection'] + end + + if attributes.key?(:'window_size') + self.window_size = attributes[:'window_size'] + 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_source == o.data_source && + definition == o.definition && + execution == o.execution && + time == o.time && + user_selection == o.user_selection && + window_size == o.window_size && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, definition, execution, time, user_selection, window_size, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition.rb new file mode 100644 index 00000000000..5a34fbd1c41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition.rb @@ -0,0 +1,155 @@ +=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 GetCohortUsersRequestDataAttributesDefinition + include BaseGenericModel + + # + attr_accessor :audience_filters + + # + attr_accessor :cohort + + # + attr_accessor :inclusion_search + + # + attr_accessor :return_search + + # + attr_accessor :segment_id + + # + attr_accessor :window + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'audience_filters' => :'audience_filters', + :'cohort' => :'cohort', + :'inclusion_search' => :'inclusion_search', + :'return_search' => :'return_search', + :'segment_id' => :'segment_id', + :'window' => :'window' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'audience_filters' => :'GetCohortUsersRequestDataAttributesDefinitionAudienceFilters', + :'cohort' => :'String', + :'inclusion_search' => :'String', + :'return_search' => :'String', + :'segment_id' => :'String', + :'window' => :'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::GetCohortUsersRequestDataAttributesDefinition` 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?(:'audience_filters') + self.audience_filters = attributes[:'audience_filters'] + end + + if attributes.key?(:'cohort') + self.cohort = attributes[:'cohort'] + end + + if attributes.key?(:'inclusion_search') + self.inclusion_search = attributes[:'inclusion_search'] + end + + if attributes.key?(:'return_search') + self.return_search = attributes[:'return_search'] + end + + if attributes.key?(:'segment_id') + self.segment_id = attributes[:'segment_id'] + end + + if attributes.key?(:'window') + self.window = attributes[:'window'] + 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 && + audience_filters == o.audience_filters && + cohort == o.cohort && + inclusion_search == o.inclusion_search && + return_search == o.return_search && + segment_id == o.segment_id && + window == o.window && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [audience_filters, cohort, inclusion_search, return_search, segment_id, window, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters.rb new file mode 100644 index 00000000000..5889092e4c4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters.rb @@ -0,0 +1,141 @@ +=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 GetCohortUsersRequestDataAttributesDefinitionAudienceFilters + include BaseGenericModel + + # + attr_accessor :accounts + + # + attr_accessor :formula + + # + attr_accessor :segments + + # + attr_accessor :users + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'accounts' => :'accounts', + :'formula' => :'formula', + :'segments' => :'segments', + :'users' => :'users' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'accounts' => :'Array', + :'formula' => :'String', + :'segments' => :'Array', + :'users' => :'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::GetCohortUsersRequestDataAttributesDefinitionAudienceFilters` 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?(:'accounts') + if (value = attributes[:'accounts']).is_a?(Array) + self.accounts = value + end + end + + if attributes.key?(:'formula') + self.formula = attributes[:'formula'] + end + + if attributes.key?(:'segments') + if (value = attributes[:'segments']).is_a?(Array) + self.segments = value + end + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = 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 && + accounts == o.accounts && + formula == o.formula && + segments == o.segments && + users == o.users && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [accounts, formula, segments, users, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_accounts_items.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_accounts_items.rb new file mode 100644 index 00000000000..561caa5ede5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_accounts_items.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersAccountsItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'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::GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersAccountsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_segments_items.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_segments_items.rb new file mode 100644 index 00000000000..f8a592858b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_segments_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersSegmentsItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_reader :segment_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'segment_id' => :'segment_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'segment_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersSegmentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'segment_id') + self.segment_id = attributes[:'segment_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @segment_id.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param segment_id [Object] Object to be assigned + # @!visibility private + def segment_id=(segment_id) + if segment_id.nil? + fail ArgumentError, 'invalid value for "segment_id", segment_id cannot be nil.' + end + @segment_id = segment_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 && + name == o.name && + segment_id == o.segment_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, segment_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_users_items.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_users_items.rb new file mode 100644 index 00000000000..4b79640868e --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_definition_audience_filters_users_items.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersUsersItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'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::GetCohortUsersRequestDataAttributesDefinitionAudienceFiltersUsersItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_time.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_time.rb new file mode 100644 index 00000000000..083b4a5dfd7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_attributes_time.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 GetCohortUsersRequestDataAttributesTime + include BaseGenericModel + + # + attr_accessor :from + + # + attr_accessor :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'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::GetCohortUsersRequestDataAttributesTime` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_request_data_type.rb b/lib/datadog_api_client/v2/models/get_cohort_users_request_data_type.rb new file mode 100644 index 00000000000..f2f43100570 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_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 + # + class GetCohortUsersRequestDataType + include BaseEnumModel + + COHORT_USERS_REQUEST = "cohort_users_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_response.rb b/lib/datadog_api_client/v2/models/get_cohort_users_response.rb new file mode 100644 index 00000000000..3602ea70320 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_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 GetCohortUsersResponse + 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' => :'GetCohortUsersResponseData' + } + 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::GetCohortUsersResponse` 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_cohort_users_response_data.rb b/lib/datadog_api_client/v2/models/get_cohort_users_response_data.rb new file mode 100644 index 00000000000..6a2ecfb5de8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_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 GetCohortUsersResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'GetCohortUsersResponseDataAttributes', + :'id' => :'String', + :'type' => :'GetCohortUsersResponseDataType' + } + 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::GetCohortUsersResponseData` 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_cohort_users_response_data_attributes.rb b/lib/datadog_api_client/v2/models/get_cohort_users_response_data_attributes.rb new file mode 100644 index 00000000000..4e24435bb6c --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_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 GetCohortUsersResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :users + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'users' => :'users' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'users' => :'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::GetCohortUsersResponseDataAttributes` 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?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = 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 && + users == o.users && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [users, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_response_data_attributes_users_items.rb b/lib/datadog_api_client/v2/models/get_cohort_users_response_data_attributes_users_items.rb new file mode 100644 index 00000000000..1c9b8326091 --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_response_data_attributes_users_items.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class GetCohortUsersResponseDataAttributesUsersItems + include BaseGenericModel + + # + attr_accessor :email + + # + attr_accessor :id + + # + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'email' => :'email', + :'id' => :'id', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'email' => :'String', + :'id' => :'String', + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GetCohortUsersResponseDataAttributesUsersItems` 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?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + id == o.id && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [email, id, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/get_cohort_users_response_data_type.rb b/lib/datadog_api_client/v2/models/get_cohort_users_response_data_type.rb new file mode 100644 index 00000000000..dc9ccbca7ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/get_cohort_users_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 + # + class GetCohortUsersResponseDataType + include BaseEnumModel + + COHORT_USERS_RESPONSE = "cohort_users_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request.rb b/lib/datadog_api_client/v2/models/sankey_request.rb new file mode 100644 index 00000000000..83728f15de6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_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 SankeyRequest + 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' => :'SankeyRequestData' + } + 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::SankeyRequest` 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/sankey_request_data.rb b/lib/datadog_api_client/v2/models/sankey_request_data.rb new file mode 100644 index 00000000000..0ee370c9263 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_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 SankeyRequestData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'SankeyRequestDataAttributes', + :'id' => :'String', + :'type' => :'SankeyRequestDataType' + } + 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::SankeyRequestData` 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/sankey_request_data_attributes.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes.rb new file mode 100644 index 00000000000..f7a03edd6a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SankeyRequestDataAttributes + include BaseGenericModel + + # + attr_accessor :data_source + + # + attr_accessor :definition + + # + attr_accessor :enforced_execution_type + + # + attr_accessor :request_id + + # + attr_accessor :sampling + + # + attr_accessor :search + + # + attr_accessor :time + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data_source' => :'data_source', + :'definition' => :'definition', + :'enforced_execution_type' => :'enforced_execution_type', + :'request_id' => :'request_id', + :'sampling' => :'sampling', + :'search' => :'search', + :'time' => :'time' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data_source' => :'String', + :'definition' => :'SankeyRequestDataAttributesDefinition', + :'enforced_execution_type' => :'String', + :'request_id' => :'String', + :'sampling' => :'SankeyRequestDataAttributesSampling', + :'search' => :'SankeyRequestDataAttributesSearch', + :'time' => :'SankeyRequestDataAttributesTime' + } + 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::SankeyRequestDataAttributes` 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_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'definition') + self.definition = attributes[:'definition'] + end + + if attributes.key?(:'enforced_execution_type') + self.enforced_execution_type = attributes[:'enforced_execution_type'] + end + + if attributes.key?(:'request_id') + self.request_id = attributes[:'request_id'] + end + + if attributes.key?(:'sampling') + self.sampling = attributes[:'sampling'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + 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_source == o.data_source && + definition == o.definition && + enforced_execution_type == o.enforced_execution_type && + request_id == o.request_id && + sampling == o.sampling && + search == o.search && + time == o.time && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data_source, definition, enforced_execution_type, request_id, sampling, search, time, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_definition.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_definition.rb new file mode 100644 index 00000000000..7f45bad9bab --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_definition.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SankeyRequestDataAttributesDefinition + include BaseGenericModel + + # + attr_accessor :entries_per_step + + # + attr_accessor :number_of_steps + + # + attr_accessor :source + + # + attr_accessor :target + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'entries_per_step' => :'entries_per_step', + :'number_of_steps' => :'number_of_steps', + :'source' => :'source', + :'target' => :'target' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'entries_per_step' => :'Integer', + :'number_of_steps' => :'Integer', + :'source' => :'String', + :'target' => :'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::SankeyRequestDataAttributesDefinition` 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?(:'entries_per_step') + self.entries_per_step = attributes[:'entries_per_step'] + end + + if attributes.key?(:'number_of_steps') + self.number_of_steps = attributes[:'number_of_steps'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + 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 && + entries_per_step == o.entries_per_step && + number_of_steps == o.number_of_steps && + source == o.source && + target == o.target && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [entries_per_step, number_of_steps, source, target, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_sampling.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_sampling.rb new file mode 100644 index 00000000000..f04c2264e99 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_sampling.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 SankeyRequestDataAttributesSampling + include BaseGenericModel + + # The `sampling` `enabled`. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + 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::SankeyRequestDataAttributesSampling` 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?(:'enabled') + self.enabled = attributes[:'enabled'] + 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 && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search.rb new file mode 100644 index 00000000000..b31e11d649a --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SankeyRequestDataAttributesSearch + include BaseGenericModel + + # + attr_accessor :audience_filters + + # + attr_accessor :occurrences + + # + attr_accessor :query + + # + attr_accessor :subquery_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'audience_filters' => :'audience_filters', + :'occurrences' => :'occurrences', + :'query' => :'query', + :'subquery_id' => :'subquery_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'audience_filters' => :'SankeyRequestDataAttributesSearchAudienceFilters', + :'occurrences' => :'SankeyRequestDataAttributesSearchOccurrences', + :'query' => :'String', + :'subquery_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SankeyRequestDataAttributesSearch` 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?(:'audience_filters') + self.audience_filters = attributes[:'audience_filters'] + end + + if attributes.key?(:'occurrences') + self.occurrences = attributes[:'occurrences'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'subquery_id') + self.subquery_id = attributes[:'subquery_id'] + 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 && + audience_filters == o.audience_filters && + occurrences == o.occurrences && + query == o.query && + subquery_id == o.subquery_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [audience_filters, occurrences, query, subquery_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters.rb new file mode 100644 index 00000000000..a6288c138b4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters.rb @@ -0,0 +1,141 @@ +=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 SankeyRequestDataAttributesSearchAudienceFilters + include BaseGenericModel + + # + attr_accessor :accounts + + # + attr_accessor :formula + + # + attr_accessor :segments + + # + attr_accessor :users + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'accounts' => :'accounts', + :'formula' => :'formula', + :'segments' => :'segments', + :'users' => :'users' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'accounts' => :'Array', + :'formula' => :'String', + :'segments' => :'Array', + :'users' => :'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::SankeyRequestDataAttributesSearchAudienceFilters` 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?(:'accounts') + if (value = attributes[:'accounts']).is_a?(Array) + self.accounts = value + end + end + + if attributes.key?(:'formula') + self.formula = attributes[:'formula'] + end + + if attributes.key?(:'segments') + if (value = attributes[:'segments']).is_a?(Array) + self.segments = value + end + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = 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 && + accounts == o.accounts && + formula == o.formula && + segments == o.segments && + users == o.users && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [accounts, formula, segments, users, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_accounts_items.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_accounts_items.rb new file mode 100644 index 00000000000..7da640943e5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_accounts_items.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SankeyRequestDataAttributesSearchAudienceFiltersAccountsItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'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::SankeyRequestDataAttributesSearchAudienceFiltersAccountsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_segments_items.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_segments_items.rb new file mode 100644 index 00000000000..12ee55cf2b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_segments_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SankeyRequestDataAttributesSearchAudienceFiltersSegmentsItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_reader :segment_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'segment_id' => :'segment_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'segment_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SankeyRequestDataAttributesSearchAudienceFiltersSegmentsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'segment_id') + self.segment_id = attributes[:'segment_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @segment_id.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param segment_id [Object] Object to be assigned + # @!visibility private + def segment_id=(segment_id) + if segment_id.nil? + fail ArgumentError, 'invalid value for "segment_id", segment_id cannot be nil.' + end + @segment_id = segment_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 && + name == o.name && + segment_id == o.segment_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, segment_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_users_items.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_users_items.rb new file mode 100644 index 00000000000..6cb502bd8f2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_audience_filters_users_items.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SankeyRequestDataAttributesSearchAudienceFiltersUsersItems + include BaseGenericModel + + # + attr_reader :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'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::SankeyRequestDataAttributesSearchAudienceFiltersUsersItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_occurrences.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_occurrences.rb new file mode 100644 index 00000000000..4676eb1c505 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_search_occurrences.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 SankeyRequestDataAttributesSearchOccurrences + include BaseGenericModel + + # + attr_accessor :meta + + # + attr_reader :operator + + # + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'meta' => :'meta', + :'operator' => :'operator', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'meta' => :'Hash', + :'operator' => :'String', + :'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::SankeyRequestDataAttributesSearchOccurrences` 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?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @operator.nil? + return false if @value.nil? + true + end + + # Custom attribute writer method with validation + # @param operator [Object] Object to be assigned + # @!visibility private + def operator=(operator) + if operator.nil? + fail ArgumentError, 'invalid value for "operator", operator cannot be nil.' + end + @operator = operator + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + meta == o.meta && + operator == o.operator && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [meta, operator, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_attributes_time.rb b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_time.rb new file mode 100644 index 00000000000..7182f8c62ae --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_request_data_attributes_time.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 SankeyRequestDataAttributesTime + include BaseGenericModel + + # + attr_accessor :from + + # + attr_accessor :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'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::SankeyRequestDataAttributesTime` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_request_data_type.rb b/lib/datadog_api_client/v2/models/sankey_request_data_type.rb new file mode 100644 index 00000000000..a507e3e5cee --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_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 + # + class SankeyRequestDataType + include BaseEnumModel + + SANKEY_REQUEST = "sankey_request".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_response.rb b/lib/datadog_api_client/v2/models/sankey_response.rb new file mode 100644 index 00000000000..1aefb624d0c --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_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 SankeyResponse + 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' => :'SankeyResponseData' + } + 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::SankeyResponse` 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/sankey_response_data.rb b/lib/datadog_api_client/v2/models/sankey_response_data.rb new file mode 100644 index 00000000000..56c7a3f3c0e --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_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 SankeyResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'SankeyResponseDataAttributes', + :'id' => :'String', + :'type' => :'SankeyResponseDataType' + } + 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::SankeyResponseData` 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/sankey_response_data_attributes.rb b/lib/datadog_api_client/v2/models/sankey_response_data_attributes.rb new file mode 100644 index 00000000000..8ccc3767798 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_response_data_attributes.rb @@ -0,0 +1,119 @@ +=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 SankeyResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :links + + # + attr_accessor :nodes + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'links' => :'links', + :'nodes' => :'nodes' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'links' => :'Array', + :'nodes' => :'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::SankeyResponseDataAttributes` 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?(:'links') + if (value = attributes[:'links']).is_a?(Array) + self.links = value + end + end + + if attributes.key?(:'nodes') + if (value = attributes[:'nodes']).is_a?(Array) + self.nodes = 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 && + links == o.links && + nodes == o.nodes && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [links, nodes, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_response_data_attributes_links_items.rb b/lib/datadog_api_client/v2/models/sankey_response_data_attributes_links_items.rb new file mode 100644 index 00000000000..4335eecfcbc --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_response_data_attributes_links_items.rb @@ -0,0 +1,145 @@ +=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 SankeyResponseDataAttributesLinksItems + include BaseGenericModel + + # + attr_accessor :column + + # + attr_accessor :id + + # + attr_accessor :source + + # + attr_accessor :target + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'column' => :'column', + :'id' => :'id', + :'source' => :'source', + :'target' => :'target', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'column' => :'Integer', + :'id' => :'String', + :'source' => :'String', + :'target' => :'String', + :'value' => :'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::SankeyResponseDataAttributesLinksItems` 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?(:'column') + self.column = attributes[:'column'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + 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 && + column == o.column && + id == o.id && + source == o.source && + target == o.target && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [column, id, source, target, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_response_data_attributes_nodes_items.rb b/lib/datadog_api_client/v2/models/sankey_response_data_attributes_nodes_items.rb new file mode 100644 index 00000000000..0b246a604e6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_response_data_attributes_nodes_items.rb @@ -0,0 +1,177 @@ +=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 SankeyResponseDataAttributesNodesItems + include BaseGenericModel + + # + attr_accessor :aggregated_nodes + + # + attr_accessor :column + + # + attr_accessor :id + + # + attr_accessor :incoming_value + + # + attr_accessor :name + + # + attr_accessor :outgoing_value + + # + attr_accessor :type + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregated_nodes' => :'aggregated_nodes', + :'column' => :'column', + :'id' => :'id', + :'incoming_value' => :'incoming_value', + :'name' => :'name', + :'outgoing_value' => :'outgoing_value', + :'type' => :'type', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregated_nodes' => :'Array', + :'column' => :'Integer', + :'id' => :'String', + :'incoming_value' => :'Integer', + :'name' => :'String', + :'outgoing_value' => :'Integer', + :'type' => :'String', + :'value' => :'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::SankeyResponseDataAttributesNodesItems` 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?(:'aggregated_nodes') + if (value = attributes[:'aggregated_nodes']).is_a?(Array) + self.aggregated_nodes = value + end + end + + if attributes.key?(:'column') + self.column = attributes[:'column'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'incoming_value') + self.incoming_value = attributes[:'incoming_value'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'outgoing_value') + self.outgoing_value = attributes[:'outgoing_value'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 && + aggregated_nodes == o.aggregated_nodes && + column == o.column && + id == o.id && + incoming_value == o.incoming_value && + name == o.name && + outgoing_value == o.outgoing_value && + type == o.type && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregated_nodes, column, id, incoming_value, name, outgoing_value, type, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_response_data_attributes_nodes_items_aggregated_nodes_items.rb b/lib/datadog_api_client/v2/models/sankey_response_data_attributes_nodes_items_aggregated_nodes_items.rb new file mode 100644 index 00000000000..60949ceb678 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_response_data_attributes_nodes_items_aggregated_nodes_items.rb @@ -0,0 +1,155 @@ +=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 SankeyResponseDataAttributesNodesItemsAggregatedNodesItems + include BaseGenericModel + + # + attr_accessor :id + + # + attr_accessor :incoming_value + + # + attr_accessor :name + + # + attr_accessor :outgoing_value + + # + attr_accessor :type + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'incoming_value' => :'incoming_value', + :'name' => :'name', + :'outgoing_value' => :'outgoing_value', + :'type' => :'type', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'incoming_value' => :'Integer', + :'name' => :'String', + :'outgoing_value' => :'Integer', + :'type' => :'String', + :'value' => :'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::SankeyResponseDataAttributesNodesItemsAggregatedNodesItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'incoming_value') + self.incoming_value = attributes[:'incoming_value'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'outgoing_value') + self.outgoing_value = attributes[:'outgoing_value'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 && + id == o.id && + incoming_value == o.incoming_value && + name == o.name && + outgoing_value == o.outgoing_value && + type == o.type && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, incoming_value, name, outgoing_value, type, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sankey_response_data_type.rb b/lib/datadog_api_client/v2/models/sankey_response_data_type.rb new file mode 100644 index 00000000000..a997829d232 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sankey_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 + # + class SankeyResponseDataType + include BaseEnumModel + + SANKEY_RESPONSE = "sankey_response".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/segment.rb b/lib/datadog_api_client/v2/models/segment.rb new file mode 100644 index 00000000000..a5c05426d2a --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment.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 Segment + 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' => :'SegmentData' + } + 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::Segment` 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/segment_array.rb b/lib/datadog_api_client/v2/models/segment_array.rb new file mode 100644 index 00000000000..39d53d2c9a6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SegmentArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SegmentArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data.rb b/lib/datadog_api_client/v2/models/segment_data.rb new file mode 100644 index 00000000000..ae80dc3ed1b --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_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 SegmentData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + 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' => :'SegmentDataAttributes', + :'id' => :'String', + :'type' => :'SegmentDataType' + } + 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::SegmentData` 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/segment_data_attributes.rb b/lib/datadog_api_client/v2/models/segment_data_attributes.rb new file mode 100644 index 00000000000..d1f51a8fc42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes.rb @@ -0,0 +1,276 @@ +=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 SegmentDataAttributes + include BaseGenericModel + + # + attr_accessor :created_at + + # + attr_accessor :created_by + + # + attr_reader :data_query + + # + attr_accessor :description + + # + attr_accessor :disabled_at + + # + attr_accessor :disabled_by + + # + attr_accessor :materialization_row_count + + # + attr_accessor :materialized_at + + # + attr_accessor :modified_at + + # + attr_accessor :modified_by + + # + attr_reader :name + + # + attr_accessor :org_id + + # + attr_accessor :source + + # + attr_accessor :tags + + # + attr_accessor :version + + 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', + :'data_query' => :'data_query', + :'description' => :'description', + :'disabled_at' => :'disabled_at', + :'disabled_by' => :'disabled_by', + :'materialization_row_count' => :'materialization_row_count', + :'materialized_at' => :'materialized_at', + :'modified_at' => :'modified_at', + :'modified_by' => :'modified_by', + :'name' => :'name', + :'org_id' => :'org_id', + :'source' => :'source', + :'tags' => :'tags', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'created_by' => :'SegmentDataSource', + :'data_query' => :'SegmentDataAttributesDataQuery', + :'description' => :'String', + :'disabled_at' => :'Time', + :'disabled_by' => :'SegmentDataSource', + :'materialization_row_count' => :'Integer', + :'materialized_at' => :'String', + :'modified_at' => :'Time', + :'modified_by' => :'SegmentDataSource', + :'name' => :'String', + :'org_id' => :'Integer', + :'source' => :'Integer', + :'tags' => :'Array', + :'version' => :'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::SegmentDataAttributes` 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?(:'data_query') + self.data_query = attributes[:'data_query'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'disabled_at') + self.disabled_at = attributes[:'disabled_at'] + end + + if attributes.key?(:'disabled_by') + self.disabled_by = attributes[:'disabled_by'] + end + + if attributes.key?(:'materialization_row_count') + self.materialization_row_count = attributes[:'materialization_row_count'] + end + + if attributes.key?(:'materialized_at') + self.materialized_at = attributes[:'materialized_at'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'org_id') + self.org_id = attributes[:'org_id'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_query.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param data_query [Object] Object to be assigned + # @!visibility private + def data_query=(data_query) + if data_query.nil? + fail ArgumentError, 'invalid value for "data_query", data_query cannot be nil.' + end + @data_query = data_query + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # 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 && + data_query == o.data_query && + description == o.description && + disabled_at == o.disabled_at && + disabled_by == o.disabled_by && + materialization_row_count == o.materialization_row_count && + materialized_at == o.materialized_at && + modified_at == o.modified_at && + modified_by == o.modified_by && + name == o.name && + org_id == o.org_id && + source == o.source && + tags == o.tags && + version == o.version && + 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, data_query, description, disabled_at, disabled_by, materialization_row_count, materialized_at, modified_at, modified_by, name, org_id, source, tags, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_attributes_data_query.rb b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query.rb new file mode 100644 index 00000000000..edf6cc64005 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query.rb @@ -0,0 +1,153 @@ +=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 SegmentDataAttributesDataQuery + include BaseGenericModel + + # + attr_accessor :combination + + # + attr_accessor :event_platform + + # + attr_accessor :reference_table + + # + attr_accessor :static + + # + attr_accessor :user_store + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'combination' => :'combination', + :'event_platform' => :'event_platform', + :'reference_table' => :'reference_table', + :'static' => :'static', + :'user_store' => :'user_store' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'combination' => :'String', + :'event_platform' => :'Array', + :'reference_table' => :'Array', + :'static' => :'Array', + :'user_store' => :'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::SegmentDataAttributesDataQuery` 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?(:'combination') + self.combination = attributes[:'combination'] + end + + if attributes.key?(:'event_platform') + if (value = attributes[:'event_platform']).is_a?(Array) + self.event_platform = value + end + end + + if attributes.key?(:'reference_table') + if (value = attributes[:'reference_table']).is_a?(Array) + self.reference_table = value + end + end + + if attributes.key?(:'static') + if (value = attributes[:'static']).is_a?(Array) + self.static = value + end + end + + if attributes.key?(:'user_store') + if (value = attributes[:'user_store']).is_a?(Array) + self.user_store = 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 && + combination == o.combination && + event_platform == o.event_platform && + reference_table == o.reference_table && + static == o.static && + user_store == o.user_store && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [combination, event_platform, reference_table, static, user_store, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_event_platform_items.rb b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_event_platform_items.rb new file mode 100644 index 00000000000..f236304ce25 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_event_platform_items.rb @@ -0,0 +1,163 @@ +=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 SegmentDataAttributesDataQueryEventPlatformItems + include BaseGenericModel + + # + attr_reader :facet + + # + attr_accessor :from + + # + attr_accessor :name + + # + attr_accessor :query + + # + attr_accessor :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'facet' => :'facet', + :'from' => :'from', + :'name' => :'name', + :'query' => :'query', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'facet' => :'String', + :'from' => :'String', + :'name' => :'String', + :'query' => :'String', + :'to' => :'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::SegmentDataAttributesDataQueryEventPlatformItems` 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') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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.nil? + true + end + + # Custom attribute writer method with validation + # @param facet [Object] Object to be assigned + # @!visibility private + def facet=(facet) + if facet.nil? + fail ArgumentError, 'invalid value for "facet", facet cannot be nil.' + end + @facet = facet + 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 == o.facet && + from == o.from && + name == o.name && + query == o.query && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [facet, from, name, query, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items.rb b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items.rb new file mode 100644 index 00000000000..29e13ed8a89 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items.rb @@ -0,0 +1,176 @@ +=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 SegmentDataAttributesDataQueryReferenceTableItems + include BaseGenericModel + + # + attr_accessor :columns + + # + attr_accessor :filter_query + + # + attr_reader :join_condition + + # + attr_accessor :name + + # + attr_reader :table_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'columns' => :'columns', + :'filter_query' => :'filter_query', + :'join_condition' => :'join_condition', + :'name' => :'name', + :'table_name' => :'table_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'columns' => :'Array', + :'filter_query' => :'String', + :'join_condition' => :'SegmentDataAttributesDataQueryReferenceTableItemsJoinCondition', + :'name' => :'String', + :'table_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SegmentDataAttributesDataQueryReferenceTableItems` 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?(:'columns') + if (value = attributes[:'columns']).is_a?(Array) + self.columns = value + end + end + + if attributes.key?(:'filter_query') + self.filter_query = attributes[:'filter_query'] + end + + if attributes.key?(:'join_condition') + self.join_condition = attributes[:'join_condition'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'table_name') + self.table_name = attributes[:'table_name'] + 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_condition.nil? + return false if @table_name.nil? + true + end + + # Custom attribute writer method with validation + # @param join_condition [Object] Object to be assigned + # @!visibility private + def join_condition=(join_condition) + if join_condition.nil? + fail ArgumentError, 'invalid value for "join_condition", join_condition cannot be nil.' + end + @join_condition = join_condition + end + + # Custom attribute writer method with validation + # @param table_name [Object] Object to be assigned + # @!visibility private + def table_name=(table_name) + if table_name.nil? + fail ArgumentError, 'invalid value for "table_name", table_name cannot be nil.' + end + @table_name = table_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + columns == o.columns && + filter_query == o.filter_query && + join_condition == o.join_condition && + name == o.name && + table_name == o.table_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [columns, filter_query, join_condition, name, table_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items_columns_items.rb b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items_columns_items.rb new file mode 100644 index 00000000000..dd34d1a1907 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items_columns_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 SegmentDataAttributesDataQueryReferenceTableItemsColumnsItems + include BaseGenericModel + + # + attr_accessor :_alias + + # + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'_alias' => :'alias', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'_alias' => :'String', + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SegmentDataAttributesDataQueryReferenceTableItemsColumnsItems` 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?(:'_alias') + self._alias = attributes[:'_alias'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _alias == o._alias && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [_alias, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items_join_condition.rb b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items_join_condition.rb new file mode 100644 index 00000000000..c7793e8ad3c --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_reference_table_items_join_condition.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SegmentDataAttributesDataQueryReferenceTableItemsJoinCondition + include BaseGenericModel + + # + attr_reader :column_name + + # + attr_accessor :facet + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'column_name' => :'column_name', + :'facet' => :'facet' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'column_name' => :'String', + :'facet' => :'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::SegmentDataAttributesDataQueryReferenceTableItemsJoinCondition` 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?(:'column_name') + self.column_name = attributes[:'column_name'] + end + + if attributes.key?(:'facet') + self.facet = attributes[:'facet'] + 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 @column_name.nil? + true + end + + # Custom attribute writer method with validation + # @param column_name [Object] Object to be assigned + # @!visibility private + def column_name=(column_name) + if column_name.nil? + fail ArgumentError, 'invalid value for "column_name", column_name cannot be nil.' + end + @column_name = column_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + column_name == o.column_name && + facet == o.facet && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [column_name, facet, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_static_items.rb b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_static_items.rb new file mode 100644 index 00000000000..a9c3b4ba97c --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_static_items.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 SegmentDataAttributesDataQueryStaticItems + include BaseGenericModel + + # + attr_accessor :id + + # + attr_accessor :name + + # + attr_reader :user_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'user_count' => :'user_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'user_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SegmentDataAttributesDataQueryStaticItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'user_count') + self.user_count = attributes[:'user_count'] + 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 !@user_count.nil? && @user_count < 0 + true + end + + # Custom attribute writer method with validation + # @param user_count [Object] Object to be assigned + # @!visibility private + def user_count=(user_count) + if !user_count.nil? && user_count < 0 + fail ArgumentError, 'invalid value for "user_count", must be greater than or equal to 0.' + end + @user_count = user_count + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + user_count == o.user_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, user_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_user_store_items.rb b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_user_store_items.rb new file mode 100644 index 00000000000..c20361c2e96 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_attributes_data_query_user_store_items.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SegmentDataAttributesDataQueryUserStoreItems + include BaseGenericModel + + # + attr_accessor :facet + + # + attr_accessor :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'facet' => :'facet', + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'facet' => :'String', + :'name' => :'String', + :'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::SegmentDataAttributesDataQueryUserStoreItems` 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') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 && + facet == o.facet && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [facet, name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_source.rb b/lib/datadog_api_client/v2/models/segment_data_source.rb new file mode 100644 index 00000000000..4247a568ee6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_data_source.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class SegmentDataSource + include BaseGenericModel + + # + attr_reader :handle + + # + attr_accessor :icon + + # + attr_reader :id + + # + attr_accessor :name + + # + attr_reader :uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'handle' => :'handle', + :'icon' => :'icon', + :'id' => :'id', + :'name' => :'name', + :'uuid' => :'uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'handle' => :'String', + :'icon' => :'String', + :'id' => :'String', + :'name' => :'String', + :'uuid' => :'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::SegmentDataSource` 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?(:'handle') + self.handle = attributes[:'handle'] + end + + if attributes.key?(:'icon') + self.icon = attributes[:'icon'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + 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 @handle.nil? + return false if @id.nil? + return false if @uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param handle [Object] Object to be assigned + # @!visibility private + def handle=(handle) + if handle.nil? + fail ArgumentError, 'invalid value for "handle", handle cannot be nil.' + end + @handle = handle + 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 uuid [Object] Object to be assigned + # @!visibility private + def uuid=(uuid) + if uuid.nil? + fail ArgumentError, 'invalid value for "uuid", uuid cannot be nil.' + end + @uuid = uuid + 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 && + handle == o.handle && + icon == o.icon && + id == o.id && + name == o.name && + uuid == o.uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [handle, icon, id, name, uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/segment_data_type.rb b/lib/datadog_api_client/v2/models/segment_data_type.rb new file mode 100644 index 00000000000..1409120ef20 --- /dev/null +++ b/lib/datadog_api_client/v2/models/segment_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 + # + class SegmentDataType + include BaseEnumModel + + SEGMENT = "segment".freeze + end +end