diff --git a/.generated-info b/.generated-info index 126fda6a0b0a..332bcf629eba 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "b75095c", - "generated": "2025-07-31 10:45:49.687" + "spec_repo_commit": "672a533", + "generated": "2025-07-31 18:07:39.883" } diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 91a0e38e0971..5e044dc1a92a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -31780,7 +31780,9 @@ paths: - security_monitoring_signals_write /api/v1/security_analytics/signals/{signal_id}/assignee: patch: - description: Modify the triage assignee of a security signal. + deprecated: true + description: This endpoint is deprecated - Modify the triage assignee of a security + signal. operationId: EditSecurityMonitoringSignalAssignee parameters: - $ref: '#/components/parameters/SignalID' @@ -31828,7 +31830,9 @@ paths: - security_monitoring_signals_write /api/v1/security_analytics/signals/{signal_id}/state: patch: - description: Change the triage state of a security signal. + deprecated: true + description: This endpoint is deprecated - Change the triage state of a security + signal. operationId: EditSecurityMonitoringSignalState parameters: - $ref: '#/components/parameters/SignalID' diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b125b71c69d5..ea57695f0533 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -2015,14 +2015,56 @@ components: description: The definition of `ActionConnectionIntegration` object. oneOf: - $ref: '#/components/schemas/AWSIntegration' + - $ref: '#/components/schemas/AnthropicIntegration' + - $ref: '#/components/schemas/AsanaIntegration' + - $ref: '#/components/schemas/AzureIntegration' + - $ref: '#/components/schemas/CircleCIIntegration' + - $ref: '#/components/schemas/ClickupIntegration' + - $ref: '#/components/schemas/CloudflareIntegration' + - $ref: '#/components/schemas/ConfigCatIntegration' - $ref: '#/components/schemas/DatadogIntegration' + - $ref: '#/components/schemas/FastlyIntegration' + - $ref: '#/components/schemas/FreshserviceIntegration' + - $ref: '#/components/schemas/GCPIntegration' + - $ref: '#/components/schemas/GeminiIntegration' + - $ref: '#/components/schemas/GitlabIntegration' + - $ref: '#/components/schemas/GreyNoiseIntegration' - $ref: '#/components/schemas/HTTPIntegration' + - $ref: '#/components/schemas/LaunchDarklyIntegration' + - $ref: '#/components/schemas/NotionIntegration' + - $ref: '#/components/schemas/OktaIntegration' + - $ref: '#/components/schemas/OpenAIIntegration' + - $ref: '#/components/schemas/ServiceNowIntegration' + - $ref: '#/components/schemas/SplitIntegration' + - $ref: '#/components/schemas/StatsigIntegration' + - $ref: '#/components/schemas/VirusTotalIntegration' ActionConnectionIntegrationUpdate: description: The definition of `ActionConnectionIntegrationUpdate` object. oneOf: - $ref: '#/components/schemas/AWSIntegrationUpdate' + - $ref: '#/components/schemas/AnthropicIntegrationUpdate' + - $ref: '#/components/schemas/AsanaIntegrationUpdate' + - $ref: '#/components/schemas/AzureIntegrationUpdate' + - $ref: '#/components/schemas/CircleCIIntegrationUpdate' + - $ref: '#/components/schemas/ClickupIntegrationUpdate' + - $ref: '#/components/schemas/CloudflareIntegrationUpdate' + - $ref: '#/components/schemas/ConfigCatIntegrationUpdate' - $ref: '#/components/schemas/DatadogIntegrationUpdate' + - $ref: '#/components/schemas/FastlyIntegrationUpdate' + - $ref: '#/components/schemas/FreshserviceIntegrationUpdate' + - $ref: '#/components/schemas/GCPIntegrationUpdate' + - $ref: '#/components/schemas/GeminiIntegrationUpdate' + - $ref: '#/components/schemas/GitlabIntegrationUpdate' + - $ref: '#/components/schemas/GreyNoiseIntegrationUpdate' - $ref: '#/components/schemas/HTTPIntegrationUpdate' + - $ref: '#/components/schemas/LaunchDarklyIntegrationUpdate' + - $ref: '#/components/schemas/NotionIntegrationUpdate' + - $ref: '#/components/schemas/OktaIntegrationUpdate' + - $ref: '#/components/schemas/OpenAIIntegrationUpdate' + - $ref: '#/components/schemas/ServiceNowIntegrationUpdate' + - $ref: '#/components/schemas/SplitIntegrationUpdate' + - $ref: '#/components/schemas/StatsigIntegrationUpdate' + - $ref: '#/components/schemas/VirusTotalIntegrationUpdate' ActionQuery: description: An action query. This query type is used to trigger an action, such as sending a HTTP request. @@ -2515,6 +2557,75 @@ components: description: The `markdownTextAnnotation` `text`. type: string type: object + AnthropicAPIKey: + description: The definition of the `AnthropicAPIKey` object. + properties: + api_token: + description: The `AnthropicAPIKey` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/AnthropicAPIKeyType' + required: + - type + - api_token + type: object + AnthropicAPIKeyType: + description: The definition of the `AnthropicAPIKey` object. + enum: + - AnthropicAPIKey + example: AnthropicAPIKey + type: string + x-enum-varnames: + - ANTHROPICAPIKEY + AnthropicAPIKeyUpdate: + description: The definition of the `AnthropicAPIKey` object. + properties: + api_token: + description: The `AnthropicAPIKeyUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/AnthropicAPIKeyType' + required: + - type + type: object + AnthropicCredentials: + description: The definition of the `AnthropicCredentials` object. + oneOf: + - $ref: '#/components/schemas/AnthropicAPIKey' + AnthropicCredentialsUpdate: + description: The definition of the `AnthropicCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/AnthropicAPIKeyUpdate' + AnthropicIntegration: + description: The definition of the `AnthropicIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/AnthropicCredentials' + type: + $ref: '#/components/schemas/AnthropicIntegrationType' + required: + - type + - credentials + type: object + AnthropicIntegrationType: + description: The definition of the `AnthropicIntegrationType` object. + enum: + - Anthropic + example: Anthropic + type: string + x-enum-varnames: + - ANTHROPIC + AnthropicIntegrationUpdate: + description: The definition of the `AnthropicIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/AnthropicCredentialsUpdate' + type: + $ref: '#/components/schemas/AnthropicIntegrationType' + required: + - type + type: object ApiID: description: API identifier. example: 90646597-5fdb-4a17-a240-647003f8c028 @@ -3627,6 +3738,75 @@ components: - CREATED_AT_DESC - UPDATED_AT_DESC - USER_NAME_DESC + AsanaAccessToken: + description: The definition of the `AsanaAccessToken` object. + properties: + access_token: + description: The `AsanaAccessToken` `access_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/AsanaAccessTokenType' + required: + - type + - access_token + type: object + AsanaAccessTokenType: + description: The definition of the `AsanaAccessToken` object. + enum: + - AsanaAccessToken + example: AsanaAccessToken + type: string + x-enum-varnames: + - ASANAACCESSTOKEN + AsanaAccessTokenUpdate: + description: The definition of the `AsanaAccessToken` object. + properties: + access_token: + description: The `AsanaAccessTokenUpdate` `access_token`. + type: string + type: + $ref: '#/components/schemas/AsanaAccessTokenType' + required: + - type + type: object + AsanaCredentials: + description: The definition of the `AsanaCredentials` object. + oneOf: + - $ref: '#/components/schemas/AsanaAccessToken' + AsanaCredentialsUpdate: + description: The definition of the `AsanaCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/AsanaAccessTokenUpdate' + AsanaIntegration: + description: The definition of the `AsanaIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/AsanaCredentials' + type: + $ref: '#/components/schemas/AsanaIntegrationType' + required: + - type + - credentials + type: object + AsanaIntegrationType: + description: The definition of the `AsanaIntegrationType` object. + enum: + - Asana + example: Asana + type: string + x-enum-varnames: + - ASANA + AsanaIntegrationUpdate: + description: The definition of the `AsanaIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/AsanaCredentialsUpdate' + type: + $ref: '#/components/schemas/AsanaIntegrationType' + required: + - type + type: object Asset: description: A single vulnerable asset properties: @@ -4720,6 +4900,43 @@ components: required: - data type: object + AzureCredentials: + description: The definition of the `AzureCredentials` object. + oneOf: + - $ref: '#/components/schemas/AzureTenant' + AzureCredentialsUpdate: + description: The definition of the `AzureCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/AzureTenantUpdate' + AzureIntegration: + description: The definition of the `AzureIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/AzureCredentials' + type: + $ref: '#/components/schemas/AzureIntegrationType' + required: + - type + - credentials + type: object + AzureIntegrationType: + description: The definition of the `AzureIntegrationType` object. + enum: + - Azure + example: Azure + type: string + x-enum-varnames: + - AZURE + AzureIntegrationUpdate: + description: The definition of the `AzureIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/AzureCredentialsUpdate' + type: + $ref: '#/components/schemas/AzureIntegrationType' + required: + - type + type: object AzureStorageDestination: description: The `azure_storage` destination forwards logs to an Azure Blob Storage container. @@ -4762,6 +4979,88 @@ components: type: string x-enum-varnames: - AZURE_STORAGE + AzureTenant: + description: The definition of the `AzureTenant` object. + properties: + app_client_id: + description: 'The Client ID, also known as the Application ID in Azure, + is a unique identifier for an application. It''s used to identify the + application during the authentication process. Your Application (client) + ID is listed in the application''s overview page. You can navigate to + your application via the Azure Directory. ' + example: '' + type: string + client_secret: + description: "The Client Secret is a confidential piece of information known + only to the application and Azure AD. It's used to prove the application's + identity. Your Client Secret is available from the application\u2019s + secrets page. You can navigate to your application via the Azure Directory." + example: '' + type: string + custom_scopes: + description: If provided, the custom scope to be requested from Microsoft + when acquiring an OAuth 2 access token. This custom scope is used only + in conjunction with the HTTP action. A resource's scope is constructed + by using the identifier URI for the resource and .default, separated by + a forward slash (/) as follows:{identifierURI}/.default. + type: string + tenant_id: + description: The Tenant ID, also known as the Directory ID in Azure, is + a unique identifier that represents an Azure AD instance. Your Tenant + ID (Directory ID) is listed in your Active Directory overview page under + the 'Tenant information' section. + example: '' + type: string + type: + $ref: '#/components/schemas/AzureTenantType' + required: + - type + - tenant_id + - app_client_id + - client_secret + type: object + AzureTenantType: + description: The definition of the `AzureTenant` object. + enum: + - AzureTenant + example: AzureTenant + type: string + x-enum-varnames: + - AZURETENANT + AzureTenantUpdate: + description: The definition of the `AzureTenant` object. + properties: + app_client_id: + description: 'The Client ID, also known as the Application ID in Azure, + is a unique identifier for an application. It''s used to identify the + application during the authentication process. Your Application (client) + ID is listed in the application''s overview page. You can navigate to + your application via the Azure Directory. ' + type: string + client_secret: + description: "The Client Secret is a confidential piece of information known + only to the application and Azure AD. It's used to prove the application's + identity. Your Client Secret is available from the application\u2019s + secrets page. You can navigate to your application via the Azure Directory." + type: string + custom_scopes: + description: If provided, the custom scope to be requested from Microsoft + when acquiring an OAuth 2 access token. This custom scope is used only + in conjunction with the HTTP action. A resource's scope is constructed + by using the identifier URI for the resource and .default, separated by + a forward slash (/) as follows:{identifierURI}/.default. + type: string + tenant_id: + description: The Tenant ID, also known as the Directory ID in Azure, is + a unique identifier that represents an Azure AD instance. Your Tenant + ID (Directory ID) is listed in your Active Directory overview page under + the 'Tenant information' section. + type: string + type: + $ref: '#/components/schemas/AzureTenantType' + required: + - type + type: object AzureUCConfig: description: Azure config. properties: @@ -7498,6 +7797,144 @@ components: example: infra_host type: string type: object + CircleCIAPIKey: + description: The definition of the `CircleCIAPIKey` object. + properties: + api_token: + description: The `CircleCIAPIKey` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/CircleCIAPIKeyType' + required: + - type + - api_token + type: object + CircleCIAPIKeyType: + description: The definition of the `CircleCIAPIKey` object. + enum: + - CircleCIAPIKey + example: CircleCIAPIKey + type: string + x-enum-varnames: + - CIRCLECIAPIKEY + CircleCIAPIKeyUpdate: + description: The definition of the `CircleCIAPIKey` object. + properties: + api_token: + description: The `CircleCIAPIKeyUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/CircleCIAPIKeyType' + required: + - type + type: object + CircleCICredentials: + description: The definition of the `CircleCICredentials` object. + oneOf: + - $ref: '#/components/schemas/CircleCIAPIKey' + CircleCICredentialsUpdate: + description: The definition of the `CircleCICredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/CircleCIAPIKeyUpdate' + CircleCIIntegration: + description: The definition of the `CircleCIIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/CircleCICredentials' + type: + $ref: '#/components/schemas/CircleCIIntegrationType' + required: + - type + - credentials + type: object + CircleCIIntegrationType: + description: The definition of the `CircleCIIntegrationType` object. + enum: + - CircleCI + example: CircleCI + type: string + x-enum-varnames: + - CIRCLECI + CircleCIIntegrationUpdate: + description: The definition of the `CircleCIIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/CircleCICredentialsUpdate' + type: + $ref: '#/components/schemas/CircleCIIntegrationType' + required: + - type + type: object + ClickupAPIKey: + description: The definition of the `ClickupAPIKey` object. + properties: + api_token: + description: The `ClickupAPIKey` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/ClickupAPIKeyType' + required: + - type + - api_token + type: object + ClickupAPIKeyType: + description: The definition of the `ClickupAPIKey` object. + enum: + - ClickupAPIKey + example: ClickupAPIKey + type: string + x-enum-varnames: + - CLICKUPAPIKEY + ClickupAPIKeyUpdate: + description: The definition of the `ClickupAPIKey` object. + properties: + api_token: + description: The `ClickupAPIKeyUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/ClickupAPIKeyType' + required: + - type + type: object + ClickupCredentials: + description: The definition of the `ClickupCredentials` object. + oneOf: + - $ref: '#/components/schemas/ClickupAPIKey' + ClickupCredentialsUpdate: + description: The definition of the `ClickupCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/ClickupAPIKeyUpdate' + ClickupIntegration: + description: The definition of the `ClickupIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/ClickupCredentials' + type: + $ref: '#/components/schemas/ClickupIntegrationType' + required: + - type + - credentials + type: object + ClickupIntegrationType: + description: The definition of the `ClickupIntegrationType` object. + enum: + - Clickup + example: Clickup + type: string + x-enum-varnames: + - CLICKUP + ClickupIntegrationUpdate: + description: The definition of the `ClickupIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/ClickupCredentialsUpdate' + type: + $ref: '#/components/schemas/ClickupIntegrationType' + required: + - type + type: object CloudConfigurationComplianceRuleOptions: additionalProperties: {} description: 'Options for cloud_configuration rules. @@ -8337,6 +8774,38 @@ components: $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleData' type: array type: object + CloudflareAPIToken: + description: The definition of the `CloudflareAPIToken` object. + properties: + api_token: + description: The `CloudflareAPIToken` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/CloudflareAPITokenType' + required: + - type + - api_token + type: object + CloudflareAPITokenType: + description: The definition of the `CloudflareAPIToken` object. + enum: + - CloudflareAPIToken + example: CloudflareAPIToken + type: string + x-enum-varnames: + - CLOUDFLAREAPITOKEN + CloudflareAPITokenUpdate: + description: The definition of the `CloudflareAPIToken` object. + properties: + api_token: + description: The `CloudflareAPITokenUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/CloudflareAPITokenType' + required: + - type + type: object CloudflareAccountCreateRequest: description: Payload schema when adding a Cloudflare account. properties: @@ -8521,6 +8990,85 @@ components: $ref: '#/components/schemas/CloudflareAccountResponseData' type: array type: object + CloudflareCredentials: + description: The definition of the `CloudflareCredentials` object. + oneOf: + - $ref: '#/components/schemas/CloudflareAPIToken' + - $ref: '#/components/schemas/CloudflareGlobalAPIToken' + CloudflareCredentialsUpdate: + description: The definition of the `CloudflareCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/CloudflareAPITokenUpdate' + - $ref: '#/components/schemas/CloudflareGlobalAPITokenUpdate' + CloudflareGlobalAPIToken: + description: The definition of the `CloudflareGlobalAPIToken` object. + properties: + auth_email: + description: The `CloudflareGlobalAPIToken` `auth_email`. + example: '' + type: string + global_api_key: + description: The `CloudflareGlobalAPIToken` `global_api_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/CloudflareGlobalAPITokenType' + required: + - type + - auth_email + - global_api_key + type: object + CloudflareGlobalAPITokenType: + description: The definition of the `CloudflareGlobalAPIToken` object. + enum: + - CloudflareGlobalAPIToken + example: CloudflareGlobalAPIToken + type: string + x-enum-varnames: + - CLOUDFLAREGLOBALAPITOKEN + CloudflareGlobalAPITokenUpdate: + description: The definition of the `CloudflareGlobalAPIToken` object. + properties: + auth_email: + description: The `CloudflareGlobalAPITokenUpdate` `auth_email`. + type: string + global_api_key: + description: The `CloudflareGlobalAPITokenUpdate` `global_api_key`. + type: string + type: + $ref: '#/components/schemas/CloudflareGlobalAPITokenType' + required: + - type + type: object + CloudflareIntegration: + description: The definition of the `CloudflareIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/CloudflareCredentials' + type: + $ref: '#/components/schemas/CloudflareIntegrationType' + required: + - type + - credentials + type: object + CloudflareIntegrationType: + description: The definition of the `CloudflareIntegrationType` object. + enum: + - Cloudflare + example: Cloudflare + type: string + x-enum-varnames: + - CLOUDFLARE + CloudflareIntegrationUpdate: + description: The definition of the `CloudflareIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/CloudflareCredentialsUpdate' + type: + $ref: '#/components/schemas/CloudflareIntegrationType' + required: + - type + type: object CodeLocation: description: Code vulnerability location. properties: @@ -8747,6 +9295,91 @@ components: - SEARCH - CONTAINER - CALLOUTVALUE + ConfigCatCredentials: + description: The definition of the `ConfigCatCredentials` object. + oneOf: + - $ref: '#/components/schemas/ConfigCatSDKKey' + ConfigCatCredentialsUpdate: + description: The definition of the `ConfigCatCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/ConfigCatSDKKeyUpdate' + ConfigCatIntegration: + description: The definition of the `ConfigCatIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/ConfigCatCredentials' + type: + $ref: '#/components/schemas/ConfigCatIntegrationType' + required: + - type + - credentials + type: object + ConfigCatIntegrationType: + description: The definition of the `ConfigCatIntegrationType` object. + enum: + - ConfigCat + example: ConfigCat + type: string + x-enum-varnames: + - CONFIGCAT + ConfigCatIntegrationUpdate: + description: The definition of the `ConfigCatIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/ConfigCatCredentialsUpdate' + type: + $ref: '#/components/schemas/ConfigCatIntegrationType' + required: + - type + type: object + ConfigCatSDKKey: + description: The definition of the `ConfigCatSDKKey` object. + properties: + api_password: + description: The `ConfigCatSDKKey` `api_password`. + example: '' + type: string + api_username: + description: The `ConfigCatSDKKey` `api_username`. + example: '' + type: string + sdk_key: + description: The `ConfigCatSDKKey` `sdk_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/ConfigCatSDKKeyType' + required: + - type + - sdk_key + - api_username + - api_password + type: object + ConfigCatSDKKeyType: + description: The definition of the `ConfigCatSDKKey` object. + enum: + - ConfigCatSDKKey + example: ConfigCatSDKKey + type: string + x-enum-varnames: + - CONFIGCATSDKKEY + ConfigCatSDKKeyUpdate: + description: The definition of the `ConfigCatSDKKey` object. + properties: + api_password: + description: The `ConfigCatSDKKeyUpdate` `api_password`. + type: string + api_username: + description: The `ConfigCatSDKKeyUpdate` `api_username`. + type: string + sdk_key: + description: The `ConfigCatSDKKeyUpdate` `sdk_key`. + type: string + type: + $ref: '#/components/schemas/ConfigCatSDKKeyType' + required: + - type + type: object ConfluentAccountCreateRequest: description: Payload schema when adding a Confluent account. properties: @@ -12512,31 +13145,33 @@ components: required: - type type: object - Dataset: - description: "Dataset object.\n\n### Datasets Constraints\n- **Tag Limit per - Dataset**:\n - Each restricted dataset supports a maximum of 10 key:value - pairs per product.\n\n- **Tag Key Rules per Telemetry Type**:\n - Only one - tag key or attribute may be used to define access within a single telemetry - type.\n - The same or different tag key may be used across different telemetry - types.\n\n- **Tag Value Uniqueness**:\n - Tag values must be unique within - a single dataset.\n - A tag value used in one dataset cannot be reused in - another dataset of the same telemetry type." + DatasetAttributesRequest: + description: Dataset metadata and configurations. properties: - attributes: - $ref: '#/components/schemas/DatasetAttributes' - id: - description: Unique identifier for the dataset. - example: 123e4567-e89b-12d3-a456-426614174000 - type: string - type: - description: Resource type, always "dataset". - example: dataset + name: + description: Name of the dataset. + example: Security Audit Dataset type: string + principals: + description: List of access principals, formatted as `principal_type:id`. + Principal can be 'team' or 'role'. + example: + - role:94172442-be03-11e9-a77a-3b7612558ac1 + items: + example: role:94172442-be03-11e9-a77a-3b7612558ac1 + type: string + type: array + product_filters: + description: List of product-specific filters. + items: + $ref: '#/components/schemas/FiltersPerProduct' + type: array required: - - type - - attributes + - name + - product_filters + - principals type: object - DatasetAttributes: + DatasetAttributesResponse: description: Dataset metadata and configuration(s). properties: created_at: @@ -12566,43 +13201,76 @@ components: items: $ref: '#/components/schemas/FiltersPerProduct' type: array - required: - - name - - product_filters - - principals type: object DatasetCreateRequest: description: Create request for a dataset. properties: data: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetRequest' required: - data type: object + DatasetRequest: + description: "**Datasets Object Constraints**\n- **Tag limit per dataset**:\n + \ - Each restricted dataset supports a maximum of 10 key:value pairs per product.\n\n- + **Tag key rules per telemetry type**:\n - Only one tag key or attribute may + be used to define access within a single telemetry type.\n - The same or + different tag key may be used across different telemetry types.\n\n- **Tag + value uniqueness**:\n - Tag values must be unique within a single dataset.\n + \ - A tag value used in one dataset cannot be reused in another dataset of + the same telemetry type." + properties: + attributes: + $ref: '#/components/schemas/DatasetAttributesRequest' + type: + description: Resource type, always "dataset". + example: dataset + type: string + required: + - type + - attributes + type: object + DatasetResponse: + description: "**Datasets Object Constraints**\n- **Tag Limit per Dataset**:\n + \ - Each restricted dataset supports a maximum of 10 key:value pairs per product.\n\n- + **Tag Key Rules per Telemetry Type**:\n - Only one tag key or attribute may + be used to define access within a single telemetry type.\n - The same or + different tag key may be used across different telemetry types.\n\n- **Tag + Value Uniqueness**:\n - Tag values must be unique within a single dataset.\n + \ - A tag value used in one dataset cannot be reused in another dataset of + the same telemetry type." + properties: + attributes: + $ref: '#/components/schemas/DatasetAttributesResponse' + id: + description: Unique identifier for the dataset. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + type: + description: Resource type, always "dataset". + example: dataset + type: string + type: object DatasetResponseMulti: description: Response containing a list of datasets. properties: data: description: The list of datasets returned in response. items: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetResponse' type: array - required: - - data type: object DatasetResponseSingle: description: Response containing a single dataset object. properties: data: - $ref: '#/components/schemas/Dataset' - required: - - data + $ref: '#/components/schemas/DatasetResponse' type: object DatasetUpdateRequest: description: Edit request for a dataset. properties: data: - $ref: '#/components/schemas/Dataset' + $ref: '#/components/schemas/DatasetRequest' required: - data type: object @@ -15913,6 +16581,38 @@ components: from the other indexes. type: string type: object + FastlyAPIKey: + description: The definition of the `FastlyAPIKey` object. + properties: + api_key: + description: The `FastlyAPIKey` `api_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/FastlyAPIKeyType' + required: + - type + - api_key + type: object + FastlyAPIKeyType: + description: The definition of the `FastlyAPIKey` object. + enum: + - FastlyAPIKey + example: FastlyAPIKey + type: string + x-enum-varnames: + - FASTLYAPIKEY + FastlyAPIKeyUpdate: + description: The definition of the `FastlyAPIKey` object. + properties: + api_key: + description: The `FastlyAPIKeyUpdate` `api_key`. + type: string + type: + $ref: '#/components/schemas/FastlyAPIKeyType' + required: + - type + type: object FastlyAccounResponseAttributes: description: Attributes object of a Fastly account. properties: @@ -16034,6 +16734,43 @@ components: $ref: '#/components/schemas/FastlyAccountResponseData' type: array type: object + FastlyCredentials: + description: The definition of the `FastlyCredentials` object. + oneOf: + - $ref: '#/components/schemas/FastlyAPIKey' + FastlyCredentialsUpdate: + description: The definition of the `FastlyCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/FastlyAPIKeyUpdate' + FastlyIntegration: + description: The definition of the `FastlyIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/FastlyCredentials' + type: + $ref: '#/components/schemas/FastlyIntegrationType' + required: + - type + - credentials + type: object + FastlyIntegrationType: + description: The definition of the `FastlyIntegrationType` object. + enum: + - Fastly + example: Fastly + type: string + x-enum-varnames: + - FASTLY + FastlyIntegrationUpdate: + description: The definition of the `FastlyIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/FastlyCredentialsUpdate' + type: + $ref: '#/components/schemas/FastlyIntegrationType' + required: + - type + type: object FastlyService: description: The schema representation of a Fastly service. properties: @@ -16379,6 +17116,83 @@ components: - type - attributes type: object + FreshserviceAPIKey: + description: The definition of the `FreshserviceAPIKey` object. + properties: + api_key: + description: The `FreshserviceAPIKey` `api_key`. + example: '' + type: string + domain: + description: The `FreshserviceAPIKey` `domain`. + example: '' + type: string + type: + $ref: '#/components/schemas/FreshserviceAPIKeyType' + required: + - type + - domain + - api_key + type: object + FreshserviceAPIKeyType: + description: The definition of the `FreshserviceAPIKey` object. + enum: + - FreshserviceAPIKey + example: FreshserviceAPIKey + type: string + x-enum-varnames: + - FRESHSERVICEAPIKEY + FreshserviceAPIKeyUpdate: + description: The definition of the `FreshserviceAPIKey` object. + properties: + api_key: + description: The `FreshserviceAPIKeyUpdate` `api_key`. + type: string + domain: + description: The `FreshserviceAPIKeyUpdate` `domain`. + type: string + type: + $ref: '#/components/schemas/FreshserviceAPIKeyType' + required: + - type + type: object + FreshserviceCredentials: + description: The definition of the `FreshserviceCredentials` object. + oneOf: + - $ref: '#/components/schemas/FreshserviceAPIKey' + FreshserviceCredentialsUpdate: + description: The definition of the `FreshserviceCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/FreshserviceAPIKeyUpdate' + FreshserviceIntegration: + description: The definition of the `FreshserviceIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/FreshserviceCredentials' + type: + $ref: '#/components/schemas/FreshserviceIntegrationType' + required: + - type + - credentials + type: object + FreshserviceIntegrationType: + description: The definition of the `FreshserviceIntegrationType` object. + enum: + - Freshservice + example: Freshservice + type: string + x-enum-varnames: + - FRESHSERVICE + FreshserviceIntegrationUpdate: + description: The definition of the `FreshserviceIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/FreshserviceCredentialsUpdate' + type: + $ref: '#/components/schemas/FreshserviceIntegrationType' + required: + - type + type: object FullAPIKey: description: Datadog API key. properties: @@ -16524,6 +17338,43 @@ components: - name - requirements type: object + GCPCredentials: + description: The definition of the `GCPCredentials` object. + oneOf: + - $ref: '#/components/schemas/GCPServiceAccount' + GCPCredentialsUpdate: + description: The definition of the `GCPCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/GCPServiceAccountUpdate' + GCPIntegration: + description: The definition of the `GCPIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/GCPCredentials' + type: + $ref: '#/components/schemas/GCPIntegrationType' + required: + - type + - credentials + type: object + GCPIntegrationType: + description: The definition of the `GCPIntegrationType` object. + enum: + - GCP + example: GCP + type: string + x-enum-varnames: + - GCP + GCPIntegrationUpdate: + description: The definition of the `GCPIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/GCPCredentialsUpdate' + type: + $ref: '#/components/schemas/GCPIntegrationType' + required: + - type + type: object GCPMetricNamespaceConfig: description: Configuration for a GCP metric namespace. properties: @@ -16706,6 +17557,32 @@ components: $ref: '#/components/schemas/GCPSTSServiceAccount' type: array type: object + GCPServiceAccount: + description: The definition of the `GCPServiceAccount` object. + properties: + private_key: + description: The `GCPServiceAccount` `private_key`. + example: '' + type: string + service_account_email: + description: The `GCPServiceAccount` `service_account_email`. + example: '' + type: string + type: + $ref: '#/components/schemas/GCPServiceAccountCredentialType' + required: + - type + - service_account_email + - private_key + type: object + GCPServiceAccountCredentialType: + description: The definition of the `GCPServiceAccount` object. + enum: + - GCPServiceAccount + example: GCPServiceAccount + type: string + x-enum-varnames: + - GCPSERVICEACCOUNT GCPServiceAccountMeta: description: Additional information related to your service account. properties: @@ -16725,6 +17602,20 @@ components: type: string x-enum-varnames: - GCP_SERVICE_ACCOUNT + GCPServiceAccountUpdate: + description: The definition of the `GCPServiceAccount` object. + properties: + private_key: + description: The `GCPServiceAccountUpdate` `private_key`. + type: string + service_account_email: + description: The `GCPServiceAccountUpdate` `service_account_email`. + type: string + type: + $ref: '#/components/schemas/GCPServiceAccountCredentialType' + required: + - type + type: object GCPUsageCostConfig: description: GCP Usage Cost config. properties: @@ -16931,6 +17822,75 @@ components: $ref: '#/components/schemas/GCPUsageCostConfig' type: array type: object + GeminiAPIKey: + description: The definition of the `GeminiAPIKey` object. + properties: + api_key: + description: The `GeminiAPIKey` `api_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/GeminiAPIKeyType' + required: + - type + - api_key + type: object + GeminiAPIKeyType: + description: The definition of the `GeminiAPIKey` object. + enum: + - GeminiAPIKey + example: GeminiAPIKey + type: string + x-enum-varnames: + - GEMINIAPIKEY + GeminiAPIKeyUpdate: + description: The definition of the `GeminiAPIKey` object. + properties: + api_key: + description: The `GeminiAPIKeyUpdate` `api_key`. + type: string + type: + $ref: '#/components/schemas/GeminiAPIKeyType' + required: + - type + type: object + GeminiCredentials: + description: The definition of the `GeminiCredentials` object. + oneOf: + - $ref: '#/components/schemas/GeminiAPIKey' + GeminiCredentialsUpdate: + description: The definition of the `GeminiCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/GeminiAPIKeyUpdate' + GeminiIntegration: + description: The definition of the `GeminiIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/GeminiCredentials' + type: + $ref: '#/components/schemas/GeminiIntegrationType' + required: + - type + - credentials + type: object + GeminiIntegrationType: + description: The definition of the `GeminiIntegrationType` object. + enum: + - Gemini + example: Gemini + type: string + x-enum-varnames: + - GEMINI + GeminiIntegrationUpdate: + description: The definition of the `GeminiIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/GeminiCredentialsUpdate' + type: + $ref: '#/components/schemas/GeminiIntegrationType' + required: + - type + type: object GetActionConnectionResponse: description: The response for found connection properties: @@ -17272,6 +18232,144 @@ components: required: - githubWebhookTrigger type: object + GitlabAPIKey: + description: The definition of the `GitlabAPIKey` object. + properties: + api_token: + description: The `GitlabAPIKey` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/GitlabAPIKeyType' + required: + - type + - api_token + type: object + GitlabAPIKeyType: + description: The definition of the `GitlabAPIKey` object. + enum: + - GitlabAPIKey + example: GitlabAPIKey + type: string + x-enum-varnames: + - GITLABAPIKEY + GitlabAPIKeyUpdate: + description: The definition of the `GitlabAPIKey` object. + properties: + api_token: + description: The `GitlabAPIKeyUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/GitlabAPIKeyType' + required: + - type + type: object + GitlabCredentials: + description: The definition of the `GitlabCredentials` object. + oneOf: + - $ref: '#/components/schemas/GitlabAPIKey' + GitlabCredentialsUpdate: + description: The definition of the `GitlabCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/GitlabAPIKeyUpdate' + GitlabIntegration: + description: The definition of the `GitlabIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/GitlabCredentials' + type: + $ref: '#/components/schemas/GitlabIntegrationType' + required: + - type + - credentials + type: object + GitlabIntegrationType: + description: The definition of the `GitlabIntegrationType` object. + enum: + - Gitlab + example: Gitlab + type: string + x-enum-varnames: + - GITLAB + GitlabIntegrationUpdate: + description: The definition of the `GitlabIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/GitlabCredentialsUpdate' + type: + $ref: '#/components/schemas/GitlabIntegrationType' + required: + - type + type: object + GreyNoiseAPIKey: + description: The definition of the `GreyNoiseAPIKey` object. + properties: + api_key: + description: The `GreyNoiseAPIKey` `api_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/GreyNoiseAPIKeyType' + required: + - type + - api_key + type: object + GreyNoiseAPIKeyType: + description: The definition of the `GreyNoiseAPIKey` object. + enum: + - GreyNoiseAPIKey + example: GreyNoiseAPIKey + type: string + x-enum-varnames: + - GREYNOISEAPIKEY + GreyNoiseAPIKeyUpdate: + description: The definition of the `GreyNoiseAPIKey` object. + properties: + api_key: + description: The `GreyNoiseAPIKeyUpdate` `api_key`. + type: string + type: + $ref: '#/components/schemas/GreyNoiseAPIKeyType' + required: + - type + type: object + GreyNoiseCredentials: + description: The definition of the `GreyNoiseCredentials` object. + oneOf: + - $ref: '#/components/schemas/GreyNoiseAPIKey' + GreyNoiseCredentialsUpdate: + description: The definition of the `GreyNoiseCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/GreyNoiseAPIKeyUpdate' + GreyNoiseIntegration: + description: The definition of the `GreyNoiseIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/GreyNoiseCredentials' + type: + $ref: '#/components/schemas/GreyNoiseIntegrationType' + required: + - type + - credentials + type: object + GreyNoiseIntegrationType: + description: The definition of the `GreyNoiseIntegrationType` object. + enum: + - GreyNoise + example: GreyNoise + type: string + x-enum-varnames: + - GREYNOISE + GreyNoiseIntegrationUpdate: + description: The definition of the `GreyNoiseIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/GreyNoiseCredentialsUpdate' + type: + $ref: '#/components/schemas/GreyNoiseIntegrationType' + required: + - type + type: object GroupScalarColumn: description: A column containing the tag keys and values in a group. properties: @@ -20476,6 +21574,75 @@ components: format: int64 type: integer type: object + LaunchDarklyAPIKey: + description: The definition of the `LaunchDarklyAPIKey` object. + properties: + api_token: + description: The `LaunchDarklyAPIKey` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/LaunchDarklyAPIKeyType' + required: + - type + - api_token + type: object + LaunchDarklyAPIKeyType: + description: The definition of the `LaunchDarklyAPIKey` object. + enum: + - LaunchDarklyAPIKey + example: LaunchDarklyAPIKey + type: string + x-enum-varnames: + - LAUNCHDARKLYAPIKEY + LaunchDarklyAPIKeyUpdate: + description: The definition of the `LaunchDarklyAPIKey` object. + properties: + api_token: + description: The `LaunchDarklyAPIKeyUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/LaunchDarklyAPIKeyType' + required: + - type + type: object + LaunchDarklyCredentials: + description: The definition of the `LaunchDarklyCredentials` object. + oneOf: + - $ref: '#/components/schemas/LaunchDarklyAPIKey' + LaunchDarklyCredentialsUpdate: + description: The definition of the `LaunchDarklyCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/LaunchDarklyAPIKeyUpdate' + LaunchDarklyIntegration: + description: The definition of the `LaunchDarklyIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/LaunchDarklyCredentials' + type: + $ref: '#/components/schemas/LaunchDarklyIntegrationType' + required: + - type + - credentials + type: object + LaunchDarklyIntegrationType: + description: The definition of the `LaunchDarklyIntegrationType` object. + enum: + - LaunchDarkly + example: LaunchDarkly + type: string + x-enum-varnames: + - LAUNCHDARKLY + LaunchDarklyIntegrationUpdate: + description: The definition of the `LaunchDarklyIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/LaunchDarklyCredentialsUpdate' + type: + $ref: '#/components/schemas/LaunchDarklyIntegrationType' + required: + - type + type: object Layer: description: Encapsulates a layer resource, holding attributes like rotation details, plus relationships to the members covering that layer. @@ -25164,6 +26331,75 @@ components: type: string x-enum-varnames: - NOTIFICATION_RULES + NotionAPIKey: + description: The definition of the `NotionAPIKey` object. + properties: + api_token: + description: The `NotionAPIKey` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/NotionAPIKeyType' + required: + - type + - api_token + type: object + NotionAPIKeyType: + description: The definition of the `NotionAPIKey` object. + enum: + - NotionAPIKey + example: NotionAPIKey + type: string + x-enum-varnames: + - NOTIONAPIKEY + NotionAPIKeyUpdate: + description: The definition of the `NotionAPIKey` object. + properties: + api_token: + description: The `NotionAPIKeyUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/NotionAPIKeyType' + required: + - type + type: object + NotionCredentials: + description: The definition of the `NotionCredentials` object. + oneOf: + - $ref: '#/components/schemas/NotionAPIKey' + NotionCredentialsUpdate: + description: The definition of the `NotionCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/NotionAPIKeyUpdate' + NotionIntegration: + description: The definition of the `NotionIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/NotionCredentials' + type: + $ref: '#/components/schemas/NotionIntegrationType' + required: + - type + - credentials + type: object + NotionIntegrationType: + description: The definition of the `NotionIntegrationType` object. + enum: + - Notion + example: Notion + type: string + x-enum-varnames: + - NOTION + NotionIntegrationUpdate: + description: The definition of the `NotionIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/NotionCredentialsUpdate' + type: + $ref: '#/components/schemas/NotionIntegrationType' + required: + - type + type: object NullableRelationshipToUser: description: Relationship to user. nullable: true @@ -28339,6 +29575,46 @@ components: required: - crt_file type: object + OktaAPIToken: + description: The definition of the `OktaAPIToken` object. + properties: + api_token: + description: The `OktaAPIToken` `api_token`. + example: '' + type: string + domain: + description: The `OktaAPIToken` `domain`. + example: '' + type: string + type: + $ref: '#/components/schemas/OktaAPITokenType' + required: + - type + - domain + - api_token + type: object + OktaAPITokenType: + description: The definition of the `OktaAPIToken` object. + enum: + - OktaAPIToken + example: OktaAPIToken + type: string + x-enum-varnames: + - OKTAAPITOKEN + OktaAPITokenUpdate: + description: The definition of the `OktaAPIToken` object. + properties: + api_token: + description: The `OktaAPITokenUpdate` `api_token`. + type: string + domain: + description: The `OktaAPITokenUpdate` `domain`. + type: string + type: + $ref: '#/components/schemas/OktaAPITokenType' + required: + - type + type: object OktaAccount: description: Schema for an Okta account. properties: @@ -28475,6 +29751,43 @@ components: $ref: '#/components/schemas/OktaAccountResponseData' type: array type: object + OktaCredentials: + description: The definition of the `OktaCredentials` object. + oneOf: + - $ref: '#/components/schemas/OktaAPIToken' + OktaCredentialsUpdate: + description: The definition of the `OktaCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/OktaAPITokenUpdate' + OktaIntegration: + description: The definition of the `OktaIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/OktaCredentials' + type: + $ref: '#/components/schemas/OktaIntegrationType' + required: + - type + - credentials + type: object + OktaIntegrationType: + description: The definition of the `OktaIntegrationType` object. + enum: + - Okta + example: Okta + type: string + x-enum-varnames: + - OKTA + OktaIntegrationUpdate: + description: The definition of the `OktaIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/OktaCredentialsUpdate' + type: + $ref: '#/components/schemas/OktaIntegrationType' + required: + - type + type: object OnCallPageTargetType: description: The kind of target, `team_id` | `team_handle` | `user_id`. enum: @@ -28516,6 +29829,75 @@ components: type: string x-enum-varnames: - ON_DEMAND_CONCURRENCY_CAP + OpenAIAPIKey: + description: The definition of the `OpenAIAPIKey` object. + properties: + api_token: + description: The `OpenAIAPIKey` `api_token`. + example: '' + type: string + type: + $ref: '#/components/schemas/OpenAIAPIKeyType' + required: + - type + - api_token + type: object + OpenAIAPIKeyType: + description: The definition of the `OpenAIAPIKey` object. + enum: + - OpenAIAPIKey + example: OpenAIAPIKey + type: string + x-enum-varnames: + - OPENAIAPIKEY + OpenAIAPIKeyUpdate: + description: The definition of the `OpenAIAPIKey` object. + properties: + api_token: + description: The `OpenAIAPIKeyUpdate` `api_token`. + type: string + type: + $ref: '#/components/schemas/OpenAIAPIKeyType' + required: + - type + type: object + OpenAICredentials: + description: The definition of the `OpenAICredentials` object. + oneOf: + - $ref: '#/components/schemas/OpenAIAPIKey' + OpenAICredentialsUpdate: + description: The definition of the `OpenAICredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/OpenAIAPIKeyUpdate' + OpenAIIntegration: + description: The definition of the `OpenAIIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/OpenAICredentials' + type: + $ref: '#/components/schemas/OpenAIIntegrationType' + required: + - type + - credentials + type: object + OpenAIIntegrationType: + description: The definition of the `OpenAIIntegrationType` object. + enum: + - OpenAI + example: OpenAI + type: string + x-enum-varnames: + - OPENAI + OpenAIIntegrationUpdate: + description: The definition of the `OpenAIIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/OpenAICredentialsUpdate' + type: + $ref: '#/components/schemas/OpenAIIntegrationType' + required: + - type + type: object OpenAPIEndpoint: description: Endpoint info extracted from an `OpenAPI` specification. properties: @@ -38194,6 +39576,91 @@ components: $ref: '#/components/schemas/ServiceDefinitionData' type: array type: object + ServiceNowBasicAuth: + description: The definition of the `ServiceNowBasicAuth` object. + properties: + instance: + description: The `ServiceNowBasicAuth` `instance`. + example: '' + type: string + password: + description: The `ServiceNowBasicAuth` `password`. + example: '' + type: string + type: + $ref: '#/components/schemas/ServiceNowBasicAuthType' + username: + description: The `ServiceNowBasicAuth` `username`. + example: '' + type: string + required: + - type + - instance + - username + - password + type: object + ServiceNowBasicAuthType: + description: The definition of the `ServiceNowBasicAuth` object. + enum: + - ServiceNowBasicAuth + example: ServiceNowBasicAuth + type: string + x-enum-varnames: + - SERVICENOWBASICAUTH + ServiceNowBasicAuthUpdate: + description: The definition of the `ServiceNowBasicAuth` object. + properties: + instance: + description: The `ServiceNowBasicAuthUpdate` `instance`. + type: string + password: + description: The `ServiceNowBasicAuthUpdate` `password`. + type: string + type: + $ref: '#/components/schemas/ServiceNowBasicAuthType' + username: + description: The `ServiceNowBasicAuthUpdate` `username`. + type: string + required: + - type + type: object + ServiceNowCredentials: + description: The definition of the `ServiceNowCredentials` object. + oneOf: + - $ref: '#/components/schemas/ServiceNowBasicAuth' + ServiceNowCredentialsUpdate: + description: The definition of the `ServiceNowCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/ServiceNowBasicAuthUpdate' + ServiceNowIntegration: + description: The definition of the `ServiceNowIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/ServiceNowCredentials' + type: + $ref: '#/components/schemas/ServiceNowIntegrationType' + required: + - type + - credentials + type: object + ServiceNowIntegrationType: + description: The definition of the `ServiceNowIntegrationType` object. + enum: + - ServiceNow + example: ServiceNow + type: string + x-enum-varnames: + - SERVICENOW + ServiceNowIntegrationUpdate: + description: The definition of the `ServiceNowIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/ServiceNowCredentialsUpdate' + type: + $ref: '#/components/schemas/ServiceNowIntegrationType' + required: + - type + type: object ServiceNowTicket: description: ServiceNow ticket attached to case nullable: true @@ -39502,6 +40969,75 @@ components: - ONE_THREE - ONE_FOUR - ONE_FIVE + SplitAPIKey: + description: The definition of the `SplitAPIKey` object. + properties: + api_key: + description: The `SplitAPIKey` `api_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/SplitAPIKeyType' + required: + - type + - api_key + type: object + SplitAPIKeyType: + description: The definition of the `SplitAPIKey` object. + enum: + - SplitAPIKey + example: SplitAPIKey + type: string + x-enum-varnames: + - SPLITAPIKEY + SplitAPIKeyUpdate: + description: The definition of the `SplitAPIKey` object. + properties: + api_key: + description: The `SplitAPIKeyUpdate` `api_key`. + type: string + type: + $ref: '#/components/schemas/SplitAPIKeyType' + required: + - type + type: object + SplitCredentials: + description: The definition of the `SplitCredentials` object. + oneOf: + - $ref: '#/components/schemas/SplitAPIKey' + SplitCredentialsUpdate: + description: The definition of the `SplitCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/SplitAPIKeyUpdate' + SplitIntegration: + description: The definition of the `SplitIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/SplitCredentials' + type: + $ref: '#/components/schemas/SplitIntegrationType' + required: + - type + - credentials + type: object + SplitIntegrationType: + description: The definition of the `SplitIntegrationType` object. + enum: + - Split + example: Split + type: string + x-enum-varnames: + - SPLIT + SplitIntegrationUpdate: + description: The definition of the `SplitIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/SplitCredentialsUpdate' + type: + $ref: '#/components/schemas/SplitIntegrationType' + required: + - type + type: object StartStepNames: description: A list of steps that run first after a trigger fires. example: @@ -39562,6 +41098,75 @@ components: type: string x-enum-varnames: - STATEVARIABLE + StatsigAPIKey: + description: The definition of the `StatsigAPIKey` object. + properties: + api_key: + description: The `StatsigAPIKey` `api_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/StatsigAPIKeyType' + required: + - type + - api_key + type: object + StatsigAPIKeyType: + description: The definition of the `StatsigAPIKey` object. + enum: + - StatsigAPIKey + example: StatsigAPIKey + type: string + x-enum-varnames: + - STATSIGAPIKEY + StatsigAPIKeyUpdate: + description: The definition of the `StatsigAPIKey` object. + properties: + api_key: + description: The `StatsigAPIKeyUpdate` `api_key`. + type: string + type: + $ref: '#/components/schemas/StatsigAPIKeyType' + required: + - type + type: object + StatsigCredentials: + description: The definition of the `StatsigCredentials` object. + oneOf: + - $ref: '#/components/schemas/StatsigAPIKey' + StatsigCredentialsUpdate: + description: The definition of the `StatsigCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/StatsigAPIKeyUpdate' + StatsigIntegration: + description: The definition of the `StatsigIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/StatsigCredentials' + type: + $ref: '#/components/schemas/StatsigIntegrationType' + required: + - type + - credentials + type: object + StatsigIntegrationType: + description: The definition of the `StatsigIntegrationType` object. + enum: + - Statsig + example: Statsig + type: string + x-enum-varnames: + - STATSIG + StatsigIntegrationUpdate: + description: The definition of the `StatsigIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/StatsigCredentialsUpdate' + type: + $ref: '#/components/schemas/StatsigIntegrationType' + required: + - type + type: object Step: description: A Step is a sub-component of a workflow. Each Step performs an action. @@ -42155,6 +43760,75 @@ components: example: 1 format: int64 type: integer + VirusTotalAPIKey: + description: The definition of the `VirusTotalAPIKey` object. + properties: + api_key: + description: The `VirusTotalAPIKey` `api_key`. + example: '' + type: string + type: + $ref: '#/components/schemas/VirusTotalAPIKeyType' + required: + - type + - api_key + type: object + VirusTotalAPIKeyType: + description: The definition of the `VirusTotalAPIKey` object. + enum: + - VirusTotalAPIKey + example: VirusTotalAPIKey + type: string + x-enum-varnames: + - VIRUSTOTALAPIKEY + VirusTotalAPIKeyUpdate: + description: The definition of the `VirusTotalAPIKey` object. + properties: + api_key: + description: The `VirusTotalAPIKeyUpdate` `api_key`. + type: string + type: + $ref: '#/components/schemas/VirusTotalAPIKeyType' + required: + - type + type: object + VirusTotalCredentials: + description: The definition of the `VirusTotalCredentials` object. + oneOf: + - $ref: '#/components/schemas/VirusTotalAPIKey' + VirusTotalCredentialsUpdate: + description: The definition of the `VirusTotalCredentialsUpdate` object. + oneOf: + - $ref: '#/components/schemas/VirusTotalAPIKeyUpdate' + VirusTotalIntegration: + description: The definition of the `VirusTotalIntegration` object. + properties: + credentials: + $ref: '#/components/schemas/VirusTotalCredentials' + type: + $ref: '#/components/schemas/VirusTotalIntegrationType' + required: + - type + - credentials + type: object + VirusTotalIntegrationType: + description: The definition of the `VirusTotalIntegrationType` object. + enum: + - VirusTotal + example: VirusTotal + type: string + x-enum-varnames: + - VIRUSTOTAL + VirusTotalIntegrationUpdate: + description: The definition of the `VirusTotalIntegrationUpdate` object. + properties: + credentials: + $ref: '#/components/schemas/VirusTotalCredentialsUpdate' + type: + $ref: '#/components/schemas/VirusTotalIntegrationType' + required: + - type + type: object VulnerabilitiesType: description: The JSON:API type. enum: @@ -48274,6 +49948,9 @@ paths: operator: OR permissions: - user_access_read + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' post: description: Create a dataset with the configurations in the request. operationId: CreateDataset @@ -48285,7 +49962,7 @@ paths: attributes: name: Test RUM Dataset principals: - - role:23bacb30-1c59-11f0-a596-da7ad0900002 + - role:94172442-be03-11e9-a77a-3b7612558ac1 product_filters: - filters: - '@application.id:application_123' @@ -48323,6 +50000,9 @@ paths: operator: OR permissions: - user_access_manage + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/datasets/{dataset_id}: delete: description: Deletes the dataset associated with the ID. @@ -48350,6 +50030,9 @@ paths: x-permission: operator: OPEN permissions: [] + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' get: description: Retrieves the dataset associated with the ID. operationId: GetDataset @@ -48380,6 +50063,9 @@ paths: x-permission: operator: OPEN permissions: [] + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' put: description: Edits the dataset associated with the ID. operationId: UpdateDataset @@ -48418,6 +50104,9 @@ paths: x-permission: operator: OPEN permissions: [] + x-unstable: '**Note: Data Access is in preview. If you have any feedback, + + contact [Datadog support](https://docs.datadoghq.com/help/).**' /api/v2/deletion/data/{product}: post: description: Creates a data deletion request by providing a query and a timeframe diff --git a/cassettes/features/v2/datasets/Create-a-dataset-returns-Bad-Request-response.frozen b/cassettes/features/v2/datasets/Create-a-dataset-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..71929eb2a5fb --- /dev/null +++ b/cassettes/features/v2/datasets/Create-a-dataset-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:57.144Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Create-a-dataset-returns-Bad-Request-response.yml b/cassettes/features/v2/datasets/Create-a-dataset-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..5df31628c900 --- /dev/null +++ b/cassettes/features/v2/datasets/Create-a-dataset-returns-Bad-Request-response.yml @@ -0,0 +1,24 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:57 GMT + request: + body: + encoding: UTF-8 + string: '{"test":"bad_request"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid request: Request body contains invalid json"]}' + headers: + Content-Type: + - application/json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Create-a-dataset-returns-Conflict-response.frozen b/cassettes/features/v2/datasets/Create-a-dataset-returns-Conflict-response.frozen new file mode 100644 index 000000000000..f6e462458c6a --- /dev/null +++ b/cassettes/features/v2/datasets/Create-a-dataset-returns-Conflict-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:57.324Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Create-a-dataset-returns-Conflict-response.yml b/cassettes/features/v2/datasets/Create-a-dataset-returns-Conflict-response.yml new file mode 100644 index 000000000000..5560bb8327e7 --- /dev/null +++ b/cassettes/features/v2/datasets/Create-a-dataset-returns-Conflict-response.yml @@ -0,0 +1,70 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:57 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:ABCD"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"7cbada94-7d01-4e73-8c74-ea70fb3b3088","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:35:57 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:ABCD"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid request: [DatasetNameConflict] dataset with name + \"Security Audit Dataset\" already exists"]} + + ' + headers: + Content-Type: + - application/json + status: + code: 409 + message: Conflict +- recorded_at: Tue, 29 Jul 2025 20:35:57 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/7cbada94-7d01-4e73-8c74-ea70fb3b3088 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/json + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Create-a-dataset-returns-OK-response.frozen b/cassettes/features/v2/datasets/Create-a-dataset-returns-OK-response.frozen new file mode 100644 index 000000000000..a11869c8f1a4 --- /dev/null +++ b/cassettes/features/v2/datasets/Create-a-dataset-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:57.839Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Create-a-dataset-returns-OK-response.yml b/cassettes/features/v2/datasets/Create-a-dataset-returns-OK-response.yml new file mode 100644 index 000000000000..76c7448a2006 --- /dev/null +++ b/cassettes/features/v2/datasets/Create-a-dataset-returns-OK-response.yml @@ -0,0 +1,45 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:57 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:ABCD"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"86f67664-8b7b-49ae-b671-919ebe11886c","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:35:57 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/86f67664-8b7b-49ae-b671-919ebe11886c + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/json + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Delete-a-dataset-returns-Bad-Request-response.frozen b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..5c83b1435b5a --- /dev/null +++ b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:58.251Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Delete-a-dataset-returns-Bad-Request-response.yml b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..b512b5985fd6 --- /dev/null +++ b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Bad-Request-response.yml @@ -0,0 +1,23 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:58 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/malformed_id + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid request: [UUIDInvalidValue] \"malformed_id\" is + not a valid UUID: invalid UUID length: 12"]} + + ' + headers: + Content-Type: + - application/json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Delete-a-dataset-returns-No-Content-response.frozen b/cassettes/features/v2/datasets/Delete-a-dataset-returns-No-Content-response.frozen new file mode 100644 index 000000000000..3f1f084a921b --- /dev/null +++ b/cassettes/features/v2/datasets/Delete-a-dataset-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:58.429Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Delete-a-dataset-returns-No-Content-response.yml b/cassettes/features/v2/datasets/Delete-a-dataset-returns-No-Content-response.yml new file mode 100644 index 000000000000..fb9da31ee861 --- /dev/null +++ b/cassettes/features/v2/datasets/Delete-a-dataset-returns-No-Content-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:58 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:ABCD"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"60ee6562-48f5-455f-bdb4-fd3f5f899978","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:35:58 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/60ee6562-48f5-455f-bdb4-fd3f5f899978 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/json + status: + code: 204 + message: No Content +- recorded_at: Tue, 29 Jul 2025 20:35:58 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/60ee6562-48f5-455f-bdb4-fd3f5f899978 + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid request: [DatasetNotFound] dataset \"60ee6562-48f5-455f-bdb4-fd3f5f899978\" + not found"]} + + ' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Delete-a-dataset-returns-Not-Found-response.frozen b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..a6e2fb84649e --- /dev/null +++ b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:58.996Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Delete-a-dataset-returns-Not-Found-response.yml b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Not-Found-response.yml new file mode 100644 index 000000000000..7a4800db39ec --- /dev/null +++ b/cassettes/features/v2/datasets/Delete-a-dataset-returns-Not-Found-response.yml @@ -0,0 +1,23 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:58 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/00000000-0000-0000-0000-000000000000 + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid request: [DatasetNotFound] dataset \"00000000-0000-0000-0000-000000000000\" + not found"]} + + ' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Edit-a-dataset-returns-Bad-Request-response.frozen b/cassettes/features/v2/datasets/Edit-a-dataset-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..cdc3a3a57aac --- /dev/null +++ b/cassettes/features/v2/datasets/Edit-a-dataset-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:59.180Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Edit-a-dataset-returns-Bad-Request-response.yml b/cassettes/features/v2/datasets/Edit-a-dataset-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..cee9c4dbde88 --- /dev/null +++ b/cassettes/features/v2/datasets/Edit-a-dataset-returns-Bad-Request-response.yml @@ -0,0 +1,22 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:59 GMT + request: + body: null + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/datasets/malformed_id + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid request: Request body contains invalid json"]}' + headers: + Content-Type: + - application/json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Edit-a-dataset-returns-OK-response.frozen b/cassettes/features/v2/datasets/Edit-a-dataset-returns-OK-response.frozen new file mode 100644 index 000000000000..89c4ccef7757 --- /dev/null +++ b/cassettes/features/v2/datasets/Edit-a-dataset-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:35:59.399Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Edit-a-dataset-returns-OK-response.yml b/cassettes/features/v2/datasets/Edit-a-dataset-returns-OK-response.yml new file mode 100644 index 000000000000..5d464b8360b1 --- /dev/null +++ b/cassettes/features/v2/datasets/Edit-a-dataset-returns-OK-response.yml @@ -0,0 +1,70 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:35:59 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:ABCD"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"2bf848a1-b18a-4602-8348-814a53862c52","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:35:59 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:1234"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PUT + uri: https://api.datadoghq.com/api/v2/datasets/2bf848a1-b18a-4602-8348-814a53862c52 + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"2bf848a1-b18a-4602-8348-814a53862c52","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:1234"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:35:59 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/2bf848a1-b18a-4602-8348-814a53862c52 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/json + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-Bad-Request-response.frozen b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..f1b515444432 --- /dev/null +++ b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:36:00.009Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-Bad-Request-response.yml b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..3cf53559814a --- /dev/null +++ b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-Bad-Request-response.yml @@ -0,0 +1,23 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:36:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/datasets/malformed_id + response: + body: + encoding: UTF-8 + string: '{"errors":["Invalid request: [UUIDInvalidValue] \"malformed_id\" is + not a valid UUID: invalid UUID length: 12"]} + + ' + headers: + Content-Type: + - application/json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-OK-response.frozen b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-OK-response.frozen new file mode 100644 index 000000000000..e339d721db2a --- /dev/null +++ b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:36:00.186Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-OK-response.yml b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-OK-response.yml new file mode 100644 index 000000000000..3093ef1b6ece --- /dev/null +++ b/cassettes/features/v2/datasets/Get-a-single-dataset-by-ID-returns-OK-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:36:00 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:ABCD"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"9e576299-3cc1-4145-8aad-67a1ab914829","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:36:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/datasets/9e576299-3cc1-4145-8aad-67a1ab914829 + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"9e576299-3cc1-4145-8aad-67a1ab914829","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:36:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/9e576299-3cc1-4145-8aad-67a1ab914829 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/json + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/datasets/Get-all-datasets-returns-OK-response.frozen b/cassettes/features/v2/datasets/Get-all-datasets-returns-OK-response.frozen new file mode 100644 index 000000000000..7db64cb6bc1c --- /dev/null +++ b/cassettes/features/v2/datasets/Get-all-datasets-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-07-29T20:36:00.713Z \ No newline at end of file diff --git a/cassettes/features/v2/datasets/Get-all-datasets-returns-OK-response.yml b/cassettes/features/v2/datasets/Get-all-datasets-returns-OK-response.yml new file mode 100644 index 000000000000..3f72ff12f3a1 --- /dev/null +++ b/cassettes/features/v2/datasets/Get-all-datasets-returns-OK-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Tue, 29 Jul 2025 20:36:00 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Security Audit Dataset","principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"product_filters":[{"filters":["@application.id:ABCD"],"product":"metrics"}]},"type":"dataset"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"dataset","id":"b0f617b4-affb-4411-970a-2c157933514c","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"]}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:36:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/datasets + response: + body: + encoding: UTF-8 + string: '{"data":[{"type":"dataset","id":"b0f617b4-affb-4411-970a-2c157933514c","attributes":{"name":"Security + Audit Dataset","product_filters":[{"product":"metrics","filters":["@application.id:ABCD"]}],"principals":["role:94172442-be03-11e9-a77a-3b7612558ac1"],"created_by":"3ad549bf-eba0-11e9-a77a-0705486660d0","created_at":"2025-07-29T20:36:00.94442Z"}}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Tue, 29 Jul 2025 20:36:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/datasets/b0f617b4-affb-4411-970a-2c157933514c + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - application/json + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/datasets/CreateDataset.rb b/examples/v2/datasets/CreateDataset.rb index 5285a960aca1..0ac223e5600c 100644 --- a/examples/v2/datasets/CreateDataset.rb +++ b/examples/v2/datasets/CreateDataset.rb @@ -1,26 +1,27 @@ # Create a dataset returns "OK" response require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_dataset".to_sym] = true +end api_instance = DatadogAPIClient::V2::DatasetsAPI.new body = DatadogAPIClient::V2::DatasetCreateRequest.new({ - data: DatadogAPIClient::V2::Dataset.new({ - attributes: DatadogAPIClient::V2::DatasetAttributes.new({ - created_at: nil, + data: DatadogAPIClient::V2::DatasetRequest.new({ + attributes: DatadogAPIClient::V2::DatasetAttributesRequest.new({ name: "Security Audit Dataset", principals: [ - "role:86245fce-0a4e-11f0-92bd-da7ad0900002", + "role:94172442-be03-11e9-a77a-3b7612558ac1", ], product_filters: [ DatadogAPIClient::V2::FiltersPerProduct.new({ filters: [ "@application.id:ABCD", ], - product: "logs", + product: "metrics", }), ], }), - id: "123e4567-e89b-12d3-a456-426614174000", type: "dataset", }), }) diff --git a/examples/v2/datasets/DeleteDataset.rb b/examples/v2/datasets/DeleteDataset.rb index 8bf69f07354f..06a13777c532 100644 --- a/examples/v2/datasets/DeleteDataset.rb +++ b/examples/v2/datasets/DeleteDataset.rb @@ -1,5 +1,11 @@ # Delete a dataset returns "No Content" response require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_dataset".to_sym] = true +end api_instance = DatadogAPIClient::V2::DatasetsAPI.new -api_instance.delete_dataset("dataset_id") + +# there is a valid "dataset" in the system +DATASET_DATA_ID = ENV["DATASET_DATA_ID"] +api_instance.delete_dataset(DATASET_DATA_ID) diff --git a/examples/v2/datasets/GetAllDatasets.rb b/examples/v2/datasets/GetAllDatasets.rb index 0e8f1e762e76..8930619fb5b0 100644 --- a/examples/v2/datasets/GetAllDatasets.rb +++ b/examples/v2/datasets/GetAllDatasets.rb @@ -1,5 +1,8 @@ # Get all datasets returns "OK" response require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_all_datasets".to_sym] = true +end api_instance = DatadogAPIClient::V2::DatasetsAPI.new p api_instance.get_all_datasets() diff --git a/examples/v2/datasets/GetDataset.rb b/examples/v2/datasets/GetDataset.rb index fb7bfe55cb82..f5e4f2b32889 100644 --- a/examples/v2/datasets/GetDataset.rb +++ b/examples/v2/datasets/GetDataset.rb @@ -1,5 +1,11 @@ # Get a single dataset by ID returns "OK" response require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_dataset".to_sym] = true +end api_instance = DatadogAPIClient::V2::DatasetsAPI.new -p api_instance.get_dataset("dataset_id") + +# there is a valid "dataset" in the system +DATASET_DATA_ID = ENV["DATASET_DATA_ID"] +p api_instance.get_dataset(DATASET_DATA_ID) diff --git a/examples/v2/datasets/UpdateDataset.rb b/examples/v2/datasets/UpdateDataset.rb index fc90783fd15e..9d5c63ac7187 100644 --- a/examples/v2/datasets/UpdateDataset.rb +++ b/examples/v2/datasets/UpdateDataset.rb @@ -1,27 +1,31 @@ # Edit a dataset returns "OK" response require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_dataset".to_sym] = true +end api_instance = DatadogAPIClient::V2::DatasetsAPI.new +# there is a valid "dataset" in the system +DATASET_DATA_ID = ENV["DATASET_DATA_ID"] + body = DatadogAPIClient::V2::DatasetUpdateRequest.new({ - data: DatadogAPIClient::V2::Dataset.new({ - attributes: DatadogAPIClient::V2::DatasetAttributes.new({ - created_at: nil, + data: DatadogAPIClient::V2::DatasetRequest.new({ + attributes: DatadogAPIClient::V2::DatasetAttributesRequest.new({ name: "Security Audit Dataset", principals: [ - "role:86245fce-0a4e-11f0-92bd-da7ad0900002", + "role:94172442-be03-11e9-a77a-3b7612558ac1", ], product_filters: [ DatadogAPIClient::V2::FiltersPerProduct.new({ filters: [ - "@application.id:ABCD", + "@application.id:1234", ], - product: "logs", + product: "metrics", }), ], }), - id: "123e4567-e89b-12d3-a456-426614174000", type: "dataset", }), }) -p api_instance.update_dataset("dataset_id", body) +p api_instance.update_dataset(DATASET_DATA_ID, body) diff --git a/features/v2/datasets.feature b/features/v2/datasets.feature index 4a220a3c8450..f4d4ac7888b1 100644 --- a/features/v2/datasets.feature +++ b/features/v2/datasets.feature @@ -11,95 +11,113 @@ Feature: Datasets And a valid "appKeyAuth" key in the system And an instance of "Datasets" API - @generated @skip @team:DataDog/aaa-granular-access + @skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-typescript @skip-validation @team:DataDog/aaa-granular-access Scenario: Create a dataset returns "Bad Request" response Given new "CreateDataset" request - And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}} + And operation "CreateDataset" enabled + And body with value {"test": "bad_request"} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Create a dataset returns "Conflict" response - Given new "CreateDataset" request - And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}} + Given there is a valid "dataset" in the system + And operation "CreateDataset" enabled + And new "CreateDataset" request + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 409 Conflict - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Create a dataset returns "OK" response Given new "CreateDataset" request - And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}} + And operation "CreateDataset" enabled + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Delete a dataset returns "Bad Request" response Given new "DeleteDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + And operation "DeleteDataset" enabled + And request contains "dataset_id" parameter with value "malformed_id" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Delete a dataset returns "No Content" response - Given new "DeleteDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + Given there is a valid "dataset" in the system + And operation "DeleteDataset" enabled + And new "DeleteDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Delete a dataset returns "Not Found" response Given new "DeleteDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + And operation "DeleteDataset" enabled + And request contains "dataset_id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/aaa-granular-access + @skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-typescript @skip-validation @team:DataDog/aaa-granular-access Scenario: Edit a dataset returns "Bad Request" response Given new "UpdateDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}} + And operation "UpdateDataset" enabled + And request contains "dataset_id" parameter with value "malformed_id" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @skip @team:DataDog/aaa-granular-access Scenario: Edit a dataset returns "Not Found" response - Given new "UpdateDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}} + Given there is a valid "dataset" in the system + And operation "UpdateDataset" enabled + And new "UpdateDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:1234"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Edit a dataset returns "OK" response - Given new "UpdateDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"created_at": null, "name": "Security Audit Dataset", "principals": ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"], "product_filters": [{"filters": ["@application.id:ABCD"], "product": "logs"}]}, "id": "123e4567-e89b-12d3-a456-426614174000", "type": "dataset"}} + Given there is a valid "dataset" in the system + And operation "UpdateDataset" enabled + And new "UpdateDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" + And body with value {"data": {"attributes": {"name": "Security Audit Dataset", "principals": ["role:94172442-be03-11e9-a77a-3b7612558ac1"], "product_filters": [{"filters": ["@application.id:1234"], "product": "metrics"}]}, "type": "dataset"}} When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Get a single dataset by ID returns "Bad Request" response Given new "GetDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + And operation "GetDataset" enabled + And request contains "dataset_id" parameter with value "malformed_id" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-granular-access + @skip @team:DataDog/aaa-granular-access Scenario: Get a single dataset by ID returns "Not Found" response - Given new "GetDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + Given operation "GetDataset" enabled + And new "GetDataset" request + And request contains "dataset_id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Get a single dataset by ID returns "OK" response - Given new "GetDataset" request - And request contains "dataset_id" parameter from "REPLACE.ME" + Given there is a valid "dataset" in the system + And operation "GetDataset" enabled + And new "GetDataset" request + And request contains "dataset_id" parameter from "dataset.data.id" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/aaa-granular-access + @team:DataDog/aaa-granular-access Scenario: Get all datasets returns "OK" response - Given new "GetAllDatasets" request + Given there is a valid "dataset" in the system + And operation "GetAllDatasets" enabled + And new "GetAllDatasets" request When the request is sent Then the response status is 200 OK diff --git a/features/v2/given.json b/features/v2/given.json index 9a7a55576893..d1f630f71a85 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -176,6 +176,19 @@ "tag": "Dashboard Lists", "operationId": "CreateDashboardListItems" }, + { + "parameters": [ + { + "name": "body", + "origin": "request", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"Security Audit Dataset\",\n \"principals\": [\n \"role:94172442-be03-11e9-a77a-3b7612558ac1\"\n ],\n \"product_filters\": [\n {\n \"filters\": [\n \"@application.id:ABCD\"\n ],\n \"product\": \"metrics\"\n }\n ]\n },\n \"type\": \"dataset\"\n }\n}" + } + ], + "step": "there is a valid \"dataset\" in the system", + "key": "dataset", + "tag": "Datasets", + "operationId": "CreateDataset" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 53bef5692a43..40ab14773c47 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -875,7 +875,7 @@ "operationId": "DeleteDataset", "parameters": [ { - "name": "id", + "name": "dataset_id", "source": "data.id" } ], diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index deabc2561674..d343edd8e318 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -208,6 +208,11 @@ def initialize "v2.list_vulnerable_assets": false, "v2.mute_findings": false, "v2.run_historical_job": false, + "v2.create_dataset": false, + "v2.delete_dataset": false, + "v2.get_all_datasets": false, + "v2.get_dataset": false, + "v2.update_dataset": false, "v2.cancel_data_deletion_request": false, "v2.create_data_deletion_request": false, "v2.get_data_deletion_requests": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 4f8873304d36..b4b3b51c2caa 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -985,6 +985,14 @@ def overrides "v2.annotation_display" => "AnnotationDisplay", "v2.annotation_display_bounds" => "AnnotationDisplayBounds", "v2.annotation_markdown_text_annotation" => "AnnotationMarkdownTextAnnotation", + "v2.anthropic_api_key" => "AnthropicAPIKey", + "v2.anthropic_api_key_type" => "AnthropicAPIKeyType", + "v2.anthropic_api_key_update" => "AnthropicAPIKeyUpdate", + "v2.anthropic_credentials" => "AnthropicCredentials", + "v2.anthropic_credentials_update" => "AnthropicCredentialsUpdate", + "v2.anthropic_integration" => "AnthropicIntegration", + "v2.anthropic_integration_type" => "AnthropicIntegrationType", + "v2.anthropic_integration_update" => "AnthropicIntegrationUpdate", "v2.api_error_response" => "APIErrorResponse", "v2.api_key_create_attributes" => "APIKeyCreateAttributes", "v2.api_key_create_data" => "APIKeyCreateData", @@ -1067,6 +1075,14 @@ def overrides "v2.app_relationship" => "AppRelationship", "v2.apps_sort_field" => "AppsSortField", "v2.app_trigger_wrapper" => "AppTriggerWrapper", + "v2.asana_access_token" => "AsanaAccessToken", + "v2.asana_access_token_type" => "AsanaAccessTokenType", + "v2.asana_access_token_update" => "AsanaAccessTokenUpdate", + "v2.asana_credentials" => "AsanaCredentials", + "v2.asana_credentials_update" => "AsanaCredentialsUpdate", + "v2.asana_integration" => "AsanaIntegration", + "v2.asana_integration_type" => "AsanaIntegrationType", + "v2.asana_integration_update" => "AsanaIntegrationUpdate", "v2.asset" => "Asset", "v2.asset_attributes" => "AssetAttributes", "v2.asset_entity_type" => "AssetEntityType", @@ -1192,8 +1208,16 @@ def overrides "v2.aws_scan_options_update_data" => "AwsScanOptionsUpdateData", "v2.aws_scan_options_update_request" => "AwsScanOptionsUpdateRequest", "v2.aws_traces_config" => "AWSTracesConfig", + "v2.azure_credentials" => "AzureCredentials", + "v2.azure_credentials_update" => "AzureCredentialsUpdate", + "v2.azure_integration" => "AzureIntegration", + "v2.azure_integration_type" => "AzureIntegrationType", + "v2.azure_integration_update" => "AzureIntegrationUpdate", "v2.azure_storage_destination" => "AzureStorageDestination", "v2.azure_storage_destination_type" => "AzureStorageDestinationType", + "v2.azure_tenant" => "AzureTenant", + "v2.azure_tenant_type" => "AzureTenantType", + "v2.azure_tenant_update" => "AzureTenantUpdate", "v2.azure_uc_config" => "AzureUCConfig", "v2.azure_uc_config_pair" => "AzureUCConfigPair", "v2.azure_uc_config_pair_attributes" => "AzureUCConfigPairAttributes", @@ -1349,6 +1373,22 @@ def overrides "v2.ci_app_tests_group_by" => "CIAppTestsGroupBy", "v2.ci_app_tests_query_filter" => "CIAppTestsQueryFilter", "v2.ci_app_warning" => "CIAppWarning", + "v2.circle_ciapi_key" => "CircleCIAPIKey", + "v2.circle_ciapi_key_type" => "CircleCIAPIKeyType", + "v2.circle_ciapi_key_update" => "CircleCIAPIKeyUpdate", + "v2.circle_ci_credentials" => "CircleCICredentials", + "v2.circle_ci_credentials_update" => "CircleCICredentialsUpdate", + "v2.circle_ci_integration" => "CircleCIIntegration", + "v2.circle_ci_integration_type" => "CircleCIIntegrationType", + "v2.circle_ci_integration_update" => "CircleCIIntegrationUpdate", + "v2.clickup_api_key" => "ClickupAPIKey", + "v2.clickup_api_key_type" => "ClickupAPIKeyType", + "v2.clickup_api_key_update" => "ClickupAPIKeyUpdate", + "v2.clickup_credentials" => "ClickupCredentials", + "v2.clickup_credentials_update" => "ClickupCredentialsUpdate", + "v2.clickup_integration" => "ClickupIntegration", + "v2.clickup_integration_type" => "ClickupIntegrationType", + "v2.clickup_integration_update" => "ClickupIntegrationUpdate", "v2.cloud_configuration_compliance_rule_options" => "CloudConfigurationComplianceRuleOptions", "v2.cloud_configuration_rego_rule" => "CloudConfigurationRegoRule", "v2.cloud_configuration_rule_case_create" => "CloudConfigurationRuleCaseCreate", @@ -1368,6 +1408,17 @@ def overrides "v2.cloudflare_account_update_request" => "CloudflareAccountUpdateRequest", "v2.cloudflare_account_update_request_attributes" => "CloudflareAccountUpdateRequestAttributes", "v2.cloudflare_account_update_request_data" => "CloudflareAccountUpdateRequestData", + "v2.cloudflare_api_token" => "CloudflareAPIToken", + "v2.cloudflare_api_token_type" => "CloudflareAPITokenType", + "v2.cloudflare_api_token_update" => "CloudflareAPITokenUpdate", + "v2.cloudflare_credentials" => "CloudflareCredentials", + "v2.cloudflare_credentials_update" => "CloudflareCredentialsUpdate", + "v2.cloudflare_global_api_token" => "CloudflareGlobalAPIToken", + "v2.cloudflare_global_api_token_type" => "CloudflareGlobalAPITokenType", + "v2.cloudflare_global_api_token_update" => "CloudflareGlobalAPITokenUpdate", + "v2.cloudflare_integration" => "CloudflareIntegration", + "v2.cloudflare_integration_type" => "CloudflareIntegrationType", + "v2.cloudflare_integration_update" => "CloudflareIntegrationUpdate", "v2.cloud_workload_security_agent_policies_list_response" => "CloudWorkloadSecurityAgentPoliciesListResponse", "v2.cloud_workload_security_agent_policy_attributes" => "CloudWorkloadSecurityAgentPolicyAttributes", "v2.cloud_workload_security_agent_policy_create_attributes" => "CloudWorkloadSecurityAgentPolicyCreateAttributes", @@ -1409,6 +1460,14 @@ def overrides "v2.component_properties" => "ComponentProperties", "v2.component_properties_is_visible" => "ComponentPropertiesIsVisible", "v2.component_type" => "ComponentType", + "v2.config_cat_credentials" => "ConfigCatCredentials", + "v2.config_cat_credentials_update" => "ConfigCatCredentialsUpdate", + "v2.config_cat_integration" => "ConfigCatIntegration", + "v2.config_cat_integration_type" => "ConfigCatIntegrationType", + "v2.config_cat_integration_update" => "ConfigCatIntegrationUpdate", + "v2.config_cat_sdk_key" => "ConfigCatSDKKey", + "v2.config_cat_sdk_key_type" => "ConfigCatSDKKeyType", + "v2.config_cat_sdk_key_update" => "ConfigCatSDKKeyUpdate", "v2.confluent_account_create_request" => "ConfluentAccountCreateRequest", "v2.confluent_account_create_request_attributes" => "ConfluentAccountCreateRequestAttributes", "v2.confluent_account_create_request_data" => "ConfluentAccountCreateRequestData", @@ -1621,9 +1680,11 @@ def overrides "v2.data_relationships_teams_data_items" => "DataRelationshipsTeamsDataItems", "v2.data_relationships_teams_data_items_type" => "DataRelationshipsTeamsDataItemsType", "v2.data_scalar_column" => "DataScalarColumn", - "v2.dataset" => "Dataset", - "v2.dataset_attributes" => "DatasetAttributes", + "v2.dataset_attributes_request" => "DatasetAttributesRequest", + "v2.dataset_attributes_response" => "DatasetAttributesResponse", "v2.dataset_create_request" => "DatasetCreateRequest", + "v2.dataset_request" => "DatasetRequest", + "v2.dataset_response" => "DatasetResponse", "v2.dataset_response_multi" => "DatasetResponseMulti", "v2.dataset_response_single" => "DatasetResponseSingle", "v2.dataset_update_request" => "DatasetUpdateRequest", @@ -1875,6 +1936,14 @@ def overrides "v2.fastly_account_update_request" => "FastlyAccountUpdateRequest", "v2.fastly_account_update_request_attributes" => "FastlyAccountUpdateRequestAttributes", "v2.fastly_account_update_request_data" => "FastlyAccountUpdateRequestData", + "v2.fastly_api_key" => "FastlyAPIKey", + "v2.fastly_api_key_type" => "FastlyAPIKeyType", + "v2.fastly_api_key_update" => "FastlyAPIKeyUpdate", + "v2.fastly_credentials" => "FastlyCredentials", + "v2.fastly_credentials_update" => "FastlyCredentialsUpdate", + "v2.fastly_integration" => "FastlyIntegration", + "v2.fastly_integration_type" => "FastlyIntegrationType", + "v2.fastly_integration_update" => "FastlyIntegrationUpdate", "v2.fastly_service" => "FastlyService", "v2.fastly_service_attributes" => "FastlyServiceAttributes", "v2.fastly_service_data" => "FastlyServiceData", @@ -1894,15 +1963,31 @@ def overrides "v2.finding_vulnerability_type" => "FindingVulnerabilityType", "v2.formula_limit" => "FormulaLimit", "v2.framework_handle_and_version_response_data" => "FrameworkHandleAndVersionResponseData", + "v2.freshservice_api_key" => "FreshserviceAPIKey", + "v2.freshservice_api_key_type" => "FreshserviceAPIKeyType", + "v2.freshservice_api_key_update" => "FreshserviceAPIKeyUpdate", + "v2.freshservice_credentials" => "FreshserviceCredentials", + "v2.freshservice_credentials_update" => "FreshserviceCredentialsUpdate", + "v2.freshservice_integration" => "FreshserviceIntegration", + "v2.freshservice_integration_type" => "FreshserviceIntegrationType", + "v2.freshservice_integration_update" => "FreshserviceIntegrationUpdate", "v2.full_api_key" => "FullAPIKey", "v2.full_api_key_attributes" => "FullAPIKeyAttributes", "v2.full_application_key" => "FullApplicationKey", "v2.full_application_key_attributes" => "FullApplicationKeyAttributes", "v2.full_custom_framework_data" => "FullCustomFrameworkData", "v2.full_custom_framework_data_attributes" => "FullCustomFrameworkDataAttributes", + "v2.gcp_credentials" => "GCPCredentials", + "v2.gcp_credentials_update" => "GCPCredentialsUpdate", + "v2.gcp_integration" => "GCPIntegration", + "v2.gcp_integration_type" => "GCPIntegrationType", + "v2.gcp_integration_update" => "GCPIntegrationUpdate", "v2.gcp_metric_namespace_config" => "GCPMetricNamespaceConfig", + "v2.gcp_service_account" => "GCPServiceAccount", + "v2.gcp_service_account_credential_type" => "GCPServiceAccountCredentialType", "v2.gcp_service_account_meta" => "GCPServiceAccountMeta", "v2.gcp_service_account_type" => "GCPServiceAccountType", + "v2.gcp_service_account_update" => "GCPServiceAccountUpdate", "v2.gcpsts_delegate_account" => "GCPSTSDelegateAccount", "v2.gcpsts_delegate_account_attributes" => "GCPSTSDelegateAccountAttributes", "v2.gcpsts_delegate_account_response" => "GCPSTSDelegateAccountResponse", @@ -1928,6 +2013,14 @@ def overrides "v2.gcp_usage_cost_config_response" => "GCPUsageCostConfigResponse", "v2.gcp_usage_cost_configs_response" => "GCPUsageCostConfigsResponse", "v2.gcp_usage_cost_config_type" => "GCPUsageCostConfigType", + "v2.gemini_api_key" => "GeminiAPIKey", + "v2.gemini_api_key_type" => "GeminiAPIKeyType", + "v2.gemini_api_key_update" => "GeminiAPIKeyUpdate", + "v2.gemini_credentials" => "GeminiCredentials", + "v2.gemini_credentials_update" => "GeminiCredentialsUpdate", + "v2.gemini_integration" => "GeminiIntegration", + "v2.gemini_integration_type" => "GeminiIntegrationType", + "v2.gemini_integration_update" => "GeminiIntegrationUpdate", "v2.get_action_connection_response" => "GetActionConnectionResponse", "v2.get_app_key_registration_response" => "GetAppKeyRegistrationResponse", "v2.get_app_response" => "GetAppResponse", @@ -1951,6 +2044,22 @@ def overrides "v2.get_workflow_response" => "GetWorkflowResponse", "v2.github_webhook_trigger" => "GithubWebhookTrigger", "v2.github_webhook_trigger_wrapper" => "GithubWebhookTriggerWrapper", + "v2.gitlab_api_key" => "GitlabAPIKey", + "v2.gitlab_api_key_type" => "GitlabAPIKeyType", + "v2.gitlab_api_key_update" => "GitlabAPIKeyUpdate", + "v2.gitlab_credentials" => "GitlabCredentials", + "v2.gitlab_credentials_update" => "GitlabCredentialsUpdate", + "v2.gitlab_integration" => "GitlabIntegration", + "v2.gitlab_integration_type" => "GitlabIntegrationType", + "v2.gitlab_integration_update" => "GitlabIntegrationUpdate", + "v2.grey_noise_api_key" => "GreyNoiseAPIKey", + "v2.grey_noise_api_key_type" => "GreyNoiseAPIKeyType", + "v2.grey_noise_api_key_update" => "GreyNoiseAPIKeyUpdate", + "v2.grey_noise_credentials" => "GreyNoiseCredentials", + "v2.grey_noise_credentials_update" => "GreyNoiseCredentialsUpdate", + "v2.grey_noise_integration" => "GreyNoiseIntegration", + "v2.grey_noise_integration_type" => "GreyNoiseIntegrationType", + "v2.grey_noise_integration_update" => "GreyNoiseIntegrationUpdate", "v2.group_scalar_column" => "GroupScalarColumn", "v2.historical_job_data_type" => "HistoricalJobDataType", "v2.historical_job_list_meta" => "HistoricalJobListMeta", @@ -2148,6 +2257,14 @@ def overrides "v2.kind_metadata" => "KindMetadata", "v2.kind_obj" => "KindObj", "v2.kind_response_meta" => "KindResponseMeta", + "v2.launch_darkly_api_key" => "LaunchDarklyAPIKey", + "v2.launch_darkly_api_key_type" => "LaunchDarklyAPIKeyType", + "v2.launch_darkly_api_key_update" => "LaunchDarklyAPIKeyUpdate", + "v2.launch_darkly_credentials" => "LaunchDarklyCredentials", + "v2.launch_darkly_credentials_update" => "LaunchDarklyCredentialsUpdate", + "v2.launch_darkly_integration" => "LaunchDarklyIntegration", + "v2.launch_darkly_integration_type" => "LaunchDarklyIntegrationType", + "v2.launch_darkly_integration_update" => "LaunchDarklyIntegrationUpdate", "v2.layer" => "Layer", "v2.layer_attributes" => "LayerAttributes", "v2.layer_attributes_interval" => "LayerAttributesInterval", @@ -2470,6 +2587,14 @@ def overrides "v2.notification_rule_attributes" => "NotificationRuleAttributes", "v2.notification_rule_response" => "NotificationRuleResponse", "v2.notification_rules_type" => "NotificationRulesType", + "v2.notion_api_key" => "NotionAPIKey", + "v2.notion_api_key_type" => "NotionAPIKeyType", + "v2.notion_api_key_update" => "NotionAPIKeyUpdate", + "v2.notion_credentials" => "NotionCredentials", + "v2.notion_credentials_update" => "NotionCredentialsUpdate", + "v2.notion_integration" => "NotionIntegration", + "v2.notion_integration_type" => "NotionIntegrationType", + "v2.notion_integration_update" => "NotionIntegrationUpdate", "v2.nullable_relationship_to_user" => "NullableRelationshipToUser", "v2.nullable_relationship_to_user_data" => "NullableRelationshipToUserData", "v2.nullable_user_relationship" => "NullableUserRelationship", @@ -2662,11 +2787,27 @@ def overrides "v2.okta_account_update_request" => "OktaAccountUpdateRequest", "v2.okta_account_update_request_attributes" => "OktaAccountUpdateRequestAttributes", "v2.okta_account_update_request_data" => "OktaAccountUpdateRequestData", + "v2.okta_api_token" => "OktaAPIToken", + "v2.okta_api_token_type" => "OktaAPITokenType", + "v2.okta_api_token_update" => "OktaAPITokenUpdate", + "v2.okta_credentials" => "OktaCredentials", + "v2.okta_credentials_update" => "OktaCredentialsUpdate", + "v2.okta_integration" => "OktaIntegration", + "v2.okta_integration_type" => "OktaIntegrationType", + "v2.okta_integration_update" => "OktaIntegrationUpdate", "v2.on_call_page_target_type" => "OnCallPageTargetType", "v2.on_demand_concurrency_cap" => "OnDemandConcurrencyCap", "v2.on_demand_concurrency_cap_attributes" => "OnDemandConcurrencyCapAttributes", "v2.on_demand_concurrency_cap_response" => "OnDemandConcurrencyCapResponse", "v2.on_demand_concurrency_cap_type" => "OnDemandConcurrencyCapType", + "v2.open_aiapi_key" => "OpenAIAPIKey", + "v2.open_aiapi_key_type" => "OpenAIAPIKeyType", + "v2.open_aiapi_key_update" => "OpenAIAPIKeyUpdate", + "v2.open_ai_credentials" => "OpenAICredentials", + "v2.open_ai_credentials_update" => "OpenAICredentialsUpdate", + "v2.open_ai_integration" => "OpenAIIntegration", + "v2.open_ai_integration_type" => "OpenAIIntegrationType", + "v2.open_ai_integration_update" => "OpenAIIntegrationUpdate", "v2.open_api_endpoint" => "OpenAPIEndpoint", "v2.open_api_file" => "OpenAPIFile", "v2.opsgenie_service_create_attributes" => "OpsgenieServiceCreateAttributes", @@ -3278,6 +3419,14 @@ def overrides "v2.service_definition_v2_slack" => "ServiceDefinitionV2Slack", "v2.service_definition_v2_slack_type" => "ServiceDefinitionV2SlackType", "v2.service_definition_v2_version" => "ServiceDefinitionV2Version", + "v2.service_now_basic_auth" => "ServiceNowBasicAuth", + "v2.service_now_basic_auth_type" => "ServiceNowBasicAuthType", + "v2.service_now_basic_auth_update" => "ServiceNowBasicAuthUpdate", + "v2.service_now_credentials" => "ServiceNowCredentials", + "v2.service_now_credentials_update" => "ServiceNowCredentialsUpdate", + "v2.service_now_integration" => "ServiceNowIntegration", + "v2.service_now_integration_type" => "ServiceNowIntegrationType", + "v2.service_now_integration_update" => "ServiceNowIntegrationUpdate", "v2.service_now_ticket" => "ServiceNowTicket", "v2.service_now_ticket_result" => "ServiceNowTicketResult", "v2.shift" => "Shift", @@ -3370,10 +3519,26 @@ def overrides "v2.spans_warning" => "SpansWarning", "v2.spec" => "Spec", "v2.spec_version" => "SpecVersion", + "v2.split_api_key" => "SplitAPIKey", + "v2.split_api_key_type" => "SplitAPIKeyType", + "v2.split_api_key_update" => "SplitAPIKeyUpdate", + "v2.split_credentials" => "SplitCredentials", + "v2.split_credentials_update" => "SplitCredentialsUpdate", + "v2.split_integration" => "SplitIntegration", + "v2.split_integration_type" => "SplitIntegrationType", + "v2.split_integration_update" => "SplitIntegrationUpdate", "v2.state" => "State", "v2.state_variable" => "StateVariable", "v2.state_variable_properties" => "StateVariableProperties", "v2.state_variable_type" => "StateVariableType", + "v2.statsig_api_key" => "StatsigAPIKey", + "v2.statsig_api_key_type" => "StatsigAPIKeyType", + "v2.statsig_api_key_update" => "StatsigAPIKeyUpdate", + "v2.statsig_credentials" => "StatsigCredentials", + "v2.statsig_credentials_update" => "StatsigCredentialsUpdate", + "v2.statsig_integration" => "StatsigIntegration", + "v2.statsig_integration_type" => "StatsigIntegrationType", + "v2.statsig_integration_update" => "StatsigIntegrationUpdate", "v2.step" => "Step", "v2.step_display" => "StepDisplay", "v2.step_display_bounds" => "StepDisplayBounds", @@ -3552,6 +3717,14 @@ def overrides "v2.validation_error" => "ValidationError", "v2.validation_error_meta" => "ValidationErrorMeta", "v2.validation_response" => "ValidationResponse", + "v2.virus_total_api_key" => "VirusTotalAPIKey", + "v2.virus_total_api_key_type" => "VirusTotalAPIKeyType", + "v2.virus_total_api_key_update" => "VirusTotalAPIKeyUpdate", + "v2.virus_total_credentials" => "VirusTotalCredentials", + "v2.virus_total_credentials_update" => "VirusTotalCredentialsUpdate", + "v2.virus_total_integration" => "VirusTotalIntegration", + "v2.virus_total_integration_type" => "VirusTotalIntegrationType", + "v2.virus_total_integration_update" => "VirusTotalIntegrationUpdate", "v2.vulnerabilities_type" => "VulnerabilitiesType", "v2.vulnerability" => "Vulnerability", "v2.vulnerability_attributes" => "VulnerabilityAttributes", diff --git a/lib/datadog_api_client/v1/api/security_monitoring_api.rb b/lib/datadog_api_client/v1/api/security_monitoring_api.rb index 5f667f6ecb73..cebe75c96016 100644 --- a/lib/datadog_api_client/v1/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v1/api/security_monitoring_api.rb @@ -105,13 +105,16 @@ def edit_security_monitoring_signal_assignee(signal_id, body, opts = {}) # Modify the triage assignee of a security signal. # - # Modify the triage assignee of a security signal. + # This endpoint is deprecated - Modify the triage assignee of a security signal. + # + # @deprecated This API is deprecated. # # @param signal_id [String] The ID of the signal. # @param body [SignalAssigneeUpdateRequest] Attributes describing the signal update. # @param opts [Hash] the optional parameters # @return [Array<(SuccessfulSignalUpdateResponse, Integer, Hash)>] SuccessfulSignalUpdateResponse data, response status code and response headers def edit_security_monitoring_signal_assignee_with_http_info(signal_id, body, opts = {}) + warn "[DEPRECATION] `EditSecurityMonitoringSignalAssignee` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.edit_security_monitoring_signal_assignee ...' @@ -177,13 +180,16 @@ def edit_security_monitoring_signal_state(signal_id, body, opts = {}) # Change the triage state of a security signal. # - # Change the triage state of a security signal. + # This endpoint is deprecated - Change the triage state of a security signal. + # + # @deprecated This API is deprecated. # # @param signal_id [String] The ID of the signal. # @param body [SignalStateUpdateRequest] Attributes describing the signal update. # @param opts [Hash] the optional parameters # @return [Array<(SuccessfulSignalUpdateResponse, Integer, Hash)>] SuccessfulSignalUpdateResponse data, response status code and response headers def edit_security_monitoring_signal_state_with_http_info(signal_id, body, opts = {}) + warn "[DEPRECATION] `EditSecurityMonitoringSignalState` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.edit_security_monitoring_signal_state ...' diff --git a/lib/datadog_api_client/v2/api/datasets_api.rb b/lib/datadog_api_client/v2/api/datasets_api.rb index 54ff85eef6e2..2d3c0be2fcc6 100644 --- a/lib/datadog_api_client/v2/api/datasets_api.rb +++ b/lib/datadog_api_client/v2/api/datasets_api.rb @@ -39,6 +39,12 @@ def create_dataset(body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers def create_dataset_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_dataset".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_dataset") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_dataset")) + end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DatasetsAPI.create_dataset ...' @@ -106,6 +112,12 @@ def delete_dataset(dataset_id, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_dataset_with_http_info(dataset_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_dataset".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_dataset") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_dataset")) + end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DatasetsAPI.delete_dataset ...' @@ -170,6 +182,12 @@ def get_all_datasets(opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(DatasetResponseMulti, Integer, Hash)>] DatasetResponseMulti data, response status code and response headers def get_all_datasets_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_all_datasets".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_all_datasets") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_all_datasets")) + end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DatasetsAPI.get_all_datasets ...' @@ -231,6 +249,12 @@ def get_dataset(dataset_id, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers def get_dataset_with_http_info(dataset_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_dataset".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_dataset") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_dataset")) + end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DatasetsAPI.get_dataset ...' @@ -297,6 +321,12 @@ def update_dataset(dataset_id, body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(DatasetResponseSingle, Integer, Hash)>] DatasetResponseSingle data, response status code and response headers def update_dataset_with_http_info(dataset_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_dataset".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_dataset") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_dataset")) + end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DatasetsAPI.update_dataset ...' diff --git a/lib/datadog_api_client/v2/models/action_connection_integration.rb b/lib/datadog_api_client/v2/models/action_connection_integration.rb index 3ec25a6189df..28f3f60bbf0d 100644 --- a/lib/datadog_api_client/v2/models/action_connection_integration.rb +++ b/lib/datadog_api_client/v2/models/action_connection_integration.rb @@ -27,8 +27,29 @@ class << self def openapi_one_of [ :'AWSIntegration', + :'AnthropicIntegration', + :'AsanaIntegration', + :'AzureIntegration', + :'CircleCIIntegration', + :'ClickupIntegration', + :'CloudflareIntegration', + :'ConfigCatIntegration', :'DatadogIntegration', - :'HTTPIntegration' + :'FastlyIntegration', + :'FreshserviceIntegration', + :'GCPIntegration', + :'GeminiIntegration', + :'GitlabIntegration', + :'GreyNoiseIntegration', + :'HTTPIntegration', + :'LaunchDarklyIntegration', + :'NotionIntegration', + :'OktaIntegration', + :'OpenAIIntegration', + :'ServiceNowIntegration', + :'SplitIntegration', + :'StatsigIntegration', + :'VirusTotalIntegration' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/action_connection_integration_update.rb b/lib/datadog_api_client/v2/models/action_connection_integration_update.rb index f4d4147f2b00..c3506c221b51 100644 --- a/lib/datadog_api_client/v2/models/action_connection_integration_update.rb +++ b/lib/datadog_api_client/v2/models/action_connection_integration_update.rb @@ -27,8 +27,29 @@ class << self def openapi_one_of [ :'AWSIntegrationUpdate', + :'AnthropicIntegrationUpdate', + :'AsanaIntegrationUpdate', + :'AzureIntegrationUpdate', + :'CircleCIIntegrationUpdate', + :'ClickupIntegrationUpdate', + :'CloudflareIntegrationUpdate', + :'ConfigCatIntegrationUpdate', :'DatadogIntegrationUpdate', - :'HTTPIntegrationUpdate' + :'FastlyIntegrationUpdate', + :'FreshserviceIntegrationUpdate', + :'GCPIntegrationUpdate', + :'GeminiIntegrationUpdate', + :'GitlabIntegrationUpdate', + :'GreyNoiseIntegrationUpdate', + :'HTTPIntegrationUpdate', + :'LaunchDarklyIntegrationUpdate', + :'NotionIntegrationUpdate', + :'OktaIntegrationUpdate', + :'OpenAIIntegrationUpdate', + :'ServiceNowIntegrationUpdate', + :'SplitIntegrationUpdate', + :'StatsigIntegrationUpdate', + :'VirusTotalIntegrationUpdate' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/anthropic_api_key.rb b/lib/datadog_api_client/v2/models/anthropic_api_key.rb new file mode 100644 index 000000000000..37c5ab8cf58f --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicAPIKey` object. + class AnthropicAPIKey + include BaseGenericModel + + # The `AnthropicAPIKey` `api_token`. + attr_reader :api_token + + # The definition of the `AnthropicAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'AnthropicAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AnthropicAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/anthropic_api_key_type.rb b/lib/datadog_api_client/v2/models/anthropic_api_key_type.rb new file mode 100644 index 000000000000..947d59b107f4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicAPIKey` object. + class AnthropicAPIKeyType + include BaseEnumModel + + ANTHROPICAPIKEY = "AnthropicAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/anthropic_api_key_update.rb b/lib/datadog_api_client/v2/models/anthropic_api_key_update.rb new file mode 100644 index 000000000000..73e34480ddc2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicAPIKey` object. + class AnthropicAPIKeyUpdate + include BaseGenericModel + + # The `AnthropicAPIKeyUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `AnthropicAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'AnthropicAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AnthropicAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/anthropic_credentials.rb b/lib/datadog_api_client/v2/models/anthropic_credentials.rb new file mode 100644 index 000000000000..e1d5de599167 --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicCredentials` object. + module AnthropicCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AnthropicAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/anthropic_credentials_update.rb b/lib/datadog_api_client/v2/models/anthropic_credentials_update.rb new file mode 100644 index 000000000000..9b1e9f232dea --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicCredentialsUpdate` object. + module AnthropicCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AnthropicAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/anthropic_integration.rb b/lib/datadog_api_client/v2/models/anthropic_integration.rb new file mode 100644 index 000000000000..303b94a2d74b --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicIntegration` object. + class AnthropicIntegration + include BaseGenericModel + + # The definition of the `AnthropicCredentials` object. + attr_reader :credentials + + # The definition of the `AnthropicIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'AnthropicCredentials', + :'type' => :'AnthropicIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AnthropicIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/anthropic_integration_type.rb b/lib/datadog_api_client/v2/models/anthropic_integration_type.rb new file mode 100644 index 000000000000..0e79c65d2d8d --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicIntegrationType` object. + class AnthropicIntegrationType + include BaseEnumModel + + ANTHROPIC = "Anthropic".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/anthropic_integration_update.rb b/lib/datadog_api_client/v2/models/anthropic_integration_update.rb new file mode 100644 index 000000000000..aa26c3500915 --- /dev/null +++ b/lib/datadog_api_client/v2/models/anthropic_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AnthropicIntegrationUpdate` object. + class AnthropicIntegrationUpdate + include BaseGenericModel + + # The definition of the `AnthropicCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `AnthropicIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'AnthropicCredentialsUpdate', + :'type' => :'AnthropicIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AnthropicIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/asana_access_token.rb b/lib/datadog_api_client/v2/models/asana_access_token.rb new file mode 100644 index 000000000000..62b4727b5c2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_access_token.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaAccessToken` object. + class AsanaAccessToken + include BaseGenericModel + + # The `AsanaAccessToken` `access_token`. + attr_reader :access_token + + # The definition of the `AsanaAccessToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'access_token' => :'access_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'access_token' => :'String', + :'type' => :'AsanaAccessTokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AsanaAccessToken` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'access_token') + self.access_token = attributes[:'access_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @access_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param access_token [Object] Object to be assigned + # @!visibility private + def access_token=(access_token) + if access_token.nil? + fail ArgumentError, 'invalid value for "access_token", access_token cannot be nil.' + end + @access_token = access_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + access_token == o.access_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [access_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/asana_access_token_type.rb b/lib/datadog_api_client/v2/models/asana_access_token_type.rb new file mode 100644 index 000000000000..cac1ed6fb648 --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_access_token_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaAccessToken` object. + class AsanaAccessTokenType + include BaseEnumModel + + ASANAACCESSTOKEN = "AsanaAccessToken".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/asana_access_token_update.rb b/lib/datadog_api_client/v2/models/asana_access_token_update.rb new file mode 100644 index 000000000000..404702e0df64 --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_access_token_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaAccessToken` object. + class AsanaAccessTokenUpdate + include BaseGenericModel + + # The `AsanaAccessTokenUpdate` `access_token`. + attr_accessor :access_token + + # The definition of the `AsanaAccessToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'access_token' => :'access_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'access_token' => :'String', + :'type' => :'AsanaAccessTokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AsanaAccessTokenUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'access_token') + self.access_token = attributes[:'access_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + access_token == o.access_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [access_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/asana_credentials.rb b/lib/datadog_api_client/v2/models/asana_credentials.rb new file mode 100644 index 000000000000..3f2899ed6624 --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaCredentials` object. + module AsanaCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AsanaAccessToken' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/asana_credentials_update.rb b/lib/datadog_api_client/v2/models/asana_credentials_update.rb new file mode 100644 index 000000000000..90eb4eb978d5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaCredentialsUpdate` object. + module AsanaCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AsanaAccessTokenUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/asana_integration.rb b/lib/datadog_api_client/v2/models/asana_integration.rb new file mode 100644 index 000000000000..9a8fb4144fdf --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaIntegration` object. + class AsanaIntegration + include BaseGenericModel + + # The definition of the `AsanaCredentials` object. + attr_reader :credentials + + # The definition of the `AsanaIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'AsanaCredentials', + :'type' => :'AsanaIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AsanaIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/asana_integration_type.rb b/lib/datadog_api_client/v2/models/asana_integration_type.rb new file mode 100644 index 000000000000..2482300b4b83 --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaIntegrationType` object. + class AsanaIntegrationType + include BaseEnumModel + + ASANA = "Asana".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/asana_integration_update.rb b/lib/datadog_api_client/v2/models/asana_integration_update.rb new file mode 100644 index 000000000000..8aa76da62ddd --- /dev/null +++ b/lib/datadog_api_client/v2/models/asana_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AsanaIntegrationUpdate` object. + class AsanaIntegrationUpdate + include BaseGenericModel + + # The definition of the `AsanaCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `AsanaIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'AsanaCredentialsUpdate', + :'type' => :'AsanaIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AsanaIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/azure_credentials.rb b/lib/datadog_api_client/v2/models/azure_credentials.rb new file mode 100644 index 000000000000..3fd47d5ec1fd --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureCredentials` object. + module AzureCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AzureTenant' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/azure_credentials_update.rb b/lib/datadog_api_client/v2/models/azure_credentials_update.rb new file mode 100644 index 000000000000..d1371edb6465 --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureCredentialsUpdate` object. + module AzureCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'AzureTenantUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/azure_integration.rb b/lib/datadog_api_client/v2/models/azure_integration.rb new file mode 100644 index 000000000000..e0dab418841c --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureIntegration` object. + class AzureIntegration + include BaseGenericModel + + # The definition of the `AzureCredentials` object. + attr_reader :credentials + + # The definition of the `AzureIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'AzureCredentials', + :'type' => :'AzureIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/azure_integration_type.rb b/lib/datadog_api_client/v2/models/azure_integration_type.rb new file mode 100644 index 000000000000..af59ca3d9dec --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureIntegrationType` object. + class AzureIntegrationType + include BaseEnumModel + + AZURE = "Azure".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/azure_integration_update.rb b/lib/datadog_api_client/v2/models/azure_integration_update.rb new file mode 100644 index 000000000000..82f5f4a5a7f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureIntegrationUpdate` object. + class AzureIntegrationUpdate + include BaseGenericModel + + # The definition of the `AzureCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `AzureIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'AzureCredentialsUpdate', + :'type' => :'AzureIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/azure_tenant.rb b/lib/datadog_api_client/v2/models/azure_tenant.rb new file mode 100644 index 000000000000..f9609f27cc41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_tenant.rb @@ -0,0 +1,196 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureTenant` object. + class AzureTenant + include BaseGenericModel + + # The Client ID, also known as the Application ID in Azure, is a unique identifier for an application. It's used to identify the application during the authentication process. Your Application (client) ID is listed in the application's overview page. You can navigate to your application via the Azure Directory. + attr_reader :app_client_id + + # The Client Secret is a confidential piece of information known only to the application and Azure AD. It's used to prove the application's identity. Your Client Secret is available from the application’s secrets page. You can navigate to your application via the Azure Directory. + attr_reader :client_secret + + # If provided, the custom scope to be requested from Microsoft when acquiring an OAuth 2 access token. This custom scope is used only in conjunction with the HTTP action. A resource's scope is constructed by using the identifier URI for the resource and .default, separated by a forward slash (/) as follows:{identifierURI}/.default. + attr_accessor :custom_scopes + + # The Tenant ID, also known as the Directory ID in Azure, is a unique identifier that represents an Azure AD instance. Your Tenant ID (Directory ID) is listed in your Active Directory overview page under the 'Tenant information' section. + attr_reader :tenant_id + + # The definition of the `AzureTenant` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'app_client_id' => :'app_client_id', + :'client_secret' => :'client_secret', + :'custom_scopes' => :'custom_scopes', + :'tenant_id' => :'tenant_id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'app_client_id' => :'String', + :'client_secret' => :'String', + :'custom_scopes' => :'String', + :'tenant_id' => :'String', + :'type' => :'AzureTenantType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureTenant` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'app_client_id') + self.app_client_id = attributes[:'app_client_id'] + end + + if attributes.key?(:'client_secret') + self.client_secret = attributes[:'client_secret'] + end + + if attributes.key?(:'custom_scopes') + self.custom_scopes = attributes[:'custom_scopes'] + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @app_client_id.nil? + return false if @client_secret.nil? + return false if @tenant_id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param app_client_id [Object] Object to be assigned + # @!visibility private + def app_client_id=(app_client_id) + if app_client_id.nil? + fail ArgumentError, 'invalid value for "app_client_id", app_client_id cannot be nil.' + end + @app_client_id = app_client_id + end + + # Custom attribute writer method with validation + # @param client_secret [Object] Object to be assigned + # @!visibility private + def client_secret=(client_secret) + if client_secret.nil? + fail ArgumentError, 'invalid value for "client_secret", client_secret cannot be nil.' + end + @client_secret = client_secret + end + + # Custom attribute writer method with validation + # @param tenant_id [Object] Object to be assigned + # @!visibility private + def tenant_id=(tenant_id) + if tenant_id.nil? + fail ArgumentError, 'invalid value for "tenant_id", tenant_id cannot be nil.' + end + @tenant_id = tenant_id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_client_id == o.app_client_id && + client_secret == o.client_secret && + custom_scopes == o.custom_scopes && + tenant_id == o.tenant_id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [app_client_id, client_secret, custom_scopes, tenant_id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/azure_tenant_type.rb b/lib/datadog_api_client/v2/models/azure_tenant_type.rb new file mode 100644 index 000000000000..227f22ca910e --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_tenant_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureTenant` object. + class AzureTenantType + include BaseEnumModel + + AZURETENANT = "AzureTenant".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/azure_tenant_update.rb b/lib/datadog_api_client/v2/models/azure_tenant_update.rb new file mode 100644 index 000000000000..be3b48b5ac13 --- /dev/null +++ b/lib/datadog_api_client/v2/models/azure_tenant_update.rb @@ -0,0 +1,163 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `AzureTenant` object. + class AzureTenantUpdate + include BaseGenericModel + + # The Client ID, also known as the Application ID in Azure, is a unique identifier for an application. It's used to identify the application during the authentication process. Your Application (client) ID is listed in the application's overview page. You can navigate to your application via the Azure Directory. + attr_accessor :app_client_id + + # The Client Secret is a confidential piece of information known only to the application and Azure AD. It's used to prove the application's identity. Your Client Secret is available from the application’s secrets page. You can navigate to your application via the Azure Directory. + attr_accessor :client_secret + + # If provided, the custom scope to be requested from Microsoft when acquiring an OAuth 2 access token. This custom scope is used only in conjunction with the HTTP action. A resource's scope is constructed by using the identifier URI for the resource and .default, separated by a forward slash (/) as follows:{identifierURI}/.default. + attr_accessor :custom_scopes + + # The Tenant ID, also known as the Directory ID in Azure, is a unique identifier that represents an Azure AD instance. Your Tenant ID (Directory ID) is listed in your Active Directory overview page under the 'Tenant information' section. + attr_accessor :tenant_id + + # The definition of the `AzureTenant` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'app_client_id' => :'app_client_id', + :'client_secret' => :'client_secret', + :'custom_scopes' => :'custom_scopes', + :'tenant_id' => :'tenant_id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'app_client_id' => :'String', + :'client_secret' => :'String', + :'custom_scopes' => :'String', + :'tenant_id' => :'String', + :'type' => :'AzureTenantType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AzureTenantUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'app_client_id') + self.app_client_id = attributes[:'app_client_id'] + end + + if attributes.key?(:'client_secret') + self.client_secret = attributes[:'client_secret'] + end + + if attributes.key?(:'custom_scopes') + self.custom_scopes = attributes[:'custom_scopes'] + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_client_id == o.app_client_id && + client_secret == o.client_secret && + custom_scopes == o.custom_scopes && + tenant_id == o.tenant_id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [app_client_id, client_secret, custom_scopes, tenant_id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ci_credentials.rb b/lib/datadog_api_client/v2/models/circle_ci_credentials.rb new file mode 100644 index 000000000000..637649ddcead --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ci_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCICredentials` object. + module CircleCICredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CircleCIAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ci_credentials_update.rb b/lib/datadog_api_client/v2/models/circle_ci_credentials_update.rb new file mode 100644 index 000000000000..8ee257ef9e7b --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ci_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCICredentialsUpdate` object. + module CircleCICredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CircleCIAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ci_integration.rb b/lib/datadog_api_client/v2/models/circle_ci_integration.rb new file mode 100644 index 000000000000..f42111a97b1a --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ci_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCIIntegration` object. + class CircleCIIntegration + include BaseGenericModel + + # The definition of the `CircleCICredentials` object. + attr_reader :credentials + + # The definition of the `CircleCIIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'CircleCICredentials', + :'type' => :'CircleCIIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CircleCIIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ci_integration_type.rb b/lib/datadog_api_client/v2/models/circle_ci_integration_type.rb new file mode 100644 index 000000000000..6b3ec008cfab --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ci_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCIIntegrationType` object. + class CircleCIIntegrationType + include BaseEnumModel + + CIRCLECI = "CircleCI".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ci_integration_update.rb b/lib/datadog_api_client/v2/models/circle_ci_integration_update.rb new file mode 100644 index 000000000000..e7e9f0f7958b --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ci_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCIIntegrationUpdate` object. + class CircleCIIntegrationUpdate + include BaseGenericModel + + # The definition of the `CircleCICredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `CircleCIIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'CircleCICredentialsUpdate', + :'type' => :'CircleCIIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CircleCIIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ciapi_key.rb b/lib/datadog_api_client/v2/models/circle_ciapi_key.rb new file mode 100644 index 000000000000..a8c20bef56e8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ciapi_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCIAPIKey` object. + class CircleCIAPIKey + include BaseGenericModel + + # The `CircleCIAPIKey` `api_token`. + attr_reader :api_token + + # The definition of the `CircleCIAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'CircleCIAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CircleCIAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ciapi_key_type.rb b/lib/datadog_api_client/v2/models/circle_ciapi_key_type.rb new file mode 100644 index 000000000000..ce6b77feeac7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ciapi_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCIAPIKey` object. + class CircleCIAPIKeyType + include BaseEnumModel + + CIRCLECIAPIKEY = "CircleCIAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/circle_ciapi_key_update.rb b/lib/datadog_api_client/v2/models/circle_ciapi_key_update.rb new file mode 100644 index 000000000000..36fe9b60d0b5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/circle_ciapi_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CircleCIAPIKey` object. + class CircleCIAPIKeyUpdate + include BaseGenericModel + + # The `CircleCIAPIKeyUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `CircleCIAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'CircleCIAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CircleCIAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_api_key.rb b/lib/datadog_api_client/v2/models/clickup_api_key.rb new file mode 100644 index 000000000000..10a4945a3b44 --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupAPIKey` object. + class ClickupAPIKey + include BaseGenericModel + + # The `ClickupAPIKey` `api_token`. + attr_reader :api_token + + # The definition of the `ClickupAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'ClickupAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ClickupAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_api_key_type.rb b/lib/datadog_api_client/v2/models/clickup_api_key_type.rb new file mode 100644 index 000000000000..290e153df66e --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupAPIKey` object. + class ClickupAPIKeyType + include BaseEnumModel + + CLICKUPAPIKEY = "ClickupAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_api_key_update.rb b/lib/datadog_api_client/v2/models/clickup_api_key_update.rb new file mode 100644 index 000000000000..db6fe2722326 --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupAPIKey` object. + class ClickupAPIKeyUpdate + include BaseGenericModel + + # The `ClickupAPIKeyUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `ClickupAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'ClickupAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ClickupAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_credentials.rb b/lib/datadog_api_client/v2/models/clickup_credentials.rb new file mode 100644 index 000000000000..3e35fc93112a --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupCredentials` object. + module ClickupCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ClickupAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_credentials_update.rb b/lib/datadog_api_client/v2/models/clickup_credentials_update.rb new file mode 100644 index 000000000000..5dfb7620a2bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupCredentialsUpdate` object. + module ClickupCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ClickupAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_integration.rb b/lib/datadog_api_client/v2/models/clickup_integration.rb new file mode 100644 index 000000000000..031e7a35a88b --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupIntegration` object. + class ClickupIntegration + include BaseGenericModel + + # The definition of the `ClickupCredentials` object. + attr_reader :credentials + + # The definition of the `ClickupIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'ClickupCredentials', + :'type' => :'ClickupIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ClickupIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_integration_type.rb b/lib/datadog_api_client/v2/models/clickup_integration_type.rb new file mode 100644 index 000000000000..02275f07465f --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupIntegrationType` object. + class ClickupIntegrationType + include BaseEnumModel + + CLICKUP = "Clickup".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/clickup_integration_update.rb b/lib/datadog_api_client/v2/models/clickup_integration_update.rb new file mode 100644 index 000000000000..86beebec090c --- /dev/null +++ b/lib/datadog_api_client/v2/models/clickup_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ClickupIntegrationUpdate` object. + class ClickupIntegrationUpdate + include BaseGenericModel + + # The definition of the `ClickupCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `ClickupIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'ClickupCredentialsUpdate', + :'type' => :'ClickupIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ClickupIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_api_token.rb b/lib/datadog_api_client/v2/models/cloudflare_api_token.rb new file mode 100644 index 000000000000..127c3d6d885b --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_api_token.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareAPIToken` object. + class CloudflareAPIToken + include BaseGenericModel + + # The `CloudflareAPIToken` `api_token`. + attr_reader :api_token + + # The definition of the `CloudflareAPIToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'CloudflareAPITokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAPIToken` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_api_token_type.rb b/lib/datadog_api_client/v2/models/cloudflare_api_token_type.rb new file mode 100644 index 000000000000..190cbcb07d0c --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_api_token_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareAPIToken` object. + class CloudflareAPITokenType + include BaseEnumModel + + CLOUDFLAREAPITOKEN = "CloudflareAPIToken".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_api_token_update.rb b/lib/datadog_api_client/v2/models/cloudflare_api_token_update.rb new file mode 100644 index 000000000000..d5ff515b2e89 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_api_token_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareAPIToken` object. + class CloudflareAPITokenUpdate + include BaseGenericModel + + # The `CloudflareAPITokenUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `CloudflareAPIToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'CloudflareAPITokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareAPITokenUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_credentials.rb b/lib/datadog_api_client/v2/models/cloudflare_credentials.rb new file mode 100644 index 000000000000..5b2674214e8e --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_credentials.rb @@ -0,0 +1,63 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareCredentials` object. + module CloudflareCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CloudflareAPIToken', + :'CloudflareGlobalAPIToken' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_credentials_update.rb b/lib/datadog_api_client/v2/models/cloudflare_credentials_update.rb new file mode 100644 index 000000000000..1be351f65ae3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_credentials_update.rb @@ -0,0 +1,63 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareCredentialsUpdate` object. + module CloudflareCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'CloudflareAPITokenUpdate', + :'CloudflareGlobalAPITokenUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_global_api_token.rb b/lib/datadog_api_client/v2/models/cloudflare_global_api_token.rb new file mode 100644 index 000000000000..5169f7211d87 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_global_api_token.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareGlobalAPIToken` object. + class CloudflareGlobalAPIToken + include BaseGenericModel + + # The `CloudflareGlobalAPIToken` `auth_email`. + attr_reader :auth_email + + # The `CloudflareGlobalAPIToken` `global_api_key`. + attr_reader :global_api_key + + # The definition of the `CloudflareGlobalAPIToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_email' => :'auth_email', + :'global_api_key' => :'global_api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_email' => :'String', + :'global_api_key' => :'String', + :'type' => :'CloudflareGlobalAPITokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareGlobalAPIToken` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auth_email') + self.auth_email = attributes[:'auth_email'] + end + + if attributes.key?(:'global_api_key') + self.global_api_key = attributes[:'global_api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_email.nil? + return false if @global_api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_email [Object] Object to be assigned + # @!visibility private + def auth_email=(auth_email) + if auth_email.nil? + fail ArgumentError, 'invalid value for "auth_email", auth_email cannot be nil.' + end + @auth_email = auth_email + end + + # Custom attribute writer method with validation + # @param global_api_key [Object] Object to be assigned + # @!visibility private + def global_api_key=(global_api_key) + if global_api_key.nil? + fail ArgumentError, 'invalid value for "global_api_key", global_api_key cannot be nil.' + end + @global_api_key = global_api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_email == o.auth_email && + global_api_key == o.global_api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_email, global_api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_global_api_token_type.rb b/lib/datadog_api_client/v2/models/cloudflare_global_api_token_type.rb new file mode 100644 index 000000000000..af6f9f863944 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_global_api_token_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareGlobalAPIToken` object. + class CloudflareGlobalAPITokenType + include BaseEnumModel + + CLOUDFLAREGLOBALAPITOKEN = "CloudflareGlobalAPIToken".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_global_api_token_update.rb b/lib/datadog_api_client/v2/models/cloudflare_global_api_token_update.rb new file mode 100644 index 000000000000..6860ca8f5aa6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_global_api_token_update.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareGlobalAPIToken` object. + class CloudflareGlobalAPITokenUpdate + include BaseGenericModel + + # The `CloudflareGlobalAPITokenUpdate` `auth_email`. + attr_accessor :auth_email + + # The `CloudflareGlobalAPITokenUpdate` `global_api_key`. + attr_accessor :global_api_key + + # The definition of the `CloudflareGlobalAPIToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_email' => :'auth_email', + :'global_api_key' => :'global_api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_email' => :'String', + :'global_api_key' => :'String', + :'type' => :'CloudflareGlobalAPITokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareGlobalAPITokenUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auth_email') + self.auth_email = attributes[:'auth_email'] + end + + if attributes.key?(:'global_api_key') + self.global_api_key = attributes[:'global_api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_email == o.auth_email && + global_api_key == o.global_api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_email, global_api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_integration.rb b/lib/datadog_api_client/v2/models/cloudflare_integration.rb new file mode 100644 index 000000000000..cc2dac2fcd3a --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareIntegration` object. + class CloudflareIntegration + include BaseGenericModel + + # The definition of the `CloudflareCredentials` object. + attr_reader :credentials + + # The definition of the `CloudflareIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'CloudflareCredentials', + :'type' => :'CloudflareIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_integration_type.rb b/lib/datadog_api_client/v2/models/cloudflare_integration_type.rb new file mode 100644 index 000000000000..ae39a3fde4b5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareIntegrationType` object. + class CloudflareIntegrationType + include BaseEnumModel + + CLOUDFLARE = "Cloudflare".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/cloudflare_integration_update.rb b/lib/datadog_api_client/v2/models/cloudflare_integration_update.rb new file mode 100644 index 000000000000..1583d311702a --- /dev/null +++ b/lib/datadog_api_client/v2/models/cloudflare_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `CloudflareIntegrationUpdate` object. + class CloudflareIntegrationUpdate + include BaseGenericModel + + # The definition of the `CloudflareCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `CloudflareIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'CloudflareCredentialsUpdate', + :'type' => :'CloudflareIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CloudflareIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_credentials.rb b/lib/datadog_api_client/v2/models/config_cat_credentials.rb new file mode 100644 index 000000000000..74796f56f782 --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatCredentials` object. + module ConfigCatCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ConfigCatSDKKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_credentials_update.rb b/lib/datadog_api_client/v2/models/config_cat_credentials_update.rb new file mode 100644 index 000000000000..edfab0a814d4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatCredentialsUpdate` object. + module ConfigCatCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ConfigCatSDKKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_integration.rb b/lib/datadog_api_client/v2/models/config_cat_integration.rb new file mode 100644 index 000000000000..c08cda3f862d --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatIntegration` object. + class ConfigCatIntegration + include BaseGenericModel + + # The definition of the `ConfigCatCredentials` object. + attr_reader :credentials + + # The definition of the `ConfigCatIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'ConfigCatCredentials', + :'type' => :'ConfigCatIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfigCatIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_integration_type.rb b/lib/datadog_api_client/v2/models/config_cat_integration_type.rb new file mode 100644 index 000000000000..116e4aeb9231 --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatIntegrationType` object. + class ConfigCatIntegrationType + include BaseEnumModel + + CONFIGCAT = "ConfigCat".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_integration_update.rb b/lib/datadog_api_client/v2/models/config_cat_integration_update.rb new file mode 100644 index 000000000000..ff7299836abe --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatIntegrationUpdate` object. + class ConfigCatIntegrationUpdate + include BaseGenericModel + + # The definition of the `ConfigCatCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `ConfigCatIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'ConfigCatCredentialsUpdate', + :'type' => :'ConfigCatIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfigCatIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_sdk_key.rb b/lib/datadog_api_client/v2/models/config_cat_sdk_key.rb new file mode 100644 index 000000000000..94987c479974 --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_sdk_key.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatSDKKey` object. + class ConfigCatSDKKey + include BaseGenericModel + + # The `ConfigCatSDKKey` `api_password`. + attr_reader :api_password + + # The `ConfigCatSDKKey` `api_username`. + attr_reader :api_username + + # The `ConfigCatSDKKey` `sdk_key`. + attr_reader :sdk_key + + # The definition of the `ConfigCatSDKKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_password' => :'api_password', + :'api_username' => :'api_username', + :'sdk_key' => :'sdk_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_password' => :'String', + :'api_username' => :'String', + :'sdk_key' => :'String', + :'type' => :'ConfigCatSDKKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfigCatSDKKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_password') + self.api_password = attributes[:'api_password'] + end + + if attributes.key?(:'api_username') + self.api_username = attributes[:'api_username'] + end + + if attributes.key?(:'sdk_key') + self.sdk_key = attributes[:'sdk_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_password.nil? + return false if @api_username.nil? + return false if @sdk_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_password [Object] Object to be assigned + # @!visibility private + def api_password=(api_password) + if api_password.nil? + fail ArgumentError, 'invalid value for "api_password", api_password cannot be nil.' + end + @api_password = api_password + end + + # Custom attribute writer method with validation + # @param api_username [Object] Object to be assigned + # @!visibility private + def api_username=(api_username) + if api_username.nil? + fail ArgumentError, 'invalid value for "api_username", api_username cannot be nil.' + end + @api_username = api_username + end + + # Custom attribute writer method with validation + # @param sdk_key [Object] Object to be assigned + # @!visibility private + def sdk_key=(sdk_key) + if sdk_key.nil? + fail ArgumentError, 'invalid value for "sdk_key", sdk_key cannot be nil.' + end + @sdk_key = sdk_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_password == o.api_password && + api_username == o.api_username && + sdk_key == o.sdk_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_password, api_username, sdk_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_sdk_key_type.rb b/lib/datadog_api_client/v2/models/config_cat_sdk_key_type.rb new file mode 100644 index 000000000000..292245a9cf4e --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_sdk_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatSDKKey` object. + class ConfigCatSDKKeyType + include BaseEnumModel + + CONFIGCATSDKKEY = "ConfigCatSDKKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/config_cat_sdk_key_update.rb b/lib/datadog_api_client/v2/models/config_cat_sdk_key_update.rb new file mode 100644 index 000000000000..85bab4162b86 --- /dev/null +++ b/lib/datadog_api_client/v2/models/config_cat_sdk_key_update.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ConfigCatSDKKey` object. + class ConfigCatSDKKeyUpdate + include BaseGenericModel + + # The `ConfigCatSDKKeyUpdate` `api_password`. + attr_accessor :api_password + + # The `ConfigCatSDKKeyUpdate` `api_username`. + attr_accessor :api_username + + # The `ConfigCatSDKKeyUpdate` `sdk_key`. + attr_accessor :sdk_key + + # The definition of the `ConfigCatSDKKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_password' => :'api_password', + :'api_username' => :'api_username', + :'sdk_key' => :'sdk_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_password' => :'String', + :'api_username' => :'String', + :'sdk_key' => :'String', + :'type' => :'ConfigCatSDKKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfigCatSDKKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_password') + self.api_password = attributes[:'api_password'] + end + + if attributes.key?(:'api_username') + self.api_username = attributes[:'api_username'] + end + + if attributes.key?(:'sdk_key') + self.sdk_key = attributes[:'sdk_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_password == o.api_password && + api_username == o.api_username && + sdk_key == o.sdk_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_password, api_username, sdk_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/dataset_attributes.rb b/lib/datadog_api_client/v2/models/dataset_attributes_request.rb similarity index 83% rename from lib/datadog_api_client/v2/models/dataset_attributes.rb rename to lib/datadog_api_client/v2/models/dataset_attributes_request.rb index 5478296ce020..1cf3c6ecbf1a 100644 --- a/lib/datadog_api_client/v2/models/dataset_attributes.rb +++ b/lib/datadog_api_client/v2/models/dataset_attributes_request.rb @@ -17,16 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # Dataset metadata and configuration(s). - class DatasetAttributes + # Dataset metadata and configurations. + class DatasetAttributesRequest include BaseGenericModel - # Timestamp when the dataset was created. - attr_accessor :created_at - - # Unique ID of the user who created the dataset. - attr_accessor :created_by - # Name of the dataset. attr_reader :name @@ -42,8 +36,6 @@ class DatasetAttributes # @!visibility private def self.attribute_map { - :'created_at' => :'created_at', - :'created_by' => :'created_by', :'name' => :'name', :'principals' => :'principals', :'product_filters' => :'product_filters' @@ -54,28 +46,18 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'created_at' => :'Time', - :'created_by' => :'UUID', :'name' => :'String', :'principals' => :'Array', :'product_filters' => :'Array' } end - # List of attributes with nullable: true - # @!visibility private - def self.openapi_nullable - Set.new([ - :'created_at', - ]) - end - # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatasetAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatasetAttributesRequest` initialize method" end self.additional_properties = {} @@ -88,14 +70,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -179,8 +153,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - created_at == o.created_at && - created_by == o.created_by && name == o.name && principals == o.principals && product_filters == o.product_filters && @@ -191,7 +163,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, created_by, name, principals, product_filters, additional_properties].hash + [name, principals, product_filters, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/dataset_attributes_response.rb b/lib/datadog_api_client/v2/models/dataset_attributes_response.rb new file mode 100644 index 000000000000..7ddeaaff9486 --- /dev/null +++ b/lib/datadog_api_client/v2/models/dataset_attributes_response.rb @@ -0,0 +1,157 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Dataset metadata and configuration(s). + class DatasetAttributesResponse + include BaseGenericModel + + # Timestamp when the dataset was created. + attr_accessor :created_at + + # Unique ID of the user who created the dataset. + attr_accessor :created_by + + # Name of the dataset. + attr_accessor :name + + # List of access principals, formatted as `principal_type:id`. Principal can be 'team' or 'role'. + attr_accessor :principals + + # List of product-specific filters. + attr_accessor :product_filters + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'created_by' => :'created_by', + :'name' => :'name', + :'principals' => :'principals', + :'product_filters' => :'product_filters' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'created_by' => :'UUID', + :'name' => :'String', + :'principals' => :'Array', + :'product_filters' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'created_at', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatasetAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'principals') + if (value = attributes[:'principals']).is_a?(Array) + self.principals = value + end + end + + if attributes.key?(:'product_filters') + if (value = attributes[:'product_filters']).is_a?(Array) + self.product_filters = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_at == o.created_at && + created_by == o.created_by && + name == o.name && + principals == o.principals && + product_filters == o.product_filters && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, created_by, name, principals, product_filters, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/dataset_create_request.rb b/lib/datadog_api_client/v2/models/dataset_create_request.rb index 640d21d4a5d2..23b47b7dc4a8 100644 --- a/lib/datadog_api_client/v2/models/dataset_create_request.rb +++ b/lib/datadog_api_client/v2/models/dataset_create_request.rb @@ -21,17 +21,15 @@ module DatadogAPIClient::V2 class DatasetCreateRequest include BaseGenericModel - # Dataset object. - # - # ### Datasets Constraints - # - **Tag Limit per Dataset**: + # **Datasets Object Constraints** + # - **Tag limit per dataset**: # - Each restricted dataset supports a maximum of 10 key:value pairs per product. # - # - **Tag Key Rules per Telemetry Type**: + # - **Tag key rules per telemetry type**: # - Only one tag key or attribute may be used to define access within a single telemetry type. # - The same or different tag key may be used across different telemetry types. # - # - **Tag Value Uniqueness**: + # - **Tag value uniqueness**: # - Tag values must be unique within a single dataset. # - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. attr_reader :data @@ -50,7 +48,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Dataset' + :'data' => :'DatasetRequest' } end diff --git a/lib/datadog_api_client/v2/models/dataset.rb b/lib/datadog_api_client/v2/models/dataset_request.rb similarity index 87% rename from lib/datadog_api_client/v2/models/dataset.rb rename to lib/datadog_api_client/v2/models/dataset_request.rb index 4a59d5e62b6c..0cea87e15134 100644 --- a/lib/datadog_api_client/v2/models/dataset.rb +++ b/lib/datadog_api_client/v2/models/dataset_request.rb @@ -17,28 +17,23 @@ require 'time' module DatadogAPIClient::V2 - # Dataset object. - # - # ### Datasets Constraints - # - **Tag Limit per Dataset**: + # **Datasets Object Constraints** + # - **Tag limit per dataset**: # - Each restricted dataset supports a maximum of 10 key:value pairs per product. # - # - **Tag Key Rules per Telemetry Type**: + # - **Tag key rules per telemetry type**: # - Only one tag key or attribute may be used to define access within a single telemetry type. # - The same or different tag key may be used across different telemetry types. # - # - **Tag Value Uniqueness**: + # - **Tag value uniqueness**: # - Tag values must be unique within a single dataset. # - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. - class Dataset + class DatasetRequest include BaseGenericModel - # Dataset metadata and configuration(s). + # Dataset metadata and configurations. attr_reader :attributes - # Unique identifier for the dataset. - attr_accessor :id - # Resource type, always "dataset". attr_reader :type @@ -49,7 +44,6 @@ class Dataset def self.attribute_map { :'attributes' => :'attributes', - :'id' => :'id', :'type' => :'type' } end @@ -58,8 +52,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'DatasetAttributes', - :'id' => :'String', + :'attributes' => :'DatasetAttributesRequest', :'type' => :'String' } end @@ -69,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::Dataset` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatasetRequest` initialize method" end self.additional_properties = {} @@ -86,10 +79,6 @@ def initialize(attributes = {}) self.attributes = attributes[:'attributes'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -151,7 +140,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes && - id == o.id && type == o.type && additional_properties == o.additional_properties end @@ -160,7 +148,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, type, additional_properties].hash + [attributes, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/dataset_response.rb b/lib/datadog_api_client/v2/models/dataset_response.rb new file mode 100644 index 000000000000..612fe4897925 --- /dev/null +++ b/lib/datadog_api_client/v2/models/dataset_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # **Datasets Object Constraints** + # - **Tag Limit per Dataset**: + # - Each restricted dataset supports a maximum of 10 key:value pairs per product. + # + # - **Tag Key Rules per Telemetry Type**: + # - Only one tag key or attribute may be used to define access within a single telemetry type. + # - The same or different tag key may be used across different telemetry types. + # + # - **Tag Value Uniqueness**: + # - Tag values must be unique within a single dataset. + # - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. + class DatasetResponse + include BaseGenericModel + + # Dataset metadata and configuration(s). + attr_accessor :attributes + + # Unique identifier for the dataset. + attr_accessor :id + + # Resource type, always "dataset". + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DatasetAttributesResponse', + :'id' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatasetResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/dataset_response_multi.rb b/lib/datadog_api_client/v2/models/dataset_response_multi.rb index 0ceb543339fb..0e41110e9d1f 100644 --- a/lib/datadog_api_client/v2/models/dataset_response_multi.rb +++ b/lib/datadog_api_client/v2/models/dataset_response_multi.rb @@ -22,7 +22,7 @@ class DatasetResponseMulti include BaseGenericModel # The list of datasets returned in response. - attr_reader :data + attr_accessor :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array' + :'data' => :'Array' } end @@ -67,24 +67,6 @@ def initialize(attributes = {}) end end - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/dataset_response_single.rb b/lib/datadog_api_client/v2/models/dataset_response_single.rb index 51baf44c264c..ab9b961f2112 100644 --- a/lib/datadog_api_client/v2/models/dataset_response_single.rb +++ b/lib/datadog_api_client/v2/models/dataset_response_single.rb @@ -21,9 +21,7 @@ module DatadogAPIClient::V2 class DatasetResponseSingle include BaseGenericModel - # Dataset object. - # - # ### Datasets Constraints + # **Datasets Object Constraints** # - **Tag Limit per Dataset**: # - Each restricted dataset supports a maximum of 10 key:value pairs per product. # @@ -34,7 +32,7 @@ class DatasetResponseSingle # - **Tag Value Uniqueness**: # - Tag values must be unique within a single dataset. # - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. - attr_reader :data + attr_accessor :data attr_accessor :additional_properties @@ -50,7 +48,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Dataset' + :'data' => :'DatasetResponse' } end @@ -77,24 +75,6 @@ def initialize(attributes = {}) end end - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/dataset_update_request.rb b/lib/datadog_api_client/v2/models/dataset_update_request.rb index f6cdd4697106..8bbf3e9ca9f7 100644 --- a/lib/datadog_api_client/v2/models/dataset_update_request.rb +++ b/lib/datadog_api_client/v2/models/dataset_update_request.rb @@ -21,17 +21,15 @@ module DatadogAPIClient::V2 class DatasetUpdateRequest include BaseGenericModel - # Dataset object. - # - # ### Datasets Constraints - # - **Tag Limit per Dataset**: + # **Datasets Object Constraints** + # - **Tag limit per dataset**: # - Each restricted dataset supports a maximum of 10 key:value pairs per product. # - # - **Tag Key Rules per Telemetry Type**: + # - **Tag key rules per telemetry type**: # - Only one tag key or attribute may be used to define access within a single telemetry type. # - The same or different tag key may be used across different telemetry types. # - # - **Tag Value Uniqueness**: + # - **Tag value uniqueness**: # - Tag values must be unique within a single dataset. # - A tag value used in one dataset cannot be reused in another dataset of the same telemetry type. attr_reader :data @@ -50,7 +48,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Dataset' + :'data' => :'DatasetRequest' } end diff --git a/lib/datadog_api_client/v2/models/fastly_api_key.rb b/lib/datadog_api_client/v2/models/fastly_api_key.rb new file mode 100644 index 000000000000..835ff40c7327 --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyAPIKey` object. + class FastlyAPIKey + include BaseGenericModel + + # The `FastlyAPIKey` `api_key`. + attr_reader :api_key + + # The definition of the `FastlyAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'FastlyAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/fastly_api_key_type.rb b/lib/datadog_api_client/v2/models/fastly_api_key_type.rb new file mode 100644 index 000000000000..8ab25c284a41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyAPIKey` object. + class FastlyAPIKeyType + include BaseEnumModel + + FASTLYAPIKEY = "FastlyAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/fastly_api_key_update.rb b/lib/datadog_api_client/v2/models/fastly_api_key_update.rb new file mode 100644 index 000000000000..53b9258165af --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyAPIKey` object. + class FastlyAPIKeyUpdate + include BaseGenericModel + + # The `FastlyAPIKeyUpdate` `api_key`. + attr_accessor :api_key + + # The definition of the `FastlyAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'FastlyAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/fastly_credentials.rb b/lib/datadog_api_client/v2/models/fastly_credentials.rb new file mode 100644 index 000000000000..170ff7ccd177 --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyCredentials` object. + module FastlyCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'FastlyAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/fastly_credentials_update.rb b/lib/datadog_api_client/v2/models/fastly_credentials_update.rb new file mode 100644 index 000000000000..e1a65588859e --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyCredentialsUpdate` object. + module FastlyCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'FastlyAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/fastly_integration.rb b/lib/datadog_api_client/v2/models/fastly_integration.rb new file mode 100644 index 000000000000..9efb45911529 --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyIntegration` object. + class FastlyIntegration + include BaseGenericModel + + # The definition of the `FastlyCredentials` object. + attr_reader :credentials + + # The definition of the `FastlyIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'FastlyCredentials', + :'type' => :'FastlyIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/fastly_integration_type.rb b/lib/datadog_api_client/v2/models/fastly_integration_type.rb new file mode 100644 index 000000000000..ce8e4305f673 --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyIntegrationType` object. + class FastlyIntegrationType + include BaseEnumModel + + FASTLY = "Fastly".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/fastly_integration_update.rb b/lib/datadog_api_client/v2/models/fastly_integration_update.rb new file mode 100644 index 000000000000..cce104e289c3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/fastly_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FastlyIntegrationUpdate` object. + class FastlyIntegrationUpdate + include BaseGenericModel + + # The definition of the `FastlyCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `FastlyIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'FastlyCredentialsUpdate', + :'type' => :'FastlyIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FastlyIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_api_key.rb b/lib/datadog_api_client/v2/models/freshservice_api_key.rb new file mode 100644 index 000000000000..2131cffab024 --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_api_key.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceAPIKey` object. + class FreshserviceAPIKey + include BaseGenericModel + + # The `FreshserviceAPIKey` `api_key`. + attr_reader :api_key + + # The `FreshserviceAPIKey` `domain`. + attr_reader :domain + + # The definition of the `FreshserviceAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'domain' => :'domain', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'domain' => :'String', + :'type' => :'FreshserviceAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FreshserviceAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @domain.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param domain [Object] Object to be assigned + # @!visibility private + def domain=(domain) + if domain.nil? + fail ArgumentError, 'invalid value for "domain", domain cannot be nil.' + end + @domain = domain + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + domain == o.domain && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, domain, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_api_key_type.rb b/lib/datadog_api_client/v2/models/freshservice_api_key_type.rb new file mode 100644 index 000000000000..54d125b5802e --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceAPIKey` object. + class FreshserviceAPIKeyType + include BaseEnumModel + + FRESHSERVICEAPIKEY = "FreshserviceAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_api_key_update.rb b/lib/datadog_api_client/v2/models/freshservice_api_key_update.rb new file mode 100644 index 000000000000..563ad6b0a537 --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_api_key_update.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceAPIKey` object. + class FreshserviceAPIKeyUpdate + include BaseGenericModel + + # The `FreshserviceAPIKeyUpdate` `api_key`. + attr_accessor :api_key + + # The `FreshserviceAPIKeyUpdate` `domain`. + attr_accessor :domain + + # The definition of the `FreshserviceAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'domain' => :'domain', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'domain' => :'String', + :'type' => :'FreshserviceAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FreshserviceAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + domain == o.domain && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, domain, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_credentials.rb b/lib/datadog_api_client/v2/models/freshservice_credentials.rb new file mode 100644 index 000000000000..577e08579874 --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceCredentials` object. + module FreshserviceCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'FreshserviceAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_credentials_update.rb b/lib/datadog_api_client/v2/models/freshservice_credentials_update.rb new file mode 100644 index 000000000000..c61f23e93392 --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceCredentialsUpdate` object. + module FreshserviceCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'FreshserviceAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_integration.rb b/lib/datadog_api_client/v2/models/freshservice_integration.rb new file mode 100644 index 000000000000..4cc1d6ede40a --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceIntegration` object. + class FreshserviceIntegration + include BaseGenericModel + + # The definition of the `FreshserviceCredentials` object. + attr_reader :credentials + + # The definition of the `FreshserviceIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'FreshserviceCredentials', + :'type' => :'FreshserviceIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FreshserviceIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_integration_type.rb b/lib/datadog_api_client/v2/models/freshservice_integration_type.rb new file mode 100644 index 000000000000..c1ccb43a1a6e --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceIntegrationType` object. + class FreshserviceIntegrationType + include BaseEnumModel + + FRESHSERVICE = "Freshservice".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/freshservice_integration_update.rb b/lib/datadog_api_client/v2/models/freshservice_integration_update.rb new file mode 100644 index 000000000000..a783bada0c04 --- /dev/null +++ b/lib/datadog_api_client/v2/models/freshservice_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `FreshserviceIntegrationUpdate` object. + class FreshserviceIntegrationUpdate + include BaseGenericModel + + # The definition of the `FreshserviceCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `FreshserviceIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'FreshserviceCredentialsUpdate', + :'type' => :'FreshserviceIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FreshserviceIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_credentials.rb b/lib/datadog_api_client/v2/models/gcp_credentials.rb new file mode 100644 index 000000000000..90cf41de01e3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPCredentials` object. + module GCPCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GCPServiceAccount' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_credentials_update.rb b/lib/datadog_api_client/v2/models/gcp_credentials_update.rb new file mode 100644 index 000000000000..905c9ba05f9c --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPCredentialsUpdate` object. + module GCPCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GCPServiceAccountUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_integration.rb b/lib/datadog_api_client/v2/models/gcp_integration.rb new file mode 100644 index 000000000000..63ca5d153361 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPIntegration` object. + class GCPIntegration + include BaseGenericModel + + # The definition of the `GCPCredentials` object. + attr_reader :credentials + + # The definition of the `GCPIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GCPCredentials', + :'type' => :'GCPIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_integration_type.rb b/lib/datadog_api_client/v2/models/gcp_integration_type.rb new file mode 100644 index 000000000000..65f4711825bc --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPIntegrationType` object. + class GCPIntegrationType + include BaseEnumModel + + GCP = "GCP".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_integration_update.rb b/lib/datadog_api_client/v2/models/gcp_integration_update.rb new file mode 100644 index 000000000000..92d366801b1e --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPIntegrationUpdate` object. + class GCPIntegrationUpdate + include BaseGenericModel + + # The definition of the `GCPCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `GCPIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GCPCredentialsUpdate', + :'type' => :'GCPIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_service_account.rb b/lib/datadog_api_client/v2/models/gcp_service_account.rb new file mode 100644 index 000000000000..6245644972f4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_service_account.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPServiceAccount` object. + class GCPServiceAccount + include BaseGenericModel + + # The `GCPServiceAccount` `private_key`. + attr_reader :private_key + + # The `GCPServiceAccount` `service_account_email`. + attr_reader :service_account_email + + # The definition of the `GCPServiceAccount` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'private_key' => :'private_key', + :'service_account_email' => :'service_account_email', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'private_key' => :'String', + :'service_account_email' => :'String', + :'type' => :'GCPServiceAccountCredentialType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPServiceAccount` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'private_key') + self.private_key = attributes[:'private_key'] + end + + if attributes.key?(:'service_account_email') + self.service_account_email = attributes[:'service_account_email'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @private_key.nil? + return false if @service_account_email.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param private_key [Object] Object to be assigned + # @!visibility private + def private_key=(private_key) + if private_key.nil? + fail ArgumentError, 'invalid value for "private_key", private_key cannot be nil.' + end + @private_key = private_key + end + + # Custom attribute writer method with validation + # @param service_account_email [Object] Object to be assigned + # @!visibility private + def service_account_email=(service_account_email) + if service_account_email.nil? + fail ArgumentError, 'invalid value for "service_account_email", service_account_email cannot be nil.' + end + @service_account_email = service_account_email + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + private_key == o.private_key && + service_account_email == o.service_account_email && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [private_key, service_account_email, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_service_account_credential_type.rb b/lib/datadog_api_client/v2/models/gcp_service_account_credential_type.rb new file mode 100644 index 000000000000..56dd6f58279c --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_service_account_credential_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPServiceAccount` object. + class GCPServiceAccountCredentialType + include BaseEnumModel + + GCPSERVICEACCOUNT = "GCPServiceAccount".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gcp_service_account_update.rb b/lib/datadog_api_client/v2/models/gcp_service_account_update.rb new file mode 100644 index 000000000000..3e81d50682f2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gcp_service_account_update.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GCPServiceAccount` object. + class GCPServiceAccountUpdate + include BaseGenericModel + + # The `GCPServiceAccountUpdate` `private_key`. + attr_accessor :private_key + + # The `GCPServiceAccountUpdate` `service_account_email`. + attr_accessor :service_account_email + + # The definition of the `GCPServiceAccount` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'private_key' => :'private_key', + :'service_account_email' => :'service_account_email', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'private_key' => :'String', + :'service_account_email' => :'String', + :'type' => :'GCPServiceAccountCredentialType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GCPServiceAccountUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'private_key') + self.private_key = attributes[:'private_key'] + end + + if attributes.key?(:'service_account_email') + self.service_account_email = attributes[:'service_account_email'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + private_key == o.private_key && + service_account_email == o.service_account_email && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [private_key, service_account_email, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_api_key.rb b/lib/datadog_api_client/v2/models/gemini_api_key.rb new file mode 100644 index 000000000000..26d32061768b --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiAPIKey` object. + class GeminiAPIKey + include BaseGenericModel + + # The `GeminiAPIKey` `api_key`. + attr_reader :api_key + + # The definition of the `GeminiAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'GeminiAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GeminiAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_api_key_type.rb b/lib/datadog_api_client/v2/models/gemini_api_key_type.rb new file mode 100644 index 000000000000..8943aa826d25 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiAPIKey` object. + class GeminiAPIKeyType + include BaseEnumModel + + GEMINIAPIKEY = "GeminiAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_api_key_update.rb b/lib/datadog_api_client/v2/models/gemini_api_key_update.rb new file mode 100644 index 000000000000..9dd178234367 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiAPIKey` object. + class GeminiAPIKeyUpdate + include BaseGenericModel + + # The `GeminiAPIKeyUpdate` `api_key`. + attr_accessor :api_key + + # The definition of the `GeminiAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'GeminiAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GeminiAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_credentials.rb b/lib/datadog_api_client/v2/models/gemini_credentials.rb new file mode 100644 index 000000000000..06d20b2f1f0e --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiCredentials` object. + module GeminiCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GeminiAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_credentials_update.rb b/lib/datadog_api_client/v2/models/gemini_credentials_update.rb new file mode 100644 index 000000000000..9c7558ec8a7a --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiCredentialsUpdate` object. + module GeminiCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GeminiAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_integration.rb b/lib/datadog_api_client/v2/models/gemini_integration.rb new file mode 100644 index 000000000000..9e7eb1ff8f27 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiIntegration` object. + class GeminiIntegration + include BaseGenericModel + + # The definition of the `GeminiCredentials` object. + attr_reader :credentials + + # The definition of the `GeminiIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GeminiCredentials', + :'type' => :'GeminiIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GeminiIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_integration_type.rb b/lib/datadog_api_client/v2/models/gemini_integration_type.rb new file mode 100644 index 000000000000..5704e2650dee --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiIntegrationType` object. + class GeminiIntegrationType + include BaseEnumModel + + GEMINI = "Gemini".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gemini_integration_update.rb b/lib/datadog_api_client/v2/models/gemini_integration_update.rb new file mode 100644 index 000000000000..e75c9466997c --- /dev/null +++ b/lib/datadog_api_client/v2/models/gemini_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GeminiIntegrationUpdate` object. + class GeminiIntegrationUpdate + include BaseGenericModel + + # The definition of the `GeminiCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `GeminiIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GeminiCredentialsUpdate', + :'type' => :'GeminiIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GeminiIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_api_key.rb b/lib/datadog_api_client/v2/models/gitlab_api_key.rb new file mode 100644 index 000000000000..e3247473c348 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabAPIKey` object. + class GitlabAPIKey + include BaseGenericModel + + # The `GitlabAPIKey` `api_token`. + attr_reader :api_token + + # The definition of the `GitlabAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'GitlabAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GitlabAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_api_key_type.rb b/lib/datadog_api_client/v2/models/gitlab_api_key_type.rb new file mode 100644 index 000000000000..7bdbff3b8947 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabAPIKey` object. + class GitlabAPIKeyType + include BaseEnumModel + + GITLABAPIKEY = "GitlabAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_api_key_update.rb b/lib/datadog_api_client/v2/models/gitlab_api_key_update.rb new file mode 100644 index 000000000000..757ac9b64490 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabAPIKey` object. + class GitlabAPIKeyUpdate + include BaseGenericModel + + # The `GitlabAPIKeyUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `GitlabAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'GitlabAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GitlabAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_credentials.rb b/lib/datadog_api_client/v2/models/gitlab_credentials.rb new file mode 100644 index 000000000000..1c48781d4b07 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabCredentials` object. + module GitlabCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GitlabAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_credentials_update.rb b/lib/datadog_api_client/v2/models/gitlab_credentials_update.rb new file mode 100644 index 000000000000..30f1596a6314 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabCredentialsUpdate` object. + module GitlabCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GitlabAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_integration.rb b/lib/datadog_api_client/v2/models/gitlab_integration.rb new file mode 100644 index 000000000000..5c456d78f9e3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabIntegration` object. + class GitlabIntegration + include BaseGenericModel + + # The definition of the `GitlabCredentials` object. + attr_reader :credentials + + # The definition of the `GitlabIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GitlabCredentials', + :'type' => :'GitlabIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GitlabIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_integration_type.rb b/lib/datadog_api_client/v2/models/gitlab_integration_type.rb new file mode 100644 index 000000000000..3c5fdbe1669f --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabIntegrationType` object. + class GitlabIntegrationType + include BaseEnumModel + + GITLAB = "Gitlab".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/gitlab_integration_update.rb b/lib/datadog_api_client/v2/models/gitlab_integration_update.rb new file mode 100644 index 000000000000..e645154c7887 --- /dev/null +++ b/lib/datadog_api_client/v2/models/gitlab_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GitlabIntegrationUpdate` object. + class GitlabIntegrationUpdate + include BaseGenericModel + + # The definition of the `GitlabCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `GitlabIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GitlabCredentialsUpdate', + :'type' => :'GitlabIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GitlabIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_api_key.rb b/lib/datadog_api_client/v2/models/grey_noise_api_key.rb new file mode 100644 index 000000000000..c9919900e537 --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseAPIKey` object. + class GreyNoiseAPIKey + include BaseGenericModel + + # The `GreyNoiseAPIKey` `api_key`. + attr_reader :api_key + + # The definition of the `GreyNoiseAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'GreyNoiseAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GreyNoiseAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_api_key_type.rb b/lib/datadog_api_client/v2/models/grey_noise_api_key_type.rb new file mode 100644 index 000000000000..cf597e46644b --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseAPIKey` object. + class GreyNoiseAPIKeyType + include BaseEnumModel + + GREYNOISEAPIKEY = "GreyNoiseAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_api_key_update.rb b/lib/datadog_api_client/v2/models/grey_noise_api_key_update.rb new file mode 100644 index 000000000000..5eebb5a99fc9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseAPIKey` object. + class GreyNoiseAPIKeyUpdate + include BaseGenericModel + + # The `GreyNoiseAPIKeyUpdate` `api_key`. + attr_accessor :api_key + + # The definition of the `GreyNoiseAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'GreyNoiseAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GreyNoiseAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_credentials.rb b/lib/datadog_api_client/v2/models/grey_noise_credentials.rb new file mode 100644 index 000000000000..8ebead8ddfbb --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseCredentials` object. + module GreyNoiseCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GreyNoiseAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_credentials_update.rb b/lib/datadog_api_client/v2/models/grey_noise_credentials_update.rb new file mode 100644 index 000000000000..c51600c21258 --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseCredentialsUpdate` object. + module GreyNoiseCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'GreyNoiseAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_integration.rb b/lib/datadog_api_client/v2/models/grey_noise_integration.rb new file mode 100644 index 000000000000..5cc4cd9ff049 --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseIntegration` object. + class GreyNoiseIntegration + include BaseGenericModel + + # The definition of the `GreyNoiseCredentials` object. + attr_reader :credentials + + # The definition of the `GreyNoiseIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GreyNoiseCredentials', + :'type' => :'GreyNoiseIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GreyNoiseIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_integration_type.rb b/lib/datadog_api_client/v2/models/grey_noise_integration_type.rb new file mode 100644 index 000000000000..65aed08f08ca --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseIntegrationType` object. + class GreyNoiseIntegrationType + include BaseEnumModel + + GREYNOISE = "GreyNoise".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/grey_noise_integration_update.rb b/lib/datadog_api_client/v2/models/grey_noise_integration_update.rb new file mode 100644 index 000000000000..7387078cb2b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/grey_noise_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `GreyNoiseIntegrationUpdate` object. + class GreyNoiseIntegrationUpdate + include BaseGenericModel + + # The definition of the `GreyNoiseCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `GreyNoiseIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'GreyNoiseCredentialsUpdate', + :'type' => :'GreyNoiseIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::GreyNoiseIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_api_key.rb b/lib/datadog_api_client/v2/models/launch_darkly_api_key.rb new file mode 100644 index 000000000000..55c6fab335a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyAPIKey` object. + class LaunchDarklyAPIKey + include BaseGenericModel + + # The `LaunchDarklyAPIKey` `api_token`. + attr_reader :api_token + + # The definition of the `LaunchDarklyAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'LaunchDarklyAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LaunchDarklyAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_api_key_type.rb b/lib/datadog_api_client/v2/models/launch_darkly_api_key_type.rb new file mode 100644 index 000000000000..67f3056aa8dd --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyAPIKey` object. + class LaunchDarklyAPIKeyType + include BaseEnumModel + + LAUNCHDARKLYAPIKEY = "LaunchDarklyAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_api_key_update.rb b/lib/datadog_api_client/v2/models/launch_darkly_api_key_update.rb new file mode 100644 index 000000000000..3710835a1200 --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyAPIKey` object. + class LaunchDarklyAPIKeyUpdate + include BaseGenericModel + + # The `LaunchDarklyAPIKeyUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `LaunchDarklyAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'LaunchDarklyAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LaunchDarklyAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_credentials.rb b/lib/datadog_api_client/v2/models/launch_darkly_credentials.rb new file mode 100644 index 000000000000..0c1fce366870 --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyCredentials` object. + module LaunchDarklyCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'LaunchDarklyAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_credentials_update.rb b/lib/datadog_api_client/v2/models/launch_darkly_credentials_update.rb new file mode 100644 index 000000000000..8c66392f6eaa --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyCredentialsUpdate` object. + module LaunchDarklyCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'LaunchDarklyAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_integration.rb b/lib/datadog_api_client/v2/models/launch_darkly_integration.rb new file mode 100644 index 000000000000..bec6cf346cab --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyIntegration` object. + class LaunchDarklyIntegration + include BaseGenericModel + + # The definition of the `LaunchDarklyCredentials` object. + attr_reader :credentials + + # The definition of the `LaunchDarklyIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'LaunchDarklyCredentials', + :'type' => :'LaunchDarklyIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LaunchDarklyIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_integration_type.rb b/lib/datadog_api_client/v2/models/launch_darkly_integration_type.rb new file mode 100644 index 000000000000..b32528192cae --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyIntegrationType` object. + class LaunchDarklyIntegrationType + include BaseEnumModel + + LAUNCHDARKLY = "LaunchDarkly".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/launch_darkly_integration_update.rb b/lib/datadog_api_client/v2/models/launch_darkly_integration_update.rb new file mode 100644 index 000000000000..702ce4311b4d --- /dev/null +++ b/lib/datadog_api_client/v2/models/launch_darkly_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `LaunchDarklyIntegrationUpdate` object. + class LaunchDarklyIntegrationUpdate + include BaseGenericModel + + # The definition of the `LaunchDarklyCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `LaunchDarklyIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'LaunchDarklyCredentialsUpdate', + :'type' => :'LaunchDarklyIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LaunchDarklyIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/notion_api_key.rb b/lib/datadog_api_client/v2/models/notion_api_key.rb new file mode 100644 index 000000000000..1c0c14ca6f63 --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionAPIKey` object. + class NotionAPIKey + include BaseGenericModel + + # The `NotionAPIKey` `api_token`. + attr_reader :api_token + + # The definition of the `NotionAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'NotionAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NotionAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/notion_api_key_type.rb b/lib/datadog_api_client/v2/models/notion_api_key_type.rb new file mode 100644 index 000000000000..0a7fecb09165 --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionAPIKey` object. + class NotionAPIKeyType + include BaseEnumModel + + NOTIONAPIKEY = "NotionAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/notion_api_key_update.rb b/lib/datadog_api_client/v2/models/notion_api_key_update.rb new file mode 100644 index 000000000000..35241d8c10e4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionAPIKey` object. + class NotionAPIKeyUpdate + include BaseGenericModel + + # The `NotionAPIKeyUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `NotionAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'NotionAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NotionAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/notion_credentials.rb b/lib/datadog_api_client/v2/models/notion_credentials.rb new file mode 100644 index 000000000000..3fd5b79674ac --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionCredentials` object. + module NotionCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'NotionAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/notion_credentials_update.rb b/lib/datadog_api_client/v2/models/notion_credentials_update.rb new file mode 100644 index 000000000000..dfc9d3eaea6d --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionCredentialsUpdate` object. + module NotionCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'NotionAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/notion_integration.rb b/lib/datadog_api_client/v2/models/notion_integration.rb new file mode 100644 index 000000000000..34fa468a195f --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionIntegration` object. + class NotionIntegration + include BaseGenericModel + + # The definition of the `NotionCredentials` object. + attr_reader :credentials + + # The definition of the `NotionIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'NotionCredentials', + :'type' => :'NotionIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NotionIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/notion_integration_type.rb b/lib/datadog_api_client/v2/models/notion_integration_type.rb new file mode 100644 index 000000000000..441f987488a6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionIntegrationType` object. + class NotionIntegrationType + include BaseEnumModel + + NOTION = "Notion".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/notion_integration_update.rb b/lib/datadog_api_client/v2/models/notion_integration_update.rb new file mode 100644 index 000000000000..6385e4934d7b --- /dev/null +++ b/lib/datadog_api_client/v2/models/notion_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `NotionIntegrationUpdate` object. + class NotionIntegrationUpdate + include BaseGenericModel + + # The definition of the `NotionCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `NotionIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'NotionCredentialsUpdate', + :'type' => :'NotionIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NotionIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/okta_api_token.rb b/lib/datadog_api_client/v2/models/okta_api_token.rb new file mode 100644 index 000000000000..85aff0777c36 --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_api_token.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaAPIToken` object. + class OktaAPIToken + include BaseGenericModel + + # The `OktaAPIToken` `api_token`. + attr_reader :api_token + + # The `OktaAPIToken` `domain`. + attr_reader :domain + + # The definition of the `OktaAPIToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'domain' => :'domain', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'domain' => :'String', + :'type' => :'OktaAPITokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAPIToken` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @domain.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param domain [Object] Object to be assigned + # @!visibility private + def domain=(domain) + if domain.nil? + fail ArgumentError, 'invalid value for "domain", domain cannot be nil.' + end + @domain = domain + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + domain == o.domain && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, domain, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/okta_api_token_type.rb b/lib/datadog_api_client/v2/models/okta_api_token_type.rb new file mode 100644 index 000000000000..3c7693469ce7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_api_token_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaAPIToken` object. + class OktaAPITokenType + include BaseEnumModel + + OKTAAPITOKEN = "OktaAPIToken".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/okta_api_token_update.rb b/lib/datadog_api_client/v2/models/okta_api_token_update.rb new file mode 100644 index 000000000000..f7967b74e24a --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_api_token_update.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaAPIToken` object. + class OktaAPITokenUpdate + include BaseGenericModel + + # The `OktaAPITokenUpdate` `api_token`. + attr_accessor :api_token + + # The `OktaAPITokenUpdate` `domain`. + attr_accessor :domain + + # The definition of the `OktaAPIToken` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'domain' => :'domain', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'domain' => :'String', + :'type' => :'OktaAPITokenType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaAPITokenUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + domain == o.domain && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, domain, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/okta_credentials.rb b/lib/datadog_api_client/v2/models/okta_credentials.rb new file mode 100644 index 000000000000..90bd93b49ca7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaCredentials` object. + module OktaCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'OktaAPIToken' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/okta_credentials_update.rb b/lib/datadog_api_client/v2/models/okta_credentials_update.rb new file mode 100644 index 000000000000..1fbda5574b05 --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaCredentialsUpdate` object. + module OktaCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'OktaAPITokenUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/okta_integration.rb b/lib/datadog_api_client/v2/models/okta_integration.rb new file mode 100644 index 000000000000..6be96e23a919 --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaIntegration` object. + class OktaIntegration + include BaseGenericModel + + # The definition of the `OktaCredentials` object. + attr_reader :credentials + + # The definition of the `OktaIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'OktaCredentials', + :'type' => :'OktaIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/okta_integration_type.rb b/lib/datadog_api_client/v2/models/okta_integration_type.rb new file mode 100644 index 000000000000..408abbab83d6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaIntegrationType` object. + class OktaIntegrationType + include BaseEnumModel + + OKTA = "Okta".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/okta_integration_update.rb b/lib/datadog_api_client/v2/models/okta_integration_update.rb new file mode 100644 index 000000000000..5edd9ba7ab06 --- /dev/null +++ b/lib/datadog_api_client/v2/models/okta_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OktaIntegrationUpdate` object. + class OktaIntegrationUpdate + include BaseGenericModel + + # The definition of the `OktaCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `OktaIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'OktaCredentialsUpdate', + :'type' => :'OktaIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OktaIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/open_ai_credentials.rb b/lib/datadog_api_client/v2/models/open_ai_credentials.rb new file mode 100644 index 000000000000..7e1cd2a3cfdf --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_ai_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAICredentials` object. + module OpenAICredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'OpenAIAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/open_ai_credentials_update.rb b/lib/datadog_api_client/v2/models/open_ai_credentials_update.rb new file mode 100644 index 000000000000..47ac9e7867d6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_ai_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAICredentialsUpdate` object. + module OpenAICredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'OpenAIAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/open_ai_integration.rb b/lib/datadog_api_client/v2/models/open_ai_integration.rb new file mode 100644 index 000000000000..fc566e57505d --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_ai_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAIIntegration` object. + class OpenAIIntegration + include BaseGenericModel + + # The definition of the `OpenAICredentials` object. + attr_reader :credentials + + # The definition of the `OpenAIIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'OpenAICredentials', + :'type' => :'OpenAIIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAIIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/open_ai_integration_type.rb b/lib/datadog_api_client/v2/models/open_ai_integration_type.rb new file mode 100644 index 000000000000..f864326b19d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_ai_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAIIntegrationType` object. + class OpenAIIntegrationType + include BaseEnumModel + + OPENAI = "OpenAI".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/open_ai_integration_update.rb b/lib/datadog_api_client/v2/models/open_ai_integration_update.rb new file mode 100644 index 000000000000..716d31c30919 --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_ai_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAIIntegrationUpdate` object. + class OpenAIIntegrationUpdate + include BaseGenericModel + + # The definition of the `OpenAICredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `OpenAIIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'OpenAICredentialsUpdate', + :'type' => :'OpenAIIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAIIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/open_aiapi_key.rb b/lib/datadog_api_client/v2/models/open_aiapi_key.rb new file mode 100644 index 000000000000..14fb8cc6d70a --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_aiapi_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAIAPIKey` object. + class OpenAIAPIKey + include BaseGenericModel + + # The `OpenAIAPIKey` `api_token`. + attr_reader :api_token + + # The definition of the `OpenAIAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'OpenAIAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAIAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_token [Object] Object to be assigned + # @!visibility private + def api_token=(api_token) + if api_token.nil? + fail ArgumentError, 'invalid value for "api_token", api_token cannot be nil.' + end + @api_token = api_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/open_aiapi_key_type.rb b/lib/datadog_api_client/v2/models/open_aiapi_key_type.rb new file mode 100644 index 000000000000..f61cecfd3d51 --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_aiapi_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAIAPIKey` object. + class OpenAIAPIKeyType + include BaseEnumModel + + OPENAIAPIKEY = "OpenAIAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/open_aiapi_key_update.rb b/lib/datadog_api_client/v2/models/open_aiapi_key_update.rb new file mode 100644 index 000000000000..f794613b78a2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/open_aiapi_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `OpenAIAPIKey` object. + class OpenAIAPIKeyUpdate + include BaseGenericModel + + # The `OpenAIAPIKeyUpdate` `api_token`. + attr_accessor :api_token + + # The definition of the `OpenAIAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_token' => :'api_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_token' => :'String', + :'type' => :'OpenAIAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OpenAIAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_token') + self.api_token = attributes[:'api_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_token == o.api_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_basic_auth.rb b/lib/datadog_api_client/v2/models/service_now_basic_auth.rb new file mode 100644 index 000000000000..5621f3521867 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_basic_auth.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowBasicAuth` object. + class ServiceNowBasicAuth + include BaseGenericModel + + # The `ServiceNowBasicAuth` `instance`. + attr_reader :instance + + # The `ServiceNowBasicAuth` `password`. + attr_reader :password + + # The definition of the `ServiceNowBasicAuth` object. + attr_reader :type + + # The `ServiceNowBasicAuth` `username`. + attr_reader :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'instance' => :'instance', + :'password' => :'password', + :'type' => :'type', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'instance' => :'String', + :'password' => :'String', + :'type' => :'ServiceNowBasicAuthType', + :'username' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceNowBasicAuth` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'instance') + self.instance = attributes[:'instance'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @instance.nil? + return false if @password.nil? + return false if @type.nil? + return false if @username.nil? + true + end + + # Custom attribute writer method with validation + # @param instance [Object] Object to be assigned + # @!visibility private + def instance=(instance) + if instance.nil? + fail ArgumentError, 'invalid value for "instance", instance cannot be nil.' + end + @instance = instance + end + + # Custom attribute writer method with validation + # @param password [Object] Object to be assigned + # @!visibility private + def password=(password) + if password.nil? + fail ArgumentError, 'invalid value for "password", password cannot be nil.' + end + @password = password + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Custom attribute writer method with validation + # @param username [Object] Object to be assigned + # @!visibility private + def username=(username) + if username.nil? + fail ArgumentError, 'invalid value for "username", username cannot be nil.' + end + @username = username + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + instance == o.instance && + password == o.password && + type == o.type && + username == o.username && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [instance, password, type, username, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_basic_auth_type.rb b/lib/datadog_api_client/v2/models/service_now_basic_auth_type.rb new file mode 100644 index 000000000000..53c5e48c7773 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_basic_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowBasicAuth` object. + class ServiceNowBasicAuthType + include BaseEnumModel + + SERVICENOWBASICAUTH = "ServiceNowBasicAuth".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_basic_auth_update.rb b/lib/datadog_api_client/v2/models/service_now_basic_auth_update.rb new file mode 100644 index 000000000000..fcda2c4c9dde --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_basic_auth_update.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowBasicAuth` object. + class ServiceNowBasicAuthUpdate + include BaseGenericModel + + # The `ServiceNowBasicAuthUpdate` `instance`. + attr_accessor :instance + + # The `ServiceNowBasicAuthUpdate` `password`. + attr_accessor :password + + # The definition of the `ServiceNowBasicAuth` object. + attr_reader :type + + # The `ServiceNowBasicAuthUpdate` `username`. + attr_accessor :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'instance' => :'instance', + :'password' => :'password', + :'type' => :'type', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'instance' => :'String', + :'password' => :'String', + :'type' => :'ServiceNowBasicAuthType', + :'username' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceNowBasicAuthUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'instance') + self.instance = attributes[:'instance'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + instance == o.instance && + password == o.password && + type == o.type && + username == o.username && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [instance, password, type, username, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_credentials.rb b/lib/datadog_api_client/v2/models/service_now_credentials.rb new file mode 100644 index 000000000000..33dee8a7c786 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowCredentials` object. + module ServiceNowCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ServiceNowBasicAuth' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_credentials_update.rb b/lib/datadog_api_client/v2/models/service_now_credentials_update.rb new file mode 100644 index 000000000000..e135198209c6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowCredentialsUpdate` object. + module ServiceNowCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ServiceNowBasicAuthUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_integration.rb b/lib/datadog_api_client/v2/models/service_now_integration.rb new file mode 100644 index 000000000000..954e958828fc --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowIntegration` object. + class ServiceNowIntegration + include BaseGenericModel + + # The definition of the `ServiceNowCredentials` object. + attr_reader :credentials + + # The definition of the `ServiceNowIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'ServiceNowCredentials', + :'type' => :'ServiceNowIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceNowIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_integration_type.rb b/lib/datadog_api_client/v2/models/service_now_integration_type.rb new file mode 100644 index 000000000000..072d05a0c723 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowIntegrationType` object. + class ServiceNowIntegrationType + include BaseEnumModel + + SERVICENOW = "ServiceNow".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_now_integration_update.rb b/lib/datadog_api_client/v2/models/service_now_integration_update.rb new file mode 100644 index 000000000000..ab475bb9f7bf --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_now_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `ServiceNowIntegrationUpdate` object. + class ServiceNowIntegrationUpdate + include BaseGenericModel + + # The definition of the `ServiceNowCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `ServiceNowIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'ServiceNowCredentialsUpdate', + :'type' => :'ServiceNowIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceNowIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/split_api_key.rb b/lib/datadog_api_client/v2/models/split_api_key.rb new file mode 100644 index 000000000000..eba71a2e5bc6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitAPIKey` object. + class SplitAPIKey + include BaseGenericModel + + # The `SplitAPIKey` `api_key`. + attr_reader :api_key + + # The definition of the `SplitAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'SplitAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SplitAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/split_api_key_type.rb b/lib/datadog_api_client/v2/models/split_api_key_type.rb new file mode 100644 index 000000000000..caecbc0aeefd --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitAPIKey` object. + class SplitAPIKeyType + include BaseEnumModel + + SPLITAPIKEY = "SplitAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/split_api_key_update.rb b/lib/datadog_api_client/v2/models/split_api_key_update.rb new file mode 100644 index 000000000000..7f0241fcb7ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitAPIKey` object. + class SplitAPIKeyUpdate + include BaseGenericModel + + # The `SplitAPIKeyUpdate` `api_key`. + attr_accessor :api_key + + # The definition of the `SplitAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'SplitAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SplitAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/split_credentials.rb b/lib/datadog_api_client/v2/models/split_credentials.rb new file mode 100644 index 000000000000..6ad7deeaddde --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitCredentials` object. + module SplitCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'SplitAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/split_credentials_update.rb b/lib/datadog_api_client/v2/models/split_credentials_update.rb new file mode 100644 index 000000000000..c05e69f4ebca --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitCredentialsUpdate` object. + module SplitCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'SplitAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/split_integration.rb b/lib/datadog_api_client/v2/models/split_integration.rb new file mode 100644 index 000000000000..3c6d4f2b3c54 --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitIntegration` object. + class SplitIntegration + include BaseGenericModel + + # The definition of the `SplitCredentials` object. + attr_reader :credentials + + # The definition of the `SplitIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'SplitCredentials', + :'type' => :'SplitIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SplitIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/split_integration_type.rb b/lib/datadog_api_client/v2/models/split_integration_type.rb new file mode 100644 index 000000000000..75a1d57d55a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitIntegrationType` object. + class SplitIntegrationType + include BaseEnumModel + + SPLIT = "Split".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/split_integration_update.rb b/lib/datadog_api_client/v2/models/split_integration_update.rb new file mode 100644 index 000000000000..117ab8582e77 --- /dev/null +++ b/lib/datadog_api_client/v2/models/split_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `SplitIntegrationUpdate` object. + class SplitIntegrationUpdate + include BaseGenericModel + + # The definition of the `SplitCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `SplitIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'SplitCredentialsUpdate', + :'type' => :'SplitIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SplitIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_api_key.rb b/lib/datadog_api_client/v2/models/statsig_api_key.rb new file mode 100644 index 000000000000..4921fe7826a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigAPIKey` object. + class StatsigAPIKey + include BaseGenericModel + + # The `StatsigAPIKey` `api_key`. + attr_reader :api_key + + # The definition of the `StatsigAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'StatsigAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatsigAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_api_key_type.rb b/lib/datadog_api_client/v2/models/statsig_api_key_type.rb new file mode 100644 index 000000000000..97e60b1306dd --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigAPIKey` object. + class StatsigAPIKeyType + include BaseEnumModel + + STATSIGAPIKEY = "StatsigAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_api_key_update.rb b/lib/datadog_api_client/v2/models/statsig_api_key_update.rb new file mode 100644 index 000000000000..f2a3ddeea5ed --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigAPIKey` object. + class StatsigAPIKeyUpdate + include BaseGenericModel + + # The `StatsigAPIKeyUpdate` `api_key`. + attr_accessor :api_key + + # The definition of the `StatsigAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'StatsigAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatsigAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_credentials.rb b/lib/datadog_api_client/v2/models/statsig_credentials.rb new file mode 100644 index 000000000000..e9ed314f912e --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigCredentials` object. + module StatsigCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'StatsigAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_credentials_update.rb b/lib/datadog_api_client/v2/models/statsig_credentials_update.rb new file mode 100644 index 000000000000..8dd42bae28a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigCredentialsUpdate` object. + module StatsigCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'StatsigAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_integration.rb b/lib/datadog_api_client/v2/models/statsig_integration.rb new file mode 100644 index 000000000000..f140f905f992 --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigIntegration` object. + class StatsigIntegration + include BaseGenericModel + + # The definition of the `StatsigCredentials` object. + attr_reader :credentials + + # The definition of the `StatsigIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'StatsigCredentials', + :'type' => :'StatsigIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatsigIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_integration_type.rb b/lib/datadog_api_client/v2/models/statsig_integration_type.rb new file mode 100644 index 000000000000..54c369663dea --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigIntegrationType` object. + class StatsigIntegrationType + include BaseEnumModel + + STATSIG = "Statsig".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/statsig_integration_update.rb b/lib/datadog_api_client/v2/models/statsig_integration_update.rb new file mode 100644 index 000000000000..cea5b68c9bce --- /dev/null +++ b/lib/datadog_api_client/v2/models/statsig_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `StatsigIntegrationUpdate` object. + class StatsigIntegrationUpdate + include BaseGenericModel + + # The definition of the `StatsigCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `StatsigIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'StatsigCredentialsUpdate', + :'type' => :'StatsigIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::StatsigIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_api_key.rb b/lib/datadog_api_client/v2/models/virus_total_api_key.rb new file mode 100644 index 000000000000..73342785cfe4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_api_key.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalAPIKey` object. + class VirusTotalAPIKey + include BaseGenericModel + + # The `VirusTotalAPIKey` `api_key`. + attr_reader :api_key + + # The definition of the `VirusTotalAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'VirusTotalAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::VirusTotalAPIKey` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_api_key_type.rb b/lib/datadog_api_client/v2/models/virus_total_api_key_type.rb new file mode 100644 index 000000000000..675098a1e4bc --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_api_key_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalAPIKey` object. + class VirusTotalAPIKeyType + include BaseEnumModel + + VIRUSTOTALAPIKEY = "VirusTotalAPIKey".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_api_key_update.rb b/lib/datadog_api_client/v2/models/virus_total_api_key_update.rb new file mode 100644 index 000000000000..3acbed4e9e5d --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_api_key_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalAPIKey` object. + class VirusTotalAPIKeyUpdate + include BaseGenericModel + + # The `VirusTotalAPIKeyUpdate` `api_key`. + attr_accessor :api_key + + # The definition of the `VirusTotalAPIKey` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'VirusTotalAPIKeyType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::VirusTotalAPIKeyUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_credentials.rb b/lib/datadog_api_client/v2/models/virus_total_credentials.rb new file mode 100644 index 000000000000..7a6568984818 --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_credentials.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalCredentials` object. + module VirusTotalCredentials + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'VirusTotalAPIKey' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_credentials_update.rb b/lib/datadog_api_client/v2/models/virus_total_credentials_update.rb new file mode 100644 index 000000000000..c45161bad7ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_credentials_update.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalCredentialsUpdate` object. + module VirusTotalCredentialsUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'VirusTotalAPIKeyUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_integration.rb b/lib/datadog_api_client/v2/models/virus_total_integration.rb new file mode 100644 index 000000000000..17a35ea1776b --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_integration.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalIntegration` object. + class VirusTotalIntegration + include BaseGenericModel + + # The definition of the `VirusTotalCredentials` object. + attr_reader :credentials + + # The definition of the `VirusTotalIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'VirusTotalCredentials', + :'type' => :'VirusTotalIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::VirusTotalIntegration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @credentials.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param credentials [Object] Object to be assigned + # @!visibility private + def credentials=(credentials) + if credentials.nil? + fail ArgumentError, 'invalid value for "credentials", credentials cannot be nil.' + end + @credentials = credentials + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_integration_type.rb b/lib/datadog_api_client/v2/models/virus_total_integration_type.rb new file mode 100644 index 000000000000..9d81cabb3a8e --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalIntegrationType` object. + class VirusTotalIntegrationType + include BaseEnumModel + + VIRUSTOTAL = "VirusTotal".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/virus_total_integration_update.rb b/lib/datadog_api_client/v2/models/virus_total_integration_update.rb new file mode 100644 index 000000000000..9c769e390e82 --- /dev/null +++ b/lib/datadog_api_client/v2/models/virus_total_integration_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The definition of the `VirusTotalIntegrationUpdate` object. + class VirusTotalIntegrationUpdate + include BaseGenericModel + + # The definition of the `VirusTotalCredentialsUpdate` object. + attr_accessor :credentials + + # The definition of the `VirusTotalIntegrationType` object. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'credentials' => :'credentials', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'credentials' => :'VirusTotalCredentialsUpdate', + :'type' => :'VirusTotalIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::VirusTotalIntegrationUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + credentials == o.credentials && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [credentials, type, additional_properties].hash + end + end +end