From 276806f31afd7a59090ac3fcb30064371ff88b01 Mon Sep 17 00:00:00 2001 From: Nicholas Muesch Date: Fri, 27 Mar 2020 10:34:53 -0400 Subject: [PATCH 1/2] Update tests and remove old generated files --- api_docs/v1/KeysApi.md | 836 ------------- api_docs/v1/Org.md | 19 - api_docs/v1/OrgCreateBody.md | 14 - api_docs/v1/OrgCreateResponse.md | 15 - api_docs/v1/OrgListResponse.md | 13 - api_docs/v1/OrgResponse.md | 13 - api_docs/v1/UsageApi.md | 707 ----------- .../datadog/api/v1/client/api/KeysApi.java | 1041 ----------------- .../datadog/api/v1/client/api/OrgsApi.java | 464 -------- .../datadog/api/v1/client/api/UsageApi.java | 1027 ---------------- .../com/datadog/api/v1/client/model/Org.java | 281 ----- .../api/v1/client/model/OrgCreateBody.java | 161 --- .../v1/client/model/OrgCreateResponse.java | 197 ---- .../api/v1/client/model/OrgListResponse.java | 112 -- .../api/v1/client/model/OrgResponse.java | 102 -- ...ApiTest.java => KeyManagementApiTest.java} | 6 +- ...ApiTest.java => OrganizationsApiTest.java} | 32 +- ...ApiTest.java => UsageMeteringApiTest.java} | 10 +- .../api/v1/client/model/OrgBillingTest.java | 47 - .../v1/client/model/OrgCreateBodyTest.java | 65 - .../client/model/OrgCreateResponseTest.java | 75 -- .../v1/client/model/OrgListResponseTest.java | 50 - .../api/v1/client/model/OrgResponseTest.java | 48 - ...ettingsSamlAutocreateUsersDomainsTest.java | 57 - .../OrgSettingsSamlIdpInitiatedLoginTest.java | 47 - .../v1/client/model/OrgSettingsSamlTest.java | 47 - .../api/v1/client/model/OrgSettingsTest.java | 121 -- .../v1/client/model/OrgSubscriptionTest.java | 47 - .../datadog/api/v1/client/model/OrgTest.java | 98 -- 29 files changed, 24 insertions(+), 5728 deletions(-) delete mode 100644 api_docs/v1/KeysApi.md delete mode 100644 api_docs/v1/Org.md delete mode 100644 api_docs/v1/OrgCreateBody.md delete mode 100644 api_docs/v1/OrgCreateResponse.md delete mode 100644 api_docs/v1/OrgListResponse.md delete mode 100644 api_docs/v1/OrgResponse.md delete mode 100644 api_docs/v1/UsageApi.md delete mode 100644 src/main/java/com/datadog/api/v1/client/api/KeysApi.java delete mode 100644 src/main/java/com/datadog/api/v1/client/api/OrgsApi.java delete mode 100644 src/main/java/com/datadog/api/v1/client/api/UsageApi.java delete mode 100644 src/main/java/com/datadog/api/v1/client/model/Org.java delete mode 100644 src/main/java/com/datadog/api/v1/client/model/OrgCreateBody.java delete mode 100644 src/main/java/com/datadog/api/v1/client/model/OrgCreateResponse.java delete mode 100644 src/main/java/com/datadog/api/v1/client/model/OrgListResponse.java delete mode 100644 src/main/java/com/datadog/api/v1/client/model/OrgResponse.java rename src/test/java/com/datadog/api/v1/client/api/{KeysApiTest.java => KeyManagementApiTest.java} (98%) rename src/test/java/com/datadog/api/v1/client/api/{OrgsApiTest.java => OrganizationsApiTest.java} (86%) rename src/test/java/com/datadog/api/v1/client/api/{UsageApiTest.java => UsageMeteringApiTest.java} (96%) delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgBillingTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgCreateBodyTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgCreateResponseTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgListResponseTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgResponseTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlAutocreateUsersDomainsTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlIdpInitiatedLoginTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgSettingsTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgSubscriptionTest.java delete mode 100644 src/test/java/com/datadog/api/v1/client/model/OrgTest.java diff --git a/api_docs/v1/KeysApi.md b/api_docs/v1/KeysApi.md deleted file mode 100644 index 277a6a07379..00000000000 --- a/api_docs/v1/KeysApi.md +++ /dev/null @@ -1,836 +0,0 @@ -# KeysApi - -All URIs are relative to *https://api.datadoghq.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createAPIKey**](KeysApi.md#createAPIKey) | **POST** /api/v1/api_key | Create an API key -[**createApplicationKey**](KeysApi.md#createApplicationKey) | **POST** /api/v1/application_key | Create an application key -[**deleteAPIKey**](KeysApi.md#deleteAPIKey) | **DELETE** /api/v1/api_key/{key} | Delete an API key -[**deleteApplicationKey**](KeysApi.md#deleteApplicationKey) | **DELETE** /api/v1/application_key/{key} | Delete an application key -[**editAPIKey**](KeysApi.md#editAPIKey) | **PUT** /api/v1/api_key/{key} | Edit an API key -[**editApplicationKey**](KeysApi.md#editApplicationKey) | **PUT** /api/v1/application_key/{key} | Edit an application key -[**getAPIKey**](KeysApi.md#getAPIKey) | **GET** /api/v1/api_key/{key} | Get API key -[**getAllAPIKeys**](KeysApi.md#getAllAPIKeys) | **GET** /api/v1/api_key | Get all API keys -[**getAllApplicationKeys**](KeysApi.md#getAllApplicationKeys) | **GET** /api/v1/application_key | Get all application keys -[**getApplicationKey**](KeysApi.md#getApplicationKey) | **GET** /api/v1/application_key/{key} | Get an application key - - - -## createAPIKey - -> ApiKeyResponse createAPIKey().body(body).execute(); - -Create an API key - -Creates an API key with a given name. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - ApiKey body = new ApiKey(); // ApiKey | - try { - ApiKeyResponse result = api.createAPIKey() - .body(body) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#createAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ApiKey**](ApiKey.md)| | [optional] - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **409** | Conflict | - | - - -## createApplicationKey - -> ApplicationKeyResponse createApplicationKey().body(body).execute(); - -Create an application key - -Create an application key with a given name. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - ApplicationKey body = new ApplicationKey(); // ApplicationKey | - try { - ApplicationKeyResponse result = api.createApplicationKey() - .body(body) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#createApplicationKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ApplicationKey**](ApplicationKey.md)| | [optional] - -### Return type - -[**ApplicationKeyResponse**](ApplicationKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **409** | Conflict | - | - - -## deleteAPIKey - -> ApiKeyResponse deleteAPIKey(key).execute(); - -Delete an API key - -Delete a given API key. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - String key = "key_example"; // String | The specific API key you are working with. - try { - ApiKeyResponse result = api.deleteAPIKey(key) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#deleteAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | **String**| The specific API key you are working with. | - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - - -## deleteApplicationKey - -> ApplicationKeyResponse deleteApplicationKey(key).execute(); - -Delete an application key - -Delete a given application key. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - String key = "key_example"; // String | The specific APP key you are working with. - try { - ApplicationKeyResponse result = api.deleteApplicationKey(key) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#deleteApplicationKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | **String**| The specific APP key you are working with. | - -### Return type - -[**ApplicationKeyResponse**](ApplicationKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - - -## editAPIKey - -> ApiKeyResponse editAPIKey(key).body(body).execute(); - -Edit an API key - -Edit an API key name. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - String key = "key_example"; // String | The specific API key you are working with. - ApiKey body = new ApiKey(); // ApiKey | - try { - ApiKeyResponse result = api.editAPIKey(key) - .body(body) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#editAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | **String**| The specific API key you are working with. | - **body** | [**ApiKey**](ApiKey.md)| | [optional] - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - - -## editApplicationKey - -> ApplicationKeyResponse editApplicationKey(key).body(body).execute(); - -Edit an application key - -Edit an application key name. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - String key = "key_example"; // String | The specific APP key you are working with. - ApplicationKey body = new ApplicationKey(); // ApplicationKey | - try { - ApplicationKeyResponse result = api.editApplicationKey(key) - .body(body) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#editApplicationKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | **String**| The specific APP key you are working with. | - **body** | [**ApplicationKey**](ApplicationKey.md)| | [optional] - -### Return type - -[**ApplicationKeyResponse**](ApplicationKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - - -## getAPIKey - -> ApiKeyResponse getAPIKey(key).execute(); - -Get API key - -Get a given API key. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - String key = "key_example"; // String | The specific API key you are working with. - try { - ApiKeyResponse result = api.getAPIKey(key) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#getAPIKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | **String**| The specific API key you are working with. | - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - - -## getAllAPIKeys - -> ApiKeyListResponse getAllAPIKeys().execute(); - -Get all API keys - -Get all API keys available for your account. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - try { - ApiKeyListResponse result = api.getAllAPIKeys() - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#getAllAPIKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ApiKeyListResponse**](ApiKeyListResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | - - -## getAllApplicationKeys - -> ApplicationKeyListResponse getAllApplicationKeys().execute(); - -Get all application keys - -Get all application keys available for your Datadog account. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - try { - ApplicationKeyListResponse result = api.getAllApplicationKeys() - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#getAllApplicationKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ApplicationKeyListResponse**](ApplicationKeyListResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | - - -## getApplicationKey - -> ApplicationKeyResponse getApplicationKey(key).execute(); - -Get an application key - -Get a given application key. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.KeysApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - KeysApi apiInstance = new KeysApi(defaultClient); - String key = "key_example"; // String | The specific APP key you are working with. - try { - ApplicationKeyResponse result = api.getApplicationKey(key) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling KeysApi#getApplicationKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **key** | **String**| The specific APP key you are working with. | - -### Return type - -[**ApplicationKeyResponse**](ApplicationKeyResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **403** | Forbidden | - | -| **404** | Not Found | - | - diff --git a/api_docs/v1/Org.md b/api_docs/v1/Org.md deleted file mode 100644 index b367163feac..00000000000 --- a/api_docs/v1/Org.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# Org - -Create, edit, and manage organizations. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**billing** | [**OrgBilling**](OrgBilling.md) | | [optional] -**created** | **String** | TODO. | [optional] [readonly] -**description** | **String** | Description of the organization. | [optional] -**name** | **String** | The name of the new child-organization, limited to 32 characters. | [optional] -**publicId** | **String** | The public_id of the org you are operating within. | [optional] -**settings** | [**OrgSettings**](OrgSettings.md) | | [optional] -**subscription** | [**OrgSubscription**](OrgSubscription.md) | | [optional] - - - diff --git a/api_docs/v1/OrgCreateBody.md b/api_docs/v1/OrgCreateBody.md deleted file mode 100644 index 0be916dd001..00000000000 --- a/api_docs/v1/OrgCreateBody.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OrgCreateBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**billing** | [**OrgBilling**](OrgBilling.md) | | -**name** | **String** | The name of the new child-organization, limited to 32 characters. | -**subscription** | [**OrgSubscription**](OrgSubscription.md) | | - - - diff --git a/api_docs/v1/OrgCreateResponse.md b/api_docs/v1/OrgCreateResponse.md deleted file mode 100644 index 7853011380a..00000000000 --- a/api_docs/v1/OrgCreateResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OrgCreateResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**apiKey** | [**ApiKey**](ApiKey.md) | | [optional] -**applicationKey** | [**ApplicationKey**](ApplicationKey.md) | | [optional] -**org** | [**Org**](Org.md) | | [optional] -**user** | [**User**](User.md) | | [optional] - - - diff --git a/api_docs/v1/OrgListResponse.md b/api_docs/v1/OrgListResponse.md deleted file mode 100644 index e6f1aa96f8b..00000000000 --- a/api_docs/v1/OrgListResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OrgListResponse - -TODO. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**orgs** | [**List<Org>**](Org.md) | | [optional] - - - diff --git a/api_docs/v1/OrgResponse.md b/api_docs/v1/OrgResponse.md deleted file mode 100644 index 6d854bf2a43..00000000000 --- a/api_docs/v1/OrgResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OrgResponse - -TODO. -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**org** | [**Org**](Org.md) | | [optional] - - - diff --git a/api_docs/v1/UsageApi.md b/api_docs/v1/UsageApi.md deleted file mode 100644 index 4a57417e173..00000000000 --- a/api_docs/v1/UsageApi.md +++ /dev/null @@ -1,707 +0,0 @@ -# UsageApi - -All URIs are relative to *https://api.datadoghq.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**getUsageFargate**](UsageApi.md#getUsageFargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate -[**getUsageHosts**](UsageApi.md#getUsageHosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers -[**getUsageLogs**](UsageApi.md#getUsageLogs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs -[**getUsageSummary**](UsageApi.md#getUsageSummary) | **GET** /api/v1/usage/summary | Get usage across your multi-org account -[**getUsageSynthetics**](UsageApi.md#getUsageSynthetics) | **GET** /api/v1/usage/synthetics | Get hourly usage for Synthetics -[**getUsageTimeseries**](UsageApi.md#getUsageTimeseries) | **GET** /api/v1/usage/timeseries | Get hourly usage for custom metrics -[**getUsageTopAvgMetrics**](UsageApi.md#getUsageTopAvgMetrics) | **GET** /api/v1/usage/top_avg_metrics | Get top 500 custom metrics by hourly average -[**getUsageTrace**](UsageApi.md#getUsageTrace) | **GET** /api/v1/usage/traces | Get hourly usage for Trace Search - - - -## getUsageFargate - -> UsageFargateResponse getUsageFargate().startHr(startHr).endHr(endHr).execute(); - -Get hourly usage for Fargate - -Get hourly usage for [fargate](https://docs.datadoghq.com/integrations/ecs_fargate/). - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime startHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour - OffsetDateTime endHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour - try { - UsageFargateResponse result = api.getUsageFargate() - .startHr(startHr) - .endHr(endHr) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageFargate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour | - **endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour | [optional] - -### Return type - -[**UsageFargateResponse**](UsageFargateResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - - -## getUsageHosts - -> UsageHostsResponse getUsageHosts().startHr(startHr).endHr(endHr).execute(); - -Get hourly usage for hosts and containers - -Get hourly usage for hosts and containers. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime startHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour - OffsetDateTime endHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour - try { - UsageHostsResponse result = api.getUsageHosts() - .startHr(startHr) - .endHr(endHr) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageHosts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour | - **endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour | [optional] - -### Return type - -[**UsageHostsResponse**](UsageHostsResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - - -## getUsageLogs - -> UsageLogsResponse getUsageLogs().startHr(startHr).endHr(endHr).execute(); - -Get hourly usage for Logs - -Get hourly usage for logs. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime startHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour - OffsetDateTime endHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour - try { - UsageLogsResponse result = api.getUsageLogs() - .startHr(startHr) - .endHr(endHr) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageLogs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour | - **endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour | [optional] - -### Return type - -[**UsageLogsResponse**](UsageLogsResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - - -## getUsageSummary - -> UsageSummaryResponse getUsageSummary().startMonth(startMonth).endMonth(endMonth).includeOrgDetails(includeOrgDetails).execute(); - -Get usage across your multi-org account - -Get usage across your multi-org account. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime startMonth = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. - OffsetDateTime endMonth = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month. - Boolean includeOrgDetails = true; // Boolean | Include usage summaries for each sub-org. - try { - UsageSummaryResponse result = api.getUsageSummary() - .startMonth(startMonth) - .endMonth(endMonth) - .includeOrgDetails(includeOrgDetails) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageSummary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startMonth** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. | - **endMonth** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month. | [optional] - **includeOrgDetails** | **Boolean**| Include usage summaries for each sub-org. | [optional] - -### Return type - -[**UsageSummaryResponse**](UsageSummaryResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - - -## getUsageSynthetics - -> UsageSyntheticsResponse getUsageSynthetics().startHr(startHr).endHr(endHr).execute(); - -Get hourly usage for Synthetics - -Get hourly usage for [synthetics](https://docs.datadoghq.com/synthetics/). - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime startHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour - OffsetDateTime endHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour - try { - UsageSyntheticsResponse result = api.getUsageSynthetics() - .startHr(startHr) - .endHr(endHr) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageSynthetics"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour | - **endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour | [optional] - -### Return type - -[**UsageSyntheticsResponse**](UsageSyntheticsResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - - -## getUsageTimeseries - -> UsageTimeseriesResponse getUsageTimeseries().startHr(startHr).endHr(endHr).execute(); - -Get hourly usage for custom metrics - -Get hourly usage for [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/). - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime startHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour - OffsetDateTime endHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour - try { - UsageTimeseriesResponse result = api.getUsageTimeseries() - .startHr(startHr) - .endHr(endHr) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageTimeseries"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour | - **endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour | [optional] - -### Return type - -[**UsageTimeseriesResponse**](UsageTimeseriesResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - - -## getUsageTopAvgMetrics - -> UsageTopAvgMetricsResponse getUsageTopAvgMetrics().month(month).names(names).execute(); - -Get top 500 custom metrics by hourly average - -Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime month = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. - List names = Arrays.asList(); // List | Comma-separated list of metric names. - try { - UsageTopAvgMetricsResponse result = api.getUsageTopAvgMetrics() - .month(month) - .names(names) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageTopAvgMetrics"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **month** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. | - **names** | [**List<String>**](String.md)| Comma-separated list of metric names. | [optional] - -### Return type - -[**UsageTopAvgMetricsResponse**](UsageTopAvgMetricsResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - - -## getUsageTrace - -> UsageTraceResponse getUsageTrace().startHr(startHr).endHr(endHr).execute(); - -Get hourly usage for Trace Search - -Get hourly usage for trace search. - -### Example - -```java -// Import classes: -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.auth.*; -import com.datadog.api.v1.client.models.*; -import com.datadog.api.v1.client.api.UsageApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://api.datadoghq.com"); - - // Configure API key authorization: apiKeyAuth - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("apiKeyAuth"); - apiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //apiKeyAuth.setApiKeyPrefix("Token"); - - // Configure API key authorization: appKeyAuth - ApiKeyAuth appKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("appKeyAuth"); - appKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //appKeyAuth.setApiKeyPrefix("Token"); - - UsageApi apiInstance = new UsageApi(defaultClient); - OffsetDateTime startHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour - OffsetDateTime endHr = new OffsetDateTime(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour - try { - UsageTraceResponse result = api.getUsageTrace() - .startHr(startHr) - .endHr(endHr) - .execute(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UsageApi#getUsageTrace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour | - **endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour | [optional] - -### Return type - -[**UsageTraceResponse**](UsageTraceResponse.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth), [appKeyAuth](../README.md#appKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json;datetime-format=rfc3339 - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **401** | Unauthorized | - | -| **403** | Forbidden | - | - diff --git a/src/main/java/com/datadog/api/v1/client/api/KeysApi.java b/src/main/java/com/datadog/api/v1/client/api/KeysApi.java deleted file mode 100644 index 3c46b59d67d..00000000000 --- a/src/main/java/com/datadog/api/v1/client/api/KeysApi.java +++ /dev/null @@ -1,1041 +0,0 @@ -package com.datadog.api.v1.client.api; - -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiResponse; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.Pair; - -import javax.ws.rs.core.GenericType; - -import com.datadog.api.v1.client.model.APIErrorResponse; -import com.datadog.api.v1.client.model.ApiKey; -import com.datadog.api.v1.client.model.ApiKeyListResponse; -import com.datadog.api.v1.client.model.ApiKeyResponse; -import com.datadog.api.v1.client.model.ApplicationKey; -import com.datadog.api.v1.client.model.ApplicationKeyListResponse; -import com.datadog.api.v1.client.model.ApplicationKeyResponse; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -public class KeysApi { - private ApiClient apiClient; - - public KeysApi() { - this(Configuration.getDefaultApiClient()); - } - - public KeysApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - -private ApiResponse createAPIKeyWithHttpInfo(ApiKey body) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/api/v1/api_key"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.createAPIKey", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIcreateAPIKeyRequest { - private ApiKey body; - - private APIcreateAPIKeyRequest() { - } - - - /** - * Set body - * @param body (optional) - * @return APIcreateAPIKeyRequest - */ - public APIcreateAPIKeyRequest body(ApiKey body) { - this.body = body; - return this; - } - - - /** - * Execute createAPIKey request - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
409 Conflict -
- - */ - - public ApiKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute createAPIKey request with HTTP info returned - * @return ApiResponse<ApiKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
409 Conflict -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return createAPIKeyWithHttpInfo(body); - } - } - - /** - * Create an API key - * Creates an API key with a given name. - * @return createAPIKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIcreateAPIKeyRequest createAPIKey() throws ApiException { - return new APIcreateAPIKeyRequest(); - } - -private ApiResponse createApplicationKeyWithHttpInfo(ApplicationKey body) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/api/v1/application_key"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.createApplicationKey", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIcreateApplicationKeyRequest { - private ApplicationKey body; - - private APIcreateApplicationKeyRequest() { - } - - - /** - * Set body - * @param body (optional) - * @return APIcreateApplicationKeyRequest - */ - public APIcreateApplicationKeyRequest body(ApplicationKey body) { - this.body = body; - return this; - } - - - /** - * Execute createApplicationKey request - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
409 Conflict -
- - */ - - public ApplicationKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute createApplicationKey request with HTTP info returned - * @return ApiResponse<ApplicationKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
409 Conflict -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return createApplicationKeyWithHttpInfo(body); - } - } - - /** - * Create an application key - * Create an application key with a given name. - * @return createApplicationKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIcreateApplicationKeyRequest createApplicationKey() throws ApiException { - return new APIcreateApplicationKeyRequest(); - } - -private ApiResponse deleteAPIKeyWithHttpInfo(String key) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException(400, "Missing the required parameter 'key' when calling deleteAPIKey"); - } - - // create path and map variables - String localVarPath = "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.deleteAPIKey", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIdeleteAPIKeyRequest { - private String key; - - private APIdeleteAPIKeyRequest(String key) { - this.key = key; - } - - - /** - * Execute deleteAPIKey request - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute deleteAPIKey request with HTTP info returned - * @return ApiResponse<ApiKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteAPIKeyWithHttpInfo(key); - } - } - - /** - * Delete an API key - * Delete a given API key. - * @param key The specific API key you are working with. (required) - * @return deleteAPIKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIdeleteAPIKeyRequest deleteAPIKey(String key) throws ApiException { - return new APIdeleteAPIKeyRequest(key); - } - -private ApiResponse deleteApplicationKeyWithHttpInfo(String key) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException(400, "Missing the required parameter 'key' when calling deleteApplicationKey"); - } - - // create path and map variables - String localVarPath = "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.deleteApplicationKey", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIdeleteApplicationKeyRequest { - private String key; - - private APIdeleteApplicationKeyRequest(String key) { - this.key = key; - } - - - /** - * Execute deleteApplicationKey request - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApplicationKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute deleteApplicationKey request with HTTP info returned - * @return ApiResponse<ApplicationKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return deleteApplicationKeyWithHttpInfo(key); - } - } - - /** - * Delete an application key - * Delete a given application key. - * @param key The specific APP key you are working with. (required) - * @return deleteApplicationKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIdeleteApplicationKeyRequest deleteApplicationKey(String key) throws ApiException { - return new APIdeleteApplicationKeyRequest(key); - } - -private ApiResponse editAPIKeyWithHttpInfo(String key, ApiKey body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException(400, "Missing the required parameter 'key' when calling editAPIKey"); - } - - // create path and map variables - String localVarPath = "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.editAPIKey", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIeditAPIKeyRequest { - private String key; - private ApiKey body; - - private APIeditAPIKeyRequest(String key) { - this.key = key; - } - - - /** - * Set body - * @param body (optional) - * @return APIeditAPIKeyRequest - */ - public APIeditAPIKeyRequest body(ApiKey body) { - this.body = body; - return this; - } - - - /** - * Execute editAPIKey request - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute editAPIKey request with HTTP info returned - * @return ApiResponse<ApiKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return editAPIKeyWithHttpInfo(key, body); - } - } - - /** - * Edit an API key - * Edit an API key name. - * @param key The specific API key you are working with. (required) - * @return editAPIKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIeditAPIKeyRequest editAPIKey(String key) throws ApiException { - return new APIeditAPIKeyRequest(key); - } - -private ApiResponse editApplicationKeyWithHttpInfo(String key, ApplicationKey body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException(400, "Missing the required parameter 'key' when calling editApplicationKey"); - } - - // create path and map variables - String localVarPath = "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.editApplicationKey", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIeditApplicationKeyRequest { - private String key; - private ApplicationKey body; - - private APIeditApplicationKeyRequest(String key) { - this.key = key; - } - - - /** - * Set body - * @param body (optional) - * @return APIeditApplicationKeyRequest - */ - public APIeditApplicationKeyRequest body(ApplicationKey body) { - this.body = body; - return this; - } - - - /** - * Execute editApplicationKey request - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApplicationKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute editApplicationKey request with HTTP info returned - * @return ApiResponse<ApplicationKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return editApplicationKeyWithHttpInfo(key, body); - } - } - - /** - * Edit an application key - * Edit an application key name. - * @param key The specific APP key you are working with. (required) - * @return editApplicationKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIeditApplicationKeyRequest editApplicationKey(String key) throws ApiException { - return new APIeditApplicationKeyRequest(key); - } - -private ApiResponse getAPIKeyWithHttpInfo(String key) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException(400, "Missing the required parameter 'key' when calling getAPIKey"); - } - - // create path and map variables - String localVarPath = "/api/v1/api_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.getAPIKey", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetAPIKeyRequest { - private String key; - - private APIgetAPIKeyRequest(String key) { - this.key = key; - } - - - /** - * Execute getAPIKey request - * @return ApiKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getAPIKey request with HTTP info returned - * @return ApiResponse<ApiKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getAPIKeyWithHttpInfo(key); - } - } - - /** - * Get API key - * Get a given API key. - * @param key The specific API key you are working with. (required) - * @return getAPIKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetAPIKeyRequest getAPIKey(String key) throws ApiException { - return new APIgetAPIKeyRequest(key); - } - -private ApiResponse getAllAPIKeysWithHttpInfo() throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/api/v1/api_key"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.getAllAPIKeys", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetAllAPIKeysRequest { - - private APIgetAllAPIKeysRequest() { - } - - - /** - * Execute getAllAPIKeys request - * @return ApiKeyListResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public ApiKeyListResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getAllAPIKeys request with HTTP info returned - * @return ApiResponse<ApiKeyListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getAllAPIKeysWithHttpInfo(); - } - } - - /** - * Get all API keys - * Get all API keys available for your account. - * @return getAllAPIKeysRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetAllAPIKeysRequest getAllAPIKeys() throws ApiException { - return new APIgetAllAPIKeysRequest(); - } - -private ApiResponse getAllApplicationKeysWithHttpInfo() throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/api/v1/application_key"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.getAllApplicationKeys", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetAllApplicationKeysRequest { - - private APIgetAllApplicationKeysRequest() { - } - - - /** - * Execute getAllApplicationKeys request - * @return ApplicationKeyListResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public ApplicationKeyListResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getAllApplicationKeys request with HTTP info returned - * @return ApiResponse<ApplicationKeyListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getAllApplicationKeysWithHttpInfo(); - } - } - - /** - * Get all application keys - * Get all application keys available for your Datadog account. - * @return getAllApplicationKeysRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetAllApplicationKeysRequest getAllApplicationKeys() throws ApiException { - return new APIgetAllApplicationKeysRequest(); - } - -private ApiResponse getApplicationKeyWithHttpInfo(String key) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException(400, "Missing the required parameter 'key' when calling getApplicationKey"); - } - - // create path and map variables - String localVarPath = "/api/v1/application_key/{key}" - .replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("KeysApi.getApplicationKey", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetApplicationKeyRequest { - private String key; - - private APIgetApplicationKeyRequest(String key) { - this.key = key; - } - - - /** - * Execute getApplicationKey request - * @return ApplicationKeyResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApplicationKeyResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getApplicationKey request with HTTP info returned - * @return ApiResponse<ApplicationKeyResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getApplicationKeyWithHttpInfo(key); - } - } - - /** - * Get an application key - * Get a given application key. - * @param key The specific APP key you are working with. (required) - * @return getApplicationKeyRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetApplicationKeyRequest getApplicationKey(String key) throws ApiException { - return new APIgetApplicationKeyRequest(key); - } -} diff --git a/src/main/java/com/datadog/api/v1/client/api/OrgsApi.java b/src/main/java/com/datadog/api/v1/client/api/OrgsApi.java deleted file mode 100644 index d4d2bda1d7b..00000000000 --- a/src/main/java/com/datadog/api/v1/client/api/OrgsApi.java +++ /dev/null @@ -1,464 +0,0 @@ -package com.datadog.api.v1.client.api; - -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiResponse; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.Pair; - -import javax.ws.rs.core.GenericType; - -import com.datadog.api.v1.client.model.APIErrorResponse; -import java.io.File; -import com.datadog.api.v1.client.model.IdpResponse; -import com.datadog.api.v1.client.model.Org; -import com.datadog.api.v1.client.model.OrgCreateBody; -import com.datadog.api.v1.client.model.OrgCreateResponse; -import com.datadog.api.v1.client.model.OrgListResponse; -import com.datadog.api.v1.client.model.OrgResponse; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -public class OrgsApi { - private ApiClient apiClient; - - public OrgsApi() { - this(Configuration.getDefaultApiClient()); - } - - public OrgsApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - -private ApiResponse createChildOrgWithHttpInfo(OrgCreateBody body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createChildOrg"); - } - - // create path and map variables - String localVarPath = "/api/v1/org"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("OrgsApi.createChildOrg", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIcreateChildOrgRequest { - private OrgCreateBody body; - - private APIcreateChildOrgRequest() { - } - - - /** - * Set body - * @param body Org object that needs to be created (required) - * @return APIcreateChildOrgRequest - */ - public APIcreateChildOrgRequest body(OrgCreateBody body) { - this.body = body; - return this; - } - - - /** - * Execute createChildOrg request - * @return OrgCreateResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public OrgCreateResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute createChildOrg request with HTTP info returned - * @return ApiResponse<OrgCreateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return createChildOrgWithHttpInfo(body); - } - } - - /** - * Create a child organization - * You can create, edit, and manage organizations. This endpoint requires the [multi-org account](https://docs.datadoghq.com/account_management/multi_organization/) feature and must be enabled by [contacting support](https://docs.datadoghq.com/help/). Once a new child organization is created, you can interact with it by using the `org.public_id`, `pi_key.key`, and **application_key.hash** provided in the response. - * @return createChildOrgRequest - * @throws ApiException if fails to make API call - - - */ - - public APIcreateChildOrgRequest createChildOrg() throws ApiException { - return new APIcreateChildOrgRequest(); - } - -private ApiResponse getOrgWithHttpInfo() throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/api/v1/org"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("OrgsApi.getOrg", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetOrgRequest { - - private APIgetOrgRequest() { - } - - - /** - * Execute getOrg request - * @return OrgListResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public OrgListResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getOrg request with HTTP info returned - * @return ApiResponse<OrgListResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getOrgWithHttpInfo(); - } - } - - /** - * Get organization information - * Get information about your organization. - * @return getOrgRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetOrgRequest getOrg() throws ApiException { - return new APIgetOrgRequest(); - } - -private ApiResponse updateOrgWithHttpInfo(String publicId, Org body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'publicId' is set - if (publicId == null) { - throw new ApiException(400, "Missing the required parameter 'publicId' when calling updateOrg"); - } - - // create path and map variables - String localVarPath = "/api/v1/org/{public_id}" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("OrgsApi.updateOrg", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIupdateOrgRequest { - private String publicId; - private Org body; - - private APIupdateOrgRequest(String publicId) { - this.publicId = publicId; - } - - - /** - * Set body - * @param body (optional) - * @return APIupdateOrgRequest - */ - public APIupdateOrgRequest body(Org body) { - this.body = body; - return this; - } - - - /** - * Execute updateOrg request - * @return OrgResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public OrgResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute updateOrg request with HTTP info returned - * @return ApiResponse<OrgResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return updateOrgWithHttpInfo(publicId, body); - } - } - - /** - * Update your organization - * Update your organization. - * @param publicId The public_id of the org you are operating within. (required) - * @return updateOrgRequest - * @throws ApiException if fails to make API call - - - */ - - public APIupdateOrgRequest updateOrg(String publicId) throws ApiException { - return new APIupdateOrgRequest(publicId); - } - -private ApiResponse uploadIdPForOrgWithHttpInfo(String publicId, File idpFile) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'publicId' is set - if (publicId == null) { - throw new ApiException(400, "Missing the required parameter 'publicId' when calling uploadIdPForOrg"); - } - - // verify the required parameter 'idpFile' is set - if (idpFile == null) { - throw new ApiException(400, "Missing the required parameter 'idpFile' when calling uploadIdPForOrg"); - } - - // create path and map variables - String localVarPath = "/api/v1/org/{public_id}/idp_metadata" - .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - if (idpFile != null) - localVarFormParams.put("idp_file", idpFile); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("OrgsApi.uploadIdPForOrg", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIuploadIdPForOrgRequest { - private String publicId; - private File idpFile; - - private APIuploadIdPForOrgRequest(String publicId) { - this.publicId = publicId; - } - - - /** - * Set idpFile - * @param idpFile The path to the XML metadata file you wish to upload. (required) - * @return APIuploadIdPForOrgRequest - */ - public APIuploadIdPForOrgRequest idpFile(File idpFile) { - this.idpFile = idpFile; - return this; - } - - - /** - * Execute uploadIdPForOrg request - * @return IdpResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
415 Unsupported Media Type -
- - */ - - public IdpResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute uploadIdPForOrg request with HTTP info returned - * @return ApiResponse<IdpResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
415 Unsupported Media Type -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return uploadIdPForOrgWithHttpInfo(publicId, idpFile); - } - } - - /** - * Upload IdP metadata - * There are a couple of options for updating the Identity Provider (IdP) metadata from your SAML IdP. * **Multipart Form-Data**: Post the IdP metadata file using a form post. * **XML Body:** Post the IdP metadata file as the body of the request. - * @param publicId The public_id of the org you are operating with (required) - * @return uploadIdPForOrgRequest - * @throws ApiException if fails to make API call - - - */ - - public APIuploadIdPForOrgRequest uploadIdPForOrg(String publicId) throws ApiException { - return new APIuploadIdPForOrgRequest(publicId); - } -} diff --git a/src/main/java/com/datadog/api/v1/client/api/UsageApi.java b/src/main/java/com/datadog/api/v1/client/api/UsageApi.java deleted file mode 100644 index 867e7fd3b7d..00000000000 --- a/src/main/java/com/datadog/api/v1/client/api/UsageApi.java +++ /dev/null @@ -1,1027 +0,0 @@ -package com.datadog.api.v1.client.api; - -import com.datadog.api.v1.client.ApiException; -import com.datadog.api.v1.client.ApiClient; -import com.datadog.api.v1.client.ApiResponse; -import com.datadog.api.v1.client.Configuration; -import com.datadog.api.v1.client.Pair; - -import javax.ws.rs.core.GenericType; - -import com.datadog.api.v1.client.model.APIErrorResponse; -import java.time.OffsetDateTime; -import com.datadog.api.v1.client.model.UsageFargateResponse; -import com.datadog.api.v1.client.model.UsageHostsResponse; -import com.datadog.api.v1.client.model.UsageLogsResponse; -import com.datadog.api.v1.client.model.UsageSummaryResponse; -import com.datadog.api.v1.client.model.UsageSyntheticsResponse; -import com.datadog.api.v1.client.model.UsageTimeseriesResponse; -import com.datadog.api.v1.client.model.UsageTopAvgMetricsResponse; -import com.datadog.api.v1.client.model.UsageTraceResponse; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -public class UsageApi { - private ApiClient apiClient; - - public UsageApi() { - this(Configuration.getDefaultApiClient()); - } - - public UsageApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - -private ApiResponse getUsageFargateWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'startHr' is set - if (startHr == null) { - throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageFargate"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/fargate"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageFargate", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageFargateRequest { - private OffsetDateTime startHr; - private OffsetDateTime endHr; - - private APIgetUsageFargateRequest() { - } - - - /** - * Set startHr - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour (required) - * @return APIgetUsageFargateRequest - */ - public APIgetUsageFargateRequest startHr(OffsetDateTime startHr) { - this.startHr = startHr; - return this; - } - - - /** - * Set endHr - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour (optional) - * @return APIgetUsageFargateRequest - */ - public APIgetUsageFargateRequest endHr(OffsetDateTime endHr) { - this.endHr = endHr; - return this; - } - - - /** - * Execute getUsageFargate request - * @return UsageFargateResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageFargateResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageFargate request with HTTP info returned - * @return ApiResponse<UsageFargateResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageFargateWithHttpInfo(startHr, endHr); - } - } - - /** - * Get hourly usage for Fargate - * Get hourly usage for [fargate](https://docs.datadoghq.com/integrations/ecs_fargate/). - * @return getUsageFargateRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageFargateRequest getUsageFargate() throws ApiException { - return new APIgetUsageFargateRequest(); - } - -private ApiResponse getUsageHostsWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'startHr' is set - if (startHr == null) { - throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageHosts"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/hosts"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageHosts", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageHostsRequest { - private OffsetDateTime startHr; - private OffsetDateTime endHr; - - private APIgetUsageHostsRequest() { - } - - - /** - * Set startHr - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour (required) - * @return APIgetUsageHostsRequest - */ - public APIgetUsageHostsRequest startHr(OffsetDateTime startHr) { - this.startHr = startHr; - return this; - } - - - /** - * Set endHr - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour (optional) - * @return APIgetUsageHostsRequest - */ - public APIgetUsageHostsRequest endHr(OffsetDateTime endHr) { - this.endHr = endHr; - return this; - } - - - /** - * Execute getUsageHosts request - * @return UsageHostsResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageHostsResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageHosts request with HTTP info returned - * @return ApiResponse<UsageHostsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageHostsWithHttpInfo(startHr, endHr); - } - } - - /** - * Get hourly usage for hosts and containers - * Get hourly usage for hosts and containers. - * @return getUsageHostsRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageHostsRequest getUsageHosts() throws ApiException { - return new APIgetUsageHostsRequest(); - } - -private ApiResponse getUsageLogsWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'startHr' is set - if (startHr == null) { - throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageLogs"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/logs"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageLogs", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageLogsRequest { - private OffsetDateTime startHr; - private OffsetDateTime endHr; - - private APIgetUsageLogsRequest() { - } - - - /** - * Set startHr - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour (required) - * @return APIgetUsageLogsRequest - */ - public APIgetUsageLogsRequest startHr(OffsetDateTime startHr) { - this.startHr = startHr; - return this; - } - - - /** - * Set endHr - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour (optional) - * @return APIgetUsageLogsRequest - */ - public APIgetUsageLogsRequest endHr(OffsetDateTime endHr) { - this.endHr = endHr; - return this; - } - - - /** - * Execute getUsageLogs request - * @return UsageLogsResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageLogsResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageLogs request with HTTP info returned - * @return ApiResponse<UsageLogsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageLogsWithHttpInfo(startHr, endHr); - } - } - - /** - * Get hourly usage for Logs - * Get hourly usage for logs. - * @return getUsageLogsRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageLogsRequest getUsageLogs() throws ApiException { - return new APIgetUsageLogsRequest(); - } - -private ApiResponse getUsageSummaryWithHttpInfo(OffsetDateTime startMonth, OffsetDateTime endMonth, Boolean includeOrgDetails) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'startMonth' is set - if (startMonth == null) { - throw new ApiException(400, "Missing the required parameter 'startMonth' when calling getUsageSummary"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/summary"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_month", startMonth)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_month", endMonth)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_org_details", includeOrgDetails)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageSummary", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageSummaryRequest { - private OffsetDateTime startMonth; - private OffsetDateTime endMonth; - private Boolean includeOrgDetails; - - private APIgetUsageSummaryRequest() { - } - - - /** - * Set startMonth - * @param startMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month. Maximum of 15 months ago. (required) - * @return APIgetUsageSummaryRequest - */ - public APIgetUsageSummaryRequest startMonth(OffsetDateTime startMonth) { - this.startMonth = startMonth; - return this; - } - - - /** - * Set endMonth - * @param endMonth Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month. (optional) - * @return APIgetUsageSummaryRequest - */ - public APIgetUsageSummaryRequest endMonth(OffsetDateTime endMonth) { - this.endMonth = endMonth; - return this; - } - - - /** - * Set includeOrgDetails - * @param includeOrgDetails Include usage summaries for each sub-org. (optional) - * @return APIgetUsageSummaryRequest - */ - public APIgetUsageSummaryRequest includeOrgDetails(Boolean includeOrgDetails) { - this.includeOrgDetails = includeOrgDetails; - return this; - } - - - /** - * Execute getUsageSummary request - * @return UsageSummaryResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageSummaryResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageSummary request with HTTP info returned - * @return ApiResponse<UsageSummaryResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageSummaryWithHttpInfo(startMonth, endMonth, includeOrgDetails); - } - } - - /** - * Get usage across your multi-org account - * Get usage across your multi-org account. - * @return getUsageSummaryRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageSummaryRequest getUsageSummary() throws ApiException { - return new APIgetUsageSummaryRequest(); - } - -private ApiResponse getUsageSyntheticsWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'startHr' is set - if (startHr == null) { - throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageSynthetics"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/synthetics"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageSynthetics", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageSyntheticsRequest { - private OffsetDateTime startHr; - private OffsetDateTime endHr; - - private APIgetUsageSyntheticsRequest() { - } - - - /** - * Set startHr - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour (required) - * @return APIgetUsageSyntheticsRequest - */ - public APIgetUsageSyntheticsRequest startHr(OffsetDateTime startHr) { - this.startHr = startHr; - return this; - } - - - /** - * Set endHr - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour (optional) - * @return APIgetUsageSyntheticsRequest - */ - public APIgetUsageSyntheticsRequest endHr(OffsetDateTime endHr) { - this.endHr = endHr; - return this; - } - - - /** - * Execute getUsageSynthetics request - * @return UsageSyntheticsResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageSyntheticsResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageSynthetics request with HTTP info returned - * @return ApiResponse<UsageSyntheticsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageSyntheticsWithHttpInfo(startHr, endHr); - } - } - - /** - * Get hourly usage for Synthetics - * Get hourly usage for [synthetics](https://docs.datadoghq.com/synthetics/). - * @return getUsageSyntheticsRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageSyntheticsRequest getUsageSynthetics() throws ApiException { - return new APIgetUsageSyntheticsRequest(); - } - -private ApiResponse getUsageTimeseriesWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'startHr' is set - if (startHr == null) { - throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageTimeseries"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/timeseries"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageTimeseries", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageTimeseriesRequest { - private OffsetDateTime startHr; - private OffsetDateTime endHr; - - private APIgetUsageTimeseriesRequest() { - } - - - /** - * Set startHr - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour (required) - * @return APIgetUsageTimeseriesRequest - */ - public APIgetUsageTimeseriesRequest startHr(OffsetDateTime startHr) { - this.startHr = startHr; - return this; - } - - - /** - * Set endHr - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour (optional) - * @return APIgetUsageTimeseriesRequest - */ - public APIgetUsageTimeseriesRequest endHr(OffsetDateTime endHr) { - this.endHr = endHr; - return this; - } - - - /** - * Execute getUsageTimeseries request - * @return UsageTimeseriesResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageTimeseriesResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageTimeseries request with HTTP info returned - * @return ApiResponse<UsageTimeseriesResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageTimeseriesWithHttpInfo(startHr, endHr); - } - } - - /** - * Get hourly usage for custom metrics - * Get hourly usage for [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/). - * @return getUsageTimeseriesRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageTimeseriesRequest getUsageTimeseries() throws ApiException { - return new APIgetUsageTimeseriesRequest(); - } - -private ApiResponse getUsageTopAvgMetricsWithHttpInfo(OffsetDateTime month, List names) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'month' is set - if (month == null) { - throw new ApiException(400, "Missing the required parameter 'month' when calling getUsageTopAvgMetrics"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/top_avg_metrics"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "month", month)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "names", names)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageTopAvgMetrics", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageTopAvgMetricsRequest { - private OffsetDateTime month; - private List names; - - private APIgetUsageTopAvgMetricsRequest() { - } - - - /** - * Set month - * @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (required) - * @return APIgetUsageTopAvgMetricsRequest - */ - public APIgetUsageTopAvgMetricsRequest month(OffsetDateTime month) { - this.month = month; - return this; - } - - - /** - * Set names - * @param names Comma-separated list of metric names. (optional) - * @return APIgetUsageTopAvgMetricsRequest - */ - public APIgetUsageTopAvgMetricsRequest names(List names) { - this.names = names; - return this; - } - - - /** - * Execute getUsageTopAvgMetrics request - * @return UsageTopAvgMetricsResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageTopAvgMetricsResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageTopAvgMetrics request with HTTP info returned - * @return ApiResponse<UsageTopAvgMetricsResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageTopAvgMetricsWithHttpInfo(month, names); - } - } - - /** - * Get top 500 custom metrics by hourly average - * Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. - * @return getUsageTopAvgMetricsRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageTopAvgMetricsRequest getUsageTopAvgMetrics() throws ApiException { - return new APIgetUsageTopAvgMetricsRequest(); - } - -private ApiResponse getUsageTraceWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'startHr' is set - if (startHr == null) { - throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageTrace"); - } - - // create path and map variables - String localVarPath = "/api/v1/usage/traces"; - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); - - - - - final String[] localVarAccepts = { - "application/json;datetime-format=rfc3339" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI("UsageApi.getUsageTrace", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - - public class APIgetUsageTraceRequest { - private OffsetDateTime startHr; - private OffsetDateTime endHr; - - private APIgetUsageTraceRequest() { - } - - - /** - * Set startHr - * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour (required) - * @return APIgetUsageTraceRequest - */ - public APIgetUsageTraceRequest startHr(OffsetDateTime startHr) { - this.startHr = startHr; - return this; - } - - - /** - * Set endHr - * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending BEFORE this hour (optional) - * @return APIgetUsageTraceRequest - */ - public APIgetUsageTraceRequest endHr(OffsetDateTime endHr) { - this.endHr = endHr; - return this; - } - - - /** - * Execute getUsageTrace request - * @return UsageTraceResponse - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public UsageTraceResponse execute() throws ApiException { - return this.executeWithHttpInfo().getData(); - } - - /** - * Execute getUsageTrace request with HTTP info returned - * @return ApiResponse<UsageTraceResponse> - * @throws ApiException if fails to make API call - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
- - */ - - public ApiResponse executeWithHttpInfo() throws ApiException { - return getUsageTraceWithHttpInfo(startHr, endHr); - } - } - - /** - * Get hourly usage for Trace Search - * Get hourly usage for trace search. - * @return getUsageTraceRequest - * @throws ApiException if fails to make API call - - - */ - - public APIgetUsageTraceRequest getUsageTrace() throws ApiException { - return new APIgetUsageTraceRequest(); - } -} diff --git a/src/main/java/com/datadog/api/v1/client/model/Org.java b/src/main/java/com/datadog/api/v1/client/model/Org.java deleted file mode 100644 index a579fb20adb..00000000000 --- a/src/main/java/com/datadog/api/v1/client/model/Org.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.datadog.api.v1.client.model.OrgBilling; -import com.datadog.api.v1.client.model.OrgSettings; -import com.datadog.api.v1.client.model.OrgSubscription; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Create, edit, and manage organizations. - */ -@ApiModel(description = "Create, edit, and manage organizations.") -@JsonPropertyOrder({ - Org.JSON_PROPERTY_BILLING, - Org.JSON_PROPERTY_CREATED, - Org.JSON_PROPERTY_DESCRIPTION, - Org.JSON_PROPERTY_NAME, - Org.JSON_PROPERTY_PUBLIC_ID, - Org.JSON_PROPERTY_SETTINGS, - Org.JSON_PROPERTY_SUBSCRIPTION -}) - -public class Org { - public static final String JSON_PROPERTY_BILLING = "billing"; - private OrgBilling billing; - - public static final String JSON_PROPERTY_CREATED = "created"; - private String created; - - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; - private String publicId; - - public static final String JSON_PROPERTY_SETTINGS = "settings"; - private OrgSettings settings; - - public static final String JSON_PROPERTY_SUBSCRIPTION = "subscription"; - private OrgSubscription subscription; - - - public Org billing(OrgBilling billing) { - - this.billing = billing; - return this; - } - - /** - * Get billing - * @return billing - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BILLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OrgBilling getBilling() { - return billing; - } - - - public void setBilling(OrgBilling billing) { - this.billing = billing; - } - - - /** - * TODO. - * @return created - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2019-09-26 17:28:28", value = "TODO.") - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCreated() { - return created; - } - - - - - public Org description(String description) { - - this.description = description; - return this; - } - - /** - * Description of the organization. - * @return description - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "some description", value = "Description of the organization.") - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Org name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the new child-organization, limited to 32 characters. - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "New child org", value = "The name of the new child-organization, limited to 32 characters.") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Org publicId(String publicId) { - - this.publicId = publicId; - return this; - } - - /** - * The public_id of the org you are operating within. - * @return publicId - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "abcdef12345", value = "The public_id of the org you are operating within.") - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPublicId() { - return publicId; - } - - - public void setPublicId(String publicId) { - this.publicId = publicId; - } - - - public Org settings(OrgSettings settings) { - - this.settings = settings; - return this; - } - - /** - * Get settings - * @return settings - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SETTINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OrgSettings getSettings() { - return settings; - } - - - public void setSettings(OrgSettings settings) { - this.settings = settings; - } - - - public Org subscription(OrgSubscription subscription) { - - this.subscription = subscription; - return this; - } - - /** - * Get subscription - * @return subscription - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SUBSCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OrgSubscription getSubscription() { - return subscription; - } - - - public void setSubscription(OrgSubscription subscription) { - this.subscription = subscription; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Org org = (Org) o; - return Objects.equals(this.billing, org.billing) && - Objects.equals(this.created, org.created) && - Objects.equals(this.description, org.description) && - Objects.equals(this.name, org.name) && - Objects.equals(this.publicId, org.publicId) && - Objects.equals(this.settings, org.settings) && - Objects.equals(this.subscription, org.subscription); - } - - @Override - public int hashCode() { - return Objects.hash(billing, created, description, name, publicId, settings, subscription); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Org {\n"); - sb.append(" billing: ").append(toIndentedString(billing)).append("\n"); - sb.append(" created: ").append(toIndentedString(created)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); - sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); - sb.append(" subscription: ").append(toIndentedString(subscription)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/datadog/api/v1/client/model/OrgCreateBody.java b/src/main/java/com/datadog/api/v1/client/model/OrgCreateBody.java deleted file mode 100644 index 249ac7bfb2e..00000000000 --- a/src/main/java/com/datadog/api/v1/client/model/OrgCreateBody.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.datadog.api.v1.client.model.OrgBilling; -import com.datadog.api.v1.client.model.OrgSubscription; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * OrgCreateBody - */ -@JsonPropertyOrder({ - OrgCreateBody.JSON_PROPERTY_BILLING, - OrgCreateBody.JSON_PROPERTY_NAME, - OrgCreateBody.JSON_PROPERTY_SUBSCRIPTION -}) - -public class OrgCreateBody { - public static final String JSON_PROPERTY_BILLING = "billing"; - private OrgBilling billing; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_SUBSCRIPTION = "subscription"; - private OrgSubscription subscription; - - - public OrgCreateBody billing(OrgBilling billing) { - - this.billing = billing; - return this; - } - - /** - * Get billing - * @return billing - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_BILLING) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public OrgBilling getBilling() { - return billing; - } - - - public void setBilling(OrgBilling billing) { - this.billing = billing; - } - - - public OrgCreateBody name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the new child-organization, limited to 32 characters. - * @return name - **/ - @ApiModelProperty(example = "New child org", required = true, value = "The name of the new child-organization, limited to 32 characters.") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public OrgCreateBody subscription(OrgSubscription subscription) { - - this.subscription = subscription; - return this; - } - - /** - * Get subscription - * @return subscription - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty(JSON_PROPERTY_SUBSCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public OrgSubscription getSubscription() { - return subscription; - } - - - public void setSubscription(OrgSubscription subscription) { - this.subscription = subscription; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgCreateBody orgCreateBody = (OrgCreateBody) o; - return Objects.equals(this.billing, orgCreateBody.billing) && - Objects.equals(this.name, orgCreateBody.name) && - Objects.equals(this.subscription, orgCreateBody.subscription); - } - - @Override - public int hashCode() { - return Objects.hash(billing, name, subscription); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgCreateBody {\n"); - sb.append(" billing: ").append(toIndentedString(billing)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" subscription: ").append(toIndentedString(subscription)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/datadog/api/v1/client/model/OrgCreateResponse.java b/src/main/java/com/datadog/api/v1/client/model/OrgCreateResponse.java deleted file mode 100644 index 3ab013d80cd..00000000000 --- a/src/main/java/com/datadog/api/v1/client/model/OrgCreateResponse.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.datadog.api.v1.client.model.ApiKey; -import com.datadog.api.v1.client.model.ApplicationKey; -import com.datadog.api.v1.client.model.Org; -import com.datadog.api.v1.client.model.User; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * OrgCreateResponse - */ -@JsonPropertyOrder({ - OrgCreateResponse.JSON_PROPERTY_API_KEY, - OrgCreateResponse.JSON_PROPERTY_APPLICATION_KEY, - OrgCreateResponse.JSON_PROPERTY_ORG, - OrgCreateResponse.JSON_PROPERTY_USER -}) - -public class OrgCreateResponse { - public static final String JSON_PROPERTY_API_KEY = "api_key"; - private ApiKey apiKey; - - public static final String JSON_PROPERTY_APPLICATION_KEY = "application_key"; - private ApplicationKey applicationKey; - - public static final String JSON_PROPERTY_ORG = "org"; - private Org org; - - public static final String JSON_PROPERTY_USER = "user"; - private User user; - - - public OrgCreateResponse apiKey(ApiKey apiKey) { - - this.apiKey = apiKey; - return this; - } - - /** - * Get apiKey - * @return apiKey - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_API_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ApiKey getApiKey() { - return apiKey; - } - - - public void setApiKey(ApiKey apiKey) { - this.apiKey = apiKey; - } - - - public OrgCreateResponse applicationKey(ApplicationKey applicationKey) { - - this.applicationKey = applicationKey; - return this; - } - - /** - * Get applicationKey - * @return applicationKey - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_APPLICATION_KEY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ApplicationKey getApplicationKey() { - return applicationKey; - } - - - public void setApplicationKey(ApplicationKey applicationKey) { - this.applicationKey = applicationKey; - } - - - public OrgCreateResponse org(Org org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ORG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Org getOrg() { - return org; - } - - - public void setOrg(Org org) { - this.org = org; - } - - - public OrgCreateResponse user(User user) { - - this.user = user; - return this; - } - - /** - * Get user - * @return user - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_USER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public User getUser() { - return user; - } - - - public void setUser(User user) { - this.user = user; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgCreateResponse orgCreateResponse = (OrgCreateResponse) o; - return Objects.equals(this.apiKey, orgCreateResponse.apiKey) && - Objects.equals(this.applicationKey, orgCreateResponse.applicationKey) && - Objects.equals(this.org, orgCreateResponse.org) && - Objects.equals(this.user, orgCreateResponse.user); - } - - @Override - public int hashCode() { - return Objects.hash(apiKey, applicationKey, org, user); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgCreateResponse {\n"); - sb.append(" apiKey: ").append(toIndentedString(apiKey)).append("\n"); - sb.append(" applicationKey: ").append(toIndentedString(applicationKey)).append("\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append(" user: ").append(toIndentedString(user)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/datadog/api/v1/client/model/OrgListResponse.java b/src/main/java/com/datadog/api/v1/client/model/OrgListResponse.java deleted file mode 100644 index 8582976fed8..00000000000 --- a/src/main/java/com/datadog/api/v1/client/model/OrgListResponse.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.datadog.api.v1.client.model.Org; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TODO. - */ -@ApiModel(description = "TODO.") -@JsonPropertyOrder({ - OrgListResponse.JSON_PROPERTY_ORGS -}) - -public class OrgListResponse { - public static final String JSON_PROPERTY_ORGS = "orgs"; - private List orgs = null; - - - public OrgListResponse orgs(List orgs) { - - this.orgs = orgs; - return this; - } - - public OrgListResponse addOrgsItem(Org orgsItem) { - if (this.orgs == null) { - this.orgs = new ArrayList<>(); - } - this.orgs.add(orgsItem); - return this; - } - - /** - * Get orgs - * @return orgs - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ORGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getOrgs() { - return orgs; - } - - - public void setOrgs(List orgs) { - this.orgs = orgs; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgListResponse orgListResponse = (OrgListResponse) o; - return Objects.equals(this.orgs, orgListResponse.orgs); - } - - @Override - public int hashCode() { - return Objects.hash(orgs); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgListResponse {\n"); - sb.append(" orgs: ").append(toIndentedString(orgs)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/main/java/com/datadog/api/v1/client/model/OrgResponse.java b/src/main/java/com/datadog/api/v1/client/model/OrgResponse.java deleted file mode 100644 index f85070a946e..00000000000 --- a/src/main/java/com/datadog/api/v1/client/model/OrgResponse.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.datadog.api.v1.client.model.Org; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * TODO. - */ -@ApiModel(description = "TODO.") -@JsonPropertyOrder({ - OrgResponse.JSON_PROPERTY_ORG -}) - -public class OrgResponse { - public static final String JSON_PROPERTY_ORG = "org"; - private Org org; - - - public OrgResponse org(Org org) { - - this.org = org; - return this; - } - - /** - * Get org - * @return org - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_ORG) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Org getOrg() { - return org; - } - - - public void setOrg(Org org) { - this.org = org; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OrgResponse orgResponse = (OrgResponse) o; - return Objects.equals(this.org, orgResponse.org); - } - - @Override - public int hashCode() { - return Objects.hash(org); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OrgResponse {\n"); - sb.append(" org: ").append(toIndentedString(org)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/src/test/java/com/datadog/api/v1/client/api/KeysApiTest.java b/src/test/java/com/datadog/api/v1/client/api/KeyManagementApiTest.java similarity index 98% rename from src/test/java/com/datadog/api/v1/client/api/KeysApiTest.java rename to src/test/java/com/datadog/api/v1/client/api/KeyManagementApiTest.java index 362a39a71b0..b2fca5966c4 100644 --- a/src/test/java/com/datadog/api/v1/client/api/KeysApiTest.java +++ b/src/test/java/com/datadog/api/v1/client/api/KeyManagementApiTest.java @@ -17,11 +17,11 @@ import static org.junit.Assert.assertEquals; /** - * API tests for KeysApi + * API tests for KeyManagementApi */ -public class KeysApiTest extends V1ApiTest { +public class KeyManagementApiTest extends V1ApiTest { - private final KeysApi api = new KeysApi(generalApiUnitTestClient); + private final KeyManagementApi api = new KeyManagementApi(generalApiUnitTestClient); private final String apiUri = "/api/v1/api_key"; private final String appUri = "/api/v1/application_key"; private final String fixturePrefix = "v1/client/api/keys_fixtures"; diff --git a/src/test/java/com/datadog/api/v1/client/api/OrgsApiTest.java b/src/test/java/com/datadog/api/v1/client/api/OrganizationsApiTest.java similarity index 86% rename from src/test/java/com/datadog/api/v1/client/api/OrgsApiTest.java rename to src/test/java/com/datadog/api/v1/client/api/OrganizationsApiTest.java index 0b9aa2c14e9..b2ea3abba34 100644 --- a/src/test/java/com/datadog/api/v1/client/api/OrgsApiTest.java +++ b/src/test/java/com/datadog/api/v1/client/api/OrganizationsApiTest.java @@ -23,9 +23,9 @@ /** * API tests for OrgsApi */ -public class OrgsApiTest extends V1ApiTest { +public class OrganizationsApiTest extends V1ApiTest { - private final OrgsApi api = new OrgsApi(generalApiUnitTestClient); + private final OrganizationsApi api = new OrganizationsApi(generalApiUnitTestClient); private final String apiUri = "/api/v1/org"; private final String fixturePrefix = "v1/client/api/org_fixtures"; @@ -46,11 +46,11 @@ public void createChildOrgTest() throws ApiException, IOException { // CreateBody can contain anything since we're mocking the response // Just confirmation that the proper fields can be set - OrgCreateBody orgCreateBody = new OrgCreateBody() + OrganizationCreateBody orgCreateBody = new OrganizationCreateBody() .name("My Org") - .billing(new OrgBilling().type("parent_billing")) - .subscription(new OrgSubscription().type("pro")); - OrgCreateResponse response = api.createChildOrg().body(orgCreateBody).execute(); + .billing(new OrganizationBilling().type("parent_billing")) + .subscription(new OrganizationSubscription().type("pro")); + OrganizationCreateResponse response = api.createChildOrg().body(orgCreateBody).execute(); // Assert values match whats in create_child_org.json assertEquals(response.getOrg().getName(), "My Org"); @@ -81,7 +81,7 @@ public void getOrgTest() throws ApiException, IOException { MappingBuilder stub = setupStub(apiUri, fixturePrefix + "/get_orgs.json", "get"); stubFor(stub); - OrgListResponse response = api.getOrg().execute(); + OrganizationListResponse response = api.getOrg().execute(); // Assert values match whats in get_orgs.json fixture assertEquals(response.getOrgs().size(), 1); @@ -110,26 +110,26 @@ public void updateOrgTest() throws ApiException, IOException { // Update Body can contain anything since we're mocking the response // Just confirmation that the proper fields can be set - Org org = new Org().name("My Org").settings( - new OrgSettings().saml( - new OrgSettingsSaml().enabled(true) + Organization org = new Organization().name("My Org").settings( + new OrganizationSettings().saml( + new OrganizationSettingsSaml().enabled(true) ) .samlIdpInitiatedLogin( - new OrgSettingsSamlIdpInitiatedLogin().enabled(true) + new OrganizationSettingsSamlIdpInitiatedLogin().enabled(true) ) .samlStrictMode( - new OrgSettingsSamlIdpInitiatedLogin().enabled(true) + new OrganizationSettingsSamlIdpInitiatedLogin().enabled(true) ) .samlAutocreateUsersDomains( - new OrgSettingsSamlAutocreateUsersDomains().enabled(true).addDomainsItem("my-org.com").addDomainsItem("example.com") + new OrganizationSettingsSamlAutocreateUsersDomains().enabled(true).addDomainsItem("my-org.com").addDomainsItem("example.com") ) ); - OrgResponse response = api.updateOrg(publicId).body(org).execute(); + OrganizationResponse response = api.updateOrg(publicId).body(org).execute(); // Assert values match whats in update_orgs.json fixture assertEquals(response.getOrg().getPublicId(), "axd2s"); assertEquals(response.getOrg().getName(), "My Org"); - assertEquals(response.getOrg().getBilling(), new OrgBilling()); + assertEquals(response.getOrg().getBilling(), new OrganizationBilling()); assertEquals(response.getOrg().getCreated(), "2016-10-06 21:41:12"); assertEquals(response.getOrg().getSettings().getSamlCanBeEnabled(), true); assertEquals(response.getOrg().getSettings().getSamlIdpInitiatedLogin().getEnabled(), true); @@ -164,7 +164,7 @@ public void uploadIdPForOrgTest() throws ApiException, IOException, URISyntaxExc String publicId = "123456"; // Open a file to test the request. Any file can do, content does not matter since the endpoint is mocked. - File idpFile = new File(OrgsApiTest.class.getResource("org_fixtures/update_idp_meta.json").toURI()); + File idpFile = new File(OrganizationsApiTest.class.getResource("org_fixtures/update_idp_meta.json").toURI()); IdpResponse response = api.uploadIdPForOrg(publicId).idpFile(idpFile).execute(); //.uploadIdPForOrg(publicId); assertEquals(response.getMessage(), "IdP metadata successfully uploaded for org Datadog HQ"); diff --git a/src/test/java/com/datadog/api/v1/client/api/UsageApiTest.java b/src/test/java/com/datadog/api/v1/client/api/UsageMeteringApiTest.java similarity index 96% rename from src/test/java/com/datadog/api/v1/client/api/UsageApiTest.java rename to src/test/java/com/datadog/api/v1/client/api/UsageMeteringApiTest.java index b9487570ad0..2be58339fa9 100644 --- a/src/test/java/com/datadog/api/v1/client/api/UsageApiTest.java +++ b/src/test/java/com/datadog/api/v1/client/api/UsageMeteringApiTest.java @@ -26,10 +26,10 @@ /** * API tests for UsageApi */ -public class UsageApiTest extends V1ApiTest { +public class UsageMeteringApiTest extends V1ApiTest { - private static UsageApi api; - private static UsageApi unitAPI; + private static UsageMeteringApi api; + private static UsageMeteringApi unitAPI; private static OffsetDateTime startHr; private static OffsetDateTime endHr; @@ -38,8 +38,8 @@ public class UsageApiTest extends V1ApiTest { @BeforeClass public static void initApi() { - api = new UsageApi(generalApiClient); - unitAPI = new UsageApi(generalApiUnitTestClient); + api = new UsageMeteringApi(generalApiClient); + unitAPI = new UsageMeteringApi(generalApiUnitTestClient); } @Before diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgBillingTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgBillingTest.java deleted file mode 100644 index 52af3801ef6..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgBillingTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgBilling - */ -public class OrgBillingTest { - private final OrgBilling model = new OrgBilling(); - - /** - * Model tests for OrgBilling - */ - @Test - public void testOrgBilling() { - // TODO: test OrgBilling - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgCreateBodyTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgCreateBodyTest.java deleted file mode 100644 index 3f6498e0d79..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgCreateBodyTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.datadog.api.v1.client.model.OrgBilling; -import com.datadog.api.v1.client.model.OrgSubscription; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgCreateBody - */ -public class OrgCreateBodyTest { - private final OrgCreateBody model = new OrgCreateBody(); - - /** - * Model tests for OrgCreateBody - */ - @Test - public void testOrgCreateBody() { - // TODO: test OrgCreateBody - } - - /** - * Test the property 'billing' - */ - @Test - public void billingTest() { - // TODO: test billing - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'subscription' - */ - @Test - public void subscriptionTest() { - // TODO: test subscription - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgCreateResponseTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgCreateResponseTest.java deleted file mode 100644 index 81981a0e0c3..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgCreateResponseTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.datadog.api.v1.client.model.ApiKey; -import com.datadog.api.v1.client.model.ApplicationKey; -import com.datadog.api.v1.client.model.Org; -import com.datadog.api.v1.client.model.User; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgCreateResponse - */ -public class OrgCreateResponseTest { - private final OrgCreateResponse model = new OrgCreateResponse(); - - /** - * Model tests for OrgCreateResponse - */ - @Test - public void testOrgCreateResponse() { - // TODO: test OrgCreateResponse - } - - /** - * Test the property 'apiKey' - */ - @Test - public void apiKeyTest() { - // TODO: test apiKey - } - - /** - * Test the property 'applicationKey' - */ - @Test - public void applicationKeyTest() { - // TODO: test applicationKey - } - - /** - * Test the property 'org' - */ - @Test - public void orgTest() { - // TODO: test org - } - - /** - * Test the property 'user' - */ - @Test - public void userTest() { - // TODO: test user - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgListResponseTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgListResponseTest.java deleted file mode 100644 index db3d3e74556..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgListResponseTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.datadog.api.v1.client.model.Org; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgListResponse - */ -public class OrgListResponseTest { - private final OrgListResponse model = new OrgListResponse(); - - /** - * Model tests for OrgListResponse - */ - @Test - public void testOrgListResponse() { - // TODO: test OrgListResponse - } - - /** - * Test the property 'orgs' - */ - @Test - public void orgsTest() { - // TODO: test orgs - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgResponseTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgResponseTest.java deleted file mode 100644 index 9341c1e72ba..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgResponseTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.datadog.api.v1.client.model.Org; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgResponse - */ -public class OrgResponseTest { - private final OrgResponse model = new OrgResponse(); - - /** - * Model tests for OrgResponse - */ - @Test - public void testOrgResponse() { - // TODO: test OrgResponse - } - - /** - * Test the property 'org' - */ - @Test - public void orgTest() { - // TODO: test org - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlAutocreateUsersDomainsTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlAutocreateUsersDomainsTest.java deleted file mode 100644 index b8301e41506..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlAutocreateUsersDomainsTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgSettingsSamlAutocreateUsersDomains - */ -public class OrgSettingsSamlAutocreateUsersDomainsTest { - private final OrgSettingsSamlAutocreateUsersDomains model = new OrgSettingsSamlAutocreateUsersDomains(); - - /** - * Model tests for OrgSettingsSamlAutocreateUsersDomains - */ - @Test - public void testOrgSettingsSamlAutocreateUsersDomains() { - // TODO: test OrgSettingsSamlAutocreateUsersDomains - } - - /** - * Test the property 'domains' - */ - @Test - public void domainsTest() { - // TODO: test domains - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlIdpInitiatedLoginTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlIdpInitiatedLoginTest.java deleted file mode 100644 index 1577b4b458e..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlIdpInitiatedLoginTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgSettingsSamlIdpInitiatedLogin - */ -public class OrgSettingsSamlIdpInitiatedLoginTest { - private final OrgSettingsSamlIdpInitiatedLogin model = new OrgSettingsSamlIdpInitiatedLogin(); - - /** - * Model tests for OrgSettingsSamlIdpInitiatedLogin - */ - @Test - public void testOrgSettingsSamlIdpInitiatedLogin() { - // TODO: test OrgSettingsSamlIdpInitiatedLogin - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlTest.java deleted file mode 100644 index d722efd9e32..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsSamlTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgSettingsSaml - */ -public class OrgSettingsSamlTest { - private final OrgSettingsSaml model = new OrgSettingsSaml(); - - /** - * Model tests for OrgSettingsSaml - */ - @Test - public void testOrgSettingsSaml() { - // TODO: test OrgSettingsSaml - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgSettingsTest.java deleted file mode 100644 index c123095b56d..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgSettingsTest.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.datadog.api.v1.client.model.OrgSettingsSaml; -import com.datadog.api.v1.client.model.OrgSettingsSamlAutocreateUsersDomains; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgSettings - */ -public class OrgSettingsTest { - private final OrgSettings model = new OrgSettings(); - - /** - * Model tests for OrgSettings - */ - @Test - public void testOrgSettings() { - // TODO: test OrgSettings - } - - /** - * Test the property 'privateWidgetShare' - */ - @Test - public void privateWidgetShareTest() { - // TODO: test privateWidgetShare - } - - /** - * Test the property 'saml' - */ - @Test - public void samlTest() { - // TODO: test saml - } - - /** - * Test the property 'samlAutocreateAccessRole' - */ - @Test - public void samlAutocreateAccessRoleTest() { - // TODO: test samlAutocreateAccessRole - } - - /** - * Test the property 'samlAutocreateUsersDomains' - */ - @Test - public void samlAutocreateUsersDomainsTest() { - // TODO: test samlAutocreateUsersDomains - } - - /** - * Test the property 'samlCanBeEnabled' - */ - @Test - public void samlCanBeEnabledTest() { - // TODO: test samlCanBeEnabled - } - - /** - * Test the property 'samlIdpEndpoint' - */ - @Test - public void samlIdpEndpointTest() { - // TODO: test samlIdpEndpoint - } - - /** - * Test the property 'samlIdpInitiatedLogin' - */ - @Test - public void samlIdpInitiatedLoginTest() { - // TODO: test samlIdpInitiatedLogin - } - - /** - * Test the property 'samlIdpMetadataUploaded' - */ - @Test - public void samlIdpMetadataUploadedTest() { - // TODO: test samlIdpMetadataUploaded - } - - /** - * Test the property 'samlLoginUrl' - */ - @Test - public void samlLoginUrlTest() { - // TODO: test samlLoginUrl - } - - /** - * Test the property 'samlStrictMode' - */ - @Test - public void samlStrictModeTest() { - // TODO: test samlStrictMode - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgSubscriptionTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgSubscriptionTest.java deleted file mode 100644 index 012762442ff..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgSubscriptionTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for OrgSubscription - */ -public class OrgSubscriptionTest { - private final OrgSubscription model = new OrgSubscription(); - - /** - * Model tests for OrgSubscription - */ - @Test - public void testOrgSubscription() { - // TODO: test OrgSubscription - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - -} diff --git a/src/test/java/com/datadog/api/v1/client/model/OrgTest.java b/src/test/java/com/datadog/api/v1/client/model/OrgTest.java deleted file mode 100644 index 6f70557c807..00000000000 --- a/src/test/java/com/datadog/api/v1/client/model/OrgTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * (C) Datadog, Inc. 2019 - * All rights reserved - * Licensed under a 3-clause BSD style license (see LICENSE) - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import com.datadog.api.v1.client.model.OrgBilling; -import com.datadog.api.v1.client.model.OrgSettings; -import com.datadog.api.v1.client.model.OrgSubscription; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Org - */ -public class OrgTest { - private final Org model = new Org(); - - /** - * Model tests for Org - */ - @Test - public void testOrg() { - // TODO: test Org - } - - /** - * Test the property 'billing' - */ - @Test - public void billingTest() { - // TODO: test billing - } - - /** - * Test the property 'created' - */ - @Test - public void createdTest() { - // TODO: test created - } - - /** - * Test the property 'description' - */ - @Test - public void descriptionTest() { - // TODO: test description - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'publicId' - */ - @Test - public void publicIdTest() { - // TODO: test publicId - } - - /** - * Test the property 'settings' - */ - @Test - public void settingsTest() { - // TODO: test settings - } - - /** - * Test the property 'subscription' - */ - @Test - public void subscriptionTest() { - // TODO: test subscription - } - -} From 784224d0d55c9587a78c6cd08f4bab02bd2a68cb Mon Sep 17 00:00:00 2001 From: Nicholas Muesch Date: Fri, 27 Mar 2020 11:57:16 -0400 Subject: [PATCH 2/2] Delete leftover model --- .../com/datadog/api/v1/client/model/Org.java | 276 ------------------ 1 file changed, 276 deletions(-) delete mode 100644 src/main/java/com/datadog/api/v1/client/model/Org.java diff --git a/src/main/java/com/datadog/api/v1/client/model/Org.java b/src/main/java/com/datadog/api/v1/client/model/Org.java deleted file mode 100644 index 16111f60d53..00000000000 --- a/src/main/java/com/datadog/api/v1/client/model/Org.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.datadog.api.v1.client.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -/** - * Create, edit, and manage organizations. - */ -@ApiModel(description = "Create, edit, and manage organizations.") -@JsonPropertyOrder({ - Org.JSON_PROPERTY_BILLING, - Org.JSON_PROPERTY_CREATED, - Org.JSON_PROPERTY_DESCRIPTION, - Org.JSON_PROPERTY_NAME, - Org.JSON_PROPERTY_PUBLIC_ID, - Org.JSON_PROPERTY_SETTINGS, - Org.JSON_PROPERTY_SUBSCRIPTION -}) - -public class Org { - public static final String JSON_PROPERTY_BILLING = "billing"; - private OrgBilling billing; - - public static final String JSON_PROPERTY_CREATED = "created"; - private String created; - - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; - private String publicId; - - public static final String JSON_PROPERTY_SETTINGS = "settings"; - private OrgSettings settings; - - public static final String JSON_PROPERTY_SUBSCRIPTION = "subscription"; - private OrgSubscription subscription; - - - public Org billing(OrgBilling billing) { - - this.billing = billing; - return this; - } - - /** - * Get billing - * @return billing - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_BILLING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OrgBilling getBilling() { - return billing; - } - - - public void setBilling(OrgBilling billing) { - this.billing = billing; - } - - - /** - * Date of the organization creation. - * @return created - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2019-09-26 17:28:28", value = "Date of the organization creation.") - @JsonProperty(JSON_PROPERTY_CREATED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCreated() { - return created; - } - - - - - public Org description(String description) { - - this.description = description; - return this; - } - - /** - * Description of the organization. - * @return description - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "some description", value = "Description of the organization.") - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getDescription() { - return description; - } - - - public void setDescription(String description) { - this.description = description; - } - - - public Org name(String name) { - - this.name = name; - return this; - } - - /** - * The name of the new child-organization, limited to 32 characters. - * @return name - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "New child org", value = "The name of the new child-organization, limited to 32 characters.") - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public Org publicId(String publicId) { - - this.publicId = publicId; - return this; - } - - /** - * The public_id of the org you are operating within. - * @return publicId - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "abcdef12345", value = "The public_id of the org you are operating within.") - @JsonProperty(JSON_PROPERTY_PUBLIC_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPublicId() { - return publicId; - } - - - public void setPublicId(String publicId) { - this.publicId = publicId; - } - - - public Org settings(OrgSettings settings) { - - this.settings = settings; - return this; - } - - /** - * Get settings - * @return settings - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SETTINGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OrgSettings getSettings() { - return settings; - } - - - public void setSettings(OrgSettings settings) { - this.settings = settings; - } - - - public Org subscription(OrgSubscription subscription) { - - this.subscription = subscription; - return this; - } - - /** - * Get subscription - * @return subscription - **/ - @javax.annotation.Nullable - @ApiModelProperty(value = "") - @JsonProperty(JSON_PROPERTY_SUBSCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OrgSubscription getSubscription() { - return subscription; - } - - - public void setSubscription(OrgSubscription subscription) { - this.subscription = subscription; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Org org = (Org) o; - return Objects.equals(this.billing, org.billing) && - Objects.equals(this.created, org.created) && - Objects.equals(this.description, org.description) && - Objects.equals(this.name, org.name) && - Objects.equals(this.publicId, org.publicId) && - Objects.equals(this.settings, org.settings) && - Objects.equals(this.subscription, org.subscription); - } - - @Override - public int hashCode() { - return Objects.hash(billing, created, description, name, publicId, settings, subscription); - } - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Org {\n"); - sb.append(" billing: ").append(toIndentedString(billing)).append("\n"); - sb.append(" created: ").append(toIndentedString(created)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); - sb.append(" settings: ").append(toIndentedString(settings)).append("\n"); - sb.append(" subscription: ").append(toIndentedString(subscription)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} -