diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 6ccf9dc7662c..e7b82fd4197c 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -991,6 +991,48 @@ components: scaling: $ref: "#/components/schemas/BarChartWidgetScaling" type: object + CalendarInterval: + additionalProperties: false + description: Calendar interval definition. + properties: + alignment: + description: Alignment of the interval. Valid values depend on the interval type. For `day`, use hours (for example, `1am`, `2pm`, or `14`). For `week`, use day names (for example, `monday`). For `month`, use day-of-month ordinals (for example, `1st`, `15th`). For `year` or `quarter`, use month names (for example, `january`). + example: "monday" + type: string + quantity: + description: Quantity of the interval. + example: 1 + format: int64 + type: integer + timezone: + description: Timezone for the interval. + example: "UTC" + type: string + type: + $ref: "#/components/schemas/CalendarIntervalType" + required: + - type + type: object + CalendarIntervalType: + description: Type of calendar interval. + enum: + - day + - week + - month + - year + - quarter + - minute + - hour + example: week + type: string + x-enum-varnames: + - DAY + - WEEK + - MONTH + - YEAR + - QUARTER + - MINUTE + - HOUR CancelDowntimesByScopeRequest: description: Cancel downtimes according to scope. properties: @@ -1235,6 +1277,69 @@ components: type: string x-enum-varnames: - CHECK_STATUS + CohortWidgetDefinition: + additionalProperties: false + description: The cohort widget visualizes user retention over time. + properties: + description: + description: The description of the widget. + type: string + requests: + description: List of Cohort widget requests. + example: + - query: + compute: + aggregation: count + metric: __dd.retention_rate + data_source: product_analytics_retention + search: + cohort_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:/home" + time_interval: + type: calendar + value: + type: week + retention_entity: "@usr.id" + return_condition: conversion_on_or_after + return_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:/checkout" + request_type: retention_grid + items: + $ref: "#/components/schemas/RetentionGridRequest" + description: A cohort widget request. + minItems: 1 + type: array + time: + $ref: "#/components/schemas/WidgetTime" + title: + description: Title of your widget. + type: string + title_align: + $ref: "#/components/schemas/WidgetTextAlign" + title_size: + description: Size of the title. + type: string + type: + $ref: "#/components/schemas/CohortWidgetDefinitionType" + required: + - type + - requests + type: object + CohortWidgetDefinitionType: + default: cohort + description: Type of the Cohort widget. + enum: + - cohort + example: cohort + type: string + x-enum-varnames: + - COHORT ContentEncoding: description: HTTP header used to compress the media-type. enum: @@ -3248,6 +3353,52 @@ components: - metric - name type: object + FormulaAndFunctionProductAnalyticsExtendedDataSource: + description: Data source for Product Analytics Extended queries. + enum: + - product_analytics_extended + example: product_analytics_extended + type: string + x-enum-varnames: + - PRODUCT_ANALYTICS_EXTENDED + FormulaAndFunctionProductAnalyticsExtendedQueryDefinition: + description: A formula and functions Product Analytics Extended query for advanced analytics features. + properties: + compute: + $ref: "#/components/schemas/ProductAnalyticsExtendedCompute" + data_source: + $ref: "#/components/schemas/FormulaAndFunctionProductAnalyticsExtendedDataSource" + group_by: + description: Group by configuration. + items: + $ref: "#/components/schemas/ProductAnalyticsExtendedGroupBy" + description: A Product Analytics Extended group by configuration. + type: array + indexes: + description: Event indexes to query. + example: ["*"] + items: + $ref: "#/components/schemas/FormulaAndFunctionProductAnalyticsExtendedQueryDefinitionIndexesItems" + type: array + name: + description: Name of the query for use in formulas. + example: "query1" + type: string + query: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + required: + - data_source + - name + - query + - compute + type: object + FormulaAndFunctionProductAnalyticsExtendedQueryDefinitionIndexesItems: + description: Use `"*"` to query all indexes. + enum: + - "*" + type: string + x-enum-varnames: + - ALL FormulaAndFunctionQueryDefinition: description: A formula and function query. oneOf: @@ -3259,6 +3410,9 @@ components: - $ref: "#/components/schemas/FormulaAndFunctionApmMetricsQueryDefinition" - $ref: "#/components/schemas/FormulaAndFunctionSLOQueryDefinition" - $ref: "#/components/schemas/FormulaAndFunctionCloudCostQueryDefinition" + - $ref: "#/components/schemas/FormulaAndFunctionProductAnalyticsExtendedQueryDefinition" + - $ref: "#/components/schemas/FormulaAndFunctionUserJourneyQueryDefinition" + - $ref: "#/components/schemas/FormulaAndFunctionRetentionQueryDefinition" FormulaAndFunctionResponseFormat: description: Timeseries, scalar, or event list response. Event list response formats are supported by Geomap widgets. enum: @@ -3271,6 +3425,31 @@ components: - TIMESERIES - SCALAR - EVENT_LIST + FormulaAndFunctionRetentionQueryDefinition: + description: A formula and functions Retention query for defining timeseries and scalar visualizations. + properties: + compute: + $ref: "#/components/schemas/RetentionCompute" + data_source: + $ref: "#/components/schemas/RetentionDataSource" + group_by: + description: Group by configuration. + items: + $ref: "#/components/schemas/RetentionGroupBy" + description: A Retention group by configuration. + type: array + name: + description: Name of the query for use in formulas. + example: "query1" + type: string + search: + $ref: "#/components/schemas/RetentionSearch" + required: + - data_source + - name + - search + - compute + type: object FormulaAndFunctionSLODataSource: description: Data source for SLO measures queries. enum: @@ -3361,6 +3540,31 @@ components: - METRIC - MONITOR - TIME_SLICE + FormulaAndFunctionUserJourneyQueryDefinition: + description: A formula and functions User Journey query for defining funnel, timeseries, and scalar visualizations over journey data. + properties: + compute: + $ref: "#/components/schemas/UserJourneyFormulaCompute" + data_source: + $ref: "#/components/schemas/ProductAnalyticsFunnelDataSource" + group_by: + description: Group by configuration. + items: + $ref: "#/components/schemas/UserJourneyFormulaGroupBy" + description: A User Journey group by configuration. + type: array + name: + description: Name of the query for use in formulas. + example: "query1" + type: string + search: + $ref: "#/components/schemas/UserJourneySearch" + required: + - data_source + - name + - search + - compute + type: object FormulaType: description: Set the sort type to formula. enum: ["formula"] @@ -3400,6 +3604,61 @@ components: type: string x-enum-varnames: - FREE_TEXT + FunnelComparisonCustomTimeframe: + additionalProperties: false + description: Custom timeframe for funnel comparison. + properties: + from: + description: Start of the custom timeframe. + example: 0.0 + format: double + type: number + to: + description: End of the custom timeframe. + example: 0.0 + format: double + type: number + required: + - from + - to + type: object + FunnelComparisonDuration: + additionalProperties: false + description: Comparison time configuration for funnel widgets. + properties: + custom_timeframe: + $ref: "#/components/schemas/FunnelComparisonCustomTimeframe" + type: + $ref: "#/components/schemas/FunnelComparisonDurationType" + required: + - type + type: object + FunnelComparisonDurationType: + description: Type of comparison duration. + enum: + - previous_timeframe + - custom_timeframe + - previous_day + - previous_week + - previous_month + example: previous_timeframe + type: string + x-enum-varnames: + - PREVIOUS_TIMEFRAME + - CUSTOM_TIMEFRAME + - PREVIOUS_DAY + - PREVIOUS_WEEK + - PREVIOUS_MONTH + FunnelGroupedDisplay: + description: Display mode for grouped funnel results. + enum: + - stacked + - side_by_side + example: stacked + type: string + x-enum-varnames: + - STACKED + - SIDE_BY_SIDE FunnelQuery: description: Updated funnel widget. properties: @@ -3458,12 +3717,13 @@ components: description: description: The description of the widget. type: string + grouped_display: + $ref: "#/components/schemas/FunnelGroupedDisplay" requests: description: Request payload used to query items. example: [{"query": {"data_source": "rum", "query_string": "@browser.name:Chrome", "steps": [{"facet": "@view.name", "value": "/logs"}, {"facet": "@view.name", "value": "/apm/home"}]}, "request_type": "funnel"}] items: $ref: "#/components/schemas/FunnelWidgetRequest" - maxItems: 1 minItems: 1 type: array time: @@ -11221,193 +11481,804 @@ components: description: The query string for the user subquery. type: string type: object - QuerySortOrder: - default: desc - description: Direction of sort. + ProductAnalyticsBaseQuery: + $ref: "#/components/schemas/ProductAnalyticsEventQuery" + description: Base query for Product Analytics. + ProductAnalyticsEventDataSource: + description: Data source for Product Analytics event queries. enum: - - asc - - desc + - product_analytics + example: product_analytics type: string x-enum-varnames: - - ASC - - DESC - QueryValueWidgetDefinition: - description: Query values display the current value of a given metric, APM, or log query. + - PRODUCT_ANALYTICS + ProductAnalyticsEventQuery: + additionalProperties: false + description: Product Analytics event query. properties: - autoscale: - description: Whether to use auto-scaling or not. - type: boolean - custom_links: - description: List of custom links. - items: - $ref: "#/components/schemas/WidgetCustomLink" - type: array - custom_unit: - description: Display a unit of your choice on the widget. + data_source: + $ref: "#/components/schemas/ProductAnalyticsEventDataSource" + search: + $ref: "#/components/schemas/ProductAnalyticsEventQuerySearch" + required: + - data_source + - search + type: object + ProductAnalyticsEventQuerySearch: + additionalProperties: false + description: Search configuration for Product Analytics event query. + properties: + query: + description: RUM event search query used to filter views or actions. + example: "@type:view @view.name:/home" type: string - description: - description: The description of the widget. + required: + - query + type: object + ProductAnalyticsExtendedCompute: + additionalProperties: false + description: Compute configuration for Product Analytics Extended queries. + properties: + aggregation: + $ref: "#/components/schemas/FormulaAndFunctionEventAggregation" + interval: + description: Fixed-width time bucket interval in milliseconds for time series queries. Mutually exclusive with `rollup`. + example: 60000 + format: double + type: number + metric: + description: Measurable attribute to compute. + example: "@usr.id" type: string - precision: - description: Number of decimals to show. If not defined, the widget uses the raw value. - format: int64 - type: integer - requests: - description: Widget definition. - example: ["q/apm_query/log_query": "{}"] - items: - $ref: "#/components/schemas/QueryValueWidgetRequest" - maxItems: 1 - minItems: 1 - type: array - text_align: - $ref: "#/components/schemas/WidgetTextAlign" - time: - $ref: "#/components/schemas/WidgetTime" - timeseries_background: - $ref: "#/components/schemas/TimeseriesBackground" - title: - description: Title of your widget. + name: + description: Name of the compute for use in formulas. + example: "query1" type: string - title_align: - $ref: "#/components/schemas/WidgetTextAlign" - title_size: - description: Size of the title. + rollup: + $ref: "#/components/schemas/CalendarInterval" + description: Calendar-aligned time bucket for time series queries (for example, day, week, or month boundaries). Mutually exclusive with `interval`. + required: + - aggregation + type: object + ProductAnalyticsExtendedGroupBy: + description: Group by configuration for Product Analytics Extended queries. + properties: + facet: + description: Facet name to group by. + example: "@geo.country" type: string - type: - $ref: "#/components/schemas/QueryValueWidgetDefinitionType" + limit: + description: Maximum number of groups to return. + example: 10 + format: int32 + maximum: 10000 + type: integer + should_exclude_missing: + description: Whether to exclude events missing the group-by facet. + type: boolean + sort: + $ref: "#/components/schemas/FormulaAndFunctionEventQueryGroupBySort" + required: + - facet + type: object + ProductAnalyticsFunnelCompute: + additionalProperties: false + description: Compute configuration for user journey funnel. + properties: + aggregation: + $ref: "#/components/schemas/ProductAnalyticsFunnelComputeAggregation" + metric: + $ref: "#/components/schemas/ProductAnalyticsFunnelComputeMetric" + required: + - aggregation + - metric + type: object + ProductAnalyticsFunnelComputeAggregation: + description: Aggregation type for user journey funnel compute. + enum: + - cardinality + - count + example: count + type: string + x-enum-varnames: + - CARDINALITY + - COUNT + ProductAnalyticsFunnelComputeMetric: + description: Metric for user journey funnel compute. `__dd.conversion` and `__dd.conversion_rate` accept `count` (unique users/sessions) and `cardinality` (total users/sessions) as aggregations. + enum: + - __dd.conversion + - __dd.conversion_rate + example: __dd.conversion_rate + type: string + x-enum-varnames: + - CONVERSION + - CONVERSION_RATE + ProductAnalyticsFunnelDataSource: + description: Data source for user journey funnel queries. + enum: + - product_analytics_journey + example: product_analytics_journey + type: string + x-enum-varnames: + - PRODUCT_ANALYTICS_JOURNEY + ProductAnalyticsFunnelGroupBy: + description: Group by configuration for user journey funnel. + properties: + facet: + description: Facet to group by. + example: "@usr.email" + type: string + limit: + description: Maximum number of groups. + format: int64 + type: integer + should_exclude_missing: + description: Whether to exclude missing values. + type: boolean + sort: + $ref: "#/components/schemas/ProductAnalyticsFunnelGroupBySort" + target: + $ref: "#/components/schemas/UserJourneySearchTarget" + required: + - facet + type: object + ProductAnalyticsFunnelGroupBySort: + additionalProperties: false + description: Sort configuration for user journey funnel group by. + properties: + aggregation: + description: Aggregation type. + example: "count" + type: string + metric: + description: Metric to sort by. + example: "@session.id" + type: string + order: + $ref: "#/components/schemas/WidgetSort" + required: + - aggregation + type: object + ProductAnalyticsFunnelQuery: + additionalProperties: false + description: User journey funnel query definition. + properties: + compute: + $ref: "#/components/schemas/ProductAnalyticsFunnelCompute" + data_source: + $ref: "#/components/schemas/ProductAnalyticsFunnelDataSource" + group_by: + description: Group by configuration. + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelGroupBy" + description: A user journey funnel group by configuration. + type: array + search: + $ref: "#/components/schemas/UserJourneySearch" + subquery_id: + description: Subquery ID. + type: string + required: + - data_source + - search + type: object + ProductAnalyticsFunnelRequest: + additionalProperties: false + description: User journey funnel widget request. + properties: + comparison_segments: + description: Comparison segments. + items: + description: Segment identifier. + minLength: 1 + type: string + minItems: 1 + type: array + comparison_time: + $ref: "#/components/schemas/FunnelComparisonDuration" + query: + $ref: "#/components/schemas/ProductAnalyticsFunnelQuery" + request_type: + $ref: "#/components/schemas/ProductAnalyticsFunnelRequestType" + required: + - query + - request_type + type: object + ProductAnalyticsFunnelRequestType: + description: Request type for user journey funnel widget. + enum: + - user_journey_funnel + example: user_journey_funnel + type: string + x-enum-varnames: + - USER_JOURNEY_FUNNEL + ProductAnalyticsFunnelWidgetDefinition: + additionalProperties: false + description: The user journey funnel visualization displays conversion funnels based on user journey data from Product Analytics. + properties: + description: + description: The description of the widget. + type: string + grouped_display: + $ref: "#/components/schemas/FunnelGroupedDisplay" + requests: + description: Request payload used to query items. + example: + - query: + compute: + aggregation: cardinality + metric: __dd.conversion + data_source: product_analytics_journey + search: + expression: "step1 -> step2" + filters: + string_filter: "@application.id:xxx @geo.country:France" + node_objects: + step1: + data_source: product_analytics + search: + query: "@type:view @view.name:/home" + step2: + data_source: product_analytics + search: + query: '@type:action @action.name:"add to cart"' + request_type: user_journey_funnel + items: + $ref: "#/components/schemas/ProductAnalyticsFunnelRequest" + description: A user journey funnel widget request. + minItems: 1 + type: array + time: + $ref: "#/components/schemas/WidgetTime" + title: + description: The title of the widget. + type: string + title_align: + $ref: "#/components/schemas/WidgetTextAlign" + title_size: + description: The size of the title. + type: string + type: + $ref: "#/components/schemas/FunnelWidgetDefinitionType" + required: + - type + - requests + type: object + QuerySortOrder: + default: desc + description: Direction of sort. + enum: + - asc + - desc + type: string + x-enum-varnames: + - ASC + - DESC + QueryValueWidgetDefinition: + description: Query values display the current value of a given metric, APM, or log query. + properties: + autoscale: + description: Whether to use auto-scaling or not. + type: boolean + custom_links: + description: List of custom links. + items: + $ref: "#/components/schemas/WidgetCustomLink" + type: array + custom_unit: + description: Display a unit of your choice on the widget. + type: string + description: + description: The description of the widget. + type: string + precision: + description: Number of decimals to show. If not defined, the widget uses the raw value. + format: int64 + type: integer + requests: + description: Widget definition. + example: ["q/apm_query/log_query": "{}"] + items: + $ref: "#/components/schemas/QueryValueWidgetRequest" + maxItems: 1 + minItems: 1 + type: array + text_align: + $ref: "#/components/schemas/WidgetTextAlign" + time: + $ref: "#/components/schemas/WidgetTime" + timeseries_background: + $ref: "#/components/schemas/TimeseriesBackground" + title: + description: Title of your widget. + type: string + title_align: + $ref: "#/components/schemas/WidgetTextAlign" + title_size: + description: Size of the title. + type: string + type: + $ref: "#/components/schemas/QueryValueWidgetDefinitionType" + required: + - type + - requests + type: object + QueryValueWidgetDefinitionType: + default: query_value + description: Type of the query value widget. + enum: + - query_value + example: query_value + type: string + x-enum-varnames: + - QUERY_VALUE + QueryValueWidgetRequest: + description: Updated query value widget. + properties: + aggregator: + $ref: "#/components/schemas/WidgetAggregator" + apm_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + audit_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + conditional_formats: + description: List of conditional formats. + items: + $ref: "#/components/schemas/WidgetConditionalFormat" + type: array + event_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + formulas: + description: List of formulas that operate on queries. + items: + $ref: "#/components/schemas/WidgetFormula" + type: array + log_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + network_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + process_query: + $ref: "#/components/schemas/ProcessQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + profile_metrics_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + q: + deprecated: true + description: Widget query. Deprecated - Use `queries` and `formulas` instead. + type: string + queries: + description: List of queries that can be returned directly or used in formulas. + items: + $ref: "#/components/schemas/FormulaAndFunctionQueryDefinition" + type: array + response_format: + $ref: "#/components/schemas/FormulaAndFunctionResponseFormat" + rum_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + security_query: + $ref: "#/components/schemas/LogQueryDefinition" + deprecated: true + description: Deprecated - Use `queries` and `formulas` instead. + type: object + ReferenceTableLogsLookupProcessor: + description: |- + **Note**: Reference Tables are in public beta. + Use the Lookup Processor to define a mapping between a log attribute + and a human readable value saved in a Reference Table. + For example, you can use the Lookup Processor to map an internal service ID + into a human readable service name. Alternatively, you could also use it to check + if the MAC address that just attempted to connect to the production + environment belongs to your list of stolen machines. + properties: + is_enabled: + default: false + description: Whether or not the processor is enabled. + type: boolean + lookup_enrichment_table: + description: |- + Name of the Reference Table for the source attribute and their associated target attribute values. + example: "service_id_to_service_name_table" + type: string + name: + description: Name of the processor. + type: string + source: + description: Source attribute used to perform the lookup. + example: service_id + type: string + target: + description: |- + Name of the attribute that contains the corresponding value in the mapping list. + example: service + type: string + type: + $ref: "#/components/schemas/LogsLookupProcessorType" + required: + - source + - target + - lookup_enrichment_table + - type + type: object + ResourceProviderConfig: + description: Configuration settings applied to resources from the specified Azure resource provider. + properties: + metrics_enabled: + description: Collect metrics for resources from this provider. + example: true + type: boolean + namespace: + description: The provider namespace to apply this configuration to. + example: Microsoft.Compute + type: string + type: object + ResponseMetaAttributes: + description: Object describing meta attributes of response. + properties: + page: + $ref: "#/components/schemas/Pagination" + type: object + RetentionCohortCriteria: + additionalProperties: false + description: Cohort criteria for retention queries. + properties: + base_query: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + time_interval: + $ref: "#/components/schemas/RetentionCohortCriteriaTimeInterval" + required: + - base_query + - time_interval + type: object + RetentionCohortCriteriaTimeInterval: + additionalProperties: false + description: Time interval for cohort criteria. + properties: + type: + $ref: "#/components/schemas/RetentionCohortCriteriaTimeIntervalType" + value: + $ref: "#/components/schemas/CalendarInterval" + required: + - type + - value + type: object + RetentionCohortCriteriaTimeIntervalType: + description: Type of time interval for cohort criteria. + enum: + - calendar + example: calendar + type: string + x-enum-varnames: + - CALENDAR + RetentionCompute: + additionalProperties: false + description: Compute configuration for retention queries. + properties: + aggregation: + $ref: "#/components/schemas/EventsAggregation" + metric: + $ref: "#/components/schemas/RetentionComputeMetric" + required: + - aggregation + - metric + type: object + RetentionComputeMetric: + description: Metric for retention compute. + enum: + - __dd.retention + - __dd.retention_rate + example: __dd.retention_rate + type: string + x-enum-varnames: + - RETENTION + - RETENTION_RATE + RetentionCurveRequestType: + description: Request type for retention curve widget. + enum: + - retention_curve + example: retention_curve + type: string + x-enum-varnames: + - RETENTION_CURVE + RetentionCurveStyle: + additionalProperties: false + description: Style configuration for retention curve. + properties: + palette: + description: Color palette for the retention curve. + example: "dog_classic" + type: string + type: object + RetentionCurveWidgetDefinition: + additionalProperties: false + description: The retention curve widget visualizes user retention rates over time. + properties: + description: + description: The description of the widget. + type: string + requests: + description: List of Retention Curve widget requests. + example: + - query: + compute: + aggregation: count + metric: __dd.retention_rate + data_source: product_analytics_retention + search: + cohort_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:/home" + time_interval: + type: calendar + value: + type: week + retention_entity: "@usr.id" + return_condition: conversion_on_or_after + return_criteria: + base_query: + data_source: product_analytics + search: + query: "@type:view @view.name:/checkout" + request_type: retention_curve + items: + $ref: "#/components/schemas/RetentionCurveWidgetRequest" + description: A retention curve widget request. + minItems: 1 + type: array + time: + $ref: "#/components/schemas/WidgetTime" + title: + description: Title of your widget. + type: string + title_align: + $ref: "#/components/schemas/WidgetTextAlign" + title_size: + description: Size of the title. + type: string + type: + $ref: "#/components/schemas/RetentionCurveWidgetDefinitionType" + required: + - type + - requests + type: object + RetentionCurveWidgetDefinitionType: + default: retention_curve + description: Type of the Retention Curve widget. + enum: + - retention_curve + example: retention_curve + type: string + x-enum-varnames: + - RETENTION_CURVE + RetentionCurveWidgetRequest: + additionalProperties: false + description: Retention curve widget request. + properties: + query: + $ref: "#/components/schemas/RetentionQuery" + request_type: + $ref: "#/components/schemas/RetentionCurveRequestType" + style: + $ref: "#/components/schemas/RetentionCurveStyle" + required: + - request_type + - query + type: object + RetentionDataSource: + description: Data source for retention queries. + enum: + - product_analytics_retention + example: product_analytics_retention + type: string + x-enum-varnames: + - PRODUCT_ANALYTICS_RETENTION + RetentionEntity: + description: Entity to track for retention. + enum: + - "@usr.id" + - "@account.id" + example: "@usr.id" + type: string + x-enum-varnames: + - USER_ID + - ACCOUNT_ID + RetentionFilters: + additionalProperties: false + description: Filters for retention queries. + properties: + audience_filters: + $ref: "#/components/schemas/ProductAnalyticsAudienceFilters" + string_filter: + description: String filter. + example: "@session.type:user" + type: string + type: object + RetentionGridRequest: + additionalProperties: false + description: Retention grid widget request. + properties: + query: + $ref: "#/components/schemas/RetentionQuery" + request_type: + $ref: "#/components/schemas/RetentionGridRequestType" + required: + - request_type + - query + type: object + RetentionGridRequestType: + description: Request type for retention grid widget. + enum: + - retention_grid + example: retention_grid + type: string + x-enum-varnames: + - RETENTION_GRID + RetentionGroupBy: + additionalProperties: false + description: Group by configuration for retention queries. + properties: + facet: + description: Facet to group by. + example: "@geo.country" + type: string + limit: + description: Maximum number of groups. + example: 10 + format: int64 + type: integer + should_exclude_missing: + description: Whether to exclude missing values. + example: false + type: boolean + sort: + $ref: "#/components/schemas/RetentionGroupBySort" + source: + description: Source field. + example: "@geo.country" + type: string + target: + $ref: "#/components/schemas/RetentionGroupByTarget" required: - - type - - requests + - target + - facet type: object - QueryValueWidgetDefinitionType: - default: query_value - description: Type of the query value widget. + RetentionGroupBySort: + additionalProperties: false + description: Sort configuration for retention group by. + properties: + order: + $ref: "#/components/schemas/WidgetSort" + type: object + RetentionGroupByTarget: + description: Target for retention group by. enum: - - query_value - example: query_value + - cohort + - return_period + example: cohort type: string x-enum-varnames: - - QUERY_VALUE - QueryValueWidgetRequest: - description: Updated query value widget. + - COHORT + - RETURN_PERIOD + RetentionQuery: + additionalProperties: false + description: Retention query definition. properties: - aggregator: - $ref: "#/components/schemas/WidgetAggregator" - apm_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - audit_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - conditional_formats: - description: List of conditional formats. - items: - $ref: "#/components/schemas/WidgetConditionalFormat" - type: array - event_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - formulas: - description: List of formulas that operate on queries. + compute: + $ref: "#/components/schemas/RetentionCompute" + data_source: + $ref: "#/components/schemas/RetentionDataSource" + filters: + $ref: "#/components/schemas/RetentionFilters" + group_by: + description: Group by configuration. items: - $ref: "#/components/schemas/WidgetFormula" + $ref: "#/components/schemas/RetentionGroupBy" + description: A retention group by configuration. type: array - log_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - network_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - process_query: - $ref: "#/components/schemas/ProcessQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - profile_metrics_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - q: - deprecated: true - description: Widget query. Deprecated - Use `queries` and `formulas` instead. + name: + description: Name of the query. + example: "retention_query" type: string - queries: - description: List of queries that can be returned directly or used in formulas. - items: - $ref: "#/components/schemas/FormulaAndFunctionQueryDefinition" - type: array - response_format: - $ref: "#/components/schemas/FormulaAndFunctionResponseFormat" - rum_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. - security_query: - $ref: "#/components/schemas/LogQueryDefinition" - deprecated: true - description: Deprecated - Use `queries` and `formulas` instead. + search: + $ref: "#/components/schemas/RetentionSearch" + required: + - data_source + - search + - compute type: object - ReferenceTableLogsLookupProcessor: - description: |- - **Note**: Reference Tables are in public beta. - Use the Lookup Processor to define a mapping between a log attribute - and a human readable value saved in a Reference Table. - For example, you can use the Lookup Processor to map an internal service ID - into a human readable service name. Alternatively, you could also use it to check - if the MAC address that just attempted to connect to the production - environment belongs to your list of stolen machines. + RetentionReturnCondition: + description: Condition for counting user return. + enum: + - conversion_on + - conversion_on_or_after + example: conversion_on_or_after + type: string + x-enum-varnames: + - CONVERSION_ON + - CONVERSION_ON_OR_AFTER + RetentionReturnCriteria: + additionalProperties: false + description: Return criteria for retention queries. properties: - is_enabled: - default: false - description: Whether or not the processor is enabled. - type: boolean - lookup_enrichment_table: - description: |- - Name of the Reference Table for the source attribute and their associated target attribute values. - example: "service_id_to_service_name_table" - type: string - name: - description: Name of the processor. - type: string - source: - description: Source attribute used to perform the lookup. - example: service_id - type: string - target: - description: |- - Name of the attribute that contains the corresponding value in the mapping list. - example: service - type: string - type: - $ref: "#/components/schemas/LogsLookupProcessorType" + base_query: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + time_interval: + $ref: "#/components/schemas/RetentionReturnCriteriaTimeInterval" required: - - source - - target - - lookup_enrichment_table - - type + - base_query type: object - ResourceProviderConfig: - description: Configuration settings applied to resources from the specified Azure resource provider. + RetentionReturnCriteriaTimeInterval: + additionalProperties: false + description: Time interval for return criteria. properties: - metrics_enabled: - description: Collect metrics for resources from this provider. - example: true - type: boolean - namespace: - description: The provider namespace to apply this configuration to. - example: Microsoft.Compute - type: string + type: + $ref: "#/components/schemas/RetentionReturnCriteriaTimeIntervalType" + unit: + $ref: "#/components/schemas/RetentionReturnCriteriaTimeIntervalUnit" + value: + description: Value of the time interval. + example: 0.0 + format: double + type: number + required: + - type + - value + - unit type: object - ResponseMetaAttributes: - description: Object describing meta attributes of response. + RetentionReturnCriteriaTimeIntervalType: + description: Type of time interval for return criteria. + enum: + - fixed + example: fixed + type: string + x-enum-varnames: + - FIXED + RetentionReturnCriteriaTimeIntervalUnit: + description: Unit of time for retention return criteria interval. + enum: + - day + - week + - month + example: day + type: string + x-enum-varnames: + - DAY + - WEEK + - MONTH + RetentionSearch: + additionalProperties: false + description: Search configuration for retention queries. properties: - page: - $ref: "#/components/schemas/Pagination" + cohort_criteria: + $ref: "#/components/schemas/RetentionCohortCriteria" + filters: + $ref: "#/components/schemas/RetentionFilters" + retention_entity: + $ref: "#/components/schemas/RetentionEntity" + return_condition: + $ref: "#/components/schemas/RetentionReturnCondition" + return_criteria: + $ref: "#/components/schemas/RetentionReturnCriteria" + required: + - cohort_criteria + - retention_entity + - return_condition type: object RunWorkflowWidgetDefinition: description: Run workflow is widget that allows you to run a workflow from a dashboard. @@ -13133,7 +14004,7 @@ components: occurrences: $ref: "#/components/schemas/ProductAnalyticsAudienceOccurrenceFilter" query_string: - description: Query string. + description: RUM event search query used to filter views or actions. example: "@type:view" type: string source: @@ -24111,6 +24982,158 @@ components: description: Information pertaining to a user disabled for a given organization. type: string type: object + UserJourneyFormulaCompute: + additionalProperties: false + description: Compute configuration for User Journey formula queries. + properties: + aggregation: + $ref: "#/components/schemas/FormulaAndFunctionEventAggregation" + interval: + description: Time bucket interval in milliseconds for time series queries. + example: 60000 + format: double + type: number + metric: + $ref: "#/components/schemas/UserJourneyFormulaComputeMetric" + target: + $ref: "#/components/schemas/UserJourneySearchTarget" + required: + - aggregation + type: object + UserJourneyFormulaComputeMetric: + description: Metric for User Journey formula compute. `__dd.conversion` and `__dd.conversion_rate` accept `count` and `cardinality` as aggregations. `__dd.time_to_convert` accepts `avg`, `median`, `pc75`, `pc95`, `pc98`, `pc99`, `min`, and `max`. + enum: + - __dd.conversion + - __dd.conversion_rate + - __dd.time_to_convert + example: __dd.conversion_rate + type: string + x-enum-varnames: + - CONVERSION + - CONVERSION_RATE + - TIME_TO_CONVERT + UserJourneyFormulaGroupBy: + description: Group by configuration for User Journey formula queries. + properties: + facet: + description: Facet name to group by. + example: "@usr.email" + type: string + limit: + description: Maximum number of groups to return. + example: 10 + format: int32 + maximum: 10000 + type: integer + should_exclude_missing: + description: Whether to exclude events missing the group-by facet. + type: boolean + sort: + $ref: "#/components/schemas/FormulaAndFunctionEventQueryGroupBySort" + target: + $ref: "#/components/schemas/UserJourneySearchTarget" + required: + - facet + type: object + UserJourneyJoinKeys: + description: Join keys for user journey queries. + properties: + primary: + description: Primary join key. + example: "@session.id" + type: string + secondary: + description: Secondary join keys. + items: + description: A secondary join key. + type: string + type: array + required: + - primary + type: object + UserJourneySearch: + additionalProperties: false + description: User journey search configuration. + properties: + expression: + description: Expression string. + example: "node_0 -> node_1" + type: string + filters: + $ref: "#/components/schemas/UserJourneySearchFilters" + join_keys: + $ref: "#/components/schemas/UserJourneyJoinKeys" + node_objects: + additionalProperties: + $ref: "#/components/schemas/ProductAnalyticsBaseQuery" + description: Node objects mapping. + type: object + step_aliases: + additionalProperties: + type: string + description: Step aliases mapping. + type: object + required: + - node_objects + - expression + type: object + UserJourneySearchFilters: + description: Filters for user journey search. + properties: + audience_filters: + $ref: "#/components/schemas/ProductAnalyticsAudienceFilters" + graph_filters: + description: Graph filters. + items: + $ref: "#/components/schemas/UserJourneySearchGraphFilter" + description: A graph filter for user journey search. + type: array + string_filter: + description: String filter. + example: "@session.type:user" + type: string + type: object + UserJourneySearchGraphFilter: + description: Graph filter for user journey search. + properties: + name: + description: Filter name. + example: "count" + type: string + operator: + description: Filter operator. + example: "gt" + type: string + target: + $ref: "#/components/schemas/UserJourneySearchTarget" + value: + description: Filter value. + example: 1 + format: int64 + type: integer + type: object + UserJourneySearchTarget: + description: Target for user journey search. + properties: + end: + description: End value. + example: "node_1" + type: string + start: + description: Start value. + example: "node_0" + type: string + type: + description: Target type. + example: "step" + type: string + value: + description: Target value. + example: "node_0" + type: string + required: + - type + type: object UserListResponse: description: Array of Datadog users for a given organization. properties: @@ -24463,11 +25486,13 @@ components: - $ref: "#/components/schemas/BarChartWidgetDefinition" - $ref: "#/components/schemas/ChangeWidgetDefinition" - $ref: "#/components/schemas/CheckStatusWidgetDefinition" + - $ref: "#/components/schemas/CohortWidgetDefinition" - $ref: "#/components/schemas/DistributionWidgetDefinition" - $ref: "#/components/schemas/EventStreamWidgetDefinition" - $ref: "#/components/schemas/EventTimelineWidgetDefinition" - $ref: "#/components/schemas/FreeTextWidgetDefinition" - $ref: "#/components/schemas/FunnelWidgetDefinition" + - $ref: "#/components/schemas/ProductAnalyticsFunnelWidgetDefinition" - $ref: "#/components/schemas/GeomapWidgetDefinition" - $ref: "#/components/schemas/GroupWidgetDefinition" - $ref: "#/components/schemas/HeatMapWidgetDefinition" @@ -24480,6 +25505,7 @@ components: - $ref: "#/components/schemas/NoteWidgetDefinition" - $ref: "#/components/schemas/PowerpackWidgetDefinition" - $ref: "#/components/schemas/QueryValueWidgetDefinition" + - $ref: "#/components/schemas/RetentionCurveWidgetDefinition" - $ref: "#/components/schemas/RunWorkflowWidgetDefinition" - $ref: "#/components/schemas/SLOListWidgetDefinition" - $ref: "#/components/schemas/SLOWidgetDefinition" diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 68924d70079a..d6172ed5ac74 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -347,14 +347,6 @@ components: required: true schema: type: string - DashboardIDPathParameter: - description: The ID of the dashboard. - example: "abc-def-ghi" - in: path - name: dashboard_id - required: true - schema: - type: string DatasetID: description: The ID of a defined dataset. example: "0879ce27-29a1-481f-a12e-bc2a48ec9ae1" @@ -1317,14 +1309,6 @@ components: items: $ref: "#/components/schemas/SearchIssuesIncludeQueryParameterItem" type: array - SecureEmbedTokenPathParameter: - description: The share token identifying the secure embed. - example: "s3cur3t0k3n-abcdef123456" - in: path - name: token - required: true - schema: - type: string SecurityFilterID: description: The ID of the security filter. in: path @@ -46626,7 +46610,7 @@ components: $ref: "#/components/schemas/ObservabilityPipelineParseGrokProcessorRuleMatchRule" type: array source: - description: The name of the field in the log event to apply the Grok rules to. + description: The value of the source field in log events to be processed by the Grok rules. example: "message" type: string support_rules: @@ -59350,469 +59334,6 @@ components: type: string x-enum-varnames: - SECRET_RULE - SecureEmbedCreateRequest: - description: Request to create a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedCreateRequestData" - required: - - data - type: object - SecureEmbedCreateRequestAttributes: - description: Attributes for creating a secure embed shared dashboard. - properties: - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether viewers can change the time range. - example: true - type: boolean - selectable_template_vars: - description: Template variables viewers can modify. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title for the shared dashboard. - example: "Q1 Metrics Dashboard" - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - required: - - status - - title - - global_time_selectable - - selectable_template_vars - - viewing_preferences - - global_time - type: object - SecureEmbedCreateRequestData: - description: Data object for creating a secure embed. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedCreateRequestAttributes" - type: - $ref: "#/components/schemas/SecureEmbedRequestType" - required: - - type - - attributes - type: object - SecureEmbedCreateResponse: - description: Response for creating a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedCreateResponseData" - required: - - data - type: object - SecureEmbedCreateResponseAttributes: - description: Attributes of a newly created secure embed shared dashboard. - properties: - created_at: - description: Creation timestamp. - example: "2026-03-11T18:30:00.000000" - readOnly: true - type: string - credential: - description: >- - The secret credential used for HMAC signing. Returned only on creation. Store securely — it cannot be retrieved again. - example: "A1b2C3d4E5f6G7h8I9j0K1l2M3n4O5p6Q7r8S9t0U1v2" - readOnly: true - type: string - dashboard_id: - description: The source dashboard ID. - example: "abc-def-ghi" - readOnly: true - type: string - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether time range is viewer-selectable. - example: true - type: boolean - id: - description: Internal share ID. - example: "12345" - readOnly: true - type: string - selectable_template_vars: - description: Template variables with their configuration. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - share_type: - $ref: "#/components/schemas/SecureEmbedShareType" - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title. - example: "Q1 Metrics Dashboard" - type: string - token: - description: Public share token. - example: "s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - url: - description: CDN URL for the shared dashboard. - example: "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedCreateResponseData: - description: Data object for a secure embed create response. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedCreateResponseAttributes" - id: - description: Internal share ID. - example: "12345" - type: string - type: - $ref: "#/components/schemas/SecureEmbedCreateResponseType" - required: - - type - - id - - attributes - type: object - SecureEmbedCreateResponseType: - description: Resource type for secure embed create responses. - enum: - - secure_embed_create_response - example: "secure_embed_create_response" - type: string - x-enum-varnames: - - SECURE_EMBED_CREATE_RESPONSE - SecureEmbedGetResponse: - description: Response for getting a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedGetResponseData" - required: - - data - type: object - SecureEmbedGetResponseAttributes: - description: Attributes of an existing secure embed shared dashboard. - properties: - created_at: - description: Creation timestamp. - example: "2026-03-11T18:30:00.000000" - readOnly: true - type: string - credential_suffix: - description: Last 4 characters of the credential. Defaults to `0000` if unavailable. - example: "ab3f" - readOnly: true - type: string - dashboard_id: - description: The source dashboard ID. - example: "abc-def-ghi" - readOnly: true - type: string - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether time range is viewer-selectable. - example: true - type: boolean - id: - description: Internal share ID. - example: "12345" - readOnly: true - type: string - selectable_template_vars: - description: Template variables with their configuration. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - share_type: - $ref: "#/components/schemas/SecureEmbedShareType" - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title. - example: "Q1 Metrics Dashboard" - type: string - token: - description: Public share token. - example: "s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - url: - description: CDN URL for the shared dashboard. - example: "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedGetResponseData: - description: Data object for a secure embed get response. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedGetResponseAttributes" - id: - description: Internal share ID. - example: "12345" - type: string - type: - $ref: "#/components/schemas/SecureEmbedGetResponseType" - required: - - type - - id - - attributes - type: object - SecureEmbedGetResponseType: - description: Resource type for secure embed get responses. - enum: - - secure_embed_get_response - example: "secure_embed_get_response" - type: string - x-enum-varnames: - - SECURE_EMBED_GET_RESPONSE - SecureEmbedGlobalTime: - description: Default time range configuration for the secure embed. - properties: - live_span: - $ref: "#/components/schemas/SecureEmbedGlobalTimeLiveSpan" - type: object - SecureEmbedGlobalTimeLiveSpan: - description: Dashboard global time live_span selection. - enum: - - 15m - - 1h - - 4h - - 1d - - 2d - - 1w - - 1mo - - 3mo - example: "1h" - type: string - x-enum-varnames: - - PAST_FIFTEEN_MINUTES - - PAST_ONE_HOUR - - PAST_FOUR_HOURS - - PAST_ONE_DAY - - PAST_TWO_DAYS - - PAST_ONE_WEEK - - PAST_ONE_MONTH - - PAST_THREE_MONTHS - SecureEmbedRequestType: - description: Resource type for secure embed create requests. - enum: - - secure_embed_request - example: "secure_embed_request" - type: string - x-enum-varnames: - - SECURE_EMBED_REQUEST - SecureEmbedSelectableTemplateVariable: - description: A template variable that viewers can modify on the secure embed shared dashboard. - properties: - default_values: - description: Default selected values for the variable. - example: ["1"] - items: - description: A default value for the template variable. - type: string - type: array - name: - description: Name of the template variable. Usually matches the prefix unless you want a different display name. - example: "org_id" - type: string - prefix: - description: Tag prefix for the variable (e.g., `environment`, `service`). - example: "org_id" - type: string - visible_tags: - description: Restrict which tag values are visible to the viewer. - example: ["1"] - items: - description: A visible tag value for the template variable. - type: string - type: array - type: object - SecureEmbedShareType: - description: The type of share. Always `secure_embed`. - enum: - - secure_embed - example: "secure_embed" - type: string - x-enum-varnames: - - SECURE_EMBED - SecureEmbedStatus: - description: The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - enum: - - active - - paused - example: "active" - type: string - x-enum-varnames: - - ACTIVE - - PAUSED - SecureEmbedUpdateRequest: - description: Request to update a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedUpdateRequestData" - required: - - data - type: object - SecureEmbedUpdateRequestAttributes: - description: Attributes for updating a secure embed shared dashboard. All fields are optional. - properties: - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Updated time selectability. - example: true - type: boolean - selectable_template_vars: - description: Updated template variables. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Updated title. - example: "Q1 Metrics Dashboard (Updated)" - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedUpdateRequestData: - description: Data object for updating a secure embed. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedUpdateRequestAttributes" - type: - $ref: "#/components/schemas/SecureEmbedUpdateRequestType" - required: - - type - - attributes - type: object - SecureEmbedUpdateRequestType: - description: Resource type for secure embed update requests. - enum: - - secure_embed_update_request - example: "secure_embed_update_request" - type: string - x-enum-varnames: - - SECURE_EMBED_UPDATE_REQUEST - SecureEmbedUpdateResponse: - description: Response for updating a secure embed shared dashboard. - properties: - data: - $ref: "#/components/schemas/SecureEmbedUpdateResponseData" - required: - - data - type: object - SecureEmbedUpdateResponseAttributes: - description: Attributes of an updated secure embed shared dashboard. - properties: - created_at: - description: Creation timestamp. - example: "2026-03-11T18:30:00.000000" - readOnly: true - type: string - credential_suffix: - description: Last 4 characters of the credential. Defaults to `0000` if unavailable. - example: "ab3f" - readOnly: true - type: string - dashboard_id: - description: The source dashboard ID. - example: "abc-def-ghi" - readOnly: true - type: string - global_time: - $ref: "#/components/schemas/SecureEmbedGlobalTime" - global_time_selectable: - description: Whether time range is viewer-selectable. - example: true - type: boolean - id: - description: Internal share ID. - example: "12345" - readOnly: true - type: string - selectable_template_vars: - description: Template variables with their configuration. - items: - $ref: "#/components/schemas/SecureEmbedSelectableTemplateVariable" - type: array - share_type: - $ref: "#/components/schemas/SecureEmbedShareType" - status: - $ref: "#/components/schemas/SecureEmbedStatus" - title: - description: Display title. - example: "Q1 Metrics Dashboard (Updated)" - type: string - token: - description: Public share token. - example: "s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - url: - description: CDN URL for the shared dashboard. - example: "https://p.datadoghq.com/sb/secure-embed/s3cur3t0k3n-abcdef123456" - readOnly: true - type: string - viewing_preferences: - $ref: "#/components/schemas/SecureEmbedViewingPreferences" - type: object - SecureEmbedUpdateResponseData: - description: Data object for a secure embed update response. - properties: - attributes: - $ref: "#/components/schemas/SecureEmbedUpdateResponseAttributes" - id: - description: Internal share ID. - example: "12345" - type: string - type: - $ref: "#/components/schemas/SecureEmbedUpdateResponseType" - required: - - type - - id - - attributes - type: object - SecureEmbedUpdateResponseType: - description: Resource type for secure embed update responses. - enum: - - secure_embed_update_response - example: "secure_embed_update_response" - type: string - x-enum-varnames: - - SECURE_EMBED_UPDATE_RESPONSE - SecureEmbedViewingPreferences: - description: Display settings for the secure embed shared dashboard. - properties: - high_density: - description: Whether widgets are displayed in high density mode. - example: false - type: boolean - theme: - $ref: "#/components/schemas/SecureEmbedViewingPreferencesTheme" - type: object - SecureEmbedViewingPreferencesTheme: - description: The theme of the shared dashboard view. `system` follows the viewer's system default. - enum: - - system - - light - - dark - example: "system" - type: string - x-enum-varnames: - - SYSTEM - - LIGHT - - DARK SecurityEntityConfigRisks: description: Configuration risks associated with the entity properties: @@ -86744,218 +86265,6 @@ paths: tags: - Dashboard Lists x-codegen-request-body-name: body - /api/v2/dashboard/{dashboard_id}/shared/secure-embed: - post: - description: >- - Create a secure embed share for a dashboard. The response includes a one-time `credential` used for HMAC-SHA256 signing. Store it securely — it cannot be retrieved again. - operationId: CreateDashboardSecureEmbed - parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - requestBody: - content: - application/json: - examples: - json-request-body: - value: - data: - attributes: - global_time: - live_span: "1h" - global_time_selectable: true - selectable_template_vars: - - default_values: ["1"] - name: "org_id" - prefix: "org_id" - visible_tags: ["1"] - status: active - title: "Q1 Metrics Dashboard" - viewing_preferences: - high_density: false - theme: "system" - type: secure_embed_request - schema: - $ref: "#/components/schemas/SecureEmbedCreateRequest" - description: Secure embed creation request body. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/SecureEmbedCreateResponse" - description: OK - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Dashboard Not Found - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Conflict — max 1000 share URLs per dashboard exceeded - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_embed_share - summary: Create a secure embed for a dashboard - tags: - - Dashboard Secure Embed - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - dashboards_embed_share - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}: - delete: - description: >- - Delete a secure embed share for a dashboard. - operationId: DeleteDashboardSecureEmbed - parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - - $ref: "#/components/parameters/SecureEmbedTokenPathParameter" - responses: - "204": - description: No Content - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_embed_share - summary: Delete a secure embed for a dashboard - tags: - - Dashboard Secure Embed - "x-permission": - operator: OR - permissions: - - dashboards_embed_share - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: >- - Retrieve an existing secure embed configuration for a dashboard. - operationId: GetDashboardSecureEmbed - parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - - $ref: "#/components/parameters/SecureEmbedTokenPathParameter" - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/SecureEmbedGetResponse" - description: OK - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_read - summary: Get a secure embed for a dashboard - tags: - - Dashboard Secure Embed - "x-permission": - operator: OR - permissions: - - dashboards_read - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - patch: - description: >- - Partially update a secure embed configuration. All fields are optional (PATCH semantics). - operationId: UpdateDashboardSecureEmbed - parameters: - - $ref: "#/components/parameters/DashboardIDPathParameter" - - $ref: "#/components/parameters/SecureEmbedTokenPathParameter" - requestBody: - content: - application/json: - examples: - json-request-body: - value: - data: - attributes: - status: active - title: "Q1 Metrics Dashboard (Updated)" - type: secure_embed_update_request - schema: - $ref: "#/components/schemas/SecureEmbedUpdateRequest" - description: Secure embed update request body. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/SecureEmbedUpdateResponse" - description: OK - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - dashboards_embed_share - summary: Update a secure embed for a dashboard - tags: - - Dashboard Secure Embed - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - dashboards_embed_share - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/datasets: get: description: Get all datasets that have been configured for an organization. @@ -120385,11 +119694,6 @@ tags: organize, find, and share all of your dashboards with your team and organization. name: Dashboard Lists - - description: >- - Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256 signed sessions for authentication, enabling customers to embed dashboards in their own applications with server-side auth control. Unlike public dashboards (open URL) or invite dashboards (email-based access), secure embeds provide programmatic access control. - - **Requirements:** - Org setting: SharedDashboards > Embed sharing must be enabled. - AuthN: Datadog API key and application key. - Read operations require `dashboards_read` permission. - Write operations require `dashboards_embed_share` permission. - name: Dashboard Secure Embed - description: |- The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively. name: Data Deletion diff --git a/examples/v2/dashboard-secure-embed/CreateDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/CreateDashboardSecureEmbed.rb deleted file mode 100644 index a40ef019cc0c..000000000000 --- a/examples/v2/dashboard-secure-embed/CreateDashboardSecureEmbed.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Create a secure embed for a dashboard returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new - -body = DatadogAPIClient::V2::SecureEmbedCreateRequest.new({ - data: DatadogAPIClient::V2::SecureEmbedCreateRequestData.new({ - attributes: DatadogAPIClient::V2::SecureEmbedCreateRequestAttributes.new({ - global_time: DatadogAPIClient::V2::SecureEmbedGlobalTime.new({ - live_span: DatadogAPIClient::V2::SecureEmbedGlobalTimeLiveSpan::PAST_ONE_HOUR, - }), - global_time_selectable: true, - selectable_template_vars: [ - DatadogAPIClient::V2::SecureEmbedSelectableTemplateVariable.new({ - default_values: [ - "1", - ], - name: "org_id", - prefix: "org_id", - visible_tags: [ - "1", - ], - }), - ], - status: DatadogAPIClient::V2::SecureEmbedStatus::ACTIVE, - title: "Q1 Metrics Dashboard", - viewing_preferences: DatadogAPIClient::V2::SecureEmbedViewingPreferences.new({ - high_density: false, - theme: DatadogAPIClient::V2::SecureEmbedViewingPreferencesTheme::SYSTEM, - }), - }), - type: DatadogAPIClient::V2::SecureEmbedRequestType::SECURE_EMBED_REQUEST, - }), -}) -p api_instance.create_dashboard_secure_embed("dashboard_id", body) diff --git a/examples/v2/dashboard-secure-embed/DeleteDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/DeleteDashboardSecureEmbed.rb deleted file mode 100644 index bb65183e9671..000000000000 --- a/examples/v2/dashboard-secure-embed/DeleteDashboardSecureEmbed.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a secure embed for a dashboard returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new -api_instance.delete_dashboard_secure_embed("dashboard_id", "token") diff --git a/examples/v2/dashboard-secure-embed/GetDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/GetDashboardSecureEmbed.rb deleted file mode 100644 index 313636bd944f..000000000000 --- a/examples/v2/dashboard-secure-embed/GetDashboardSecureEmbed.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a secure embed for a dashboard returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new -p api_instance.get_dashboard_secure_embed("dashboard_id", "token") diff --git a/examples/v2/dashboard-secure-embed/UpdateDashboardSecureEmbed.rb b/examples/v2/dashboard-secure-embed/UpdateDashboardSecureEmbed.rb deleted file mode 100644 index 15aa31f6ae8f..000000000000 --- a/examples/v2/dashboard-secure-embed/UpdateDashboardSecureEmbed.rb +++ /dev/null @@ -1,38 +0,0 @@ -# Update a secure embed for a dashboard returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_dashboard_secure_embed".to_sym] = true -end -api_instance = DatadogAPIClient::V2::DashboardSecureEmbedAPI.new - -body = DatadogAPIClient::V2::SecureEmbedUpdateRequest.new({ - data: DatadogAPIClient::V2::SecureEmbedUpdateRequestData.new({ - attributes: DatadogAPIClient::V2::SecureEmbedUpdateRequestAttributes.new({ - global_time: DatadogAPIClient::V2::SecureEmbedGlobalTime.new({ - live_span: DatadogAPIClient::V2::SecureEmbedGlobalTimeLiveSpan::PAST_ONE_HOUR, - }), - global_time_selectable: true, - selectable_template_vars: [ - DatadogAPIClient::V2::SecureEmbedSelectableTemplateVariable.new({ - default_values: [ - "1", - ], - name: "org_id", - prefix: "org_id", - visible_tags: [ - "1", - ], - }), - ], - status: DatadogAPIClient::V2::SecureEmbedStatus::ACTIVE, - title: "Q1 Metrics Dashboard (Updated)", - viewing_preferences: DatadogAPIClient::V2::SecureEmbedViewingPreferences.new({ - high_density: false, - theme: DatadogAPIClient::V2::SecureEmbedViewingPreferencesTheme::SYSTEM, - }), - }), - type: DatadogAPIClient::V2::SecureEmbedUpdateRequestType::SECURE_EMBED_UPDATE_REQUEST, - }), -}) -p api_instance.update_dashboard_secure_embed("dashboard_id", "token", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index ec581ec55b63..54d5118a0805 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2043,23 +2043,6 @@ "dashboard_list_id" => "Integer", "body" => "DashboardListUpdateItemsRequest", }, - "v2.CreateDashboardSecureEmbed" => { - "dashboard_id" => "String", - "body" => "SecureEmbedCreateRequest", - }, - "v2.DeleteDashboardSecureEmbed" => { - "dashboard_id" => "String", - "token" => "String", - }, - "v2.GetDashboardSecureEmbed" => { - "dashboard_id" => "String", - "token" => "String", - }, - "v2.UpdateDashboardSecureEmbed" => { - "dashboard_id" => "String", - "token" => "String", - "body" => "SecureEmbedUpdateRequest", - }, "v2.CreateDataset" => { "body" => "DatasetCreateRequest", }, diff --git a/features/v2/dashboard_secure_embed.feature b/features/v2/dashboard_secure_embed.feature deleted file mode 100644 index 25cb5335e322..000000000000 --- a/features/v2/dashboard_secure_embed.feature +++ /dev/null @@ -1,99 +0,0 @@ -@endpoint(dashboard-secure-embed) @endpoint(dashboard-secure-embed-v2) @endpoint(https://api.datadoghq.com) @endpoint(https://api.datadoghq.eu) @endpoint(https://api.ddog-gov.com) @endpoint(https://api.us5.datadoghq.com) -Feature: Dashboard Secure Embed - Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256 - signed sessions for authentication, enabling customers to embed dashboards - in their own applications with server-side auth control. Unlike public - dashboards (open URL) or invite dashboards (email-based access), secure - embeds provide programmatic access control. **Requirements:** - Org - setting: SharedDashboards > Embed sharing must be enabled. - AuthN: - Datadog API key and application key. - Read operations require - `dashboards_read` permission. - Write operations require - `dashboards_embed_share` permission. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "DashboardSecureEmbed" API - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Create a secure embed for a dashboard returns "Conflict — max 1000 share URLs per dashboard exceeded" response - Given operation "CreateDashboardSecureEmbed" enabled - And new "CreateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}} - When the request is sent - Then the response status is 409 Conflict — max 1000 share URLs per dashboard exceeded - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Create a secure embed for a dashboard returns "Dashboard Not Found" response - Given operation "CreateDashboardSecureEmbed" enabled - And new "CreateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}} - When the request is sent - Then the response status is 404 Dashboard Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Create a secure embed for a dashboard returns "OK" response - Given operation "CreateDashboardSecureEmbed" enabled - And new "CreateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Delete a secure embed for a dashboard returns "No Content" response - Given operation "DeleteDashboardSecureEmbed" enabled - And new "DeleteDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Delete a secure embed for a dashboard returns "Not Found" response - Given operation "DeleteDashboardSecureEmbed" enabled - And new "DeleteDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Get a secure embed for a dashboard returns "Not Found" response - Given operation "GetDashboardSecureEmbed" enabled - And new "GetDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Get a secure embed for a dashboard returns "OK" response - Given operation "GetDashboardSecureEmbed" enabled - And new "GetDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Update a secure embed for a dashboard returns "Not Found" response - Given operation "UpdateDashboardSecureEmbed" enabled - And new "UpdateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/dashboardsnotebooks-backend - Scenario: Update a secure embed for a dashboard returns "OK" response - Given operation "UpdateDashboardSecureEmbed" enabled - And new "UpdateDashboardSecureEmbed" request - And request contains "dashboard_id" parameter from "REPLACE.ME" - And request contains "token" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}} - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 21caf3f3290a..d585c531dc03 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1500,41 +1500,6 @@ "type": "safe" } }, - "CreateDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "operationId": "DeleteDashboardSecureEmbed", - "parameters": [ - { - "name": "dashboard_id", - "source": "data.attributes.dashboard_id" - }, - { - "name": "token", - "source": "data.attributes.token" - } - ], - "type": "unsafe" - } - }, - "DeleteDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "type": "idempotent" - } - }, - "GetDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "type": "safe" - } - }, - "UpdateDashboardSecureEmbed": { - "tag": "Dashboard Secure Embed", - "undo": { - "type": "idempotent" - } - }, "GetAllDatasets": { "tag": "Datasets", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 73968a285cc2..35e54918eaa1 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -259,10 +259,6 @@ def initialize "v2.search_security_monitoring_histsignals": false, "v2.get_code_coverage_branch_summary": false, "v2.get_code_coverage_commit_summary": false, - "v2.create_dashboard_secure_embed": false, - "v2.delete_dashboard_secure_embed": false, - "v2.get_dashboard_secure_embed": false, - "v2.update_dashboard_secure_embed": false, "v2.create_dataset": false, "v2.delete_dataset": false, "v2.get_all_datasets": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index f3f09955cdab..82fcc8e70743 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -64,6 +64,8 @@ def overrides "v1.bar_chart_widget_stacked" => "BarChartWidgetStacked", "v1.bar_chart_widget_stacked_type" => "BarChartWidgetStackedType", "v1.bar_chart_widget_style" => "BarChartWidgetStyle", + "v1.calendar_interval" => "CalendarInterval", + "v1.calendar_interval_type" => "CalendarIntervalType", "v1.cancel_downtimes_by_scope_request" => "CancelDowntimesByScopeRequest", "v1.canceled_downtimes_ids" => "CanceledDowntimesIds", "v1.change_widget_definition" => "ChangeWidgetDefinition", @@ -75,6 +77,8 @@ def overrides "v1.check_can_delete_slo_response_data" => "CheckCanDeleteSLOResponseData", "v1.check_status_widget_definition" => "CheckStatusWidgetDefinition", "v1.check_status_widget_definition_type" => "CheckStatusWidgetDefinitionType", + "v1.cohort_widget_definition" => "CohortWidgetDefinition", + "v1.cohort_widget_definition_type" => "CohortWidgetDefinitionType", "v1.content_encoding" => "ContentEncoding", "v1.creator" => "Creator", "v1.dashboard" => "Dashboard", @@ -156,16 +160,25 @@ def overrides "v1.formula_and_function_metric_semantic_mode" => "FormulaAndFunctionMetricSemanticMode", "v1.formula_and_function_process_query_data_source" => "FormulaAndFunctionProcessQueryDataSource", "v1.formula_and_function_process_query_definition" => "FormulaAndFunctionProcessQueryDefinition", + "v1.formula_and_function_product_analytics_extended_data_source" => "FormulaAndFunctionProductAnalyticsExtendedDataSource", + "v1.formula_and_function_product_analytics_extended_query_definition" => "FormulaAndFunctionProductAnalyticsExtendedQueryDefinition", + "v1.formula_and_function_product_analytics_extended_query_definition_indexes_items" => "FormulaAndFunctionProductAnalyticsExtendedQueryDefinitionIndexesItems", "v1.formula_and_function_query_definition" => "FormulaAndFunctionQueryDefinition", "v1.formula_and_function_response_format" => "FormulaAndFunctionResponseFormat", + "v1.formula_and_function_retention_query_definition" => "FormulaAndFunctionRetentionQueryDefinition", "v1.formula_and_function_slo_data_source" => "FormulaAndFunctionSLODataSource", "v1.formula_and_function_slo_group_mode" => "FormulaAndFunctionSLOGroupMode", "v1.formula_and_function_slo_measure" => "FormulaAndFunctionSLOMeasure", "v1.formula_and_function_slo_query_definition" => "FormulaAndFunctionSLOQueryDefinition", "v1.formula_and_function_slo_query_type" => "FormulaAndFunctionSLOQueryType", + "v1.formula_and_function_user_journey_query_definition" => "FormulaAndFunctionUserJourneyQueryDefinition", "v1.formula_type" => "FormulaType", "v1.free_text_widget_definition" => "FreeTextWidgetDefinition", "v1.free_text_widget_definition_type" => "FreeTextWidgetDefinitionType", + "v1.funnel_comparison_custom_timeframe" => "FunnelComparisonCustomTimeframe", + "v1.funnel_comparison_duration" => "FunnelComparisonDuration", + "v1.funnel_comparison_duration_type" => "FunnelComparisonDurationType", + "v1.funnel_grouped_display" => "FunnelGroupedDisplay", "v1.funnel_query" => "FunnelQuery", "v1.funnel_request_type" => "FunnelRequestType", "v1.funnel_source" => "FunnelSource", @@ -490,6 +503,21 @@ def overrides "v1.product_analytics_audience_occurrence_filter" => "ProductAnalyticsAudienceOccurrenceFilter", "v1.product_analytics_audience_segment_subquery" => "ProductAnalyticsAudienceSegmentSubquery", "v1.product_analytics_audience_user_subquery" => "ProductAnalyticsAudienceUserSubquery", + "v1.product_analytics_base_query" => "ProductAnalyticsBaseQuery", + "v1.product_analytics_event_data_source" => "ProductAnalyticsEventDataSource", + "v1.product_analytics_event_query_search" => "ProductAnalyticsEventQuerySearch", + "v1.product_analytics_extended_compute" => "ProductAnalyticsExtendedCompute", + "v1.product_analytics_extended_group_by" => "ProductAnalyticsExtendedGroupBy", + "v1.product_analytics_funnel_compute" => "ProductAnalyticsFunnelCompute", + "v1.product_analytics_funnel_compute_aggregation" => "ProductAnalyticsFunnelComputeAggregation", + "v1.product_analytics_funnel_compute_metric" => "ProductAnalyticsFunnelComputeMetric", + "v1.product_analytics_funnel_data_source" => "ProductAnalyticsFunnelDataSource", + "v1.product_analytics_funnel_group_by" => "ProductAnalyticsFunnelGroupBy", + "v1.product_analytics_funnel_group_by_sort" => "ProductAnalyticsFunnelGroupBySort", + "v1.product_analytics_funnel_query" => "ProductAnalyticsFunnelQuery", + "v1.product_analytics_funnel_request" => "ProductAnalyticsFunnelRequest", + "v1.product_analytics_funnel_request_type" => "ProductAnalyticsFunnelRequestType", + "v1.product_analytics_funnel_widget_definition" => "ProductAnalyticsFunnelWidgetDefinition", "v1.query_sort_order" => "QuerySortOrder", "v1.query_value_widget_definition" => "QueryValueWidgetDefinition", "v1.query_value_widget_definition_type" => "QueryValueWidgetDefinitionType", @@ -497,6 +525,31 @@ def overrides "v1.reference_table_logs_lookup_processor" => "ReferenceTableLogsLookupProcessor", "v1.resource_provider_config" => "ResourceProviderConfig", "v1.response_meta_attributes" => "ResponseMetaAttributes", + "v1.retention_cohort_criteria" => "RetentionCohortCriteria", + "v1.retention_cohort_criteria_time_interval" => "RetentionCohortCriteriaTimeInterval", + "v1.retention_cohort_criteria_time_interval_type" => "RetentionCohortCriteriaTimeIntervalType", + "v1.retention_compute" => "RetentionCompute", + "v1.retention_compute_metric" => "RetentionComputeMetric", + "v1.retention_curve_request_type" => "RetentionCurveRequestType", + "v1.retention_curve_style" => "RetentionCurveStyle", + "v1.retention_curve_widget_definition" => "RetentionCurveWidgetDefinition", + "v1.retention_curve_widget_definition_type" => "RetentionCurveWidgetDefinitionType", + "v1.retention_curve_widget_request" => "RetentionCurveWidgetRequest", + "v1.retention_data_source" => "RetentionDataSource", + "v1.retention_entity" => "RetentionEntity", + "v1.retention_filters" => "RetentionFilters", + "v1.retention_grid_request" => "RetentionGridRequest", + "v1.retention_grid_request_type" => "RetentionGridRequestType", + "v1.retention_group_by" => "RetentionGroupBy", + "v1.retention_group_by_sort" => "RetentionGroupBySort", + "v1.retention_group_by_target" => "RetentionGroupByTarget", + "v1.retention_query" => "RetentionQuery", + "v1.retention_return_condition" => "RetentionReturnCondition", + "v1.retention_return_criteria" => "RetentionReturnCriteria", + "v1.retention_return_criteria_time_interval" => "RetentionReturnCriteriaTimeInterval", + "v1.retention_return_criteria_time_interval_type" => "RetentionReturnCriteriaTimeIntervalType", + "v1.retention_return_criteria_time_interval_unit" => "RetentionReturnCriteriaTimeIntervalUnit", + "v1.retention_search" => "RetentionSearch", "v1.run_workflow_widget_definition" => "RunWorkflowWidgetDefinition", "v1.run_workflow_widget_definition_type" => "RunWorkflowWidgetDefinitionType", "v1.run_workflow_widget_input" => "RunWorkflowWidgetInput", @@ -958,6 +1011,14 @@ def overrides "v1.usage_top_avg_metrics_response" => "UsageTopAvgMetricsResponse", "v1.user" => "User", "v1.user_disable_response" => "UserDisableResponse", + "v1.user_journey_formula_compute" => "UserJourneyFormulaCompute", + "v1.user_journey_formula_compute_metric" => "UserJourneyFormulaComputeMetric", + "v1.user_journey_formula_group_by" => "UserJourneyFormulaGroupBy", + "v1.user_journey_join_keys" => "UserJourneyJoinKeys", + "v1.user_journey_search" => "UserJourneySearch", + "v1.user_journey_search_filters" => "UserJourneySearchFilters", + "v1.user_journey_search_graph_filter" => "UserJourneySearchGraphFilter", + "v1.user_journey_search_target" => "UserJourneySearchTarget", "v1.user_list_response" => "UserListResponse", "v1.user_response" => "UserResponse", "v1.viewing_preferences" => "ViewingPreferences", @@ -4844,33 +4905,6 @@ def overrides "v2.secret_rule_data_attributes_match_validation_invalid_http_status_code_items" => "SecretRuleDataAttributesMatchValidationInvalidHttpStatusCodeItems", "v2.secret_rule_data_attributes_match_validation_valid_http_status_code_items" => "SecretRuleDataAttributesMatchValidationValidHttpStatusCodeItems", "v2.secret_rule_data_type" => "SecretRuleDataType", - "v2.secure_embed_create_request" => "SecureEmbedCreateRequest", - "v2.secure_embed_create_request_attributes" => "SecureEmbedCreateRequestAttributes", - "v2.secure_embed_create_request_data" => "SecureEmbedCreateRequestData", - "v2.secure_embed_create_response" => "SecureEmbedCreateResponse", - "v2.secure_embed_create_response_attributes" => "SecureEmbedCreateResponseAttributes", - "v2.secure_embed_create_response_data" => "SecureEmbedCreateResponseData", - "v2.secure_embed_create_response_type" => "SecureEmbedCreateResponseType", - "v2.secure_embed_get_response" => "SecureEmbedGetResponse", - "v2.secure_embed_get_response_attributes" => "SecureEmbedGetResponseAttributes", - "v2.secure_embed_get_response_data" => "SecureEmbedGetResponseData", - "v2.secure_embed_get_response_type" => "SecureEmbedGetResponseType", - "v2.secure_embed_global_time" => "SecureEmbedGlobalTime", - "v2.secure_embed_global_time_live_span" => "SecureEmbedGlobalTimeLiveSpan", - "v2.secure_embed_request_type" => "SecureEmbedRequestType", - "v2.secure_embed_selectable_template_variable" => "SecureEmbedSelectableTemplateVariable", - "v2.secure_embed_share_type" => "SecureEmbedShareType", - "v2.secure_embed_status" => "SecureEmbedStatus", - "v2.secure_embed_update_request" => "SecureEmbedUpdateRequest", - "v2.secure_embed_update_request_attributes" => "SecureEmbedUpdateRequestAttributes", - "v2.secure_embed_update_request_data" => "SecureEmbedUpdateRequestData", - "v2.secure_embed_update_request_type" => "SecureEmbedUpdateRequestType", - "v2.secure_embed_update_response" => "SecureEmbedUpdateResponse", - "v2.secure_embed_update_response_attributes" => "SecureEmbedUpdateResponseAttributes", - "v2.secure_embed_update_response_data" => "SecureEmbedUpdateResponseData", - "v2.secure_embed_update_response_type" => "SecureEmbedUpdateResponseType", - "v2.secure_embed_viewing_preferences" => "SecureEmbedViewingPreferences", - "v2.secure_embed_viewing_preferences_theme" => "SecureEmbedViewingPreferencesTheme", "v2.security_entity_config_risks" => "SecurityEntityConfigRisks", "v2.security_entity_metadata" => "SecurityEntityMetadata", "v2.security_entity_risk_score" => "SecurityEntityRiskScore", @@ -6072,7 +6106,6 @@ def overrides "v2.csm_coverage_analysis_api" => "CSMCoverageAnalysisAPI", "v2.csm_threats_api" => "CSMThreatsAPI", "v2.dashboard_lists_api" => "DashboardListsAPI", - "v2.dashboard_secure_embed_api" => "DashboardSecureEmbedAPI", "v2.data_deletion_api" => "DataDeletionAPI", "v2.datasets_api" => "DatasetsAPI", "v2.deployment_gates_api" => "DeploymentGatesAPI", diff --git a/lib/datadog_api_client/v1/models/calendar_interval.rb b/lib/datadog_api_client/v1/models/calendar_interval.rb new file mode 100644 index 000000000000..cff0ce047dc2 --- /dev/null +++ b/lib/datadog_api_client/v1/models/calendar_interval.rb @@ -0,0 +1,128 @@ +=begin +#Datadog API V1 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::V1 + # Calendar interval definition. + class CalendarInterval + include BaseGenericModel + + # Alignment of the interval. Valid values depend on the interval type. For `day`, use hours (for example, `1am`, `2pm`, or `14`). For `week`, use day names (for example, `monday`). For `month`, use day-of-month ordinals (for example, `1st`, `15th`). For `year` or `quarter`, use month names (for example, `january`). + attr_accessor :alignment + + # Quantity of the interval. + attr_accessor :quantity + + # Timezone for the interval. + attr_accessor :timezone + + # Type of calendar interval. + attr_reader :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'alignment' => :'alignment', + :'quantity' => :'quantity', + :'timezone' => :'timezone', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'alignment' => :'String', + :'quantity' => :'Integer', + :'timezone' => :'String', + :'type' => :'CalendarIntervalType' + } + 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::V1::CalendarInterval` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CalendarInterval`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'alignment') + self.alignment = attributes[:'alignment'] + end + + if attributes.key?(:'quantity') + self.quantity = attributes[:'quantity'] + end + + if attributes.key?(:'timezone') + self.timezone = attributes[:'timezone'] + 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 + + # 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 && + alignment == o.alignment && + quantity == o.quantity && + timezone == o.timezone && + type == o.type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [alignment, quantity, timezone, type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/calendar_interval_type.rb b/lib/datadog_api_client/v1/models/calendar_interval_type.rb new file mode 100644 index 000000000000..a0261d5d6053 --- /dev/null +++ b/lib/datadog_api_client/v1/models/calendar_interval_type.rb @@ -0,0 +1,32 @@ +=begin +#Datadog API V1 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::V1 + # Type of calendar interval. + class CalendarIntervalType + include BaseEnumModel + + DAY = "day".freeze + WEEK = "week".freeze + MONTH = "month".freeze + YEAR = "year".freeze + QUARTER = "quarter".freeze + MINUTE = "minute".freeze + HOUR = "hour".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/cohort_widget_definition.rb b/lib/datadog_api_client/v1/models/cohort_widget_definition.rb new file mode 100644 index 000000000000..59ad60097087 --- /dev/null +++ b/lib/datadog_api_client/v1/models/cohort_widget_definition.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V1 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::V1 + # The cohort widget visualizes user retention over time. + class CohortWidgetDefinition + include BaseGenericModel + + # The description of the widget. + attr_accessor :description + + # List of Cohort widget requests. + attr_reader :requests + + # Time setting for the widget. + attr_accessor :time + + # Title of your widget. + attr_accessor :title + + # How to align the text on the widget. + attr_accessor :title_align + + # Size of the title. + attr_accessor :title_size + + # Type of the Cohort widget. + attr_reader :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'requests' => :'requests', + :'time' => :'time', + :'title' => :'title', + :'title_align' => :'title_align', + :'title_size' => :'title_size', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'requests' => :'Array', + :'time' => :'WidgetTime', + :'title' => :'String', + :'title_align' => :'WidgetTextAlign', + :'title_size' => :'String', + :'type' => :'CohortWidgetDefinitionType' + } + 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::V1::CohortWidgetDefinition` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::CohortWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'requests') + if (value = attributes[:'requests']).is_a?(Array) + self.requests = value + end + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'title_align') + self.title_align = attributes[:'title_align'] + end + + if attributes.key?(:'title_size') + self.title_size = attributes[:'title_size'] + 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 @requests.nil? + return false if @requests.length < 1 + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param requests [Object] Object to be assigned + # @!visibility private + def requests=(requests) + if requests.nil? + fail ArgumentError, 'invalid value for "requests", requests cannot be nil.' + end + if requests.length < 1 + fail ArgumentError, 'invalid value for "requests", number of items must be greater than or equal to 1.' + end + @requests = requests + 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 + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + requests == o.requests && + time == o.time && + title == o.title && + title_align == o.title_align && + title_size == o.title_size && + type == o.type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, requests, time, title, title_align, title_size, type].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_share_type.rb b/lib/datadog_api_client/v1/models/cohort_widget_definition_type.rb similarity index 75% rename from lib/datadog_api_client/v2/models/secure_embed_share_type.rb rename to lib/datadog_api_client/v1/models/cohort_widget_definition_type.rb index 30403ea3d958..c7b85c3aec64 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_share_type.rb +++ b/lib/datadog_api_client/v1/models/cohort_widget_definition_type.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,11 +16,11 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # The type of share. Always `secure_embed`. - class SecureEmbedShareType +module DatadogAPIClient::V1 + # Type of the Cohort widget. + class CohortWidgetDefinitionType include BaseEnumModel - SECURE_EMBED = "secure_embed".freeze + COHORT = "cohort".freeze end end diff --git a/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_data_source.rb b/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_data_source.rb new file mode 100644 index 000000000000..fac46c4e3185 --- /dev/null +++ b/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_data_source.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Data source for Product Analytics Extended queries. + class FormulaAndFunctionProductAnalyticsExtendedDataSource + include BaseEnumModel + + PRODUCT_ANALYTICS_EXTENDED = "product_analytics_extended".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_query_definition.rb new file mode 100644 index 000000000000..0a119f99d6e2 --- /dev/null +++ b/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_query_definition.rb @@ -0,0 +1,210 @@ +=begin +#Datadog API V1 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::V1 + # A formula and functions Product Analytics Extended query for advanced analytics features. + class FormulaAndFunctionProductAnalyticsExtendedQueryDefinition + include BaseGenericModel + + # Compute configuration for Product Analytics Extended queries. + attr_reader :compute + + # Data source for Product Analytics Extended queries. + attr_reader :data_source + + # Group by configuration. + attr_accessor :group_by + + # Event indexes to query. + attr_accessor :indexes + + # Name of the query for use in formulas. + attr_reader :name + + # Product Analytics event query. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'data_source' => :'data_source', + :'group_by' => :'group_by', + :'indexes' => :'indexes', + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'ProductAnalyticsExtendedCompute', + :'data_source' => :'FormulaAndFunctionProductAnalyticsExtendedDataSource', + :'group_by' => :'Array', + :'indexes' => :'Array', + :'name' => :'String', + :'query' => :'ProductAnalyticsBaseQuery' + } + 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::V1::FormulaAndFunctionProductAnalyticsExtendedQueryDefinition` 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?(:'compute') + self.compute = attributes[:'compute'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'indexes') + if (value = attributes[:'indexes']).is_a?(Array) + self.indexes = value + end + 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 @compute.nil? + return false if @data_source.nil? + return false if @name.nil? + return false if @query.nil? + true + end + + # Custom attribute writer method with validation + # @param compute [Object] Object to be assigned + # @!visibility private + def compute=(compute) + if compute.nil? + fail ArgumentError, 'invalid value for "compute", compute cannot be nil.' + end + @compute = compute + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + 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 query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + 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 && + compute == o.compute && + data_source == o.data_source && + group_by == o.group_by && + indexes == o.indexes && + 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 + [compute, data_source, group_by, indexes, name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_request_type.rb b/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_query_definition_indexes_items.rb similarity index 72% rename from lib/datadog_api_client/v2/models/secure_embed_request_type.rb rename to lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_query_definition_indexes_items.rb index 44b09eeb8ac6..749d58974add 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_request_type.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_product_analytics_extended_query_definition_indexes_items.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,11 +16,11 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Resource type for secure embed create requests. - class SecureEmbedRequestType +module DatadogAPIClient::V1 + # Use `"*"` to query all indexes. + class FormulaAndFunctionProductAnalyticsExtendedQueryDefinitionIndexesItems include BaseEnumModel - SECURE_EMBED_REQUEST = "secure_embed_request".freeze + ALL = "*".freeze end end diff --git a/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb index 7b050225df10..97a9143e68a8 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb @@ -33,7 +33,10 @@ def openapi_one_of :'FormulaAndFunctionApmResourceStatsQueryDefinition', :'FormulaAndFunctionApmMetricsQueryDefinition', :'FormulaAndFunctionSLOQueryDefinition', - :'FormulaAndFunctionCloudCostQueryDefinition' + :'FormulaAndFunctionCloudCostQueryDefinition', + :'FormulaAndFunctionProductAnalyticsExtendedQueryDefinition', + :'FormulaAndFunctionUserJourneyQueryDefinition', + :'FormulaAndFunctionRetentionQueryDefinition' ] end # Builds the object diff --git a/lib/datadog_api_client/v1/models/formula_and_function_retention_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_retention_query_definition.rb new file mode 100644 index 000000000000..0cb4a5fe5708 --- /dev/null +++ b/lib/datadog_api_client/v1/models/formula_and_function_retention_query_definition.rb @@ -0,0 +1,198 @@ +=begin +#Datadog API V1 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::V1 + # A formula and functions Retention query for defining timeseries and scalar visualizations. + class FormulaAndFunctionRetentionQueryDefinition + include BaseGenericModel + + # Compute configuration for retention queries. + attr_reader :compute + + # Data source for retention queries. + attr_reader :data_source + + # Group by configuration. + attr_accessor :group_by + + # Name of the query for use in formulas. + attr_reader :name + + # Search configuration for retention queries. + attr_reader :search + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'data_source' => :'data_source', + :'group_by' => :'group_by', + :'name' => :'name', + :'search' => :'search' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'RetentionCompute', + :'data_source' => :'RetentionDataSource', + :'group_by' => :'Array', + :'name' => :'String', + :'search' => :'RetentionSearch' + } + 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::V1::FormulaAndFunctionRetentionQueryDefinition` 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?(:'compute') + self.compute = attributes[:'compute'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @compute.nil? + return false if @data_source.nil? + return false if @name.nil? + return false if @search.nil? + true + end + + # Custom attribute writer method with validation + # @param compute [Object] Object to be assigned + # @!visibility private + def compute=(compute) + if compute.nil? + fail ArgumentError, 'invalid value for "compute", compute cannot be nil.' + end + @compute = compute + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + 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 search [Object] Object to be assigned + # @!visibility private + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' + end + @search = search + 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 && + compute == o.compute && + data_source == o.data_source && + group_by == o.group_by && + name == o.name && + search == o.search && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compute, data_source, group_by, name, search, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/formula_and_function_user_journey_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_user_journey_query_definition.rb new file mode 100644 index 000000000000..a257f13b931d --- /dev/null +++ b/lib/datadog_api_client/v1/models/formula_and_function_user_journey_query_definition.rb @@ -0,0 +1,198 @@ +=begin +#Datadog API V1 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::V1 + # A formula and functions User Journey query for defining funnel, timeseries, and scalar visualizations over journey data. + class FormulaAndFunctionUserJourneyQueryDefinition + include BaseGenericModel + + # Compute configuration for User Journey formula queries. + attr_reader :compute + + # Data source for user journey funnel queries. + attr_reader :data_source + + # Group by configuration. + attr_accessor :group_by + + # Name of the query for use in formulas. + attr_reader :name + + # User journey search configuration. + attr_reader :search + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'data_source' => :'data_source', + :'group_by' => :'group_by', + :'name' => :'name', + :'search' => :'search' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'UserJourneyFormulaCompute', + :'data_source' => :'ProductAnalyticsFunnelDataSource', + :'group_by' => :'Array', + :'name' => :'String', + :'search' => :'UserJourneySearch' + } + 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::V1::FormulaAndFunctionUserJourneyQueryDefinition` 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?(:'compute') + self.compute = attributes[:'compute'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @compute.nil? + return false if @data_source.nil? + return false if @name.nil? + return false if @search.nil? + true + end + + # Custom attribute writer method with validation + # @param compute [Object] Object to be assigned + # @!visibility private + def compute=(compute) + if compute.nil? + fail ArgumentError, 'invalid value for "compute", compute cannot be nil.' + end + @compute = compute + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + 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 search [Object] Object to be assigned + # @!visibility private + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' + end + @search = search + 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 && + compute == o.compute && + data_source == o.data_source && + group_by == o.group_by && + name == o.name && + search == o.search && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compute, data_source, group_by, name, search, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response.rb b/lib/datadog_api_client/v1/models/funnel_comparison_custom_timeframe.rb similarity index 56% rename from lib/datadog_api_client/v2/models/secure_embed_create_response.rb rename to lib/datadog_api_client/v1/models/funnel_comparison_custom_timeframe.rb index a82a632bb170..aa78e622e3d3 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response.rb +++ b/lib/datadog_api_client/v1/models/funnel_comparison_custom_timeframe.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,21 +16,23 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Response for creating a secure embed shared dashboard. - class SecureEmbedCreateResponse +module DatadogAPIClient::V1 + # Custom timeframe for funnel comparison. + class FunnelComparisonCustomTimeframe include BaseGenericModel - # Data object for a secure embed create response. - attr_reader :data + # Start of the custom timeframe. + attr_reader :from - attr_accessor :additional_properties + # End of the custom timeframe. + attr_reader :to # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'data' => :'data' + :'from' => :'from', + :'to' => :'to' } end @@ -38,7 +40,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'SecureEmbedCreateResponseData' + :'from' => :'Float', + :'to' => :'Float' } end @@ -47,21 +50,23 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::FunnelComparisonCustomTimeframe` 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 + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FunnelComparisonCustomTimeframe`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end + h[k.to_sym] = v } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] end end @@ -69,38 +74,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @from.nil? + return false if @to.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param from [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def from=(from) + if from.nil? + fail ArgumentError, 'invalid value for "from", from cannot be nil.' end - @data = data + @from = from end - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash + # Custom attribute writer method with validation + # @param to [Object] Object to be assigned # @!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 + def to=(to) + if to.nil? + fail ArgumentError, 'invalid value for "to", to cannot be nil.' end - hash + @to = to end # Checks equality by comparing each attribute. @@ -109,15 +105,15 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && - additional_properties == o.additional_properties + from == o.from && + to == o.to end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [from, to].hash end end end diff --git a/lib/datadog_api_client/v1/models/funnel_comparison_duration.rb b/lib/datadog_api_client/v1/models/funnel_comparison_duration.rb new file mode 100644 index 000000000000..ffaac76c6319 --- /dev/null +++ b/lib/datadog_api_client/v1/models/funnel_comparison_duration.rb @@ -0,0 +1,108 @@ +=begin +#Datadog API V1 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::V1 + # Comparison time configuration for funnel widgets. + class FunnelComparisonDuration + include BaseGenericModel + + # Custom timeframe for funnel comparison. + attr_accessor :custom_timeframe + + # Type of comparison duration. + attr_reader :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'custom_timeframe' => :'custom_timeframe', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'custom_timeframe' => :'FunnelComparisonCustomTimeframe', + :'type' => :'FunnelComparisonDurationType' + } + 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::V1::FunnelComparisonDuration` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::FunnelComparisonDuration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'custom_timeframe') + self.custom_timeframe = attributes[:'custom_timeframe'] + 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 + + # 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 && + custom_timeframe == o.custom_timeframe && + type == o.type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [custom_timeframe, type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/funnel_comparison_duration_type.rb b/lib/datadog_api_client/v1/models/funnel_comparison_duration_type.rb new file mode 100644 index 000000000000..d410d81ff82f --- /dev/null +++ b/lib/datadog_api_client/v1/models/funnel_comparison_duration_type.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V1 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::V1 + # Type of comparison duration. + class FunnelComparisonDurationType + include BaseEnumModel + + PREVIOUS_TIMEFRAME = "previous_timeframe".freeze + CUSTOM_TIMEFRAME = "custom_timeframe".freeze + PREVIOUS_DAY = "previous_day".freeze + PREVIOUS_WEEK = "previous_week".freeze + PREVIOUS_MONTH = "previous_month".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response_type.rb b/lib/datadog_api_client/v1/models/funnel_grouped_display.rb similarity index 71% rename from lib/datadog_api_client/v2/models/secure_embed_get_response_type.rb rename to lib/datadog_api_client/v1/models/funnel_grouped_display.rb index ce2a9dcf995b..c978ebf58332 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response_type.rb +++ b/lib/datadog_api_client/v1/models/funnel_grouped_display.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,11 +16,12 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Resource type for secure embed get responses. - class SecureEmbedGetResponseType +module DatadogAPIClient::V1 + # Display mode for grouped funnel results. + class FunnelGroupedDisplay include BaseEnumModel - SECURE_EMBED_GET_RESPONSE = "secure_embed_get_response".freeze + STACKED = "stacked".freeze + SIDE_BY_SIDE = "side_by_side".freeze end end diff --git a/lib/datadog_api_client/v1/models/funnel_widget_definition.rb b/lib/datadog_api_client/v1/models/funnel_widget_definition.rb index 2fc8576119ef..766e94f2a98a 100644 --- a/lib/datadog_api_client/v1/models/funnel_widget_definition.rb +++ b/lib/datadog_api_client/v1/models/funnel_widget_definition.rb @@ -24,6 +24,9 @@ class FunnelWidgetDefinition # The description of the widget. attr_accessor :description + # Display mode for grouped funnel results. + attr_accessor :grouped_display + # Request payload used to query items. attr_reader :requests @@ -49,6 +52,7 @@ class FunnelWidgetDefinition def self.attribute_map { :'description' => :'description', + :'grouped_display' => :'grouped_display', :'requests' => :'requests', :'time' => :'time', :'title' => :'title', @@ -63,6 +67,7 @@ def self.attribute_map def self.openapi_types { :'description' => :'String', + :'grouped_display' => :'FunnelGroupedDisplay', :'requests' => :'Array', :'time' => :'WidgetTime', :'title' => :'String', @@ -94,6 +99,10 @@ def initialize(attributes = {}) self.description = attributes[:'description'] end + if attributes.key?(:'grouped_display') + self.grouped_display = attributes[:'grouped_display'] + end + if attributes.key?(:'requests') if (value = attributes[:'requests']).is_a?(Array) self.requests = value @@ -126,7 +135,6 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @requests.nil? - return false if @requests.length > 1 return false if @requests.length < 1 return false if @type.nil? true @@ -139,9 +147,6 @@ def requests=(requests) if requests.nil? fail ArgumentError, 'invalid value for "requests", requests cannot be nil.' end - if requests.length > 1 - fail ArgumentError, 'invalid value for "requests", number of items must be less than or equal to 1.' - end if requests.length < 1 fail ArgumentError, 'invalid value for "requests", number of items must be greater than or equal to 1.' end @@ -185,6 +190,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && description == o.description && + grouped_display == o.grouped_display && requests == o.requests && time == o.time && title == o.title && @@ -198,7 +204,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [description, requests, time, title, title_align, title_size, type, additional_properties].hash + [description, grouped_display, requests, time, title, title_align, title_size, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response.rb b/lib/datadog_api_client/v1/models/product_analytics_base_query.rb similarity index 54% rename from lib/datadog_api_client/v2/models/secure_embed_update_response.rb rename to lib/datadog_api_client/v1/models/product_analytics_base_query.rb index a39fd4c047a0..d63a2606d0eb 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response.rb +++ b/lib/datadog_api_client/v1/models/product_analytics_base_query.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,21 +16,23 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Response for updating a secure embed shared dashboard. - class SecureEmbedUpdateResponse +module DatadogAPIClient::V1 + # Product Analytics event query. + class ProductAnalyticsBaseQuery include BaseGenericModel - # Data object for a secure embed update response. - attr_reader :data + # Data source for Product Analytics event queries. + attr_reader :data_source - attr_accessor :additional_properties + # Search configuration for Product Analytics event query. + attr_reader :search # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'data' => :'data' + :'data_source' => :'data_source', + :'search' => :'search' } end @@ -38,7 +40,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'SecureEmbedUpdateResponseData' + :'data_source' => :'ProductAnalyticsEventDataSource', + :'search' => :'ProductAnalyticsEventQuerySearch' } end @@ -47,21 +50,23 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsBaseQuery` 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 + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsBaseQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end + h[k.to_sym] = v } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] end end @@ -69,38 +74,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @data_source.nil? + return false if @search.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param data_source [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' end - @data = data + @data_source = data_source end - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash + # Custom attribute writer method with validation + # @param search [Object] Object to be assigned # @!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 + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' end - hash + @search = search end # Checks equality by comparing each attribute. @@ -109,15 +105,15 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && - additional_properties == o.additional_properties + data_source == o.data_source && + search == o.search end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [data_source, search].hash end end end diff --git a/lib/datadog_api_client/v1/models/product_analytics_event_data_source.rb b/lib/datadog_api_client/v1/models/product_analytics_event_data_source.rb new file mode 100644 index 000000000000..df1c653456a6 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_event_data_source.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Data source for Product Analytics event queries. + class ProductAnalyticsEventDataSource + include BaseEnumModel + + PRODUCT_ANALYTICS = "product_analytics".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_global_time.rb b/lib/datadog_api_client/v1/models/product_analytics_event_query_search.rb similarity index 54% rename from lib/datadog_api_client/v2/models/secure_embed_global_time.rb rename to lib/datadog_api_client/v1/models/product_analytics_event_query_search.rb index 99e9d36b4c63..3fa94727dad5 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_global_time.rb +++ b/lib/datadog_api_client/v1/models/product_analytics_event_query_search.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,21 +16,19 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Default time range configuration for the secure embed. - class SecureEmbedGlobalTime +module DatadogAPIClient::V1 + # Search configuration for Product Analytics event query. + class ProductAnalyticsEventQuerySearch include BaseGenericModel - # Dashboard global time live_span selection. - attr_accessor :live_span - - attr_accessor :additional_properties + # RUM event search query used to filter views or actions. + attr_reader :query # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'live_span' => :'live_span' + :'query' => :'query' } end @@ -38,7 +36,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'live_span' => :'SecureEmbedGlobalTimeLiveSpan' + :'query' => :'String' } end @@ -47,42 +45,38 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedGlobalTime` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsEventQuerySearch` 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 + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsEventQuerySearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end + h[k.to_sym] = v } - if attributes.key?(:'live_span') - self.live_span = attributes[:'live_span'] + 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 + # Check to see if the all the properties in the model are valid + # @return true if the model is valid # @!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 + def valid? + return false if @query.nil? + true + end - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' end - hash + @query = query end # Checks equality by comparing each attribute. @@ -91,15 +85,14 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - live_span == o.live_span && - additional_properties == o.additional_properties + query == o.query end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [live_span, additional_properties].hash + [query].hash end end end diff --git a/lib/datadog_api_client/v1/models/product_analytics_extended_compute.rb b/lib/datadog_api_client/v1/models/product_analytics_extended_compute.rb new file mode 100644 index 000000000000..efb7f1ccb80d --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_extended_compute.rb @@ -0,0 +1,138 @@ +=begin +#Datadog API V1 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::V1 + # Compute configuration for Product Analytics Extended queries. + class ProductAnalyticsExtendedCompute + include BaseGenericModel + + # Aggregation methods for event platform queries. + attr_reader :aggregation + + # Fixed-width time bucket interval in milliseconds for time series queries. Mutually exclusive with `rollup`. + attr_accessor :interval + + # Measurable attribute to compute. + attr_accessor :metric + + # Name of the compute for use in formulas. + attr_accessor :name + + # Calendar interval definition. + attr_accessor :rollup + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'interval' => :'interval', + :'metric' => :'metric', + :'name' => :'name', + :'rollup' => :'rollup' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregation' => :'FormulaAndFunctionEventAggregation', + :'interval' => :'Float', + :'metric' => :'String', + :'name' => :'String', + :'rollup' => :'CalendarInterval' + } + 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::V1::ProductAnalyticsExtendedCompute` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsExtendedCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'aggregation') + self.aggregation = attributes[:'aggregation'] + end + + if attributes.key?(:'interval') + self.interval = attributes[:'interval'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'rollup') + self.rollup = attributes[:'rollup'] + 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 @aggregation.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregation [Object] Object to be assigned + # @!visibility private + def aggregation=(aggregation) + if aggregation.nil? + fail ArgumentError, 'invalid value for "aggregation", aggregation cannot be nil.' + end + @aggregation = aggregation + 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 && + aggregation == o.aggregation && + interval == o.interval && + metric == o.metric && + name == o.name && + rollup == o.rollup + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregation, interval, metric, name, rollup].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response_data.rb b/lib/datadog_api_client/v1/models/product_analytics_extended_group_by.rb similarity index 59% rename from lib/datadog_api_client/v2/models/secure_embed_update_response_data.rb rename to lib/datadog_api_client/v1/models/product_analytics_extended_group_by.rb index 4d4438eab9d3..5cb5aa7a9c03 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response_data.rb +++ b/lib/datadog_api_client/v1/models/product_analytics_extended_group_by.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,19 +16,22 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Data object for a secure embed update response. - class SecureEmbedUpdateResponseData +module DatadogAPIClient::V1 + # Group by configuration for Product Analytics Extended queries. + class ProductAnalyticsExtendedGroupBy include BaseGenericModel - # Attributes of an updated secure embed shared dashboard. - attr_reader :attributes + # Facet name to group by. + attr_reader :facet - # Internal share ID. - attr_reader :id + # Maximum number of groups to return. + attr_reader :limit - # Resource type for secure embed update responses. - attr_reader :type + # Whether to exclude events missing the group-by facet. + attr_accessor :should_exclude_missing + + # Options for sorting group by results. + attr_accessor :sort attr_accessor :additional_properties @@ -36,9 +39,10 @@ class SecureEmbedUpdateResponseData # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' + :'facet' => :'facet', + :'limit' => :'limit', + :'should_exclude_missing' => :'should_exclude_missing', + :'sort' => :'sort' } end @@ -46,9 +50,10 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'SecureEmbedUpdateResponseAttributes', - :'id' => :'String', - :'type' => :'SecureEmbedUpdateResponseType' + :'facet' => :'String', + :'limit' => :'Integer', + :'should_exclude_missing' => :'Boolean', + :'sort' => :'FormulaAndFunctionEventQueryGroupBySort' } end @@ -57,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsExtendedGroupBy` initialize method" end self.additional_properties = {} @@ -70,16 +75,20 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'facet') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] + if attributes.key?(:'should_exclude_missing') + self.should_exclude_missing = attributes[:'should_exclude_missing'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] end end @@ -87,40 +96,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? + return false if @facet.nil? + return false if !@limit.nil? && @limit > 10000 true end # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned + # @param facet [Object] Object to be assigned # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' + def facet=(facet) + if facet.nil? + fail ArgumentError, 'invalid value for "facet", facet cannot be nil.' end - @id = id + @facet = facet end # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param limit [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def limit=(limit) + if !limit.nil? && limit > 10000 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 10000.' end - @type = type + @limit = limit end # Returns the object in the form of hash, with additionalProperties support. @@ -149,9 +147,10 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && + facet == o.facet && + limit == o.limit && + should_exclude_missing == o.should_exclude_missing && + sort == o.sort && additional_properties == o.additional_properties end @@ -159,7 +158,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, type, additional_properties].hash + [facet, limit, should_exclude_missing, sort, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_compute.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_compute.rb new file mode 100644 index 000000000000..54614c23b918 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_compute.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 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::V1 + # Compute configuration for user journey funnel. + class ProductAnalyticsFunnelCompute + include BaseGenericModel + + # Aggregation type for user journey funnel compute. + attr_reader :aggregation + + # Metric for user journey funnel compute. `__dd.conversion` and `__dd.conversion_rate` accept `count` (unique users/sessions) and `cardinality` (total users/sessions) as aggregations. + attr_reader :metric + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'metric' => :'metric' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregation' => :'ProductAnalyticsFunnelComputeAggregation', + :'metric' => :'ProductAnalyticsFunnelComputeMetric' + } + 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::V1::ProductAnalyticsFunnelCompute` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsFunnelCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'aggregation') + self.aggregation = attributes[:'aggregation'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + 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 @aggregation.nil? + return false if @metric.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregation [Object] Object to be assigned + # @!visibility private + def aggregation=(aggregation) + if aggregation.nil? + fail ArgumentError, 'invalid value for "aggregation", aggregation cannot be nil.' + end + @aggregation = aggregation + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + 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 && + aggregation == o.aggregation && + metric == o.metric + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregation, metric].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response_type.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_compute_aggregation.rb similarity index 69% rename from lib/datadog_api_client/v2/models/secure_embed_create_response_type.rb rename to lib/datadog_api_client/v1/models/product_analytics_funnel_compute_aggregation.rb index d5df6cfab066..5aaf7bd81e3e 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response_type.rb +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_compute_aggregation.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,11 +16,12 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Resource type for secure embed create responses. - class SecureEmbedCreateResponseType +module DatadogAPIClient::V1 + # Aggregation type for user journey funnel compute. + class ProductAnalyticsFunnelComputeAggregation include BaseEnumModel - SECURE_EMBED_CREATE_RESPONSE = "secure_embed_create_response".freeze + CARDINALITY = "cardinality".freeze + COUNT = "count".freeze end end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_compute_metric.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_compute_metric.rb new file mode 100644 index 000000000000..0912aeb5a0e2 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_compute_metric.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 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::V1 + # Metric for user journey funnel compute. `__dd.conversion` and `__dd.conversion_rate` accept `count` (unique users/sessions) and `cardinality` (total users/sessions) as aggregations. + class ProductAnalyticsFunnelComputeMetric + include BaseEnumModel + + CONVERSION = "__dd.conversion".freeze + CONVERSION_RATE = "__dd.conversion_rate".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_data_source.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_data_source.rb new file mode 100644 index 000000000000..ce91b60f479d --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_data_source.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Data source for user journey funnel queries. + class ProductAnalyticsFunnelDataSource + include BaseEnumModel + + PRODUCT_ANALYTICS_JOURNEY = "product_analytics_journey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response_data.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_group_by.rb similarity index 59% rename from lib/datadog_api_client/v2/models/secure_embed_get_response_data.rb rename to lib/datadog_api_client/v1/models/product_analytics_funnel_group_by.rb index 810c06f9be17..cc276dfd284d 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response_data.rb +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_group_by.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,19 +16,25 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Data object for a secure embed get response. - class SecureEmbedGetResponseData +module DatadogAPIClient::V1 + # Group by configuration for user journey funnel. + class ProductAnalyticsFunnelGroupBy include BaseGenericModel - # Attributes of an existing secure embed shared dashboard. - attr_reader :attributes + # Facet to group by. + attr_reader :facet - # Internal share ID. - attr_reader :id + # Maximum number of groups. + attr_accessor :limit - # Resource type for secure embed get responses. - attr_reader :type + # Whether to exclude missing values. + attr_accessor :should_exclude_missing + + # Sort configuration for user journey funnel group by. + attr_accessor :sort + + # Target for user journey search. + attr_accessor :target attr_accessor :additional_properties @@ -36,9 +42,11 @@ class SecureEmbedGetResponseData # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' + :'facet' => :'facet', + :'limit' => :'limit', + :'should_exclude_missing' => :'should_exclude_missing', + :'sort' => :'sort', + :'target' => :'target' } end @@ -46,9 +54,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'SecureEmbedGetResponseAttributes', - :'id' => :'String', - :'type' => :'SecureEmbedGetResponseType' + :'facet' => :'String', + :'limit' => :'Integer', + :'should_exclude_missing' => :'Boolean', + :'sort' => :'ProductAnalyticsFunnelGroupBySort', + :'target' => :'UserJourneySearchTarget' } end @@ -57,7 +67,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedGetResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsFunnelGroupBy` initialize method" end self.additional_properties = {} @@ -70,16 +80,24 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'facet') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] + if attributes.key?(:'should_exclude_missing') + self.should_exclude_missing = attributes[:'should_exclude_missing'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] end end @@ -87,40 +105,18 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? + return false if @facet.nil? true end # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param facet [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def facet=(facet) + if facet.nil? + fail ArgumentError, 'invalid value for "facet", facet cannot be nil.' end - @type = type + @facet = facet end # Returns the object in the form of hash, with additionalProperties support. @@ -149,9 +145,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && + facet == o.facet && + limit == o.limit && + should_exclude_missing == o.should_exclude_missing && + sort == o.sort && + target == o.target && additional_properties == o.additional_properties end @@ -159,7 +157,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, type, additional_properties].hash + [facet, limit, should_exclude_missing, sort, target, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_group_by_sort.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_group_by_sort.rb new file mode 100644 index 000000000000..53e3870d4447 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_group_by_sort.rb @@ -0,0 +1,118 @@ +=begin +#Datadog API V1 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::V1 + # Sort configuration for user journey funnel group by. + class ProductAnalyticsFunnelGroupBySort + include BaseGenericModel + + # Aggregation type. + attr_reader :aggregation + + # Metric to sort by. + attr_accessor :metric + + # Widget sorting methods. + attr_accessor :order + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'metric' => :'metric', + :'order' => :'order' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregation' => :'String', + :'metric' => :'String', + :'order' => :'WidgetSort' + } + 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::V1::ProductAnalyticsFunnelGroupBySort` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsFunnelGroupBySort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'aggregation') + self.aggregation = attributes[:'aggregation'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'order') + self.order = attributes[:'order'] + 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 @aggregation.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregation [Object] Object to be assigned + # @!visibility private + def aggregation=(aggregation) + if aggregation.nil? + fail ArgumentError, 'invalid value for "aggregation", aggregation cannot be nil.' + end + @aggregation = aggregation + 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 && + aggregation == o.aggregation && + metric == o.metric && + order == o.order + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregation, metric, order].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_query.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_query.rb new file mode 100644 index 000000000000..8632bded0114 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_query.rb @@ -0,0 +1,151 @@ +=begin +#Datadog API V1 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::V1 + # User journey funnel query definition. + class ProductAnalyticsFunnelQuery + include BaseGenericModel + + # Compute configuration for user journey funnel. + attr_accessor :compute + + # Data source for user journey funnel queries. + attr_reader :data_source + + # Group by configuration. + attr_accessor :group_by + + # User journey search configuration. + attr_reader :search + + # Subquery ID. + attr_accessor :subquery_id + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'data_source' => :'data_source', + :'group_by' => :'group_by', + :'search' => :'search', + :'subquery_id' => :'subquery_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'ProductAnalyticsFunnelCompute', + :'data_source' => :'ProductAnalyticsFunnelDataSource', + :'group_by' => :'Array', + :'search' => :'UserJourneySearch', + :'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::V1::ProductAnalyticsFunnelQuery` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsFunnelQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'compute') + self.compute = attributes[:'compute'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'subquery_id') + self.subquery_id = attributes[:'subquery_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 @data_source.nil? + return false if @search.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param search [Object] Object to be assigned + # @!visibility private + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' + end + @search = search + 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 && + compute == o.compute && + data_source == o.data_source && + group_by == o.group_by && + search == o.search && + subquery_id == o.subquery_id + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compute, data_source, group_by, search, subquery_id].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_request.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_request.rb new file mode 100644 index 000000000000..fae5c899944d --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_request.rb @@ -0,0 +1,152 @@ +=begin +#Datadog API V1 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::V1 + # User journey funnel widget request. + class ProductAnalyticsFunnelRequest + include BaseGenericModel + + # Comparison segments. + attr_reader :comparison_segments + + # Comparison time configuration for funnel widgets. + attr_accessor :comparison_time + + # User journey funnel query definition. + attr_reader :query + + # Request type for user journey funnel widget. + attr_reader :request_type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'comparison_segments' => :'comparison_segments', + :'comparison_time' => :'comparison_time', + :'query' => :'query', + :'request_type' => :'request_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'comparison_segments' => :'Array', + :'comparison_time' => :'FunnelComparisonDuration', + :'query' => :'ProductAnalyticsFunnelQuery', + :'request_type' => :'ProductAnalyticsFunnelRequestType' + } + 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::V1::ProductAnalyticsFunnelRequest` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsFunnelRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comparison_segments') + if (value = attributes[:'comparison_segments']).is_a?(Array) + self.comparison_segments = value + end + end + + if attributes.key?(:'comparison_time') + self.comparison_time = attributes[:'comparison_time'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'request_type') + self.request_type = attributes[:'request_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 !@comparison_segments.nil? && @comparison_segments.length < 1 + return false if @query.nil? + return false if @request_type.nil? + true + end + + # Custom attribute writer method with validation + # @param comparison_segments [Object] Object to be assigned + # @!visibility private + def comparison_segments=(comparison_segments) + if !comparison_segments.nil? && comparison_segments.length < 1 + fail ArgumentError, 'invalid value for "comparison_segments", number of items must be greater than or equal to 1.' + end + @comparison_segments = comparison_segments + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Custom attribute writer method with validation + # @param request_type [Object] Object to be assigned + # @!visibility private + def request_type=(request_type) + if request_type.nil? + fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' + end + @request_type = request_type + 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 && + comparison_segments == o.comparison_segments && + comparison_time == o.comparison_time && + query == o.query && + request_type == o.request_type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [comparison_segments, comparison_time, query, request_type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_request_type.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_request_type.rb new file mode 100644 index 000000000000..971767f37687 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_request_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Request type for user journey funnel widget. + class ProductAnalyticsFunnelRequestType + include BaseEnumModel + + USER_JOURNEY_FUNNEL = "user_journey_funnel".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_funnel_widget_definition.rb b/lib/datadog_api_client/v1/models/product_analytics_funnel_widget_definition.rb new file mode 100644 index 000000000000..98e0f5fc5e1c --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_funnel_widget_definition.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V1 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::V1 + # The user journey funnel visualization displays conversion funnels based on user journey data from Product Analytics. + class ProductAnalyticsFunnelWidgetDefinition + include BaseGenericModel + + # The description of the widget. + attr_accessor :description + + # Display mode for grouped funnel results. + attr_accessor :grouped_display + + # Request payload used to query items. + attr_reader :requests + + # Time setting for the widget. + attr_accessor :time + + # The title of the widget. + attr_accessor :title + + # How to align the text on the widget. + attr_accessor :title_align + + # The size of the title. + attr_accessor :title_size + + # Type of funnel widget. + attr_reader :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'grouped_display' => :'grouped_display', + :'requests' => :'requests', + :'time' => :'time', + :'title' => :'title', + :'title_align' => :'title_align', + :'title_size' => :'title_size', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'grouped_display' => :'FunnelGroupedDisplay', + :'requests' => :'Array', + :'time' => :'WidgetTime', + :'title' => :'String', + :'title_align' => :'WidgetTextAlign', + :'title_size' => :'String', + :'type' => :'FunnelWidgetDefinitionType' + } + 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::V1::ProductAnalyticsFunnelWidgetDefinition` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::ProductAnalyticsFunnelWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'grouped_display') + self.grouped_display = attributes[:'grouped_display'] + end + + if attributes.key?(:'requests') + if (value = attributes[:'requests']).is_a?(Array) + self.requests = value + end + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'title_align') + self.title_align = attributes[:'title_align'] + end + + if attributes.key?(:'title_size') + self.title_size = attributes[:'title_size'] + 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 @requests.nil? + return false if @requests.length < 1 + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param requests [Object] Object to be assigned + # @!visibility private + def requests=(requests) + if requests.nil? + fail ArgumentError, 'invalid value for "requests", requests cannot be nil.' + end + if requests.length < 1 + fail ArgumentError, 'invalid value for "requests", number of items must be greater than or equal to 1.' + end + @requests = requests + 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 + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + grouped_display == o.grouped_display && + requests == o.requests && + time == o.time && + title == o.title && + title_align == o.title_align && + title_size == o.title_size && + type == o.type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, grouped_display, requests, time, title, title_align, title_size, type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_cohort_criteria.rb b/lib/datadog_api_client/v1/models/retention_cohort_criteria.rb new file mode 100644 index 000000000000..b1ec330da41c --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_cohort_criteria.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 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::V1 + # Cohort criteria for retention queries. + class RetentionCohortCriteria + include BaseGenericModel + + # Product Analytics event query. + attr_reader :base_query + + # Time interval for cohort criteria. + attr_reader :time_interval + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'base_query' => :'base_query', + :'time_interval' => :'time_interval' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'base_query' => :'ProductAnalyticsBaseQuery', + :'time_interval' => :'RetentionCohortCriteriaTimeInterval' + } + 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::V1::RetentionCohortCriteria` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionCohortCriteria`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'base_query') + self.base_query = attributes[:'base_query'] + end + + if attributes.key?(:'time_interval') + self.time_interval = attributes[:'time_interval'] + 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 @base_query.nil? + return false if @time_interval.nil? + true + end + + # Custom attribute writer method with validation + # @param base_query [Object] Object to be assigned + # @!visibility private + def base_query=(base_query) + if base_query.nil? + fail ArgumentError, 'invalid value for "base_query", base_query cannot be nil.' + end + @base_query = base_query + end + + # Custom attribute writer method with validation + # @param time_interval [Object] Object to be assigned + # @!visibility private + def time_interval=(time_interval) + if time_interval.nil? + fail ArgumentError, 'invalid value for "time_interval", time_interval cannot be nil.' + end + @time_interval = time_interval + 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 && + base_query == o.base_query && + time_interval == o.time_interval + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [base_query, time_interval].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_cohort_criteria_time_interval.rb b/lib/datadog_api_client/v1/models/retention_cohort_criteria_time_interval.rb new file mode 100644 index 000000000000..1355097ee1fc --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_cohort_criteria_time_interval.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 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::V1 + # Time interval for cohort criteria. + class RetentionCohortCriteriaTimeInterval + include BaseGenericModel + + # Type of time interval for cohort criteria. + attr_reader :type + + # Calendar interval definition. + attr_reader :value + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'type' => :'type', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'type' => :'RetentionCohortCriteriaTimeIntervalType', + :'value' => :'CalendarInterval' + } + 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::V1::RetentionCohortCriteriaTimeInterval` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionCohortCriteriaTimeInterval`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @type.nil? + return false if @value.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 + + # 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 + + # 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 && + type == o.type && + value == o.value + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [type, value].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_cohort_criteria_time_interval_type.rb b/lib/datadog_api_client/v1/models/retention_cohort_criteria_time_interval_type.rb new file mode 100644 index 000000000000..0b05eaaeaab3 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_cohort_criteria_time_interval_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Type of time interval for cohort criteria. + class RetentionCohortCriteriaTimeIntervalType + include BaseEnumModel + + CALENDAR = "calendar".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_compute.rb b/lib/datadog_api_client/v1/models/retention_compute.rb new file mode 100644 index 000000000000..89af39d056fd --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_compute.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 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::V1 + # Compute configuration for retention queries. + class RetentionCompute + include BaseGenericModel + + # The type of aggregation that can be performed on events-based queries. + attr_reader :aggregation + + # Metric for retention compute. + attr_reader :metric + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'metric' => :'metric' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregation' => :'EventsAggregation', + :'metric' => :'RetentionComputeMetric' + } + 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::V1::RetentionCompute` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'aggregation') + self.aggregation = attributes[:'aggregation'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + 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 @aggregation.nil? + return false if @metric.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregation [Object] Object to be assigned + # @!visibility private + def aggregation=(aggregation) + if aggregation.nil? + fail ArgumentError, 'invalid value for "aggregation", aggregation cannot be nil.' + end + @aggregation = aggregation + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + 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 && + aggregation == o.aggregation && + metric == o.metric + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregation, metric].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_compute_metric.rb b/lib/datadog_api_client/v1/models/retention_compute_metric.rb new file mode 100644 index 000000000000..918e4fe579d2 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_compute_metric.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 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::V1 + # Metric for retention compute. + class RetentionComputeMetric + include BaseEnumModel + + RETENTION = "__dd.retention".freeze + RETENTION_RATE = "__dd.retention_rate".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_curve_request_type.rb b/lib/datadog_api_client/v1/models/retention_curve_request_type.rb new file mode 100644 index 000000000000..18f8b8e6ee11 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_curve_request_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Request type for retention curve widget. + class RetentionCurveRequestType + include BaseEnumModel + + RETENTION_CURVE = "retention_curve".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_curve_style.rb b/lib/datadog_api_client/v1/models/retention_curve_style.rb new file mode 100644 index 000000000000..27fd2d0d045a --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_curve_style.rb @@ -0,0 +1,80 @@ +=begin +#Datadog API V1 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::V1 + # Style configuration for retention curve. + class RetentionCurveStyle + include BaseGenericModel + + # Color palette for the retention curve. + attr_accessor :palette + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'palette' => :'palette' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'palette' => :'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::V1::RetentionCurveStyle` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionCurveStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'palette') + self.palette = attributes[:'palette'] + end + 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 && + palette == o.palette + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [palette].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_curve_widget_definition.rb b/lib/datadog_api_client/v1/models/retention_curve_widget_definition.rb new file mode 100644 index 000000000000..71eb7528623c --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_curve_widget_definition.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V1 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::V1 + # The retention curve widget visualizes user retention rates over time. + class RetentionCurveWidgetDefinition + include BaseGenericModel + + # The description of the widget. + attr_accessor :description + + # List of Retention Curve widget requests. + attr_reader :requests + + # Time setting for the widget. + attr_accessor :time + + # Title of your widget. + attr_accessor :title + + # How to align the text on the widget. + attr_accessor :title_align + + # Size of the title. + attr_accessor :title_size + + # Type of the Retention Curve widget. + attr_reader :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'requests' => :'requests', + :'time' => :'time', + :'title' => :'title', + :'title_align' => :'title_align', + :'title_size' => :'title_size', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'requests' => :'Array', + :'time' => :'WidgetTime', + :'title' => :'String', + :'title_align' => :'WidgetTextAlign', + :'title_size' => :'String', + :'type' => :'RetentionCurveWidgetDefinitionType' + } + 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::V1::RetentionCurveWidgetDefinition` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionCurveWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'requests') + if (value = attributes[:'requests']).is_a?(Array) + self.requests = value + end + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'title_align') + self.title_align = attributes[:'title_align'] + end + + if attributes.key?(:'title_size') + self.title_size = attributes[:'title_size'] + 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 @requests.nil? + return false if @requests.length < 1 + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param requests [Object] Object to be assigned + # @!visibility private + def requests=(requests) + if requests.nil? + fail ArgumentError, 'invalid value for "requests", requests cannot be nil.' + end + if requests.length < 1 + fail ArgumentError, 'invalid value for "requests", number of items must be greater than or equal to 1.' + end + @requests = requests + 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 + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + requests == o.requests && + time == o.time && + title == o.title && + title_align == o.title_align && + title_size == o.title_size && + type == o.type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, requests, time, title, title_align, title_size, type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_curve_widget_definition_type.rb b/lib/datadog_api_client/v1/models/retention_curve_widget_definition_type.rb new file mode 100644 index 000000000000..acd9f5897248 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_curve_widget_definition_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Type of the Retention Curve widget. + class RetentionCurveWidgetDefinitionType + include BaseEnumModel + + RETENTION_CURVE = "retention_curve".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_curve_widget_request.rb b/lib/datadog_api_client/v1/models/retention_curve_widget_request.rb new file mode 100644 index 000000000000..a7163bb4d756 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_curve_widget_request.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V1 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::V1 + # Retention curve widget request. + class RetentionCurveWidgetRequest + include BaseGenericModel + + # Retention query definition. + attr_reader :query + + # Request type for retention curve widget. + attr_reader :request_type + + # Style configuration for retention curve. + attr_accessor :style + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query', + :'request_type' => :'request_type', + :'style' => :'style' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'RetentionQuery', + :'request_type' => :'RetentionCurveRequestType', + :'style' => :'RetentionCurveStyle' + } + 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::V1::RetentionCurveWidgetRequest` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionCurveWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'request_type') + self.request_type = attributes[:'request_type'] + end + + if attributes.key?(:'style') + self.style = attributes[:'style'] + 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 @query.nil? + return false if @request_type.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Custom attribute writer method with validation + # @param request_type [Object] Object to be assigned + # @!visibility private + def request_type=(request_type) + if request_type.nil? + fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' + end + @request_type = request_type + 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 && + request_type == o.request_type && + style == o.style + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, request_type, style].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request_type.rb b/lib/datadog_api_client/v1/models/retention_data_source.rb similarity index 71% rename from lib/datadog_api_client/v2/models/secure_embed_update_request_type.rb rename to lib/datadog_api_client/v1/models/retention_data_source.rb index 5d87a8629b22..82b70e7d7fe9 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request_type.rb +++ b/lib/datadog_api_client/v1/models/retention_data_source.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,11 +16,11 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Resource type for secure embed update requests. - class SecureEmbedUpdateRequestType +module DatadogAPIClient::V1 + # Data source for retention queries. + class RetentionDataSource include BaseEnumModel - SECURE_EMBED_UPDATE_REQUEST = "secure_embed_update_request".freeze + PRODUCT_ANALYTICS_RETENTION = "product_analytics_retention".freeze end end diff --git a/lib/datadog_api_client/v1/models/retention_entity.rb b/lib/datadog_api_client/v1/models/retention_entity.rb new file mode 100644 index 000000000000..d8d35f3c3998 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_entity.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 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::V1 + # Entity to track for retention. + class RetentionEntity + include BaseEnumModel + + USER_ID = "@usr.id".freeze + ACCOUNT_ID = "@account.id".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_filters.rb b/lib/datadog_api_client/v1/models/retention_filters.rb new file mode 100644 index 000000000000..ff5d747ce26b --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_filters.rb @@ -0,0 +1,90 @@ +=begin +#Datadog API V1 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::V1 + # Filters for retention queries. + class RetentionFilters + include BaseGenericModel + + # Product Analytics/RUM audience filters. + attr_accessor :audience_filters + + # String filter. + attr_accessor :string_filter + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'audience_filters' => :'audience_filters', + :'string_filter' => :'string_filter' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'audience_filters' => :'ProductAnalyticsAudienceFilters', + :'string_filter' => :'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::V1::RetentionFilters` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'audience_filters') + self.audience_filters = attributes[:'audience_filters'] + end + + if attributes.key?(:'string_filter') + self.string_filter = attributes[:'string_filter'] + end + 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 && + string_filter == o.string_filter + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [audience_filters, string_filter].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_grid_request.rb b/lib/datadog_api_client/v1/models/retention_grid_request.rb new file mode 100644 index 000000000000..5d693709a671 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_grid_request.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 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::V1 + # Retention grid widget request. + class RetentionGridRequest + include BaseGenericModel + + # Retention query definition. + attr_reader :query + + # Request type for retention grid widget. + attr_reader :request_type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query', + :'request_type' => :'request_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'RetentionQuery', + :'request_type' => :'RetentionGridRequestType' + } + 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::V1::RetentionGridRequest` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionGridRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'request_type') + self.request_type = attributes[:'request_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 @query.nil? + return false if @request_type.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Custom attribute writer method with validation + # @param request_type [Object] Object to be assigned + # @!visibility private + def request_type=(request_type) + if request_type.nil? + fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' + end + @request_type = request_type + 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 && + request_type == o.request_type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, request_type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_grid_request_type.rb b/lib/datadog_api_client/v1/models/retention_grid_request_type.rb new file mode 100644 index 000000000000..a62742064a9e --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_grid_request_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Request type for retention grid widget. + class RetentionGridRequestType + include BaseEnumModel + + RETENTION_GRID = "retention_grid".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_group_by.rb b/lib/datadog_api_client/v1/models/retention_group_by.rb new file mode 100644 index 000000000000..0f7cf74df609 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_group_by.rb @@ -0,0 +1,159 @@ +=begin +#Datadog API V1 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::V1 + # Group by configuration for retention queries. + class RetentionGroupBy + include BaseGenericModel + + # Facet to group by. + attr_reader :facet + + # Maximum number of groups. + attr_accessor :limit + + # Whether to exclude missing values. + attr_accessor :should_exclude_missing + + # Sort configuration for retention group by. + attr_accessor :sort + + # Source field. + attr_accessor :source + + # Target for retention group by. + attr_reader :target + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'facet' => :'facet', + :'limit' => :'limit', + :'should_exclude_missing' => :'should_exclude_missing', + :'sort' => :'sort', + :'source' => :'source', + :'target' => :'target' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'facet' => :'String', + :'limit' => :'Integer', + :'should_exclude_missing' => :'Boolean', + :'sort' => :'RetentionGroupBySort', + :'source' => :'String', + :'target' => :'RetentionGroupByTarget' + } + 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::V1::RetentionGroupBy` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'facet') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'should_exclude_missing') + self.should_exclude_missing = attributes[:'should_exclude_missing'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + 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? + return false if @target.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 + + # Custom attribute writer method with validation + # @param target [Object] Object to be assigned + # @!visibility private + def target=(target) + if target.nil? + fail ArgumentError, 'invalid value for "target", target cannot be nil.' + end + @target = target + 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 && + limit == o.limit && + should_exclude_missing == o.should_exclude_missing && + sort == o.sort && + source == o.source && + target == o.target + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [facet, limit, should_exclude_missing, sort, source, target].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_group_by_sort.rb b/lib/datadog_api_client/v1/models/retention_group_by_sort.rb new file mode 100644 index 000000000000..8f262896db43 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_group_by_sort.rb @@ -0,0 +1,80 @@ +=begin +#Datadog API V1 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::V1 + # Sort configuration for retention group by. + class RetentionGroupBySort + include BaseGenericModel + + # Widget sorting methods. + attr_accessor :order + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'order' => :'order' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'order' => :'WidgetSort' + } + 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::V1::RetentionGroupBySort` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionGroupBySort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + 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 && + order == o.order + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [order].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_group_by_target.rb b/lib/datadog_api_client/v1/models/retention_group_by_target.rb new file mode 100644 index 000000000000..2c864ea2c3b3 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_group_by_target.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 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::V1 + # Target for retention group by. + class RetentionGroupByTarget + include BaseEnumModel + + COHORT = "cohort".freeze + RETURN_PERIOD = "return_period".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_query.rb b/lib/datadog_api_client/v1/models/retention_query.rb new file mode 100644 index 000000000000..73ceafd2b6c6 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_query.rb @@ -0,0 +1,172 @@ +=begin +#Datadog API V1 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::V1 + # Retention query definition. + class RetentionQuery + include BaseGenericModel + + # Compute configuration for retention queries. + attr_reader :compute + + # Data source for retention queries. + attr_reader :data_source + + # Filters for retention queries. + attr_accessor :filters + + # Group by configuration. + attr_accessor :group_by + + # Name of the query. + attr_accessor :name + + # Search configuration for retention queries. + attr_reader :search + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'data_source' => :'data_source', + :'filters' => :'filters', + :'group_by' => :'group_by', + :'name' => :'name', + :'search' => :'search' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'RetentionCompute', + :'data_source' => :'RetentionDataSource', + :'filters' => :'RetentionFilters', + :'group_by' => :'Array', + :'name' => :'String', + :'search' => :'RetentionSearch' + } + 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::V1::RetentionQuery` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'compute') + self.compute = attributes[:'compute'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'filters') + self.filters = attributes[:'filters'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @compute.nil? + return false if @data_source.nil? + return false if @search.nil? + true + end + + # Custom attribute writer method with validation + # @param compute [Object] Object to be assigned + # @!visibility private + def compute=(compute) + if compute.nil? + fail ArgumentError, 'invalid value for "compute", compute cannot be nil.' + end + @compute = compute + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param search [Object] Object to be assigned + # @!visibility private + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' + end + @search = search + 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 && + compute == o.compute && + data_source == o.data_source && + filters == o.filters && + group_by == o.group_by && + name == o.name && + search == o.search + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compute, data_source, filters, group_by, name, search].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/retention_return_condition.rb b/lib/datadog_api_client/v1/models/retention_return_condition.rb new file mode 100644 index 000000000000..11bb62fd48fe --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_return_condition.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 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::V1 + # Condition for counting user return. + class RetentionReturnCondition + include BaseEnumModel + + CONVERSION_ON = "conversion_on".freeze + CONVERSION_ON_OR_AFTER = "conversion_on_or_after".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_return_criteria.rb b/lib/datadog_api_client/v1/models/retention_return_criteria.rb new file mode 100644 index 000000000000..b84f7eadf31f --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_return_criteria.rb @@ -0,0 +1,108 @@ +=begin +#Datadog API V1 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::V1 + # Return criteria for retention queries. + class RetentionReturnCriteria + include BaseGenericModel + + # Product Analytics event query. + attr_reader :base_query + + # Time interval for return criteria. + attr_accessor :time_interval + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'base_query' => :'base_query', + :'time_interval' => :'time_interval' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'base_query' => :'ProductAnalyticsBaseQuery', + :'time_interval' => :'RetentionReturnCriteriaTimeInterval' + } + 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::V1::RetentionReturnCriteria` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionReturnCriteria`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'base_query') + self.base_query = attributes[:'base_query'] + end + + if attributes.key?(:'time_interval') + self.time_interval = attributes[:'time_interval'] + 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 @base_query.nil? + true + end + + # Custom attribute writer method with validation + # @param base_query [Object] Object to be assigned + # @!visibility private + def base_query=(base_query) + if base_query.nil? + fail ArgumentError, 'invalid value for "base_query", base_query cannot be nil.' + end + @base_query = base_query + 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 && + base_query == o.base_query && + time_interval == o.time_interval + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [base_query, time_interval].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request_data.rb b/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval.rb similarity index 56% rename from lib/datadog_api_client/v2/models/secure_embed_update_request_data.rb rename to lib/datadog_api_client/v1/models/retention_return_criteria_time_interval.rb index f352ac2cfd03..bd212ea03bdc 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request_data.rb +++ b/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,25 +16,27 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Data object for updating a secure embed. - class SecureEmbedUpdateRequestData +module DatadogAPIClient::V1 + # Time interval for return criteria. + class RetentionReturnCriteriaTimeInterval include BaseGenericModel - # Attributes for updating a secure embed shared dashboard. All fields are optional. - attr_reader :attributes - - # Resource type for secure embed update requests. + # Type of time interval for return criteria. attr_reader :type - attr_accessor :additional_properties + # Unit of time for retention return criteria interval. + attr_reader :unit + + # Value of the time interval. + attr_reader :value # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'type' => :'type' + :'type' => :'type', + :'unit' => :'unit', + :'value' => :'value' } end @@ -42,8 +44,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'SecureEmbedUpdateRequestAttributes', - :'type' => :'SecureEmbedUpdateRequestType' + :'type' => :'RetentionReturnCriteriaTimeIntervalType', + :'unit' => :'RetentionReturnCriteriaTimeIntervalUnit', + :'value' => :'Float' } end @@ -52,47 +55,40 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateRequestData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::RetentionReturnCriteriaTimeInterval` 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 + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionReturnCriteriaTimeInterval`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end + h[k.to_sym] = v } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - if attributes.key?(:'type') self.type = attributes[:'type'] end + + if attributes.key?(:'unit') + self.unit = attributes[:'unit'] + 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 @attributes.nil? return false if @type.nil? + return false if @unit.nil? + return false if @value.nil? true end - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -103,24 +99,24 @@ def type=(type) @type = type end - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash + # Custom attribute writer method with validation + # @param unit [Object] Object to be assigned # @!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) + def unit=(unit) + if unit.nil? + fail ArgumentError, 'invalid value for "unit", unit cannot be nil.' end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value + @unit = unit + 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 - hash + @value = value end # Checks equality by comparing each attribute. @@ -129,16 +125,16 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && type == o.type && - additional_properties == o.additional_properties + unit == o.unit && + value == o.value end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash - [attributes, type, additional_properties].hash + [type, unit, value].hash end end end diff --git a/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval_type.rb b/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval_type.rb new file mode 100644 index 000000000000..384d9aec34a9 --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 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::V1 + # Type of time interval for return criteria. + class RetentionReturnCriteriaTimeIntervalType + include BaseEnumModel + + FIXED = "fixed".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval_unit.rb b/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval_unit.rb new file mode 100644 index 000000000000..1c92ea78d70d --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_return_criteria_time_interval_unit.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V1 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::V1 + # Unit of time for retention return criteria interval. + class RetentionReturnCriteriaTimeIntervalUnit + include BaseEnumModel + + DAY = "day".freeze + WEEK = "week".freeze + MONTH = "month".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/retention_search.rb b/lib/datadog_api_client/v1/models/retention_search.rb new file mode 100644 index 000000000000..c04123d3a2ed --- /dev/null +++ b/lib/datadog_api_client/v1/models/retention_search.rb @@ -0,0 +1,160 @@ +=begin +#Datadog API V1 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::V1 + # Search configuration for retention queries. + class RetentionSearch + include BaseGenericModel + + # Cohort criteria for retention queries. + attr_reader :cohort_criteria + + # Filters for retention queries. + attr_accessor :filters + + # Entity to track for retention. + attr_reader :retention_entity + + # Condition for counting user return. + attr_reader :return_condition + + # Return criteria for retention queries. + attr_accessor :return_criteria + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cohort_criteria' => :'cohort_criteria', + :'filters' => :'filters', + :'retention_entity' => :'retention_entity', + :'return_condition' => :'return_condition', + :'return_criteria' => :'return_criteria' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cohort_criteria' => :'RetentionCohortCriteria', + :'filters' => :'RetentionFilters', + :'retention_entity' => :'RetentionEntity', + :'return_condition' => :'RetentionReturnCondition', + :'return_criteria' => :'RetentionReturnCriteria' + } + 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::V1::RetentionSearch` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RetentionSearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cohort_criteria') + self.cohort_criteria = attributes[:'cohort_criteria'] + end + + if attributes.key?(:'filters') + self.filters = attributes[:'filters'] + end + + if attributes.key?(:'retention_entity') + self.retention_entity = attributes[:'retention_entity'] + end + + if attributes.key?(:'return_condition') + self.return_condition = attributes[:'return_condition'] + end + + if attributes.key?(:'return_criteria') + self.return_criteria = attributes[:'return_criteria'] + 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 @cohort_criteria.nil? + return false if @retention_entity.nil? + return false if @return_condition.nil? + true + end + + # Custom attribute writer method with validation + # @param cohort_criteria [Object] Object to be assigned + # @!visibility private + def cohort_criteria=(cohort_criteria) + if cohort_criteria.nil? + fail ArgumentError, 'invalid value for "cohort_criteria", cohort_criteria cannot be nil.' + end + @cohort_criteria = cohort_criteria + end + + # Custom attribute writer method with validation + # @param retention_entity [Object] Object to be assigned + # @!visibility private + def retention_entity=(retention_entity) + if retention_entity.nil? + fail ArgumentError, 'invalid value for "retention_entity", retention_entity cannot be nil.' + end + @retention_entity = retention_entity + end + + # Custom attribute writer method with validation + # @param return_condition [Object] Object to be assigned + # @!visibility private + def return_condition=(return_condition) + if return_condition.nil? + fail ArgumentError, 'invalid value for "return_condition", return_condition cannot be nil.' + end + @return_condition = return_condition + 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_criteria == o.cohort_criteria && + filters == o.filters && + retention_entity == o.retention_entity && + return_condition == o.return_condition && + return_criteria == o.return_criteria + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cohort_criteria, filters, retention_entity, return_condition, return_criteria].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_query.rb b/lib/datadog_api_client/v1/models/sankey_rum_query.rb index da33641462d7..09ffaf8afddd 100644 --- a/lib/datadog_api_client/v1/models/sankey_rum_query.rb +++ b/lib/datadog_api_client/v1/models/sankey_rum_query.rb @@ -42,7 +42,7 @@ class SankeyRumQuery # Filter applied to occurrence counts when building a Product Analytics audience. attr_accessor :occurrences - # Query string. + # RUM event search query used to filter views or actions. attr_reader :query_string # Source. diff --git a/lib/datadog_api_client/v1/models/user_journey_formula_compute.rb b/lib/datadog_api_client/v1/models/user_journey_formula_compute.rb new file mode 100644 index 000000000000..216058807c5a --- /dev/null +++ b/lib/datadog_api_client/v1/models/user_journey_formula_compute.rb @@ -0,0 +1,128 @@ +=begin +#Datadog API V1 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::V1 + # Compute configuration for User Journey formula queries. + class UserJourneyFormulaCompute + include BaseGenericModel + + # Aggregation methods for event platform queries. + attr_reader :aggregation + + # Time bucket interval in milliseconds for time series queries. + attr_accessor :interval + + # Metric for User Journey formula compute. `__dd.conversion` and `__dd.conversion_rate` accept `count` and `cardinality` as aggregations. `__dd.time_to_convert` accepts `avg`, `median`, `pc75`, `pc95`, `pc98`, `pc99`, `min`, and `max`. + attr_accessor :metric + + # Target for user journey search. + attr_accessor :target + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'interval' => :'interval', + :'metric' => :'metric', + :'target' => :'target' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregation' => :'FormulaAndFunctionEventAggregation', + :'interval' => :'Float', + :'metric' => :'UserJourneyFormulaComputeMetric', + :'target' => :'UserJourneySearchTarget' + } + 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::V1::UserJourneyFormulaCompute` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UserJourneyFormulaCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'aggregation') + self.aggregation = attributes[:'aggregation'] + end + + if attributes.key?(:'interval') + self.interval = attributes[:'interval'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + 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 @aggregation.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregation [Object] Object to be assigned + # @!visibility private + def aggregation=(aggregation) + if aggregation.nil? + fail ArgumentError, 'invalid value for "aggregation", aggregation cannot be nil.' + end + @aggregation = aggregation + 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 && + aggregation == o.aggregation && + interval == o.interval && + metric == o.metric && + target == o.target + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregation, interval, metric, target].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_global_time_live_span.rb b/lib/datadog_api_client/v1/models/user_journey_formula_compute_metric.rb similarity index 52% rename from lib/datadog_api_client/v2/models/secure_embed_global_time_live_span.rb rename to lib/datadog_api_client/v1/models/user_journey_formula_compute_metric.rb index bca9eb60b382..afcabbf08a2e 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_global_time_live_span.rb +++ b/lib/datadog_api_client/v1/models/user_journey_formula_compute_metric.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,18 +16,13 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Dashboard global time live_span selection. - class SecureEmbedGlobalTimeLiveSpan +module DatadogAPIClient::V1 + # Metric for User Journey formula compute. `__dd.conversion` and `__dd.conversion_rate` accept `count` and `cardinality` as aggregations. `__dd.time_to_convert` accepts `avg`, `median`, `pc75`, `pc95`, `pc98`, `pc99`, `min`, and `max`. + class UserJourneyFormulaComputeMetric include BaseEnumModel - PAST_FIFTEEN_MINUTES = "15m".freeze - PAST_ONE_HOUR = "1h".freeze - PAST_FOUR_HOURS = "4h".freeze - PAST_ONE_DAY = "1d".freeze - PAST_TWO_DAYS = "2d".freeze - PAST_ONE_WEEK = "1w".freeze - PAST_ONE_MONTH = "1mo".freeze - PAST_THREE_MONTHS = "3mo".freeze + CONVERSION = "__dd.conversion".freeze + CONVERSION_RATE = "__dd.conversion_rate".freeze + TIME_TO_CONVERT = "__dd.time_to_convert".freeze end end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response_data.rb b/lib/datadog_api_client/v1/models/user_journey_formula_group_by.rb similarity index 56% rename from lib/datadog_api_client/v2/models/secure_embed_create_response_data.rb rename to lib/datadog_api_client/v1/models/user_journey_formula_group_by.rb index b24d7f25f0e9..3010b9ed4538 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response_data.rb +++ b/lib/datadog_api_client/v1/models/user_journey_formula_group_by.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,19 +16,25 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Data object for a secure embed create response. - class SecureEmbedCreateResponseData +module DatadogAPIClient::V1 + # Group by configuration for User Journey formula queries. + class UserJourneyFormulaGroupBy include BaseGenericModel - # Attributes of a newly created secure embed shared dashboard. - attr_reader :attributes + # Facet name to group by. + attr_reader :facet - # Internal share ID. - attr_reader :id + # Maximum number of groups to return. + attr_reader :limit - # Resource type for secure embed create responses. - attr_reader :type + # Whether to exclude events missing the group-by facet. + attr_accessor :should_exclude_missing + + # Options for sorting group by results. + attr_accessor :sort + + # Target for user journey search. + attr_accessor :target attr_accessor :additional_properties @@ -36,9 +42,11 @@ class SecureEmbedCreateResponseData # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' + :'facet' => :'facet', + :'limit' => :'limit', + :'should_exclude_missing' => :'should_exclude_missing', + :'sort' => :'sort', + :'target' => :'target' } end @@ -46,9 +54,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'SecureEmbedCreateResponseAttributes', - :'id' => :'String', - :'type' => :'SecureEmbedCreateResponseType' + :'facet' => :'String', + :'limit' => :'Integer', + :'should_exclude_missing' => :'Boolean', + :'sort' => :'FormulaAndFunctionEventQueryGroupBySort', + :'target' => :'UserJourneySearchTarget' } end @@ -57,7 +67,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserJourneyFormulaGroupBy` initialize method" end self.additional_properties = {} @@ -70,16 +80,24 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'facet') + self.facet = attributes[:'facet'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'should_exclude_missing') + self.should_exclude_missing = attributes[:'should_exclude_missing'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'target') + self.target = attributes[:'target'] end end @@ -87,40 +105,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? + return false if @facet.nil? + return false if !@limit.nil? && @limit > 10000 true end # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned + # @param facet [Object] Object to be assigned # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' + def facet=(facet) + if facet.nil? + fail ArgumentError, 'invalid value for "facet", facet cannot be nil.' end - @id = id + @facet = facet end # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param limit [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def limit=(limit) + if !limit.nil? && limit > 10000 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 10000.' end - @type = type + @limit = limit end # Returns the object in the form of hash, with additionalProperties support. @@ -149,9 +156,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type && + facet == o.facet && + limit == o.limit && + should_exclude_missing == o.should_exclude_missing && + sort == o.sort && + target == o.target && additional_properties == o.additional_properties end @@ -159,7 +168,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, type, additional_properties].hash + [facet, limit, should_exclude_missing, sort, target, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response.rb b/lib/datadog_api_client/v1/models/user_journey_join_keys.rb similarity index 72% rename from lib/datadog_api_client/v2/models/secure_embed_get_response.rb rename to lib/datadog_api_client/v1/models/user_journey_join_keys.rb index 07829667bdcd..66720726622b 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response.rb +++ b/lib/datadog_api_client/v1/models/user_journey_join_keys.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,13 +16,16 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Response for getting a secure embed shared dashboard. - class SecureEmbedGetResponse +module DatadogAPIClient::V1 + # Join keys for user journey queries. + class UserJourneyJoinKeys include BaseGenericModel - # Data object for a secure embed get response. - attr_reader :data + # Primary join key. + attr_reader :primary + + # Secondary join keys. + attr_accessor :secondary attr_accessor :additional_properties @@ -30,7 +33,8 @@ class SecureEmbedGetResponse # @!visibility private def self.attribute_map { - :'data' => :'data' + :'primary' => :'primary', + :'secondary' => :'secondary' } end @@ -38,7 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'SecureEmbedGetResponseData' + :'primary' => :'String', + :'secondary' => :'Array' } end @@ -47,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedGetResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserJourneyJoinKeys` initialize method" end self.additional_properties = {} @@ -60,8 +65,14 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'primary') + self.primary = attributes[:'primary'] + end + + if attributes.key?(:'secondary') + if (value = attributes[:'secondary']).is_a?(Array) + self.secondary = value + end end end @@ -69,18 +80,18 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @primary.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param primary [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def primary=(primary) + if primary.nil? + fail ArgumentError, 'invalid value for "primary", primary cannot be nil.' end - @data = data + @primary = primary end # Returns the object in the form of hash, with additionalProperties support. @@ -109,7 +120,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && + primary == o.primary && + secondary == o.secondary && additional_properties == o.additional_properties end @@ -117,7 +129,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [primary, secondary, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/user_journey_search.rb b/lib/datadog_api_client/v1/models/user_journey_search.rb new file mode 100644 index 000000000000..49e36ccad048 --- /dev/null +++ b/lib/datadog_api_client/v1/models/user_journey_search.rb @@ -0,0 +1,149 @@ +=begin +#Datadog API V1 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::V1 + # User journey search configuration. + class UserJourneySearch + include BaseGenericModel + + # Expression string. + attr_reader :expression + + # Filters for user journey search. + attr_accessor :filters + + # Join keys for user journey queries. + attr_accessor :join_keys + + # Node objects mapping. + attr_reader :node_objects + + # Step aliases mapping. + attr_accessor :step_aliases + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'expression' => :'expression', + :'filters' => :'filters', + :'join_keys' => :'join_keys', + :'node_objects' => :'node_objects', + :'step_aliases' => :'step_aliases' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'expression' => :'String', + :'filters' => :'UserJourneySearchFilters', + :'join_keys' => :'UserJourneyJoinKeys', + :'node_objects' => :'Hash', + :'step_aliases' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserJourneySearch` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::UserJourneySearch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'expression') + self.expression = attributes[:'expression'] + end + + if attributes.key?(:'filters') + self.filters = attributes[:'filters'] + end + + if attributes.key?(:'join_keys') + self.join_keys = attributes[:'join_keys'] + end + + if attributes.key?(:'node_objects') + self.node_objects = attributes[:'node_objects'] + end + + if attributes.key?(:'step_aliases') + self.step_aliases = attributes[:'step_aliases'] + 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 @expression.nil? + return false if @node_objects.nil? + true + end + + # Custom attribute writer method with validation + # @param expression [Object] Object to be assigned + # @!visibility private + def expression=(expression) + if expression.nil? + fail ArgumentError, 'invalid value for "expression", expression cannot be nil.' + end + @expression = expression + end + + # Custom attribute writer method with validation + # @param node_objects [Object] Object to be assigned + # @!visibility private + def node_objects=(node_objects) + if node_objects.nil? + fail ArgumentError, 'invalid value for "node_objects", node_objects cannot be nil.' + end + @node_objects = node_objects + 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 && + expression == o.expression && + filters == o.filters && + join_keys == o.join_keys && + node_objects == o.node_objects && + step_aliases == o.step_aliases + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [expression, filters, join_keys, node_objects, step_aliases].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request.rb b/lib/datadog_api_client/v1/models/user_journey_search_filters.rb similarity index 66% rename from lib/datadog_api_client/v2/models/secure_embed_update_request.rb rename to lib/datadog_api_client/v1/models/user_journey_search_filters.rb index 0e8932905a59..38f65929de74 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request.rb +++ b/lib/datadog_api_client/v1/models/user_journey_search_filters.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,13 +16,19 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Request to update a secure embed shared dashboard. - class SecureEmbedUpdateRequest +module DatadogAPIClient::V1 + # Filters for user journey search. + class UserJourneySearchFilters include BaseGenericModel - # Data object for updating a secure embed. - attr_reader :data + # Product Analytics/RUM audience filters. + attr_accessor :audience_filters + + # Graph filters. + attr_accessor :graph_filters + + # String filter. + attr_accessor :string_filter attr_accessor :additional_properties @@ -30,7 +36,9 @@ class SecureEmbedUpdateRequest # @!visibility private def self.attribute_map { - :'data' => :'data' + :'audience_filters' => :'audience_filters', + :'graph_filters' => :'graph_filters', + :'string_filter' => :'string_filter' } end @@ -38,7 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'SecureEmbedUpdateRequestData' + :'audience_filters' => :'ProductAnalyticsAudienceFilters', + :'graph_filters' => :'Array', + :'string_filter' => :'String' } end @@ -47,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedUpdateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserJourneySearchFilters` initialize method" end self.additional_properties = {} @@ -60,27 +70,19 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'audience_filters') + self.audience_filters = attributes[:'audience_filters'] 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 + if attributes.key?(:'graph_filters') + if (value = attributes[:'graph_filters']).is_a?(Array) + self.graph_filters = value + end + 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.' + if attributes.key?(:'string_filter') + self.string_filter = attributes[:'string_filter'] end - @data = data end # Returns the object in the form of hash, with additionalProperties support. @@ -109,7 +111,9 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && + audience_filters == o.audience_filters && + graph_filters == o.graph_filters && + string_filter == o.string_filter && additional_properties == o.additional_properties end @@ -117,7 +121,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [audience_filters, graph_filters, string_filter, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_request.rb b/lib/datadog_api_client/v1/models/user_journey_search_graph_filter.rb similarity index 67% rename from lib/datadog_api_client/v2/models/secure_embed_create_request.rb rename to lib/datadog_api_client/v1/models/user_journey_search_graph_filter.rb index dfbcd1d6fc43..decf0bf5420e 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_create_request.rb +++ b/lib/datadog_api_client/v1/models/user_journey_search_graph_filter.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,13 +16,22 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Request to create a secure embed shared dashboard. - class SecureEmbedCreateRequest +module DatadogAPIClient::V1 + # Graph filter for user journey search. + class UserJourneySearchGraphFilter include BaseGenericModel - # Data object for creating a secure embed. - attr_reader :data + # Filter name. + attr_accessor :name + + # Filter operator. + attr_accessor :operator + + # Target for user journey search. + attr_accessor :target + + # Filter value. + attr_accessor :value attr_accessor :additional_properties @@ -30,7 +39,10 @@ class SecureEmbedCreateRequest # @!visibility private def self.attribute_map { - :'data' => :'data' + :'name' => :'name', + :'operator' => :'operator', + :'target' => :'target', + :'value' => :'value' } end @@ -38,7 +50,10 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'SecureEmbedCreateRequestData' + :'name' => :'String', + :'operator' => :'String', + :'target' => :'UserJourneySearchTarget', + :'value' => :'Integer' } end @@ -47,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserJourneySearchGraphFilter` initialize method" end self.additional_properties = {} @@ -60,27 +75,21 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'name') + self.name = attributes[:'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 @data.nil? - true - end + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + 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.' + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] end - @data = data end # Returns the object in the form of hash, with additionalProperties support. @@ -109,7 +118,10 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && + name == o.name && + operator == o.operator && + target == o.target && + value == o.value && additional_properties == o.additional_properties end @@ -117,7 +129,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [name, operator, target, value, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_request_data.rb b/lib/datadog_api_client/v1/models/user_journey_search_target.rb similarity index 74% rename from lib/datadog_api_client/v2/models/secure_embed_create_request_data.rb rename to lib/datadog_api_client/v1/models/user_journey_search_target.rb index 2477a8af2abc..9e34929ee727 100644 --- a/lib/datadog_api_client/v2/models/secure_embed_create_request_data.rb +++ b/lib/datadog_api_client/v1/models/user_journey_search_target.rb @@ -1,5 +1,5 @@ =begin -#Datadog API V2 Collection +#Datadog API V1 Collection #Collection of all Datadog Public endpoints. @@ -16,25 +16,33 @@ require 'date' require 'time' -module DatadogAPIClient::V2 - # Data object for creating a secure embed. - class SecureEmbedCreateRequestData +module DatadogAPIClient::V1 + # Target for user journey search. + class UserJourneySearchTarget include BaseGenericModel - # Attributes for creating a secure embed shared dashboard. - attr_reader :attributes + # End value. + attr_accessor :_end - # Resource type for secure embed create requests. + # Start value. + attr_accessor :start + + # Target type. attr_reader :type + # Target value. + attr_accessor :value + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'type' => :'type' + :'_end' => :'end', + :'start' => :'start', + :'type' => :'type', + :'value' => :'value' } end @@ -42,8 +50,10 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'SecureEmbedCreateRequestAttributes', - :'type' => :'SecureEmbedRequestType' + :'_end' => :'String', + :'start' => :'String', + :'type' => :'String', + :'value' => :'String' } end @@ -52,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecureEmbedCreateRequestData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UserJourneySearchTarget` initialize method" end self.additional_properties = {} @@ -65,34 +75,31 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'_end') + self._end = attributes[:'_end'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] end if attributes.key?(:'type') self.type = attributes[:'type'] 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 @attributes.nil? return false if @type.nil? true end - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -129,8 +136,10 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && + _end == o._end && + start == o.start && type == o.type && + value == o.value && additional_properties == o.additional_properties end @@ -138,7 +147,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, type, additional_properties].hash + [_end, start, type, value, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v1/models/widget_definition.rb b/lib/datadog_api_client/v1/models/widget_definition.rb index 44abec34681d..e72c14a8a531 100644 --- a/lib/datadog_api_client/v1/models/widget_definition.rb +++ b/lib/datadog_api_client/v1/models/widget_definition.rb @@ -31,11 +31,13 @@ def openapi_one_of :'BarChartWidgetDefinition', :'ChangeWidgetDefinition', :'CheckStatusWidgetDefinition', + :'CohortWidgetDefinition', :'DistributionWidgetDefinition', :'EventStreamWidgetDefinition', :'EventTimelineWidgetDefinition', :'FreeTextWidgetDefinition', :'FunnelWidgetDefinition', + :'ProductAnalyticsFunnelWidgetDefinition', :'GeomapWidgetDefinition', :'GroupWidgetDefinition', :'HeatMapWidgetDefinition', @@ -48,6 +50,7 @@ def openapi_one_of :'NoteWidgetDefinition', :'PowerpackWidgetDefinition', :'QueryValueWidgetDefinition', + :'RetentionCurveWidgetDefinition', :'RunWorkflowWidgetDefinition', :'SLOListWidgetDefinition', :'SLOWidgetDefinition', diff --git a/lib/datadog_api_client/v2/api/dashboard_secure_embed_api.rb b/lib/datadog_api_client/v2/api/dashboard_secure_embed_api.rb deleted file mode 100644 index 97f9a6225eb5..000000000000 --- a/lib/datadog_api_client/v2/api/dashboard_secure_embed_api.rb +++ /dev/null @@ -1,339 +0,0 @@ -=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 DashboardSecureEmbedAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create a secure embed for a dashboard. - # - # @see #create_dashboard_secure_embed_with_http_info - def create_dashboard_secure_embed(dashboard_id, body, opts = {}) - data, _status_code, _headers = create_dashboard_secure_embed_with_http_info(dashboard_id, body, opts) - data - end - - # Create a secure embed for a dashboard. - # - # Create a secure embed share for a dashboard. The response includes a one-time `credential` used for HMAC-SHA256 signing. Store it securely — it cannot be retrieved again. - # - # @param dashboard_id [String] The ID of the dashboard. - # @param body [SecureEmbedCreateRequest] Secure embed creation request body. - # @param opts [Hash] the optional parameters - # @return [Array<(SecureEmbedCreateResponse, Integer, Hash)>] SecureEmbedCreateResponse data, response status code and response headers - def create_dashboard_secure_embed_with_http_info(dashboard_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.create_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.create_dashboard_secure_embed" - 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 DashboardSecureEmbedAPI.create_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecureEmbedCreateResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_dashboard_secure_embed, - :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: DashboardSecureEmbedAPI#create_dashboard_secure_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a secure embed for a dashboard. - # - # @see #delete_dashboard_secure_embed_with_http_info - def delete_dashboard_secure_embed(dashboard_id, token, opts = {}) - delete_dashboard_secure_embed_with_http_info(dashboard_id, token, opts) - nil - end - - # Delete a secure embed for a dashboard. - # - # Delete a secure embed share for a dashboard. - # - # @param dashboard_id [String] The ID of the dashboard. - # @param token [String] The share token identifying the secure embed. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_dashboard_secure_embed_with_http_info(dashboard_id, token, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.delete_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.delete_dashboard_secure_embed" - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling DashboardSecureEmbedAPI.delete_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')).sub('{token}', CGI.escape(token.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_dashboard_secure_embed, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DashboardSecureEmbedAPI#delete_dashboard_secure_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a secure embed for a dashboard. - # - # @see #get_dashboard_secure_embed_with_http_info - def get_dashboard_secure_embed(dashboard_id, token, opts = {}) - data, _status_code, _headers = get_dashboard_secure_embed_with_http_info(dashboard_id, token, opts) - data - end - - # Get a secure embed for a dashboard. - # - # Retrieve an existing secure embed configuration for a dashboard. - # - # @param dashboard_id [String] The ID of the dashboard. - # @param token [String] The share token identifying the secure embed. - # @param opts [Hash] the optional parameters - # @return [Array<(SecureEmbedGetResponse, Integer, Hash)>] SecureEmbedGetResponse data, response status code and response headers - def get_dashboard_secure_embed_with_http_info(dashboard_id, token, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.get_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.get_dashboard_secure_embed" - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling DashboardSecureEmbedAPI.get_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')).sub('{token}', CGI.escape(token.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SecureEmbedGetResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_dashboard_secure_embed, - :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: DashboardSecureEmbedAPI#get_dashboard_secure_embed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update a secure embed for a dashboard. - # - # @see #update_dashboard_secure_embed_with_http_info - def update_dashboard_secure_embed(dashboard_id, token, body, opts = {}) - data, _status_code, _headers = update_dashboard_secure_embed_with_http_info(dashboard_id, token, body, opts) - data - end - - # Update a secure embed for a dashboard. - # - # Partially update a secure embed configuration. All fields are optional (PATCH semantics). - # - # @param dashboard_id [String] The ID of the dashboard. - # @param token [String] The share token identifying the secure embed. - # @param body [SecureEmbedUpdateRequest] Secure embed update request body. - # @param opts [Hash] the optional parameters - # @return [Array<(SecureEmbedUpdateResponse, Integer, Hash)>] SecureEmbedUpdateResponse data, response status code and response headers - def update_dashboard_secure_embed_with_http_info(dashboard_id, token, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_dashboard_secure_embed".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_dashboard_secure_embed") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_dashboard_secure_embed")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DashboardSecureEmbedAPI.update_dashboard_secure_embed ...' - end - # verify the required parameter 'dashboard_id' is set - if @api_client.config.client_side_validation && dashboard_id.nil? - fail ArgumentError, "Missing the required parameter 'dashboard_id' when calling DashboardSecureEmbedAPI.update_dashboard_secure_embed" - end - # verify the required parameter 'token' is set - if @api_client.config.client_side_validation && token.nil? - fail ArgumentError, "Missing the required parameter 'token' when calling DashboardSecureEmbedAPI.update_dashboard_secure_embed" - 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 DashboardSecureEmbedAPI.update_dashboard_secure_embed" - end - # resource path - local_var_path = '/api/v2/dashboard/{dashboard_id}/shared/secure-embed/{token}'.sub('{dashboard_id}', CGI.escape(dashboard_id.to_s).gsub('%2F', '/')).sub('{token}', CGI.escape(token.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecureEmbedUpdateResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_dashboard_secure_embed, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DashboardSecureEmbedAPI#update_dashboard_secure_embed\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/observability_pipeline_parse_grok_processor_rule.rb b/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb index 6a0de832c8bc..a84449bac9f0 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor_rule.rb @@ -26,7 +26,7 @@ class ObservabilityPipelineParseGrokProcessorRule # Each rule must contain a name and a valid Grok pattern. attr_reader :match_rules - # The name of the field in the log event to apply the Grok rules to. + # The value of the source field in log events to be processed by the Grok rules. attr_reader :source # A list of Grok helper rules that can be referenced by the parsing rules. diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_request_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_create_request_attributes.rb deleted file mode 100644 index 92abaaf854aa..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_request_attributes.rb +++ /dev/null @@ -1,230 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for creating a secure embed shared dashboard. - class SecureEmbedCreateRequestAttributes - include BaseGenericModel - - # Default time range configuration for the secure embed. - attr_reader :global_time - - # Whether viewers can change the time range. - attr_reader :global_time_selectable - - # Template variables viewers can modify. - attr_reader :selectable_template_vars - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_reader :status - - # Display title for the shared dashboard. - attr_reader :title - - # Display settings for the secure embed shared dashboard. - attr_reader :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'selectable_template_vars' => :'selectable_template_vars', - :'status' => :'status', - :'title' => :'title', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'selectable_template_vars' => :'Array', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - 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::SecureEmbedCreateRequestAttributes` 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?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - 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 @global_time.nil? - return false if @global_time_selectable.nil? - return false if @selectable_template_vars.nil? - return false if @status.nil? - return false if @title.nil? - return false if @viewing_preferences.nil? - true - end - - # Custom attribute writer method with validation - # @param global_time [Object] Object to be assigned - # @!visibility private - def global_time=(global_time) - if global_time.nil? - fail ArgumentError, 'invalid value for "global_time", global_time cannot be nil.' - end - @global_time = global_time - end - - # Custom attribute writer method with validation - # @param global_time_selectable [Object] Object to be assigned - # @!visibility private - def global_time_selectable=(global_time_selectable) - if global_time_selectable.nil? - fail ArgumentError, 'invalid value for "global_time_selectable", global_time_selectable cannot be nil.' - end - @global_time_selectable = global_time_selectable - end - - # Custom attribute writer method with validation - # @param selectable_template_vars [Object] Object to be assigned - # @!visibility private - def selectable_template_vars=(selectable_template_vars) - if selectable_template_vars.nil? - fail ArgumentError, 'invalid value for "selectable_template_vars", selectable_template_vars cannot be nil.' - end - @selectable_template_vars = selectable_template_vars - end - - # Custom attribute writer method with validation - # @param status [Object] Object to be assigned - # @!visibility private - def status=(status) - if status.nil? - fail ArgumentError, 'invalid value for "status", status cannot be nil.' - end - @status = status - end - - # Custom attribute writer method with validation - # @param title [Object] Object to be assigned - # @!visibility private - def title=(title) - if title.nil? - fail ArgumentError, 'invalid value for "title", title cannot be nil.' - end - @title = title - end - - # Custom attribute writer method with validation - # @param viewing_preferences [Object] Object to be assigned - # @!visibility private - def viewing_preferences=(viewing_preferences) - if viewing_preferences.nil? - fail ArgumentError, 'invalid value for "viewing_preferences", viewing_preferences cannot be nil.' - end - @viewing_preferences = viewing_preferences - 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 && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - selectable_template_vars == o.selectable_template_vars && - status == o.status && - title == o.title && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [global_time, global_time_selectable, selectable_template_vars, status, title, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_create_response_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_create_response_attributes.rb deleted file mode 100644 index 1399f486c91f..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_create_response_attributes.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of a newly created secure embed shared dashboard. - class SecureEmbedCreateResponseAttributes - include BaseGenericModel - - # Creation timestamp. - attr_accessor :created_at - - # The secret credential used for HMAC signing. Returned only on creation. Store securely — it cannot be retrieved again. - attr_accessor :credential - - # The source dashboard ID. - attr_accessor :dashboard_id - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Whether time range is viewer-selectable. - attr_accessor :global_time_selectable - - # Internal share ID. - attr_accessor :id - - # Template variables with their configuration. - attr_accessor :selectable_template_vars - - # The type of share. Always `secure_embed`. - attr_accessor :share_type - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Display title. - attr_accessor :title - - # Public share token. - attr_accessor :token - - # CDN URL for the shared dashboard. - attr_accessor :url - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_at' => :'created_at', - :'credential' => :'credential', - :'dashboard_id' => :'dashboard_id', - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'id' => :'id', - :'selectable_template_vars' => :'selectable_template_vars', - :'share_type' => :'share_type', - :'status' => :'status', - :'title' => :'title', - :'token' => :'token', - :'url' => :'url', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_at' => :'String', - :'credential' => :'String', - :'dashboard_id' => :'String', - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'id' => :'String', - :'selectable_template_vars' => :'Array', - :'share_type' => :'SecureEmbedShareType', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'token' => :'String', - :'url' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - 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::SecureEmbedCreateResponseAttributes` 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?(:'credential') - self.credential = attributes[:'credential'] - end - - if attributes.key?(:'dashboard_id') - self.dashboard_id = attributes[:'dashboard_id'] - end - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'share_type') - self.share_type = attributes[:'share_type'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'token') - self.token = attributes[:'token'] - end - - if attributes.key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_at == o.created_at && - credential == o.credential && - dashboard_id == o.dashboard_id && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - id == o.id && - selectable_template_vars == o.selectable_template_vars && - share_type == o.share_type && - status == o.status && - title == o.title && - token == o.token && - url == o.url && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_at, credential, dashboard_id, global_time, global_time_selectable, id, selectable_template_vars, share_type, status, title, token, url, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_get_response_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_get_response_attributes.rb deleted file mode 100644 index 15d85c82990b..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_get_response_attributes.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of an existing secure embed shared dashboard. - class SecureEmbedGetResponseAttributes - include BaseGenericModel - - # Creation timestamp. - attr_accessor :created_at - - # Last 4 characters of the credential. Defaults to `0000` if unavailable. - attr_accessor :credential_suffix - - # The source dashboard ID. - attr_accessor :dashboard_id - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Whether time range is viewer-selectable. - attr_accessor :global_time_selectable - - # Internal share ID. - attr_accessor :id - - # Template variables with their configuration. - attr_accessor :selectable_template_vars - - # The type of share. Always `secure_embed`. - attr_accessor :share_type - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Display title. - attr_accessor :title - - # Public share token. - attr_accessor :token - - # CDN URL for the shared dashboard. - attr_accessor :url - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_at' => :'created_at', - :'credential_suffix' => :'credential_suffix', - :'dashboard_id' => :'dashboard_id', - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'id' => :'id', - :'selectable_template_vars' => :'selectable_template_vars', - :'share_type' => :'share_type', - :'status' => :'status', - :'title' => :'title', - :'token' => :'token', - :'url' => :'url', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_at' => :'String', - :'credential_suffix' => :'String', - :'dashboard_id' => :'String', - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'id' => :'String', - :'selectable_template_vars' => :'Array', - :'share_type' => :'SecureEmbedShareType', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'token' => :'String', - :'url' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - 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::SecureEmbedGetResponseAttributes` 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?(:'credential_suffix') - self.credential_suffix = attributes[:'credential_suffix'] - end - - if attributes.key?(:'dashboard_id') - self.dashboard_id = attributes[:'dashboard_id'] - end - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'share_type') - self.share_type = attributes[:'share_type'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'token') - self.token = attributes[:'token'] - end - - if attributes.key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_at == o.created_at && - credential_suffix == o.credential_suffix && - dashboard_id == o.dashboard_id && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - id == o.id && - selectable_template_vars == o.selectable_template_vars && - share_type == o.share_type && - status == o.status && - title == o.title && - token == o.token && - url == o.url && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_at, credential_suffix, dashboard_id, global_time, global_time_selectable, id, selectable_template_vars, share_type, status, title, token, url, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_selectable_template_variable.rb b/lib/datadog_api_client/v2/models/secure_embed_selectable_template_variable.rb deleted file mode 100644 index bd80a51e9c49..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_selectable_template_variable.rb +++ /dev/null @@ -1,139 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A template variable that viewers can modify on the secure embed shared dashboard. - class SecureEmbedSelectableTemplateVariable - include BaseGenericModel - - # Default selected values for the variable. - attr_accessor :default_values - - # Name of the template variable. Usually matches the prefix unless you want a different display name. - attr_accessor :name - - # Tag prefix for the variable (e.g., `environment`, `service`). - attr_accessor :prefix - - # Restrict which tag values are visible to the viewer. - attr_accessor :visible_tags - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'default_values' => :'default_values', - :'name' => :'name', - :'prefix' => :'prefix', - :'visible_tags' => :'visible_tags' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'default_values' => :'Array', - :'name' => :'String', - :'prefix' => :'String', - :'visible_tags' => :'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::SecureEmbedSelectableTemplateVariable` 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?(:'default_values') - if (value = attributes[:'default_values']).is_a?(Array) - self.default_values = value - end - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'prefix') - self.prefix = attributes[:'prefix'] - end - - if attributes.key?(:'visible_tags') - if (value = attributes[:'visible_tags']).is_a?(Array) - self.visible_tags = 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 && - default_values == o.default_values && - name == o.name && - prefix == o.prefix && - visible_tags == o.visible_tags && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [default_values, name, prefix, visible_tags, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_status.rb b/lib/datadog_api_client/v2/models/secure_embed_status.rb deleted file mode 100644 index b4c90b0984a6..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_status.rb +++ /dev/null @@ -1,27 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - class SecureEmbedStatus - include BaseEnumModel - - ACTIVE = "active".freeze - PAUSED = "paused".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_request_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_update_request_attributes.rb deleted file mode 100644 index 93f65cf8a023..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_request_attributes.rb +++ /dev/null @@ -1,157 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for updating a secure embed shared dashboard. All fields are optional. - class SecureEmbedUpdateRequestAttributes - include BaseGenericModel - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Updated time selectability. - attr_accessor :global_time_selectable - - # Updated template variables. - attr_accessor :selectable_template_vars - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Updated title. - attr_accessor :title - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'selectable_template_vars' => :'selectable_template_vars', - :'status' => :'status', - :'title' => :'title', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'selectable_template_vars' => :'Array', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - 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::SecureEmbedUpdateRequestAttributes` 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?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - 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 && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - selectable_template_vars == o.selectable_template_vars && - status == o.status && - title == o.title && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [global_time, global_time_selectable, selectable_template_vars, status, title, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response_attributes.rb b/lib/datadog_api_client/v2/models/secure_embed_update_response_attributes.rb deleted file mode 100644 index 1e9882e81b5d..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response_attributes.rb +++ /dev/null @@ -1,227 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of an updated secure embed shared dashboard. - class SecureEmbedUpdateResponseAttributes - include BaseGenericModel - - # Creation timestamp. - attr_accessor :created_at - - # Last 4 characters of the credential. Defaults to `0000` if unavailable. - attr_accessor :credential_suffix - - # The source dashboard ID. - attr_accessor :dashboard_id - - # Default time range configuration for the secure embed. - attr_accessor :global_time - - # Whether time range is viewer-selectable. - attr_accessor :global_time_selectable - - # Internal share ID. - attr_accessor :id - - # Template variables with their configuration. - attr_accessor :selectable_template_vars - - # The type of share. Always `secure_embed`. - attr_accessor :share_type - - # The status of the secure embed share. Active means the shared dashboard is available. Paused means it is not. - attr_accessor :status - - # Display title. - attr_accessor :title - - # Public share token. - attr_accessor :token - - # CDN URL for the shared dashboard. - attr_accessor :url - - # Display settings for the secure embed shared dashboard. - attr_accessor :viewing_preferences - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_at' => :'created_at', - :'credential_suffix' => :'credential_suffix', - :'dashboard_id' => :'dashboard_id', - :'global_time' => :'global_time', - :'global_time_selectable' => :'global_time_selectable', - :'id' => :'id', - :'selectable_template_vars' => :'selectable_template_vars', - :'share_type' => :'share_type', - :'status' => :'status', - :'title' => :'title', - :'token' => :'token', - :'url' => :'url', - :'viewing_preferences' => :'viewing_preferences' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_at' => :'String', - :'credential_suffix' => :'String', - :'dashboard_id' => :'String', - :'global_time' => :'SecureEmbedGlobalTime', - :'global_time_selectable' => :'Boolean', - :'id' => :'String', - :'selectable_template_vars' => :'Array', - :'share_type' => :'SecureEmbedShareType', - :'status' => :'SecureEmbedStatus', - :'title' => :'String', - :'token' => :'String', - :'url' => :'String', - :'viewing_preferences' => :'SecureEmbedViewingPreferences' - } - 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::SecureEmbedUpdateResponseAttributes` 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?(:'credential_suffix') - self.credential_suffix = attributes[:'credential_suffix'] - end - - if attributes.key?(:'dashboard_id') - self.dashboard_id = attributes[:'dashboard_id'] - end - - if attributes.key?(:'global_time') - self.global_time = attributes[:'global_time'] - end - - if attributes.key?(:'global_time_selectable') - self.global_time_selectable = attributes[:'global_time_selectable'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'selectable_template_vars') - if (value = attributes[:'selectable_template_vars']).is_a?(Array) - self.selectable_template_vars = value - end - end - - if attributes.key?(:'share_type') - self.share_type = attributes[:'share_type'] - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'token') - self.token = attributes[:'token'] - end - - if attributes.key?(:'url') - self.url = attributes[:'url'] - end - - if attributes.key?(:'viewing_preferences') - self.viewing_preferences = attributes[:'viewing_preferences'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_at == o.created_at && - credential_suffix == o.credential_suffix && - dashboard_id == o.dashboard_id && - global_time == o.global_time && - global_time_selectable == o.global_time_selectable && - id == o.id && - selectable_template_vars == o.selectable_template_vars && - share_type == o.share_type && - status == o.status && - title == o.title && - token == o.token && - url == o.url && - viewing_preferences == o.viewing_preferences && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_at, credential_suffix, dashboard_id, global_time, global_time_selectable, id, selectable_template_vars, share_type, status, title, token, url, viewing_preferences, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_update_response_type.rb b/lib/datadog_api_client/v2/models/secure_embed_update_response_type.rb deleted file mode 100644 index 7c93bc3c4d10..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_update_response_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=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 - # Resource type for secure embed update responses. - class SecureEmbedUpdateResponseType - include BaseEnumModel - - SECURE_EMBED_UPDATE_RESPONSE = "secure_embed_update_response".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences.rb b/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences.rb deleted file mode 100644 index 469acc8f75e0..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences.rb +++ /dev/null @@ -1,115 +0,0 @@ -=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 - # Display settings for the secure embed shared dashboard. - class SecureEmbedViewingPreferences - include BaseGenericModel - - # Whether widgets are displayed in high density mode. - attr_accessor :high_density - - # The theme of the shared dashboard view. `system` follows the viewer's system default. - attr_accessor :theme - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'high_density' => :'high_density', - :'theme' => :'theme' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'high_density' => :'Boolean', - :'theme' => :'SecureEmbedViewingPreferencesTheme' - } - 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::SecureEmbedViewingPreferences` 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?(:'high_density') - self.high_density = attributes[:'high_density'] - end - - if attributes.key?(:'theme') - self.theme = attributes[:'theme'] - 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 && - high_density == o.high_density && - theme == o.theme && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [high_density, theme, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences_theme.rb b/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences_theme.rb deleted file mode 100644 index cd5c9bf8625d..000000000000 --- a/lib/datadog_api_client/v2/models/secure_embed_viewing_preferences_theme.rb +++ /dev/null @@ -1,28 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The theme of the shared dashboard view. `system` follows the viewer's system default. - class SecureEmbedViewingPreferencesTheme - include BaseEnumModel - - SYSTEM = "system".freeze - LIGHT = "light".freeze - DARK = "dark".freeze - end -end