From b6bfa8dd25d93ddd2ab7a56e74dfc8fb92cb4ab0 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 29 Jan 2021 12:49:22 +0000 Subject: [PATCH] Regenerate client from commit bc876ff of spec repo --- .apigentools-info | 8 +- data/v1/openapi.yaml | 99 ++++++++ docs/v1/README.md | 3 + docs/v1/UsageIoTHour.md | 20 ++ docs/v1/UsageIoTResponse.md | 18 ++ docs/v1/UsageMeteringApi.md | 77 ++++++ docs/v1/UsageSummaryDate.md | 4 + docs/v1/UsageSummaryDateOrg.md | 4 + docs/v1/UsageSummaryResponse.md | 4 + features/v1/undo.json | 6 + features/v1/usage_metering.feature | 12 + lib/datadog_api_client/v1.rb | 2 + .../v1/api/usage_metering_api.rb | 77 ++++++ .../v1/models/usage_io_t_hour.rb | 233 ++++++++++++++++++ .../v1/models/usage_io_t_response.rb | 225 +++++++++++++++++ .../v1/models/usage_summary_date.rb | 22 +- .../v1/models/usage_summary_date_org.rb | 22 +- .../v1/models/usage_summary_response.rb | 22 +- spec/v1/models/usage_io_t_hour_spec.rb | 43 ++++ spec/v1/models/usage_io_t_response_spec.rb | 37 +++ 20 files changed, 931 insertions(+), 7 deletions(-) create mode 100644 docs/v1/UsageIoTHour.md create mode 100644 docs/v1/UsageIoTResponse.md create mode 100644 lib/datadog_api_client/v1/models/usage_io_t_hour.rb create mode 100644 lib/datadog_api_client/v1/models/usage_io_t_response.rb create mode 100644 spec/v1/models/usage_io_t_hour_spec.rb create mode 100644 spec/v1/models/usage_io_t_response_spec.rb diff --git a/.apigentools-info b/.apigentools-info index 167bc36c0ae3..32c3f1d6d3fb 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-01-29 07:52:52.536777", - "spec_repo_commit": "6dc3341" + "regenerated": "2021-01-29 12:49:08.865785", + "spec_repo_commit": "bc876ff" }, "v2": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-01-29 07:53:05.048276", - "spec_repo_commit": "6dc3341" + "regenerated": "2021-01-29 12:49:21.065278", + "spec_repo_commit": "bc876ff" } } } \ No newline at end of file diff --git a/data/v1/openapi.yaml b/data/v1/openapi.yaml index 3c8e3a48c34f..94ab5b667033 100644 --- a/data/v1/openapi.yaml +++ b/data/v1/openapi.yaml @@ -8483,6 +8483,28 @@ components: $ref: '#/components/schemas/UsageIngestedSpansHour' type: array type: object + UsageIoTHour: + description: IoT usage for a given organization for a given hour. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + iot_device_count: + description: The total number of IoT device hours from the start of the + given hour's month until the given hour. + format: int64 + type: integer + type: object + UsageIoTResponse: + description: Response containing the IoT usage for each hour for a given organization. + properties: + usage: + description: Get hourly usage for IoT. + items: + $ref: '#/components/schemas/UsageIoTHour' + type: array + type: object UsageLambdaHour: description: 'Number of lambda functions and sum of the invocations of all lambda functions @@ -8922,6 +8944,16 @@ components: current date for all organizations. format: int64 type: integer + iot_device_agg_sum: + description: Shows the sum of all IoT devices over all hours in the current + date for all organizations. + format: int64 + type: integer + iot_device_top99p_sum: + description: Shows the 99th percentile of all IoT devices over all hours + in the current date all organizations. + format: int64 + type: integer mobile_rum_session_count_android_sum: description: Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. @@ -9084,6 +9116,16 @@ components: current date for the given org. format: int64 type: integer + iot_device_agg_sum: + description: Shows the sum of all IoT devices over all hours in the current + date for the given org. + format: int64 + type: integer + iot_device_top99p_sum: + description: Shows the 99th percentile of all IoT devices over all hours + in the current date for the given org. + format: int64 + type: integer mobile_rum_session_count_android_sum: description: Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. @@ -9254,6 +9296,16 @@ components: current months for all organizations. format: int64 type: integer + iot_device_agg_sum: + description: Shows the sum of all IoT devices over all hours in the current + months for all organizations. + format: int64 + type: integer + iot_device_top99p_sum: + description: Shows the 99th percentile of all IoT devices over all hours + in the current months of all organizations. + format: int64 + type: integer last_updated: description: Shows the the most recent hour in the current months for all organizations for which all usages were calculated. @@ -16744,6 +16796,53 @@ paths: - Usage Metering x-undo: type: safe + /api/v1/usage/iot: + get: + description: Get hourly usage for IoT. + operationId: GetUsageInternetOfThings + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage beginning at this hour.' + in: query + name: start_hr + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage ending + + **before** this hour.' + in: query + name: end_hr + required: false + schema: + format: date-time + type: string + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/UsageIoTResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + summary: Get hourly usage for IoT + tags: + - Usage Metering + x-undo: + type: safe /api/v1/usage/logs: get: description: Get hourly usage for logs. diff --git a/docs/v1/README.md b/docs/v1/README.md index 331a187dbc6d..c68298161371 100644 --- a/docs/v1/README.md +++ b/docs/v1/README.md @@ -232,6 +232,7 @@ Class | Method | HTTP request | Description *DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate *DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers *DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans +*DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_internet_of_things**](UsageMeteringApi.md#get_usage_internet_of_things) | **GET** /api/v1/usage/iot | Get hourly usage for IoT *DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_lambda**](UsageMeteringApi.md#get_usage_lambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda *DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_logs**](UsageMeteringApi.md#get_usage_logs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs *DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_logs_by_index**](UsageMeteringApi.md#get_usage_logs_by_index) | **GET** /api/v1/usage/logs_by_index | Get hourly usage for Logs by Index @@ -644,6 +645,8 @@ Class | Method | HTTP request | Description - [DatadogAPIClient::V1::UsageIndexedSpansResponse](UsageIndexedSpansResponse.md) - [DatadogAPIClient::V1::UsageIngestedSpansHour](UsageIngestedSpansHour.md) - [DatadogAPIClient::V1::UsageIngestedSpansResponse](UsageIngestedSpansResponse.md) + - [DatadogAPIClient::V1::UsageIoTHour](UsageIoTHour.md) + - [DatadogAPIClient::V1::UsageIoTResponse](UsageIoTResponse.md) - [DatadogAPIClient::V1::UsageLambdaHour](UsageLambdaHour.md) - [DatadogAPIClient::V1::UsageLambdaResponse](UsageLambdaResponse.md) - [DatadogAPIClient::V1::UsageLogsByIndexHour](UsageLogsByIndexHour.md) diff --git a/docs/v1/UsageIoTHour.md b/docs/v1/UsageIoTHour.md new file mode 100644 index 000000000000..a777cd24d2be --- /dev/null +++ b/docs/v1/UsageIoTHour.md @@ -0,0 +1,20 @@ +# DatadogAPIClient::V1::UsageIoTHour + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **hour** | **Time** | The hour for the usage. | [optional] | +| **iot_device_count** | **Integer** | The total number of IoT device hours from the start of the given hour's month until the given hour. | [optional] | + +## Example + +```ruby +require 'datadog_api_client/v1' + +instance = DatadogAPIClient::V1::UsageIoTHour.new( + hour: null, + iot_device_count: null +) +``` + diff --git a/docs/v1/UsageIoTResponse.md b/docs/v1/UsageIoTResponse.md new file mode 100644 index 000000000000..ea29d8c9aa3f --- /dev/null +++ b/docs/v1/UsageIoTResponse.md @@ -0,0 +1,18 @@ +# DatadogAPIClient::V1::UsageIoTResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **usage** | [**Array<UsageIoTHour>**](UsageIoTHour.md) | Get hourly usage for IoT. | [optional] | + +## Example + +```ruby +require 'datadog_api_client/v1' + +instance = DatadogAPIClient::V1::UsageIoTResponse.new( + usage: null +) +``` + diff --git a/docs/v1/UsageMeteringApi.md b/docs/v1/UsageMeteringApi.md index d6f25222235e..0db627d77b19 100644 --- a/docs/v1/UsageMeteringApi.md +++ b/docs/v1/UsageMeteringApi.md @@ -17,6 +17,7 @@ All URIs are relative to *https://api.datadoghq.com* | [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate | | [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers | | [**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans | +| [**get_usage_internet_of_things**](UsageMeteringApi.md#get_usage_internet_of_things) | **GET** /api/v1/usage/iot | Get hourly usage for IoT | | [**get_usage_lambda**](UsageMeteringApi.md#get_usage_lambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda | | [**get_usage_logs**](UsageMeteringApi.md#get_usage_logs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs | | [**get_usage_logs_by_index**](UsageMeteringApi.md#get_usage_logs_by_index) | **GET** /api/v1/usage/logs_by_index | Get hourly usage for Logs by Index | @@ -1036,6 +1037,82 @@ end - **Accept**: application/json;datetime-format=rfc3339 +## get_usage_internet_of_things + +> get_usage_internet_of_things(start_hr, opts) + +Get hourly usage for IoT + +Get hourly usage for IoT. + +### Examples + +```ruby +require 'time' +require 'datadog_api_client/v1' +# setup authorization +DatadogAPIClient::V1.configure do |config| + # Configure API key authorization: apiKeyAuth + config.api_key['apiKeyAuth'] = ENV["DD_CLIENT_API_KEY"] + + # Configure API key authorization: appKeyAuth + config.api_key['appKeyAuth'] = ENV["DD_CLIENT_APP_KEY"] +end + +api_instance = DatadogAPIClient::V1::UsageMeteringApi.new +start_hr = Time.parse('2013-10-20T19:20:30+01:00') # Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. +opts = { + end_hr: Time.parse('2013-10-20T19:20:30+01:00') # Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. +} + +begin + # Get hourly usage for IoT + result = api_instance.get_usage_internet_of_things(start_hr, opts) + p result +rescue DatadogAPIClient::V1::ApiError => e + puts "Error when calling UsageMeteringApi->get_usage_internet_of_things: #{e}" +end +``` + +#### Using the get_usage_internet_of_things_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_usage_internet_of_things_with_http_info(start_hr, opts) + +```ruby +begin + # Get hourly usage for IoT + data, status_code, headers = api_instance.get_usage_internet_of_things_with_http_info(start_hr, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V1::ApiError => e + puts "Error when calling UsageMeteringApi->get_usage_internet_of_things_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **start_hr** | **Time** | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. | | +| **end_hr** | **Time** | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. | [optional] | + +### Return type + +[**UsageIoTResponse**](UsageIoTResponse.md) + +### Authorization + +[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json;datetime-format=rfc3339 + + ## get_usage_lambda > get_usage_lambda(start_hr, opts) diff --git a/docs/v1/UsageSummaryDate.md b/docs/v1/UsageSummaryDate.md index 1b42d948081d..e9a1b3a0dbe5 100644 --- a/docs/v1/UsageSummaryDate.md +++ b/docs/v1/UsageSummaryDate.md @@ -23,6 +23,8 @@ | **indexed_events_count_sum** | **Integer** | Shows the sum of all log events indexed over all hours in the current date for all organizations. | [optional] | | **infra_host_top99p** | **Integer** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for all organizations. | [optional] | | **ingested_events_bytes_sum** | **Integer** | Shows the sum of all log bytes ingested over all hours in the current date for all organizations. | [optional] | +| **iot_device_agg_sum** | **Integer** | Shows the sum of all IoT devices over all hours in the current date for all organizations. | [optional] | +| **iot_device_top99p_sum** | **Integer** | Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. | [optional] | | **mobile_rum_session_count_android_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. | [optional] | | **mobile_rum_session_count_ios_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for all organizations. | [optional] | | **mobile_rum_session_count_sum** | **Integer** | Shows the sum of all mobile RUM Sessions over all hours in the current date for all organizations | [optional] | @@ -62,6 +64,8 @@ instance = DatadogAPIClient::V1::UsageSummaryDate.new( indexed_events_count_sum: null, infra_host_top99p: null, ingested_events_bytes_sum: null, + iot_device_agg_sum: null, + iot_device_top99p_sum: null, mobile_rum_session_count_android_sum: null, mobile_rum_session_count_ios_sum: null, mobile_rum_session_count_sum: null, diff --git a/docs/v1/UsageSummaryDateOrg.md b/docs/v1/UsageSummaryDateOrg.md index 3c2d4534462e..3569f743ac2e 100644 --- a/docs/v1/UsageSummaryDateOrg.md +++ b/docs/v1/UsageSummaryDateOrg.md @@ -23,6 +23,8 @@ | **indexed_events_count_sum** | **Integer** | Shows the sum of all log events indexed over all hours in the current date for the given org. | [optional] | | **infra_host_top99p** | **Integer** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for the given org. | [optional] | | **ingested_events_bytes_sum** | **Integer** | Shows the sum of all log bytes ingested over all hours in the current date for the given org. | [optional] | +| **iot_device_agg_sum** | **Integer** | Shows the sum of all IoT devices over all hours in the current date for the given org. | [optional] | +| **iot_device_top99p_sum** | **Integer** | Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. | [optional] | | **mobile_rum_session_count_android_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. | [optional] | | **mobile_rum_session_count_ios_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for the given org. | [optional] | | **mobile_rum_session_count_sum** | **Integer** | Shows the sum of all mobile RUM Sessions over all hours in the current date for the given org. | [optional] | @@ -63,6 +65,8 @@ instance = DatadogAPIClient::V1::UsageSummaryDateOrg.new( indexed_events_count_sum: null, infra_host_top99p: null, ingested_events_bytes_sum: null, + iot_device_agg_sum: null, + iot_device_top99p_sum: null, mobile_rum_session_count_android_sum: null, mobile_rum_session_count_ios_sum: null, mobile_rum_session_count_sum: null, diff --git a/docs/v1/UsageSummaryResponse.md b/docs/v1/UsageSummaryResponse.md index 84df0c0de09d..75a78ebf3a66 100644 --- a/docs/v1/UsageSummaryResponse.md +++ b/docs/v1/UsageSummaryResponse.md @@ -24,6 +24,8 @@ | **indexed_events_count_agg_sum** | **Integer** | Shows the sum of all log events indexed over all hours in the current months for all organizations. | [optional] | | **infra_host_top99p_sum** | **Integer** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current months for all organizations. | [optional] | | **ingested_events_bytes_agg_sum** | **Integer** | Shows the sum of all log bytes ingested over all hours in the current months for all organizations. | [optional] | +| **iot_device_agg_sum** | **Integer** | Shows the sum of all IoT devices over all hours in the current months for all organizations. | [optional] | +| **iot_device_top99p_sum** | **Integer** | Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations. | [optional] | | **last_updated** | **Time** | Shows the the most recent hour in the current months for all organizations for which all usages were calculated. | [optional] | | **live_indexed_events_agg_sum** | **Integer** | Shows the sum of all live logs indexed over all hours in the current months for all organizations (data available as of December 1, 2020). | [optional] | | **live_ingested_bytes_agg_sum** | **Integer** | Shows the sum of all live logs bytes ingested over all hours in the current months for all organizations (data available as of December 1, 2020). | [optional] | @@ -71,6 +73,8 @@ instance = DatadogAPIClient::V1::UsageSummaryResponse.new( indexed_events_count_agg_sum: null, infra_host_top99p_sum: null, ingested_events_bytes_agg_sum: null, + iot_device_agg_sum: null, + iot_device_top99p_sum: null, last_updated: null, live_indexed_events_agg_sum: null, live_ingested_bytes_agg_sum: null, diff --git a/features/v1/undo.json b/features/v1/undo.json index dfcaf2ae837e..7a2f3d48daad 100644 --- a/features/v1/undo.json +++ b/features/v1/undo.json @@ -982,6 +982,12 @@ "type": "safe" } }, + "GetUsageInternetOfThings": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, "GetUsageLogs": { "tag": "Usage Metering", "undo": { diff --git a/features/v1/usage_metering.feature b/features/v1/usage_metering.feature index 9a82ed8c79e2..a2e145490032 100644 --- a/features/v1/usage_metering.feature +++ b/features/v1/usage_metering.feature @@ -43,6 +43,18 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK + @generated @skip + Scenario: Get hourly usage for IoT returns "Bad Request" response + Given new "GetUsageInternetOfThings" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip + Scenario: Get hourly usage for IoT returns "OK" response + Given new "GetUsageInternetOfThings" request + When the request is sent + Then the response status is 200 OK + @generated @skip Scenario: Get hourly usage for Lambda returns "Bad Request" response Given new "GetUsageLambda" request diff --git a/lib/datadog_api_client/v1.rb b/lib/datadog_api_client/v1.rb index 1d71c00f6dbb..9c93816db9af 100644 --- a/lib/datadog_api_client/v1.rb +++ b/lib/datadog_api_client/v1.rb @@ -408,6 +408,8 @@ require 'datadog_api_client/v1/models/usage_indexed_spans_response' require 'datadog_api_client/v1/models/usage_ingested_spans_hour' require 'datadog_api_client/v1/models/usage_ingested_spans_response' +require 'datadog_api_client/v1/models/usage_io_t_hour' +require 'datadog_api_client/v1/models/usage_io_t_response' require 'datadog_api_client/v1/models/usage_lambda_hour' require 'datadog_api_client/v1/models/usage_lambda_response' require 'datadog_api_client/v1/models/usage_logs_by_index_hour' diff --git a/lib/datadog_api_client/v1/api/usage_metering_api.rb b/lib/datadog_api_client/v1/api/usage_metering_api.rb index c7818c407aa9..a49fc783d5ed 100644 --- a/lib/datadog_api_client/v1/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v1/api/usage_metering_api.rb @@ -1025,6 +1025,83 @@ def get_usage_indexed_spans_with_http_info(start_hr, opts = {}) return data, status_code, headers end + # Get hourly usage for IoT + # Get hourly usage for IoT. + # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. + # @param [Hash] opts the optional parameters + # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. + # @return [UsageIoTResponse] + def get_usage_internet_of_things(start_hr, opts = {}) + data, _status_code, _headers = get_usage_internet_of_things_with_http_info(start_hr, opts) + data + end + + # Get hourly usage for IoT + # Get hourly usage for IoT. + # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. + # @param [Hash] opts the optional parameters + # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. + # @return [Array<(UsageIoTResponse, Integer, Hash)>] UsageIoTResponse data, response status code and response headers + def get_usage_internet_of_things_with_http_info(start_hr, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:get_usage_internet_of_things) + unstable_enabled = @api_client.config.unstable_operations[:get_usage_internet_of_things] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "get_usage_internet_of_things") + else + raise ApiError.new(message: format("Unstable operation '%s' is disabled", "get_usage_internet_of_things")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: UsageMeteringApi.get_usage_internet_of_things ...' + end + # verify the required parameter 'start_hr' is set + if @api_client.config.client_side_validation && start_hr.nil? + fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringApi.get_usage_internet_of_things" + end + # resource path + local_var_path = '/api/v1/usage/iot' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'start_hr'] = start_hr + query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'UsageIoTResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'appKeyAuth'] + + new_options = opts.merge( + :operation => :"UsageMeteringApi.get_usage_internet_of_things", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: UsageMeteringApi#get_usage_internet_of_things\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get hourly usage for Lambda # Get hourly usage for lambda. # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. diff --git a/lib/datadog_api_client/v1/models/usage_io_t_hour.rb b/lib/datadog_api_client/v1/models/usage_io_t_hour.rb new file mode 100644 index 000000000000..af67085497ea --- /dev/null +++ b/lib/datadog_api_client/v1/models/usage_io_t_hour.rb @@ -0,0 +1,233 @@ +=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://openapi-generator.tech + + Unless explicitly stated otherwise all files in this repository are licensed 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 + # IoT usage for a given organization for a given hour. + class UsageIoTHour + # The hour for the usage. + attr_accessor :hour + + # The total number of IoT device hours from the start of the given hour's month until the given hour. + attr_accessor :iot_device_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'hour' => :'hour', + :'iot_device_count' => :'iot_device_count' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'hour' => :'Time', + :'iot_device_count' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIoTHour` 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::UsageIoTHour`. 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?(:'hour') + self.hour = attributes[:'hour'] + end + + if attributes.key?(:'iot_device_count') + self.iot_device_count = attributes[:'iot_device_count'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hour == o.hour && + iot_device_count == o.iot_device_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [hour, iot_device_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V1.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v1/models/usage_io_t_response.rb b/lib/datadog_api_client/v1/models/usage_io_t_response.rb new file mode 100644 index 000000000000..2bc51d4ff540 --- /dev/null +++ b/lib/datadog_api_client/v1/models/usage_io_t_response.rb @@ -0,0 +1,225 @@ +=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://openapi-generator.tech + + Unless explicitly stated otherwise all files in this repository are licensed 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 + # Response containing the IoT usage for each hour for a given organization. + class UsageIoTResponse + # Get hourly usage for IoT. + attr_accessor :usage + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'usage' => :'usage' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'usage' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::UsageIoTResponse` 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::UsageIoTResponse`. 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?(:'usage') + if (value = attributes[:'usage']).is_a?(Array) + self.usage = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + usage == o.usage + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [usage].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V1.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v1/models/usage_summary_date.rb b/lib/datadog_api_client/v1/models/usage_summary_date.rb index 39d58fe6927d..ba31ea83d1a2 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date.rb @@ -76,6 +76,12 @@ class UsageSummaryDate # Shows the sum of all log bytes ingested over all hours in the current date for all organizations. attr_accessor :ingested_events_bytes_sum + # Shows the sum of all IoT devices over all hours in the current date for all organizations. + attr_accessor :iot_device_agg_sum + + # Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. + attr_accessor :iot_device_top99p_sum + # Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. attr_accessor :mobile_rum_session_count_android_sum @@ -137,6 +143,8 @@ def self.attribute_map :'indexed_events_count_sum' => :'indexed_events_count_sum', :'infra_host_top99p' => :'infra_host_top99p', :'ingested_events_bytes_sum' => :'ingested_events_bytes_sum', + :'iot_device_agg_sum' => :'iot_device_agg_sum', + :'iot_device_top99p_sum' => :'iot_device_top99p_sum', :'mobile_rum_session_count_android_sum' => :'mobile_rum_session_count_android_sum', :'mobile_rum_session_count_ios_sum' => :'mobile_rum_session_count_ios_sum', :'mobile_rum_session_count_sum' => :'mobile_rum_session_count_sum', @@ -180,6 +188,8 @@ def self.openapi_types :'indexed_events_count_sum' => :'Integer', :'infra_host_top99p' => :'Integer', :'ingested_events_bytes_sum' => :'Integer', + :'iot_device_agg_sum' => :'Integer', + :'iot_device_top99p_sum' => :'Integer', :'mobile_rum_session_count_android_sum' => :'Integer', :'mobile_rum_session_count_ios_sum' => :'Integer', :'mobile_rum_session_count_sum' => :'Integer', @@ -293,6 +303,14 @@ def initialize(attributes = {}) self.ingested_events_bytes_sum = attributes[:'ingested_events_bytes_sum'] end + if attributes.key?(:'iot_device_agg_sum') + self.iot_device_agg_sum = attributes[:'iot_device_agg_sum'] + end + + if attributes.key?(:'iot_device_top99p_sum') + self.iot_device_top99p_sum = attributes[:'iot_device_top99p_sum'] + end + if attributes.key?(:'mobile_rum_session_count_android_sum') self.mobile_rum_session_count_android_sum = attributes[:'mobile_rum_session_count_android_sum'] end @@ -385,6 +403,8 @@ def ==(o) indexed_events_count_sum == o.indexed_events_count_sum && infra_host_top99p == o.infra_host_top99p && ingested_events_bytes_sum == o.ingested_events_bytes_sum && + iot_device_agg_sum == o.iot_device_agg_sum && + iot_device_top99p_sum == o.iot_device_top99p_sum && mobile_rum_session_count_android_sum == o.mobile_rum_session_count_android_sum && mobile_rum_session_count_ios_sum == o.mobile_rum_session_count_ios_sum && mobile_rum_session_count_sum == o.mobile_rum_session_count_sum && @@ -409,7 +429,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_host_top99p, apm_azure_app_service_host_top99p, apm_host_top99p, aws_host_top99p, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p, billable_ingested_bytes_sum, container_avg, container_hwm, custom_ts_avg, date, fargate_tasks_count_avg, fargate_tasks_count_hwm, gcp_host_top99p, incident_management_monthly_active_users_hwm, indexed_events_count_sum, infra_host_top99p, ingested_events_bytes_sum, mobile_rum_session_count_android_sum, mobile_rum_session_count_ios_sum, mobile_rum_session_count_sum, netflow_indexed_events_count_sum, npm_host_top99p, orgs, profiling_host_top99p, rum_session_count_sum, rum_total_session_count_sum, synthetics_browser_check_calls_count_sum, synthetics_check_calls_count_sum, trace_search_indexed_events_count_sum, twol_ingested_events_bytes_sum].hash + [agent_host_top99p, apm_azure_app_service_host_top99p, apm_host_top99p, aws_host_top99p, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p, billable_ingested_bytes_sum, container_avg, container_hwm, custom_ts_avg, date, fargate_tasks_count_avg, fargate_tasks_count_hwm, gcp_host_top99p, incident_management_monthly_active_users_hwm, indexed_events_count_sum, infra_host_top99p, ingested_events_bytes_sum, iot_device_agg_sum, iot_device_top99p_sum, mobile_rum_session_count_android_sum, mobile_rum_session_count_ios_sum, mobile_rum_session_count_sum, netflow_indexed_events_count_sum, npm_host_top99p, orgs, profiling_host_top99p, rum_session_count_sum, rum_total_session_count_sum, synthetics_browser_check_calls_count_sum, synthetics_check_calls_count_sum, trace_search_indexed_events_count_sum, twol_ingested_events_bytes_sum].hash end # Builds the object from hash diff --git a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb index 9532c34f6964..ce5580e51aa7 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb @@ -76,6 +76,12 @@ class UsageSummaryDateOrg # Shows the sum of all log bytes ingested over all hours in the current date for the given org. attr_accessor :ingested_events_bytes_sum + # Shows the sum of all IoT devices over all hours in the current date for the given org. + attr_accessor :iot_device_agg_sum + + # Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. + attr_accessor :iot_device_top99p_sum + # Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. attr_accessor :mobile_rum_session_count_android_sum @@ -140,6 +146,8 @@ def self.attribute_map :'indexed_events_count_sum' => :'indexed_events_count_sum', :'infra_host_top99p' => :'infra_host_top99p', :'ingested_events_bytes_sum' => :'ingested_events_bytes_sum', + :'iot_device_agg_sum' => :'iot_device_agg_sum', + :'iot_device_top99p_sum' => :'iot_device_top99p_sum', :'mobile_rum_session_count_android_sum' => :'mobile_rum_session_count_android_sum', :'mobile_rum_session_count_ios_sum' => :'mobile_rum_session_count_ios_sum', :'mobile_rum_session_count_sum' => :'mobile_rum_session_count_sum', @@ -184,6 +192,8 @@ def self.openapi_types :'indexed_events_count_sum' => :'Integer', :'infra_host_top99p' => :'Integer', :'ingested_events_bytes_sum' => :'Integer', + :'iot_device_agg_sum' => :'Integer', + :'iot_device_top99p_sum' => :'Integer', :'mobile_rum_session_count_android_sum' => :'Integer', :'mobile_rum_session_count_ios_sum' => :'Integer', :'mobile_rum_session_count_sum' => :'Integer', @@ -298,6 +308,14 @@ def initialize(attributes = {}) self.ingested_events_bytes_sum = attributes[:'ingested_events_bytes_sum'] end + if attributes.key?(:'iot_device_agg_sum') + self.iot_device_agg_sum = attributes[:'iot_device_agg_sum'] + end + + if attributes.key?(:'iot_device_top99p_sum') + self.iot_device_top99p_sum = attributes[:'iot_device_top99p_sum'] + end + if attributes.key?(:'mobile_rum_session_count_android_sum') self.mobile_rum_session_count_android_sum = attributes[:'mobile_rum_session_count_android_sum'] end @@ -392,6 +410,8 @@ def ==(o) indexed_events_count_sum == o.indexed_events_count_sum && infra_host_top99p == o.infra_host_top99p && ingested_events_bytes_sum == o.ingested_events_bytes_sum && + iot_device_agg_sum == o.iot_device_agg_sum && + iot_device_top99p_sum == o.iot_device_top99p_sum && mobile_rum_session_count_android_sum == o.mobile_rum_session_count_android_sum && mobile_rum_session_count_ios_sum == o.mobile_rum_session_count_ios_sum && mobile_rum_session_count_sum == o.mobile_rum_session_count_sum && @@ -417,7 +437,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_host_top99p, apm_azure_app_service_host_top99p, apm_host_top99p, aws_host_top99p, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p, billable_ingested_bytes_sum, container_avg, container_hwm, custom_ts_avg, fargate_tasks_count_avg, fargate_tasks_count_hwm, gcp_host_top99p, id, incident_management_monthly_active_users_hwm, indexed_events_count_sum, infra_host_top99p, ingested_events_bytes_sum, mobile_rum_session_count_android_sum, mobile_rum_session_count_ios_sum, mobile_rum_session_count_sum, name, netflow_indexed_events_count_sum, npm_host_top99p, profiling_host_top99p, public_id, rum_session_count_sum, rum_total_session_count_sum, synthetics_browser_check_calls_count_sum, synthetics_check_calls_count_sum, trace_search_indexed_events_count_sum, twol_ingested_events_bytes_sum].hash + [agent_host_top99p, apm_azure_app_service_host_top99p, apm_host_top99p, aws_host_top99p, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p, billable_ingested_bytes_sum, container_avg, container_hwm, custom_ts_avg, fargate_tasks_count_avg, fargate_tasks_count_hwm, gcp_host_top99p, id, incident_management_monthly_active_users_hwm, indexed_events_count_sum, infra_host_top99p, ingested_events_bytes_sum, iot_device_agg_sum, iot_device_top99p_sum, mobile_rum_session_count_android_sum, mobile_rum_session_count_ios_sum, mobile_rum_session_count_sum, name, netflow_indexed_events_count_sum, npm_host_top99p, profiling_host_top99p, public_id, rum_session_count_sum, rum_total_session_count_sum, synthetics_browser_check_calls_count_sum, synthetics_check_calls_count_sum, trace_search_indexed_events_count_sum, twol_ingested_events_bytes_sum].hash end # Builds the object from hash diff --git a/lib/datadog_api_client/v1/models/usage_summary_response.rb b/lib/datadog_api_client/v1/models/usage_summary_response.rb index 65cf658cd3d2..7941664e422e 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_response.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_response.rb @@ -79,6 +79,12 @@ class UsageSummaryResponse # Shows the sum of all log bytes ingested over all hours in the current months for all organizations. attr_accessor :ingested_events_bytes_agg_sum + # Shows the sum of all IoT devices over all hours in the current months for all organizations. + attr_accessor :iot_device_agg_sum + + # Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations. + attr_accessor :iot_device_top99p_sum + # Shows the the most recent hour in the current months for all organizations for which all usages were calculated. attr_accessor :last_updated @@ -162,6 +168,8 @@ def self.attribute_map :'indexed_events_count_agg_sum' => :'indexed_events_count_agg_sum', :'infra_host_top99p_sum' => :'infra_host_top99p_sum', :'ingested_events_bytes_agg_sum' => :'ingested_events_bytes_agg_sum', + :'iot_device_agg_sum' => :'iot_device_agg_sum', + :'iot_device_top99p_sum' => :'iot_device_top99p_sum', :'last_updated' => :'last_updated', :'live_indexed_events_agg_sum' => :'live_indexed_events_agg_sum', :'live_ingested_bytes_agg_sum' => :'live_ingested_bytes_agg_sum', @@ -213,6 +221,8 @@ def self.openapi_types :'indexed_events_count_agg_sum' => :'Integer', :'infra_host_top99p_sum' => :'Integer', :'ingested_events_bytes_agg_sum' => :'Integer', + :'iot_device_agg_sum' => :'Integer', + :'iot_device_top99p_sum' => :'Integer', :'last_updated' => :'Time', :'live_indexed_events_agg_sum' => :'Integer', :'live_ingested_bytes_agg_sum' => :'Integer', @@ -337,6 +347,14 @@ def initialize(attributes = {}) self.ingested_events_bytes_agg_sum = attributes[:'ingested_events_bytes_agg_sum'] end + if attributes.key?(:'iot_device_agg_sum') + self.iot_device_agg_sum = attributes[:'iot_device_agg_sum'] + end + + if attributes.key?(:'iot_device_top99p_sum') + self.iot_device_top99p_sum = attributes[:'iot_device_top99p_sum'] + end + if attributes.key?(:'last_updated') self.last_updated = attributes[:'last_updated'] end @@ -458,6 +476,8 @@ def ==(o) indexed_events_count_agg_sum == o.indexed_events_count_agg_sum && infra_host_top99p_sum == o.infra_host_top99p_sum && ingested_events_bytes_agg_sum == o.ingested_events_bytes_agg_sum && + iot_device_agg_sum == o.iot_device_agg_sum && + iot_device_top99p_sum == o.iot_device_top99p_sum && last_updated == o.last_updated && live_indexed_events_agg_sum == o.live_indexed_events_agg_sum && live_ingested_bytes_agg_sum == o.live_ingested_bytes_agg_sum && @@ -489,7 +509,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_host_top99p_sum, apm_azure_app_service_host_top99p_sum, apm_host_top99p_sum, aws_host_top99p_sum, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p_sum, azure_host_top99p_sum, billable_ingested_bytes_agg_sum, container_avg_sum, container_hwm_sum, custom_ts_sum, end_date, fargate_tasks_count_avg_sum, fargate_tasks_count_hwm_sum, gcp_host_top99p_sum, incident_management_monthly_active_users_hwm_sum, indexed_events_count_agg_sum, infra_host_top99p_sum, ingested_events_bytes_agg_sum, last_updated, live_indexed_events_agg_sum, live_ingested_bytes_agg_sum, mobile_rum_session_count_agg_sum, mobile_rum_session_count_android_agg_sum, mobile_rum_session_count_ios_agg_sum, netflow_indexed_events_count_agg_sum, npm_host_top99p_sum, profiling_container_agent_count_avg, profiling_host_count_top99p_sum, rehydrated_indexed_events_agg_sum, rehydrated_ingested_bytes_agg_sum, rum_session_count_agg_sum, rum_total_session_count_agg_sum, start_date, synthetics_browser_check_calls_count_agg_sum, synthetics_check_calls_count_agg_sum, trace_search_indexed_events_count_agg_sum, twol_ingested_events_bytes_agg_sum, usage].hash + [agent_host_top99p_sum, apm_azure_app_service_host_top99p_sum, apm_host_top99p_sum, aws_host_top99p_sum, aws_lambda_func_count, aws_lambda_invocations_sum, azure_app_service_top99p_sum, azure_host_top99p_sum, billable_ingested_bytes_agg_sum, container_avg_sum, container_hwm_sum, custom_ts_sum, end_date, fargate_tasks_count_avg_sum, fargate_tasks_count_hwm_sum, gcp_host_top99p_sum, incident_management_monthly_active_users_hwm_sum, indexed_events_count_agg_sum, infra_host_top99p_sum, ingested_events_bytes_agg_sum, iot_device_agg_sum, iot_device_top99p_sum, last_updated, live_indexed_events_agg_sum, live_ingested_bytes_agg_sum, mobile_rum_session_count_agg_sum, mobile_rum_session_count_android_agg_sum, mobile_rum_session_count_ios_agg_sum, netflow_indexed_events_count_agg_sum, npm_host_top99p_sum, profiling_container_agent_count_avg, profiling_host_count_top99p_sum, rehydrated_indexed_events_agg_sum, rehydrated_ingested_bytes_agg_sum, rum_session_count_agg_sum, rum_total_session_count_agg_sum, start_date, synthetics_browser_check_calls_count_agg_sum, synthetics_check_calls_count_agg_sum, trace_search_indexed_events_count_agg_sum, twol_ingested_events_bytes_agg_sum, usage].hash end # Builds the object from hash diff --git a/spec/v1/models/usage_io_t_hour_spec.rb b/spec/v1/models/usage_io_t_hour_spec.rb new file mode 100644 index 000000000000..66b1f701ed75 --- /dev/null +++ b/spec/v1/models/usage_io_t_hour_spec.rb @@ -0,0 +1,43 @@ +=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://openapi-generator.tech + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V1::UsageIoTHour +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V1::UsageIoTHour do + let(:instance) { DatadogAPIClient::V1::UsageIoTHour.new } + + describe 'test an instance of UsageIoTHour' do + it 'should create an instance of UsageIoTHour' do + expect(instance).to be_instance_of(DatadogAPIClient::V1::UsageIoTHour) + end + end + describe 'test attribute "hour"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "iot_device_count"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v1/models/usage_io_t_response_spec.rb b/spec/v1/models/usage_io_t_response_spec.rb new file mode 100644 index 000000000000..021796286a82 --- /dev/null +++ b/spec/v1/models/usage_io_t_response_spec.rb @@ -0,0 +1,37 @@ +=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://openapi-generator.tech + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V1::UsageIoTResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V1::UsageIoTResponse do + let(:instance) { DatadogAPIClient::V1::UsageIoTResponse.new } + + describe 'test an instance of UsageIoTResponse' do + it 'should create an instance of UsageIoTResponse' do + expect(instance).to be_instance_of(DatadogAPIClient::V1::UsageIoTResponse) + end + end + describe 'test attribute "usage"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end