diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 840ac4eef97..d57aebc821a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -14989,6 +14989,185 @@ components: type: string x-enum-varnames: - REFERENCE_TABLE + CreateTenancyConfigData: + properties: + attributes: + $ref: '#/components/schemas/CreateTenancyConfigDataAttributes' + id: + example: '' + type: string + type: + $ref: '#/components/schemas/UpdateTenancyConfigDataType' + required: + - type + - id + type: object + CreateTenancyConfigDataAttributes: + properties: + auth_credentials: + $ref: '#/components/schemas/CreateTenancyConfigDataAttributesAuthCredentials' + config_version: + format: int64 + nullable: true + type: integer + cost_collection_enabled: + type: boolean + dd_compartment_id: + type: string + dd_stack_id: + type: string + home_region: + example: '' + type: string + logs_config: + $ref: '#/components/schemas/CreateTenancyConfigDataAttributesLogsConfig' + metrics_config: + $ref: '#/components/schemas/CreateTenancyConfigDataAttributesMetricsConfig' + regions_config: + $ref: '#/components/schemas/CreateTenancyConfigDataAttributesRegionsConfig' + resource_collection_enabled: + type: boolean + user_ocid: + example: '' + type: string + required: + - auth_credentials + - home_region + - user_ocid + type: object + CreateTenancyConfigDataAttributesAuthCredentials: + properties: + fingerprint: + type: string + private_key: + example: '' + type: string + required: + - private_key + type: object + CreateTenancyConfigDataAttributesLogsConfig: + properties: + compartment_tag_filters: + items: + type: string + type: array + enabled: + type: boolean + enabled_services: + items: + type: string + type: array + type: object + CreateTenancyConfigDataAttributesMetricsConfig: + properties: + compartment_tag_filters: + items: + type: string + type: array + enabled: + type: boolean + excluded_services: + items: + type: string + type: array + type: object + CreateTenancyConfigDataAttributesRegionsConfig: + properties: + available: + items: + type: string + type: array + disabled: + items: + type: string + type: array + enabled: + items: + type: string + type: array + type: object + CreateTenancyConfigRequest: + example: + data: + attributes: + auth_credentials: + fingerprint: '' + private_key: '----BEGIN PRIVATE KEY----- + + MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdvSMmlfLyeD4M + + QsA3WlrWBqKdWa5eVV3/uODyqT3wWMEMIJHcG3/quNs8nh9xrK1/JkQT2qoKEHqR + + C5k59jN6Vp8em8ARJthMgam9K37ELt+IQ/G8ySTSuqZG8T4cHp/cs3fAclNqttOl + + YnGr4RbVAgMBAAECggEAGZNLGbyCUbIRTW6Kh4d8ZVC+eZtJMqGmGJ3KfVaW8Pjn + + QGWfSuJCEe2o2Y8G3phlidFauICnZ44enXA17Rhi+I/whnr7FIyQk2bR7rv+1Uhc + + mOJygWX5eFFMsledgVAdIAl9Luk2nykx7Un3g6rtbl/Vs+5k4m7ITLFMpCHzsJLU + + nm8kBzDOqY2JUkMd08nL88KL6QywWtal05UESzQpNFXd0e5kxYfexeMCsLsWP0mc + + quMLRbn7NuBjCbe9VU2kmIvcfDDaWjurT7d5m1OXx1cc8p6P4PFZTVyCjdhiWOr3 + + LQXZ4/vdZNR3zgEHypRoM6D9Yq99LWUOUEMrdiSLQQKBgQDQkh7C1OtAXnpy7F6R + + W+/I3zBHici2p7A57UT7VECQ1IVGg37/uus83DkuOtdZ33JmHLAVrwLFJvUlbyjx + + l6dc/1ms40L5HFdLgaVtd4k0rSPFeOSDr6evz0lX4yBuzlP0fEh+o3XHW7mwe2G+ + + rWCULF/Uqza66fjbCSKMNgLIXQKBgQDBm9nZg/s4S0THWCFNWcB1tXBG0p/sH5eY + + PC1H/VmTEINIixStrS4ufczf31X8rcoSjSbO7+vZDTTATdk7OLn1I2uGFVYl8M59 + + 86BYT2Hi7cwp7YVzOc/cJigVeBAqSRW/iYYyWBEUTiW1gbkV0sRWwhPp67m+c0sP + + XpY/iEZA2QKBgB1w8tynt4l/jKNaUEMOijt9ndALWATIiOy0XG9pxi9rgGCiwTOS + + DBCsOXoYHjv2eayGUijNaoOv6xzcoxfvQ1WySdNIxTRq1ru20kYwgHKqGgmO9hrM + + mcwMY5r/WZ2qjFlPjeAqbL62aPDLidGjoaVo2iIoBPK/gjxQ/5f0MS4N/YQ0zWoYBueSQ0DGs + + -----END PRIVATE KEY-----' + config_version: null + cost_collection_enabled: true + dd_compartment_id: ocid.compartment.test + dd_stack_id: ocid.stack.test + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + enabled_services: + - service_1 + - service_1 + metrics_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + excluded_services: + - service_1 + - service_1 + regions_config: + available: + - us-ashburn-1 + - us-phoenix-1 + disabled: + - us-phoenix-1 + enabled: + - us-ashburn-1 + resource_collection_enabled: true + user_ocid: ocid.user.test + id: ocid.tenancy.test + type: oci_tenancy + properties: + data: + $ref: '#/components/schemas/CreateTenancyConfigData' + required: + - data + type: object CreateUploadRequest: description: Request to create an upload for a file to be ingested into a reference table. @@ -62752,6 +62931,219 @@ components: description: Offset type. type: string type: object + TenancyConfig: + example: + data: + attributes: + config_version: 2 + cost_collection_enabled: true + dd_compartment_id: ocid.compartment.test + dd_stack_id: ocid.stack.test + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - compartment.test + enabled: true + enabled_services: + - compute + metrics_config: + compartment_tag_filters: + - compartment.test + enabled: true + excluded_services: + - compute + regions_config: + available: + - us-ashburn-1 + - us-phoenix-1 + disabled: + - us-phoenix-1 + enabled: + - us-ashburn-1 + resource_collection_enabled: true + user_ocid: ocid.user.test + id: ocid.tenancy.test + type: oci_tenancy + properties: + data: + $ref: '#/components/schemas/TenancyConfigData' + type: object + TenancyConfigData: + properties: + attributes: + $ref: '#/components/schemas/TenancyConfigDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/UpdateTenancyConfigDataType' + required: + - type + type: object + TenancyConfigDataAttributes: + properties: + billing_plan_id: + format: int32 + maximum: 2147483647 + type: integer + config_version: + format: int64 + type: integer + cost_collection_enabled: + type: boolean + dd_compartment_id: + type: string + dd_stack_id: + type: string + home_region: + type: string + logs_config: + $ref: '#/components/schemas/TenancyConfigDataAttributesLogsConfig' + metrics_config: + $ref: '#/components/schemas/TenancyConfigDataAttributesMetricsConfig' + parent_tenancy_name: + type: string + regions_config: + $ref: '#/components/schemas/TenancyConfigDataAttributesRegionsConfig' + resource_collection_enabled: + type: boolean + tenancy_name: + type: string + user_ocid: + type: string + type: object + TenancyConfigDataAttributesLogsConfig: + properties: + compartment_tag_filters: + items: + type: string + type: array + enabled: + type: boolean + enabled_services: + items: + type: string + type: array + type: object + TenancyConfigDataAttributesMetricsConfig: + properties: + compartment_tag_filters: + items: + type: string + type: array + enabled: + type: boolean + excluded_services: + items: + type: string + type: array + type: object + TenancyConfigDataAttributesRegionsConfig: + properties: + available: + items: + type: string + type: array + disabled: + items: + type: string + type: array + enabled: + items: + type: string + type: array + type: object + TenancyConfigList: + example: + data: + - attributes: + config_version: 2 + cost_collection_enabled: true + dd_compartment_id: ocid.compartment.test + dd_stack_id: ocid.stack.test + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - compartment.test + enabled: true + enabled_services: + - compute + metrics_config: + compartment_tag_filters: + - compartment.test + enabled: true + excluded_services: + - compute + regions_config: + available: + - us-ashburn-1 + - us-phoenix-1 + disabled: + - us-phoenix-1 + enabled: + - us-ashburn-1 + resource_collection_enabled: true + user_ocid: ocid.user.test + id: ocid.tenancy.test + type: oci_tenancy + properties: + data: + items: + $ref: '#/components/schemas/TenancyConfigData' + type: array + required: + - data + type: object + TenancyProductsData: + properties: + attributes: + $ref: '#/components/schemas/TenancyProductsDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/TenancyProductsDataType' + required: + - type + type: object + TenancyProductsDataAttributes: + properties: + products: + items: + $ref: '#/components/schemas/TenancyProductsDataAttributesProductsItems' + type: array + type: object + TenancyProductsDataAttributesProductsItems: + properties: + enabled: + type: boolean + product_key: + type: string + type: object + TenancyProductsDataType: + default: oci_tenancy_product + description: OCI tenancy product resource type. + enum: + - oci_tenancy_product + example: oci_tenancy_product + type: string + x-enum-varnames: + - OCI_TENANCY_PRODUCT + TenancyProductsList: + example: + data: + - attributes: + products: + - enabled: true + product_key: CLOUD_SECURITY_POSTURE_MANAGEMENT + id: ocid.tenancy.test + type: oci_tenancy_product + properties: + data: + items: + $ref: '#/components/schemas/TenancyProductsData' + type: array + required: + - data + type: object ThreatHuntingJobDataType: description: Type of payload. enum: @@ -64438,6 +64830,177 @@ components: type: string x-enum-varnames: - UPDATE_RULESET + UpdateTenancyConfigData: + properties: + attributes: + $ref: '#/components/schemas/UpdateTenancyConfigDataAttributes' + id: + example: '' + type: string + type: + $ref: '#/components/schemas/UpdateTenancyConfigDataType' + required: + - type + - id + type: object + UpdateTenancyConfigDataAttributes: + properties: + auth_credentials: + $ref: '#/components/schemas/UpdateTenancyConfigDataAttributesAuthCredentials' + cost_collection_enabled: + type: boolean + home_region: + type: string + logs_config: + $ref: '#/components/schemas/UpdateTenancyConfigDataAttributesLogsConfig' + metrics_config: + $ref: '#/components/schemas/UpdateTenancyConfigDataAttributesMetricsConfig' + regions_config: + $ref: '#/components/schemas/UpdateTenancyConfigDataAttributesRegionsConfig' + resource_collection_enabled: + type: boolean + user_ocid: + type: string + type: object + UpdateTenancyConfigDataAttributesAuthCredentials: + properties: + fingerprint: + type: string + private_key: + example: '' + type: string + required: + - private_key + type: object + UpdateTenancyConfigDataAttributesLogsConfig: + properties: + compartment_tag_filters: + items: + type: string + type: array + enabled: + type: boolean + enabled_services: + items: + type: string + type: array + type: object + UpdateTenancyConfigDataAttributesMetricsConfig: + properties: + compartment_tag_filters: + items: + type: string + type: array + enabled: + type: boolean + excluded_services: + items: + type: string + type: array + type: object + UpdateTenancyConfigDataAttributesRegionsConfig: + properties: + available: + items: + type: string + type: array + disabled: + items: + type: string + type: array + enabled: + items: + type: string + type: array + type: object + UpdateTenancyConfigDataType: + default: oci_tenancy + description: OCI tenancy resource type. + enum: + - oci_tenancy + example: oci_tenancy + type: string + x-enum-varnames: + - OCI_TENANCY + UpdateTenancyConfigRequest: + example: + data: + attributes: + auth_credentials: + fingerprint: '' + private_key: '----BEGIN PRIVATE KEY----- + + MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdvSMmlfLyeD4M + + QsA3WlrWBqKdWa5eVV3/uODyqT3wWMEMIJHcG3/quNs8nh9xrK1/JkQT2qoKEHqR + + C5k59jN6Vp8em8ARJthMgam9K37ELt+IQ/G8ySTSuqZG8T4cHp/cs3fAclNqttOl + + YnGr4RbVAgMBAAECggEAGZNLGbyCUbIRTW6Kh4d8ZVC+eZtJMqGmGJ3KfVaW8Pjn + + QGWfSuJCEe2o2Y8G3phlidFauICnZ44enXA17Rhi+I/whnr7FIyQk2bR7rv+1Uhc + + mOJygWX5eFFMsledgVAdIAl9Luk2nykx7Un3g6rtbl/Vs+5k4m7ITLFMpCHzsJLU + + nm8kBzDOqY2JUkMd08nL88KL6QywWtal05UESzQpNFXd0e5kxYfexeMCsLsWP0mc + + quMLRbn7NuBjCbe9VU2kmIvcfDDaWjurT7d5m1OXx1cc8p6P4PFZTVyCjdhiWOr3 + + LQXZ4/vdZNR3zgEHypRoM6D9Yq99LWUOUEMrdiSLQQKBgQDQkh7C1OtAXnpy7F6R + + W+/I3zBHici2p7A57UT7VECQ1IVGg37/uus83DkuOtdZ33JmHLAVrwLFJvUlbyjx + + l6dc/1ms40L5HFdLgaVtd4k0rSPFeOSDr6evz0lX4yBuzlP0fEh+o3XHW7mwe2G+ + + rWCULF/Uqza66fjbCSKMNgLIXQKBgQDBm9nZg/s4S0THWCFNWcB1tXBG0p/sH5eY + + PC1H/VmTEINIixStrS4ufczf31X8rcoSjSbO7+vZDTTATdk7OLn1I2uGFVYl8M59 + + 86BYT2Hi7cwp7YVzOc/cJigVeBAqSRW/iYYyWBEUTiW1gbkV0sRWwhPp67m+c0sP + + XpY/iEZA2QKBgB1w8tynt4l/jKNaUEMOijt9ndALWATIiOy0XG9pxi9rgGCiwTOS + + DBCsOXoYHjv2eayGUijNaoOv6xzcoxfvQ1WySdNIxTRq1ru20kYwgHKqGgmO9hrM + + mcwMY5r/WZ2qjFlPjeAqbL62aPDLidGjoaVo2iIoBPK/gjxQ/5f0MS4N/YQ0zWoYBueSQ0DGs + + -----END PRIVATE KEY-----' + cost_collection_enabled: true + home_region: us-ashburn-1 + logs_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + enabled_services: + - service_1 + - service_1 + metrics_config: + compartment_tag_filters: + - datadog:true + - env:prod + enabled: true + excluded_services: + - service_1 + - service_1 + regions_config: + available: + - us-ashburn-1 + - us-phoenix-1 + disabled: + - us-phoenix-1 + enabled: + - us-ashburn-1 + resource_collection_enabled: true + user_ocid: ocid.user.test + id: ocid.tenancy.test + type: oci_tenancy + properties: + data: + $ref: '#/components/schemas/UpdateTenancyConfigData' + required: + - data + type: object UpdateWorkflowRequest: description: A request object for updating an existing workflow. example: @@ -77857,7 +78420,16 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents/{incident_id}/attachments/postmortems: post: - description: Create a postmortem attachment for an incident. + description: 'Create a postmortem attachment for an incident. + + + The endpoint accepts markdown for notebooks created in Confluence or Google + Docs. + + Postmortems created from notebooks need to be formatted using frontend notebook + cells, + + in addition to markdown format.' operationId: CreateIncidentPostmortemAttachment parameters: - description: The ID of the incident @@ -79518,6 +80090,170 @@ paths: tags: - Microsoft Teams Integration x-codegen-request-body-name: body + /api/v2/integration/oci/products: + get: + description: Lists the products for a given tenancy. Returns the enabled/disabled + status of Datadog products (such as Cloud Security Posture Management) for + specific OCI tenancies. + operationId: ListTenancyProducts + parameters: + - description: Comma-separated list of product keys to filter by. + in: query + name: productKeys + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyProductsList' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List tenancy products + tags: + - OCI Integration + /api/v2/integration/oci/tenancies: + get: + description: Get a list of all configured OCI tenancy integrations. Returns + basic information about each tenancy including authentication credentials, + region settings, and collection preferences for metrics, logs, and resources. + operationId: GetTenancyConfigs + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfigList' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get tenancy configs + tags: + - OCI Integration + x-unstable: '**Note**: This endpoint may be subject to changes.' + post: + description: 'Create a new tenancy config to establish monitoring and data collection + from your OCI environment. Requires OCI authentication credentials and tenancy + details. Warning: Datadog recommends interacting with this endpoint only through + the Datadog web UI to ensure all necessary OCI resources have been created + and configured properly.' + operationId: CreateTenancyConfig + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTenancyConfigRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfig' + description: Created + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create tenancy config + tags: + - OCI Integration + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/integration/oci/tenancies/{tenancy_ocid}: + delete: + description: Delete an existing tenancy config. This will stop all data collection + from the specified OCI tenancy and remove the stored configuration. This operation + cannot be undone. + operationId: DeleteTenancyConfig + parameters: + - description: The OCID of the tenancy config to delete. + in: path + name: tenancy_ocid + required: true + schema: + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete tenancy config + tags: + - OCI Integration + get: + description: Get a single tenancy config object by its OCID. Returns detailed + configuration including authentication credentials, enabled services, region + settings, and collection preferences. + operationId: GetTenancyConfig + parameters: + - description: The OCID of the tenancy config to retrieve. + in: path + name: tenancy_ocid + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfig' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get tenancy config + tags: + - OCI Integration + patch: + description: 'Update an existing tenancy config. You can modify authentication + credentials, enable/disable collection types, update service filters, and + change region settings. Warning: We recommend using the Datadog web UI to + avoid unintended update effects.' + operationId: UpdateTenancyConfig + parameters: + - description: The OCID of the tenancy config to update. + in: path + name: tenancy_ocid + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTenancyConfigRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TenancyConfig' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update tenancy config + tags: + - OCI Integration /api/v2/integration/opsgenie/services: get: description: Get a list of all services from the Datadog Opsgenie integration. @@ -101674,6 +102410,8 @@ tags: and their attributes. See the [Network Device Monitoring page](https://docs.datadoghq.com/network_monitoring/) for more information. name: Network Device Monitoring +- description: Auto-generated tag OCI Integration + name: OCI Integration - description: Observability Pipelines allows you to collect and process logs within your own infrastructure, and then route them to downstream integrations. externalDocs: diff --git a/examples/v2/oci-integration/CreateTenancyConfig.rb b/examples/v2/oci-integration/CreateTenancyConfig.rb new file mode 100644 index 00000000000..6186586cf85 --- /dev/null +++ b/examples/v2/oci-integration/CreateTenancyConfig.rb @@ -0,0 +1,62 @@ +# Create tenancy config returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_tenancy_config".to_sym] = true +end +api_instance = DatadogAPIClient::V2::OCIIntegrationAPI.new + +body = DatadogAPIClient::V2::CreateTenancyConfigRequest.new({ + data: DatadogAPIClient::V2::CreateTenancyConfigData.new({ + attributes: DatadogAPIClient::V2::CreateTenancyConfigDataAttributes.new({ + auth_credentials: DatadogAPIClient::V2::CreateTenancyConfigDataAttributesAuthCredentials.new({ + fingerprint: "", + private_key: '----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdvSMmlfLyeD4M\nQsA3WlrWBqKdWa5eVV3/uODyqT3wWMEMIJHcG3/quNs8nh9xrK1/JkQT2qoKEHqR\nC5k59jN6Vp8em8ARJthMgam9K37ELt+IQ/G8ySTSuqZG8T4cHp/cs3fAclNqttOl\nYnGr4RbVAgMBAAECggEAGZNLGbyCUbIRTW6Kh4d8ZVC+eZtJMqGmGJ3KfVaW8Pjn\nQGWfSuJCEe2o2Y8G3phlidFauICnZ44enXA17Rhi+I/whnr7FIyQk2bR7rv+1Uhc\nmOJygWX5eFFMsledgVAdIAl9Luk2nykx7Un3g6rtbl/Vs+5k4m7ITLFMpCHzsJLU\nnm8kBzDOqY2JUkMd08nL88KL6QywWtal05UESzQpNFXd0e5kxYfexeMCsLsWP0mc\nquMLRbn7NuBjCbe9VU2kmIvcfDDaWjurT7d5m1OXx1cc8p6P4PFZTVyCjdhiWOr3\nLQXZ4/vdZNR3zgEHypRoM6D9Yq99LWUOUEMrdiSLQQKBgQDQkh7C1OtAXnpy7F6R\nW+/I3zBHici2p7A57UT7VECQ1IVGg37/uus83DkuOtdZ33JmHLAVrwLFJvUlbyjx\nl6dc/1ms40L5HFdLgaVtd4k0rSPFeOSDr6evz0lX4yBuzlP0fEh+o3XHW7mwe2G+\nrWCULF/Uqza66fjbCSKMNgLIXQKBgQDBm9nZg/s4S0THWCFNWcB1tXBG0p/sH5eY\nPC1H/VmTEINIixStrS4ufczf31X8rcoSjSbO7+vZDTTATdk7OLn1I2uGFVYl8M59\n86BYT2Hi7cwp7YVzOc/cJigVeBAqSRW/iYYyWBEUTiW1gbkV0sRWwhPp67m+c0sP\nXpY/iEZA2QKBgB1w8tynt4l/jKNaUEMOijt9ndALWATIiOy0XG9pxi9rgGCiwTOS\nDBCsOXoYHjv2eayGUijNaoOv6xzcoxfvQ1WySdNIxTRq1ru20kYwgHKqGgmO9hrM\nmcwMY5r/WZ2qjFlPjeAqbL62aPDLidGjoaVo2iIoBPK/gjxQ/5f0MS4N/YQ0zWoYBueSQ0DGs\n-----END PRIVATE KEY-----', + }), + config_version: nil, + cost_collection_enabled: true, + dd_compartment_id: "ocid.compartment.test", + dd_stack_id: "ocid.stack.test", + home_region: "us-ashburn-1", + logs_config: DatadogAPIClient::V2::CreateTenancyConfigDataAttributesLogsConfig.new({ + compartment_tag_filters: [ + "datadog:true", + "env:prod", + ], + enabled: true, + enabled_services: [ + "service_1", + "service_1", + ], + }), + metrics_config: DatadogAPIClient::V2::CreateTenancyConfigDataAttributesMetricsConfig.new({ + compartment_tag_filters: [ + "datadog:true", + "env:prod", + ], + enabled: true, + excluded_services: [ + "service_1", + "service_1", + ], + }), + regions_config: DatadogAPIClient::V2::CreateTenancyConfigDataAttributesRegionsConfig.new({ + available: [ + "us-ashburn-1", + "us-phoenix-1", + ], + disabled: [ + "us-phoenix-1", + ], + enabled: [ + "us-ashburn-1", + ], + }), + resource_collection_enabled: true, + user_ocid: "ocid.user.test", + }), + id: "ocid.tenancy.test", + type: DatadogAPIClient::V2::UpdateTenancyConfigDataType::OCI_TENANCY, + }), +}) +p api_instance.create_tenancy_config(body) diff --git a/examples/v2/oci-integration/DeleteTenancyConfig.rb b/examples/v2/oci-integration/DeleteTenancyConfig.rb new file mode 100644 index 00000000000..de2304e55e9 --- /dev/null +++ b/examples/v2/oci-integration/DeleteTenancyConfig.rb @@ -0,0 +1,5 @@ +# Delete tenancy config returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::OCIIntegrationAPI.new +api_instance.delete_tenancy_config("tenancy_ocid") diff --git a/examples/v2/oci-integration/GetTenancyConfig.rb b/examples/v2/oci-integration/GetTenancyConfig.rb new file mode 100644 index 00000000000..758e5199698 --- /dev/null +++ b/examples/v2/oci-integration/GetTenancyConfig.rb @@ -0,0 +1,5 @@ +# Get tenancy config returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::OCIIntegrationAPI.new +p api_instance.get_tenancy_config("tenancy_ocid") diff --git a/examples/v2/oci-integration/GetTenancyConfigs.rb b/examples/v2/oci-integration/GetTenancyConfigs.rb new file mode 100644 index 00000000000..be25f7aaab0 --- /dev/null +++ b/examples/v2/oci-integration/GetTenancyConfigs.rb @@ -0,0 +1,8 @@ +# Get tenancy configs returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_tenancy_configs".to_sym] = true +end +api_instance = DatadogAPIClient::V2::OCIIntegrationAPI.new +p api_instance.get_tenancy_configs() diff --git a/examples/v2/oci-integration/ListTenancyProducts.rb b/examples/v2/oci-integration/ListTenancyProducts.rb new file mode 100644 index 00000000000..cd91f40135c --- /dev/null +++ b/examples/v2/oci-integration/ListTenancyProducts.rb @@ -0,0 +1,5 @@ +# List tenancy products returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::OCIIntegrationAPI.new +p api_instance.list_tenancy_products("productKeys") diff --git a/examples/v2/oci-integration/UpdateTenancyConfig.rb b/examples/v2/oci-integration/UpdateTenancyConfig.rb new file mode 100644 index 00000000000..4d92943b29c --- /dev/null +++ b/examples/v2/oci-integration/UpdateTenancyConfig.rb @@ -0,0 +1,56 @@ +# Update tenancy config returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::OCIIntegrationAPI.new + +body = DatadogAPIClient::V2::UpdateTenancyConfigRequest.new({ + data: DatadogAPIClient::V2::UpdateTenancyConfigData.new({ + attributes: DatadogAPIClient::V2::UpdateTenancyConfigDataAttributes.new({ + auth_credentials: DatadogAPIClient::V2::UpdateTenancyConfigDataAttributesAuthCredentials.new({ + fingerprint: "", + private_key: '----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdvSMmlfLyeD4M\nQsA3WlrWBqKdWa5eVV3/uODyqT3wWMEMIJHcG3/quNs8nh9xrK1/JkQT2qoKEHqR\nC5k59jN6Vp8em8ARJthMgam9K37ELt+IQ/G8ySTSuqZG8T4cHp/cs3fAclNqttOl\nYnGr4RbVAgMBAAECggEAGZNLGbyCUbIRTW6Kh4d8ZVC+eZtJMqGmGJ3KfVaW8Pjn\nQGWfSuJCEe2o2Y8G3phlidFauICnZ44enXA17Rhi+I/whnr7FIyQk2bR7rv+1Uhc\nmOJygWX5eFFMsledgVAdIAl9Luk2nykx7Un3g6rtbl/Vs+5k4m7ITLFMpCHzsJLU\nnm8kBzDOqY2JUkMd08nL88KL6QywWtal05UESzQpNFXd0e5kxYfexeMCsLsWP0mc\nquMLRbn7NuBjCbe9VU2kmIvcfDDaWjurT7d5m1OXx1cc8p6P4PFZTVyCjdhiWOr3\nLQXZ4/vdZNR3zgEHypRoM6D9Yq99LWUOUEMrdiSLQQKBgQDQkh7C1OtAXnpy7F6R\nW+/I3zBHici2p7A57UT7VECQ1IVGg37/uus83DkuOtdZ33JmHLAVrwLFJvUlbyjx\nl6dc/1ms40L5HFdLgaVtd4k0rSPFeOSDr6evz0lX4yBuzlP0fEh+o3XHW7mwe2G+\nrWCULF/Uqza66fjbCSKMNgLIXQKBgQDBm9nZg/s4S0THWCFNWcB1tXBG0p/sH5eY\nPC1H/VmTEINIixStrS4ufczf31X8rcoSjSbO7+vZDTTATdk7OLn1I2uGFVYl8M59\n86BYT2Hi7cwp7YVzOc/cJigVeBAqSRW/iYYyWBEUTiW1gbkV0sRWwhPp67m+c0sP\nXpY/iEZA2QKBgB1w8tynt4l/jKNaUEMOijt9ndALWATIiOy0XG9pxi9rgGCiwTOS\nDBCsOXoYHjv2eayGUijNaoOv6xzcoxfvQ1WySdNIxTRq1ru20kYwgHKqGgmO9hrM\nmcwMY5r/WZ2qjFlPjeAqbL62aPDLidGjoaVo2iIoBPK/gjxQ/5f0MS4N/YQ0zWoYBueSQ0DGs\n-----END PRIVATE KEY-----', + }), + cost_collection_enabled: true, + home_region: "us-ashburn-1", + logs_config: DatadogAPIClient::V2::UpdateTenancyConfigDataAttributesLogsConfig.new({ + compartment_tag_filters: [ + "datadog:true", + "env:prod", + ], + enabled: true, + enabled_services: [ + "service_1", + "service_1", + ], + }), + metrics_config: DatadogAPIClient::V2::UpdateTenancyConfigDataAttributesMetricsConfig.new({ + compartment_tag_filters: [ + "datadog:true", + "env:prod", + ], + enabled: true, + excluded_services: [ + "service_1", + "service_1", + ], + }), + regions_config: DatadogAPIClient::V2::UpdateTenancyConfigDataAttributesRegionsConfig.new({ + available: [ + "us-ashburn-1", + "us-phoenix-1", + ], + disabled: [ + "us-phoenix-1", + ], + enabled: [ + "us-ashburn-1", + ], + }), + resource_collection_enabled: true, + user_ocid: "ocid.user.test", + }), + id: "ocid.tenancy.test", + type: DatadogAPIClient::V2::UpdateTenancyConfigDataType::OCI_TENANCY, + }), +}) +p api_instance.update_tenancy_config("tenancy_ocid", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 754dcc7c06b..2d691450863 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2346,6 +2346,22 @@ "handle_id" => "String", "body" => "MicrosoftTeamsUpdateWorkflowsWebhookHandleRequest", }, + "v2.ListTenancyProducts" => { + "product_keys" => "String", + }, + "v2.CreateTenancyConfig" => { + "body" => "CreateTenancyConfigRequest", + }, + "v2.DeleteTenancyConfig" => { + "tenancy_ocid" => "String", + }, + "v2.GetTenancyConfig" => { + "tenancy_ocid" => "String", + }, + "v2.UpdateTenancyConfig" => { + "tenancy_ocid" => "String", + "body" => "UpdateTenancyConfigRequest", + }, "v2.CreateOpsgenieService" => { "body" => "OpsgenieServiceCreateRequest", }, diff --git a/features/v2/oci_integration.feature b/features/v2/oci_integration.feature new file mode 100644 index 00000000000..0da91f9a063 --- /dev/null +++ b/features/v2/oci_integration.feature @@ -0,0 +1,52 @@ +@endpoint(oci-integration) @endpoint(oci-integration-v2) +Feature: OCI Integration + Auto-generated tag OCI Integration + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "OCIIntegration" API + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: Create tenancy config returns "Created" response + Given operation "CreateTenancyConfig" enabled + And new "CreateTenancyConfig" request + And body with value {"data": {"attributes": {"auth_credentials": {"fingerprint": "", "private_key": "----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdvSMmlfLyeD4M\nQsA3WlrWBqKdWa5eVV3/uODyqT3wWMEMIJHcG3/quNs8nh9xrK1/JkQT2qoKEHqR\nC5k59jN6Vp8em8ARJthMgam9K37ELt+IQ/G8ySTSuqZG8T4cHp/cs3fAclNqttOl\nYnGr4RbVAgMBAAECggEAGZNLGbyCUbIRTW6Kh4d8ZVC+eZtJMqGmGJ3KfVaW8Pjn\nQGWfSuJCEe2o2Y8G3phlidFauICnZ44enXA17Rhi+I/whnr7FIyQk2bR7rv+1Uhc\nmOJygWX5eFFMsledgVAdIAl9Luk2nykx7Un3g6rtbl/Vs+5k4m7ITLFMpCHzsJLU\nnm8kBzDOqY2JUkMd08nL88KL6QywWtal05UESzQpNFXd0e5kxYfexeMCsLsWP0mc\nquMLRbn7NuBjCbe9VU2kmIvcfDDaWjurT7d5m1OXx1cc8p6P4PFZTVyCjdhiWOr3\nLQXZ4/vdZNR3zgEHypRoM6D9Yq99LWUOUEMrdiSLQQKBgQDQkh7C1OtAXnpy7F6R\nW+/I3zBHici2p7A57UT7VECQ1IVGg37/uus83DkuOtdZ33JmHLAVrwLFJvUlbyjx\nl6dc/1ms40L5HFdLgaVtd4k0rSPFeOSDr6evz0lX4yBuzlP0fEh+o3XHW7mwe2G+\nrWCULF/Uqza66fjbCSKMNgLIXQKBgQDBm9nZg/s4S0THWCFNWcB1tXBG0p/sH5eY\nPC1H/VmTEINIixStrS4ufczf31X8rcoSjSbO7+vZDTTATdk7OLn1I2uGFVYl8M59\n86BYT2Hi7cwp7YVzOc/cJigVeBAqSRW/iYYyWBEUTiW1gbkV0sRWwhPp67m+c0sP\nXpY/iEZA2QKBgB1w8tynt4l/jKNaUEMOijt9ndALWATIiOy0XG9pxi9rgGCiwTOS\nDBCsOXoYHjv2eayGUijNaoOv6xzcoxfvQ1WySdNIxTRq1ru20kYwgHKqGgmO9hrM\nmcwMY5r/WZ2qjFlPjeAqbL62aPDLidGjoaVo2iIoBPK/gjxQ/5f0MS4N/YQ0zWoYBueSQ0DGs\n-----END PRIVATE KEY-----"}, "config_version": null, "cost_collection_enabled": true, "dd_compartment_id": "ocid.compartment.test", "dd_stack_id": "ocid.stack.test", "home_region": "us-ashburn-1", "logs_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "enabled_services": ["service_1", "service_1"]}, "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "excluded_services": ["service_1", "service_1"]}, "regions_config": {"available": ["us-ashburn-1", "us-phoenix-1"], "disabled": ["us-phoenix-1"], "enabled": ["us-ashburn-1"]}, "resource_collection_enabled": true, "user_ocid": "ocid.user.test"}, "id": "ocid.tenancy.test", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: Delete tenancy config returns "No Content" response + Given new "DeleteTenancyConfig" request + And request contains "tenancy_ocid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: Get tenancy config returns "OK" response + Given new "GetTenancyConfig" request + And request contains "tenancy_ocid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: Get tenancy configs returns "OK" response + Given operation "GetTenancyConfigs" enabled + And new "GetTenancyConfigs" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: List tenancy products returns "OK" response + Given new "ListTenancyProducts" request + And request contains "productKeys" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/emerging-cloud-integrations + Scenario: Update tenancy config returns "OK" response + Given new "UpdateTenancyConfig" request + And request contains "tenancy_ocid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"auth_credentials": {"fingerprint": "", "private_key": "----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCdvSMmlfLyeD4M\nQsA3WlrWBqKdWa5eVV3/uODyqT3wWMEMIJHcG3/quNs8nh9xrK1/JkQT2qoKEHqR\nC5k59jN6Vp8em8ARJthMgam9K37ELt+IQ/G8ySTSuqZG8T4cHp/cs3fAclNqttOl\nYnGr4RbVAgMBAAECggEAGZNLGbyCUbIRTW6Kh4d8ZVC+eZtJMqGmGJ3KfVaW8Pjn\nQGWfSuJCEe2o2Y8G3phlidFauICnZ44enXA17Rhi+I/whnr7FIyQk2bR7rv+1Uhc\nmOJygWX5eFFMsledgVAdIAl9Luk2nykx7Un3g6rtbl/Vs+5k4m7ITLFMpCHzsJLU\nnm8kBzDOqY2JUkMd08nL88KL6QywWtal05UESzQpNFXd0e5kxYfexeMCsLsWP0mc\nquMLRbn7NuBjCbe9VU2kmIvcfDDaWjurT7d5m1OXx1cc8p6P4PFZTVyCjdhiWOr3\nLQXZ4/vdZNR3zgEHypRoM6D9Yq99LWUOUEMrdiSLQQKBgQDQkh7C1OtAXnpy7F6R\nW+/I3zBHici2p7A57UT7VECQ1IVGg37/uus83DkuOtdZ33JmHLAVrwLFJvUlbyjx\nl6dc/1ms40L5HFdLgaVtd4k0rSPFeOSDr6evz0lX4yBuzlP0fEh+o3XHW7mwe2G+\nrWCULF/Uqza66fjbCSKMNgLIXQKBgQDBm9nZg/s4S0THWCFNWcB1tXBG0p/sH5eY\nPC1H/VmTEINIixStrS4ufczf31X8rcoSjSbO7+vZDTTATdk7OLn1I2uGFVYl8M59\n86BYT2Hi7cwp7YVzOc/cJigVeBAqSRW/iYYyWBEUTiW1gbkV0sRWwhPp67m+c0sP\nXpY/iEZA2QKBgB1w8tynt4l/jKNaUEMOijt9ndALWATIiOy0XG9pxi9rgGCiwTOS\nDBCsOXoYHjv2eayGUijNaoOv6xzcoxfvQ1WySdNIxTRq1ru20kYwgHKqGgmO9hrM\nmcwMY5r/WZ2qjFlPjeAqbL62aPDLidGjoaVo2iIoBPK/gjxQ/5f0MS4N/YQ0zWoYBueSQ0DGs\n-----END PRIVATE KEY-----"}, "cost_collection_enabled": true, "home_region": "us-ashburn-1", "logs_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "enabled_services": ["service_1", "service_1"]}, "metrics_config": {"compartment_tag_filters": ["datadog:true", "env:prod"], "enabled": true, "excluded_services": ["service_1", "service_1"]}, "regions_config": {"available": ["us-ashburn-1", "us-phoenix-1"], "disabled": ["us-phoenix-1"], "enabled": ["us-ashburn-1"]}, "resource_collection_enabled": true, "user_ocid": "ocid.user.test"}, "id": "ocid.tenancy.test", "type": "oci_tenancy"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 41fa31182a8..030260c0f8c 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2241,6 +2241,49 @@ "type": "idempotent" } }, + "ListTenancyProducts": { + "tag": "OCI Integration", + "undo": { + "type": "safe" + } + }, + "GetTenancyConfigs": { + "tag": "OCI Integration", + "undo": { + "type": "safe" + } + }, + "CreateTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "operationId": "DeleteTenancyConfig", + "parameters": [ + { + "name": "tenancy_ocid", + "source": "" + } + ], + "type": "unsafe" + } + }, + "DeleteTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "type": "idempotent" + } + }, + "GetTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "type": "safe" + } + }, + "UpdateTenancyConfig": { + "tag": "OCI Integration", + "undo": { + "type": "idempotent" + } + }, "ListOpsgenieServices": { "tag": "Opsgenie Integration", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index f2cdbcd8b56..2e1fec19648 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -295,6 +295,8 @@ def initialize "v2.list_jira_accounts": false, "v2.list_jira_issue_templates": false, "v2.update_jira_issue_template": false, + "v2.create_tenancy_config": false, + "v2.get_tenancy_configs": false, "v2.create_service_now_template": false, "v2.delete_service_now_template": false, "v2.get_service_now_template": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 1c12eeb3b6e..85b2e31fc28 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1843,6 +1843,13 @@ def overrides "v2.create_table_request_data_attributes_schema" => "CreateTableRequestDataAttributesSchema", "v2.create_table_request_data_attributes_schema_fields_items" => "CreateTableRequestDataAttributesSchemaFieldsItems", "v2.create_table_request_data_type" => "CreateTableRequestDataType", + "v2.create_tenancy_config_data" => "CreateTenancyConfigData", + "v2.create_tenancy_config_data_attributes" => "CreateTenancyConfigDataAttributes", + "v2.create_tenancy_config_data_attributes_auth_credentials" => "CreateTenancyConfigDataAttributesAuthCredentials", + "v2.create_tenancy_config_data_attributes_logs_config" => "CreateTenancyConfigDataAttributesLogsConfig", + "v2.create_tenancy_config_data_attributes_metrics_config" => "CreateTenancyConfigDataAttributesMetricsConfig", + "v2.create_tenancy_config_data_attributes_regions_config" => "CreateTenancyConfigDataAttributesRegionsConfig", + "v2.create_tenancy_config_request" => "CreateTenancyConfigRequest", "v2.create_upload_request" => "CreateUploadRequest", "v2.create_upload_request_data" => "CreateUploadRequestData", "v2.create_upload_request_data_attributes" => "CreateUploadRequestDataAttributes", @@ -4910,6 +4917,18 @@ def overrides "v2.team_update_attributes" => "TeamUpdateAttributes", "v2.team_update_relationships" => "TeamUpdateRelationships", "v2.team_update_request" => "TeamUpdateRequest", + "v2.tenancy_config" => "TenancyConfig", + "v2.tenancy_config_data" => "TenancyConfigData", + "v2.tenancy_config_data_attributes" => "TenancyConfigDataAttributes", + "v2.tenancy_config_data_attributes_logs_config" => "TenancyConfigDataAttributesLogsConfig", + "v2.tenancy_config_data_attributes_metrics_config" => "TenancyConfigDataAttributesMetricsConfig", + "v2.tenancy_config_data_attributes_regions_config" => "TenancyConfigDataAttributesRegionsConfig", + "v2.tenancy_config_list" => "TenancyConfigList", + "v2.tenancy_products_data" => "TenancyProductsData", + "v2.tenancy_products_data_attributes" => "TenancyProductsDataAttributes", + "v2.tenancy_products_data_attributes_products_items" => "TenancyProductsDataAttributesProductsItems", + "v2.tenancy_products_data_type" => "TenancyProductsDataType", + "v2.tenancy_products_list" => "TenancyProductsList", "v2.threat_hunting_job_data_type" => "ThreatHuntingJobDataType", "v2.threat_hunting_job_list_meta" => "ThreatHuntingJobListMeta", "v2.threat_hunting_job_options" => "ThreatHuntingJobOptions", @@ -5020,6 +5039,14 @@ def overrides "v2.update_ruleset_request_data_attributes_rules_items_reference_table" => "UpdateRulesetRequestDataAttributesRulesItemsReferenceTable", "v2.update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items" => "UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems", "v2.update_ruleset_request_data_type" => "UpdateRulesetRequestDataType", + "v2.update_tenancy_config_data" => "UpdateTenancyConfigData", + "v2.update_tenancy_config_data_attributes" => "UpdateTenancyConfigDataAttributes", + "v2.update_tenancy_config_data_attributes_auth_credentials" => "UpdateTenancyConfigDataAttributesAuthCredentials", + "v2.update_tenancy_config_data_attributes_logs_config" => "UpdateTenancyConfigDataAttributesLogsConfig", + "v2.update_tenancy_config_data_attributes_metrics_config" => "UpdateTenancyConfigDataAttributesMetricsConfig", + "v2.update_tenancy_config_data_attributes_regions_config" => "UpdateTenancyConfigDataAttributesRegionsConfig", + "v2.update_tenancy_config_data_type" => "UpdateTenancyConfigDataType", + "v2.update_tenancy_config_request" => "UpdateTenancyConfigRequest", "v2.update_workflow_request" => "UpdateWorkflowRequest", "v2.update_workflow_response" => "UpdateWorkflowResponse", "v2.upsert_catalog_entity_request" => "UpsertCatalogEntityRequest", @@ -5244,6 +5271,7 @@ def overrides "v2.monitors_api" => "MonitorsAPI", "v2.network_device_monitoring_api" => "NetworkDeviceMonitoringAPI", "v2.observability_pipelines_api" => "ObservabilityPipelinesAPI", + "v2.oci_integration_api" => "OCIIntegrationAPI", "v2.okta_integration_api" => "OktaIntegrationAPI", "v2.on_call_api" => "OnCallAPI", "v2.on_call_paging_api" => "OnCallPagingAPI", diff --git a/lib/datadog_api_client/v2/api/incidents_api.rb b/lib/datadog_api_client/v2/api/incidents_api.rb index 8d70192d255..13ff0ab08e5 100644 --- a/lib/datadog_api_client/v2/api/incidents_api.rb +++ b/lib/datadog_api_client/v2/api/incidents_api.rb @@ -561,6 +561,10 @@ def create_incident_postmortem_attachment(incident_id, body, opts = {}) # # Create a postmortem attachment for an incident. # + # The endpoint accepts markdown for notebooks created in Confluence or Google Docs. + # Postmortems created from notebooks need to be formatted using frontend notebook cells, + # in addition to markdown format. + # # @param incident_id [String] The ID of the incident # @param body [PostmortemAttachmentRequest] # @param opts [Hash] the optional parameters diff --git a/lib/datadog_api_client/v2/api/oci_integration_api.rb b/lib/datadog_api_client/v2/api/oci_integration_api.rb new file mode 100644 index 00000000000..8ff27e4d994 --- /dev/null +++ b/lib/datadog_api_client/v2/api/oci_integration_api.rb @@ -0,0 +1,433 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class OCIIntegrationAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create tenancy config. + # + # @see #create_tenancy_config_with_http_info + def create_tenancy_config(body, opts = {}) + data, _status_code, _headers = create_tenancy_config_with_http_info(body, opts) + data + end + + # Create tenancy config. + # + # Create a new tenancy config to establish monitoring and data collection from your OCI environment. Requires OCI authentication credentials and tenancy details. Warning: Datadog recommends interacting with this endpoint only through the Datadog web UI to ensure all necessary OCI resources have been created and configured properly. + # + # @param body [CreateTenancyConfigRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TenancyConfig, Integer, Hash)>] TenancyConfig data, response status code and response headers + def create_tenancy_config_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_tenancy_config".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_tenancy_config") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_tenancy_config")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OCIIntegrationAPI.create_tenancy_config ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OCIIntegrationAPI.create_tenancy_config" + end + # resource path + local_var_path = '/api/v2/integration/oci/tenancies' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'TenancyConfig' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_tenancy_config, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OCIIntegrationAPI#create_tenancy_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete tenancy config. + # + # @see #delete_tenancy_config_with_http_info + def delete_tenancy_config(tenancy_ocid, opts = {}) + delete_tenancy_config_with_http_info(tenancy_ocid, opts) + nil + end + + # Delete tenancy config. + # + # Delete an existing tenancy config. This will stop all data collection from the specified OCI tenancy and remove the stored configuration. This operation cannot be undone. + # + # @param tenancy_ocid [String] The OCID of the tenancy config to delete. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_tenancy_config_with_http_info(tenancy_ocid, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OCIIntegrationAPI.delete_tenancy_config ...' + end + # verify the required parameter 'tenancy_ocid' is set + if @api_client.config.client_side_validation && tenancy_ocid.nil? + fail ArgumentError, "Missing the required parameter 'tenancy_ocid' when calling OCIIntegrationAPI.delete_tenancy_config" + end + # resource path + local_var_path = '/api/v2/integration/oci/tenancies/{tenancy_ocid}'.sub('{tenancy_ocid}', CGI.escape(tenancy_ocid.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_tenancy_config, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OCIIntegrationAPI#delete_tenancy_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get tenancy config. + # + # @see #get_tenancy_config_with_http_info + def get_tenancy_config(tenancy_ocid, opts = {}) + data, _status_code, _headers = get_tenancy_config_with_http_info(tenancy_ocid, opts) + data + end + + # Get tenancy config. + # + # Get a single tenancy config object by its OCID. Returns detailed configuration including authentication credentials, enabled services, region settings, and collection preferences. + # + # @param tenancy_ocid [String] The OCID of the tenancy config to retrieve. + # @param opts [Hash] the optional parameters + # @return [Array<(TenancyConfig, Integer, Hash)>] TenancyConfig data, response status code and response headers + def get_tenancy_config_with_http_info(tenancy_ocid, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OCIIntegrationAPI.get_tenancy_config ...' + end + # verify the required parameter 'tenancy_ocid' is set + if @api_client.config.client_side_validation && tenancy_ocid.nil? + fail ArgumentError, "Missing the required parameter 'tenancy_ocid' when calling OCIIntegrationAPI.get_tenancy_config" + end + # resource path + local_var_path = '/api/v2/integration/oci/tenancies/{tenancy_ocid}'.sub('{tenancy_ocid}', CGI.escape(tenancy_ocid.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TenancyConfig' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_tenancy_config, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OCIIntegrationAPI#get_tenancy_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get tenancy configs. + # + # @see #get_tenancy_configs_with_http_info + def get_tenancy_configs(opts = {}) + data, _status_code, _headers = get_tenancy_configs_with_http_info(opts) + data + end + + # Get tenancy configs. + # + # Get a list of all configured OCI tenancy integrations. Returns basic information about each tenancy including authentication credentials, region settings, and collection preferences for metrics, logs, and resources. + # + # @param opts [Hash] the optional parameters + # @return [Array<(TenancyConfigList, Integer, Hash)>] TenancyConfigList data, response status code and response headers + def get_tenancy_configs_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_tenancy_configs".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_tenancy_configs") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_tenancy_configs")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OCIIntegrationAPI.get_tenancy_configs ...' + end + # resource path + local_var_path = '/api/v2/integration/oci/tenancies' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TenancyConfigList' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_tenancy_configs, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OCIIntegrationAPI#get_tenancy_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List tenancy products. + # + # @see #list_tenancy_products_with_http_info + def list_tenancy_products(product_keys, opts = {}) + data, _status_code, _headers = list_tenancy_products_with_http_info(product_keys, opts) + data + end + + # List tenancy products. + # + # Lists the products for a given tenancy. Returns the enabled/disabled status of Datadog products (such as Cloud Security Posture Management) for specific OCI tenancies. + # + # @param product_keys [String] Comma-separated list of product keys to filter by. + # @param opts [Hash] the optional parameters + # @return [Array<(TenancyProductsList, Integer, Hash)>] TenancyProductsList data, response status code and response headers + def list_tenancy_products_with_http_info(product_keys, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OCIIntegrationAPI.list_tenancy_products ...' + end + # verify the required parameter 'product_keys' is set + if @api_client.config.client_side_validation && product_keys.nil? + fail ArgumentError, "Missing the required parameter 'product_keys' when calling OCIIntegrationAPI.list_tenancy_products" + end + # resource path + local_var_path = '/api/v2/integration/oci/products' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'productKeys'] = product_keys + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TenancyProductsList' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_tenancy_products, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OCIIntegrationAPI#list_tenancy_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update tenancy config. + # + # @see #update_tenancy_config_with_http_info + def update_tenancy_config(tenancy_ocid, body, opts = {}) + data, _status_code, _headers = update_tenancy_config_with_http_info(tenancy_ocid, body, opts) + data + end + + # Update tenancy config. + # + # Update an existing tenancy config. You can modify authentication credentials, enable/disable collection types, update service filters, and change region settings. Warning: We recommend using the Datadog web UI to avoid unintended update effects. + # + # @param tenancy_ocid [String] The OCID of the tenancy config to update. + # @param body [UpdateTenancyConfigRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TenancyConfig, Integer, Hash)>] TenancyConfig data, response status code and response headers + def update_tenancy_config_with_http_info(tenancy_ocid, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OCIIntegrationAPI.update_tenancy_config ...' + end + # verify the required parameter 'tenancy_ocid' is set + if @api_client.config.client_side_validation && tenancy_ocid.nil? + fail ArgumentError, "Missing the required parameter 'tenancy_ocid' when calling OCIIntegrationAPI.update_tenancy_config" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OCIIntegrationAPI.update_tenancy_config" + end + # resource path + local_var_path = '/api/v2/integration/oci/tenancies/{tenancy_ocid}'.sub('{tenancy_ocid}', CGI.escape(tenancy_ocid.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'TenancyConfig' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_tenancy_config, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OCIIntegrationAPI#update_tenancy_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_tenancy_config_data.rb b/lib/datadog_api_client/v2/models/create_tenancy_config_data.rb new file mode 100644 index 00000000000..551d5ef5a7c --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_tenancy_config_data.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateTenancyConfigData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_reader :id + + # OCI tenancy resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateTenancyConfigDataAttributes', + :'id' => :'String', + :'type' => :'UpdateTenancyConfigDataType' + } + 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::CreateTenancyConfigData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes.rb b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes.rb new file mode 100644 index 00000000000..9dc1e2496a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes.rb @@ -0,0 +1,253 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateTenancyConfigDataAttributes + include BaseGenericModel + + # + attr_reader :auth_credentials + + # + attr_accessor :config_version + + # + attr_accessor :cost_collection_enabled + + # + attr_accessor :dd_compartment_id + + # + attr_accessor :dd_stack_id + + # + attr_reader :home_region + + # + attr_accessor :logs_config + + # + attr_accessor :metrics_config + + # + attr_accessor :regions_config + + # + attr_accessor :resource_collection_enabled + + # + attr_reader :user_ocid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_credentials' => :'auth_credentials', + :'config_version' => :'config_version', + :'cost_collection_enabled' => :'cost_collection_enabled', + :'dd_compartment_id' => :'dd_compartment_id', + :'dd_stack_id' => :'dd_stack_id', + :'home_region' => :'home_region', + :'logs_config' => :'logs_config', + :'metrics_config' => :'metrics_config', + :'regions_config' => :'regions_config', + :'resource_collection_enabled' => :'resource_collection_enabled', + :'user_ocid' => :'user_ocid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_credentials' => :'CreateTenancyConfigDataAttributesAuthCredentials', + :'config_version' => :'Integer', + :'cost_collection_enabled' => :'Boolean', + :'dd_compartment_id' => :'String', + :'dd_stack_id' => :'String', + :'home_region' => :'String', + :'logs_config' => :'CreateTenancyConfigDataAttributesLogsConfig', + :'metrics_config' => :'CreateTenancyConfigDataAttributesMetricsConfig', + :'regions_config' => :'CreateTenancyConfigDataAttributesRegionsConfig', + :'resource_collection_enabled' => :'Boolean', + :'user_ocid' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'config_version', + ]) + 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::CreateTenancyConfigDataAttributes` 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_credentials') + self.auth_credentials = attributes[:'auth_credentials'] + end + + if attributes.key?(:'config_version') + self.config_version = attributes[:'config_version'] + end + + if attributes.key?(:'cost_collection_enabled') + self.cost_collection_enabled = attributes[:'cost_collection_enabled'] + end + + if attributes.key?(:'dd_compartment_id') + self.dd_compartment_id = attributes[:'dd_compartment_id'] + end + + if attributes.key?(:'dd_stack_id') + self.dd_stack_id = attributes[:'dd_stack_id'] + end + + if attributes.key?(:'home_region') + self.home_region = attributes[:'home_region'] + end + + if attributes.key?(:'logs_config') + self.logs_config = attributes[:'logs_config'] + end + + if attributes.key?(:'metrics_config') + self.metrics_config = attributes[:'metrics_config'] + end + + if attributes.key?(:'regions_config') + self.regions_config = attributes[:'regions_config'] + end + + if attributes.key?(:'resource_collection_enabled') + self.resource_collection_enabled = attributes[:'resource_collection_enabled'] + end + + if attributes.key?(:'user_ocid') + self.user_ocid = attributes[:'user_ocid'] + 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_credentials.nil? + return false if @home_region.nil? + return false if @user_ocid.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_credentials [Object] Object to be assigned + # @!visibility private + def auth_credentials=(auth_credentials) + if auth_credentials.nil? + fail ArgumentError, 'invalid value for "auth_credentials", auth_credentials cannot be nil.' + end + @auth_credentials = auth_credentials + end + + # Custom attribute writer method with validation + # @param home_region [Object] Object to be assigned + # @!visibility private + def home_region=(home_region) + if home_region.nil? + fail ArgumentError, 'invalid value for "home_region", home_region cannot be nil.' + end + @home_region = home_region + end + + # Custom attribute writer method with validation + # @param user_ocid [Object] Object to be assigned + # @!visibility private + def user_ocid=(user_ocid) + if user_ocid.nil? + fail ArgumentError, 'invalid value for "user_ocid", user_ocid cannot be nil.' + end + @user_ocid = user_ocid + 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_credentials == o.auth_credentials && + config_version == o.config_version && + cost_collection_enabled == o.cost_collection_enabled && + dd_compartment_id == o.dd_compartment_id && + dd_stack_id == o.dd_stack_id && + home_region == o.home_region && + logs_config == o.logs_config && + metrics_config == o.metrics_config && + regions_config == o.regions_config && + resource_collection_enabled == o.resource_collection_enabled && + user_ocid == o.user_ocid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_credentials, config_version, cost_collection_enabled, dd_compartment_id, dd_stack_id, home_region, logs_config, metrics_config, regions_config, resource_collection_enabled, user_ocid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_auth_credentials.rb b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_auth_credentials.rb new file mode 100644 index 00000000000..5a094a57cc9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_auth_credentials.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateTenancyConfigDataAttributesAuthCredentials + include BaseGenericModel + + # + attr_accessor :fingerprint + + # + attr_reader :private_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fingerprint' => :'fingerprint', + :'private_key' => :'private_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fingerprint' => :'String', + :'private_key' => :'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::CreateTenancyConfigDataAttributesAuthCredentials` 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?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'private_key') + self.private_key = attributes[:'private_key'] + 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? + 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 + + # 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 && + fingerprint == o.fingerprint && + private_key == o.private_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fingerprint, private_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_logs_config.rb b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_logs_config.rb new file mode 100644 index 00000000000..65e7f3c9dbc --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_logs_config.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateTenancyConfigDataAttributesLogsConfig + include BaseGenericModel + + # + attr_accessor :compartment_tag_filters + + # + attr_accessor :enabled + + # + attr_accessor :enabled_services + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compartment_tag_filters' => :'compartment_tag_filters', + :'enabled' => :'enabled', + :'enabled_services' => :'enabled_services' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compartment_tag_filters' => :'Array', + :'enabled' => :'Boolean', + :'enabled_services' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateTenancyConfigDataAttributesLogsConfig` 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?(:'compartment_tag_filters') + if (value = attributes[:'compartment_tag_filters']).is_a?(Array) + self.compartment_tag_filters = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'enabled_services') + if (value = attributes[:'enabled_services']).is_a?(Array) + self.enabled_services = 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 && + compartment_tag_filters == o.compartment_tag_filters && + enabled == o.enabled && + enabled_services == o.enabled_services && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compartment_tag_filters, enabled, enabled_services, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_metrics_config.rb b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_metrics_config.rb new file mode 100644 index 00000000000..8364284dc20 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_metrics_config.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateTenancyConfigDataAttributesMetricsConfig + include BaseGenericModel + + # + attr_accessor :compartment_tag_filters + + # + attr_accessor :enabled + + # + attr_accessor :excluded_services + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compartment_tag_filters' => :'compartment_tag_filters', + :'enabled' => :'enabled', + :'excluded_services' => :'excluded_services' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compartment_tag_filters' => :'Array', + :'enabled' => :'Boolean', + :'excluded_services' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateTenancyConfigDataAttributesMetricsConfig` 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?(:'compartment_tag_filters') + if (value = attributes[:'compartment_tag_filters']).is_a?(Array) + self.compartment_tag_filters = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'excluded_services') + if (value = attributes[:'excluded_services']).is_a?(Array) + self.excluded_services = 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 && + compartment_tag_filters == o.compartment_tag_filters && + enabled == o.enabled && + excluded_services == o.excluded_services && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compartment_tag_filters, enabled, excluded_services, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_regions_config.rb b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_regions_config.rb new file mode 100644 index 00000000000..5c4e4cadaaa --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_tenancy_config_data_attributes_regions_config.rb @@ -0,0 +1,131 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateTenancyConfigDataAttributesRegionsConfig + include BaseGenericModel + + # + attr_accessor :available + + # + attr_accessor :disabled + + # + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'available' => :'available', + :'disabled' => :'disabled', + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'available' => :'Array', + :'disabled' => :'Array', + :'enabled' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateTenancyConfigDataAttributesRegionsConfig` 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?(:'available') + if (value = attributes[:'available']).is_a?(Array) + self.available = value + end + end + + if attributes.key?(:'disabled') + if (value = attributes[:'disabled']).is_a?(Array) + self.disabled = value + end + end + + if attributes.key?(:'enabled') + if (value = attributes[:'enabled']).is_a?(Array) + self.enabled = 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 && + available == o.available && + disabled == o.disabled && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [available, disabled, enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_tenancy_config_request.rb b/lib/datadog_api_client/v2/models/create_tenancy_config_request.rb new file mode 100644 index 00000000000..f9c345eb3ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_tenancy_config_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class CreateTenancyConfigRequest + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CreateTenancyConfigData' + } + 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::CreateTenancyConfigRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_config.rb b/lib/datadog_api_client/v2/models/tenancy_config.rb new file mode 100644 index 00000000000..ce4083f18a1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_config.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyConfig + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'TenancyConfigData' + } + 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::TenancyConfig` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_config_data.rb b/lib/datadog_api_client/v2/models/tenancy_config_data.rb new file mode 100644 index 00000000000..46d0c2eb98d --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_config_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyConfigData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # OCI tenancy resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'TenancyConfigDataAttributes', + :'id' => :'String', + :'type' => :'UpdateTenancyConfigDataType' + } + 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::TenancyConfigData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_config_data_attributes.rb b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes.rb new file mode 100644 index 00000000000..3776e133bf3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes.rb @@ -0,0 +1,243 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyConfigDataAttributes + include BaseGenericModel + + # + attr_reader :billing_plan_id + + # + attr_accessor :config_version + + # + attr_accessor :cost_collection_enabled + + # + attr_accessor :dd_compartment_id + + # + attr_accessor :dd_stack_id + + # + attr_accessor :home_region + + # + attr_accessor :logs_config + + # + attr_accessor :metrics_config + + # + attr_accessor :parent_tenancy_name + + # + attr_accessor :regions_config + + # + attr_accessor :resource_collection_enabled + + # + attr_accessor :tenancy_name + + # + attr_accessor :user_ocid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'billing_plan_id' => :'billing_plan_id', + :'config_version' => :'config_version', + :'cost_collection_enabled' => :'cost_collection_enabled', + :'dd_compartment_id' => :'dd_compartment_id', + :'dd_stack_id' => :'dd_stack_id', + :'home_region' => :'home_region', + :'logs_config' => :'logs_config', + :'metrics_config' => :'metrics_config', + :'parent_tenancy_name' => :'parent_tenancy_name', + :'regions_config' => :'regions_config', + :'resource_collection_enabled' => :'resource_collection_enabled', + :'tenancy_name' => :'tenancy_name', + :'user_ocid' => :'user_ocid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'billing_plan_id' => :'Integer', + :'config_version' => :'Integer', + :'cost_collection_enabled' => :'Boolean', + :'dd_compartment_id' => :'String', + :'dd_stack_id' => :'String', + :'home_region' => :'String', + :'logs_config' => :'TenancyConfigDataAttributesLogsConfig', + :'metrics_config' => :'TenancyConfigDataAttributesMetricsConfig', + :'parent_tenancy_name' => :'String', + :'regions_config' => :'TenancyConfigDataAttributesRegionsConfig', + :'resource_collection_enabled' => :'Boolean', + :'tenancy_name' => :'String', + :'user_ocid' => :'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::TenancyConfigDataAttributes` 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?(:'billing_plan_id') + self.billing_plan_id = attributes[:'billing_plan_id'] + end + + if attributes.key?(:'config_version') + self.config_version = attributes[:'config_version'] + end + + if attributes.key?(:'cost_collection_enabled') + self.cost_collection_enabled = attributes[:'cost_collection_enabled'] + end + + if attributes.key?(:'dd_compartment_id') + self.dd_compartment_id = attributes[:'dd_compartment_id'] + end + + if attributes.key?(:'dd_stack_id') + self.dd_stack_id = attributes[:'dd_stack_id'] + end + + if attributes.key?(:'home_region') + self.home_region = attributes[:'home_region'] + end + + if attributes.key?(:'logs_config') + self.logs_config = attributes[:'logs_config'] + end + + if attributes.key?(:'metrics_config') + self.metrics_config = attributes[:'metrics_config'] + end + + if attributes.key?(:'parent_tenancy_name') + self.parent_tenancy_name = attributes[:'parent_tenancy_name'] + end + + if attributes.key?(:'regions_config') + self.regions_config = attributes[:'regions_config'] + end + + if attributes.key?(:'resource_collection_enabled') + self.resource_collection_enabled = attributes[:'resource_collection_enabled'] + end + + if attributes.key?(:'tenancy_name') + self.tenancy_name = attributes[:'tenancy_name'] + end + + if attributes.key?(:'user_ocid') + self.user_ocid = attributes[:'user_ocid'] + 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 !@billing_plan_id.nil? && @billing_plan_id > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param billing_plan_id [Object] Object to be assigned + # @!visibility private + def billing_plan_id=(billing_plan_id) + if !billing_plan_id.nil? && billing_plan_id > 2147483647 + fail ArgumentError, 'invalid value for "billing_plan_id", must be smaller than or equal to 2147483647.' + end + @billing_plan_id = billing_plan_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + billing_plan_id == o.billing_plan_id && + config_version == o.config_version && + cost_collection_enabled == o.cost_collection_enabled && + dd_compartment_id == o.dd_compartment_id && + dd_stack_id == o.dd_stack_id && + home_region == o.home_region && + logs_config == o.logs_config && + metrics_config == o.metrics_config && + parent_tenancy_name == o.parent_tenancy_name && + regions_config == o.regions_config && + resource_collection_enabled == o.resource_collection_enabled && + tenancy_name == o.tenancy_name && + user_ocid == o.user_ocid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [billing_plan_id, config_version, cost_collection_enabled, dd_compartment_id, dd_stack_id, home_region, logs_config, metrics_config, parent_tenancy_name, regions_config, resource_collection_enabled, tenancy_name, user_ocid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_logs_config.rb b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_logs_config.rb new file mode 100644 index 00000000000..5363c21db87 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_logs_config.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyConfigDataAttributesLogsConfig + include BaseGenericModel + + # + attr_accessor :compartment_tag_filters + + # + attr_accessor :enabled + + # + attr_accessor :enabled_services + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compartment_tag_filters' => :'compartment_tag_filters', + :'enabled' => :'enabled', + :'enabled_services' => :'enabled_services' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compartment_tag_filters' => :'Array', + :'enabled' => :'Boolean', + :'enabled_services' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TenancyConfigDataAttributesLogsConfig` 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?(:'compartment_tag_filters') + if (value = attributes[:'compartment_tag_filters']).is_a?(Array) + self.compartment_tag_filters = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'enabled_services') + if (value = attributes[:'enabled_services']).is_a?(Array) + self.enabled_services = 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 && + compartment_tag_filters == o.compartment_tag_filters && + enabled == o.enabled && + enabled_services == o.enabled_services && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compartment_tag_filters, enabled, enabled_services, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_metrics_config.rb b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_metrics_config.rb new file mode 100644 index 00000000000..612a4757713 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_metrics_config.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyConfigDataAttributesMetricsConfig + include BaseGenericModel + + # + attr_accessor :compartment_tag_filters + + # + attr_accessor :enabled + + # + attr_accessor :excluded_services + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compartment_tag_filters' => :'compartment_tag_filters', + :'enabled' => :'enabled', + :'excluded_services' => :'excluded_services' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compartment_tag_filters' => :'Array', + :'enabled' => :'Boolean', + :'excluded_services' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TenancyConfigDataAttributesMetricsConfig` 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?(:'compartment_tag_filters') + if (value = attributes[:'compartment_tag_filters']).is_a?(Array) + self.compartment_tag_filters = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'excluded_services') + if (value = attributes[:'excluded_services']).is_a?(Array) + self.excluded_services = 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 && + compartment_tag_filters == o.compartment_tag_filters && + enabled == o.enabled && + excluded_services == o.excluded_services && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compartment_tag_filters, enabled, excluded_services, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_regions_config.rb b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_regions_config.rb new file mode 100644 index 00000000000..21289f94aa5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_config_data_attributes_regions_config.rb @@ -0,0 +1,131 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyConfigDataAttributesRegionsConfig + include BaseGenericModel + + # + attr_accessor :available + + # + attr_accessor :disabled + + # + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'available' => :'available', + :'disabled' => :'disabled', + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'available' => :'Array', + :'disabled' => :'Array', + :'enabled' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TenancyConfigDataAttributesRegionsConfig` 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?(:'available') + if (value = attributes[:'available']).is_a?(Array) + self.available = value + end + end + + if attributes.key?(:'disabled') + if (value = attributes[:'disabled']).is_a?(Array) + self.disabled = value + end + end + + if attributes.key?(:'enabled') + if (value = attributes[:'enabled']).is_a?(Array) + self.enabled = 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 && + available == o.available && + disabled == o.disabled && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [available, disabled, enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_config_list.rb b/lib/datadog_api_client/v2/models/tenancy_config_list.rb new file mode 100644 index 00000000000..7d40aea7e71 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_config_list.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyConfigList + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TenancyConfigList` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_products_data.rb b/lib/datadog_api_client/v2/models/tenancy_products_data.rb new file mode 100644 index 00000000000..0c0e9c6e7f0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_products_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyProductsData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # OCI tenancy product resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'TenancyProductsDataAttributes', + :'id' => :'String', + :'type' => :'TenancyProductsDataType' + } + 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::TenancyProductsData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_products_data_attributes.rb b/lib/datadog_api_client/v2/models/tenancy_products_data_attributes.rb new file mode 100644 index 00000000000..c95707963c4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_products_data_attributes.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyProductsDataAttributes + include BaseGenericModel + + # + attr_accessor :products + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'products' => :'products' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'products' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TenancyProductsDataAttributes` 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?(:'products') + if (value = attributes[:'products']).is_a?(Array) + self.products = 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 && + products == o.products && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [products, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_products_data_attributes_products_items.rb b/lib/datadog_api_client/v2/models/tenancy_products_data_attributes_products_items.rb new file mode 100644 index 00000000000..6c4b080d794 --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_products_data_attributes_products_items.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyProductsDataAttributesProductsItems + include BaseGenericModel + + # + attr_accessor :enabled + + # + attr_accessor :product_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'product_key' => :'product_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'product_key' => :'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::TenancyProductsDataAttributesProductsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'product_key') + self.product_key = attributes[:'product_key'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + product_key == o.product_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, product_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_products_data_type.rb b/lib/datadog_api_client/v2/models/tenancy_products_data_type.rb new file mode 100644 index 00000000000..ea6111ac02c --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_products_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # OCI tenancy product resource type. + class TenancyProductsDataType + include BaseEnumModel + + OCI_TENANCY_PRODUCT = "oci_tenancy_product".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/tenancy_products_list.rb b/lib/datadog_api_client/v2/models/tenancy_products_list.rb new file mode 100644 index 00000000000..b3ed0bbad4a --- /dev/null +++ b/lib/datadog_api_client/v2/models/tenancy_products_list.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class TenancyProductsList + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TenancyProductsList` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_data.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_data.rb new file mode 100644 index 00000000000..6466a642262 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_data.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateTenancyConfigData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_reader :id + + # OCI tenancy resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'UpdateTenancyConfigDataAttributes', + :'id' => :'String', + :'type' => :'UpdateTenancyConfigDataType' + } + 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::UpdateTenancyConfigData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes.rb new file mode 100644 index 00000000000..efc7aaac839 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateTenancyConfigDataAttributes + include BaseGenericModel + + # + attr_accessor :auth_credentials + + # + attr_accessor :cost_collection_enabled + + # + attr_accessor :home_region + + # + attr_accessor :logs_config + + # + attr_accessor :metrics_config + + # + attr_accessor :regions_config + + # + attr_accessor :resource_collection_enabled + + # + attr_accessor :user_ocid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_credentials' => :'auth_credentials', + :'cost_collection_enabled' => :'cost_collection_enabled', + :'home_region' => :'home_region', + :'logs_config' => :'logs_config', + :'metrics_config' => :'metrics_config', + :'regions_config' => :'regions_config', + :'resource_collection_enabled' => :'resource_collection_enabled', + :'user_ocid' => :'user_ocid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_credentials' => :'UpdateTenancyConfigDataAttributesAuthCredentials', + :'cost_collection_enabled' => :'Boolean', + :'home_region' => :'String', + :'logs_config' => :'UpdateTenancyConfigDataAttributesLogsConfig', + :'metrics_config' => :'UpdateTenancyConfigDataAttributesMetricsConfig', + :'regions_config' => :'UpdateTenancyConfigDataAttributesRegionsConfig', + :'resource_collection_enabled' => :'Boolean', + :'user_ocid' => :'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::UpdateTenancyConfigDataAttributes` 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_credentials') + self.auth_credentials = attributes[:'auth_credentials'] + end + + if attributes.key?(:'cost_collection_enabled') + self.cost_collection_enabled = attributes[:'cost_collection_enabled'] + end + + if attributes.key?(:'home_region') + self.home_region = attributes[:'home_region'] + end + + if attributes.key?(:'logs_config') + self.logs_config = attributes[:'logs_config'] + end + + if attributes.key?(:'metrics_config') + self.metrics_config = attributes[:'metrics_config'] + end + + if attributes.key?(:'regions_config') + self.regions_config = attributes[:'regions_config'] + end + + if attributes.key?(:'resource_collection_enabled') + self.resource_collection_enabled = attributes[:'resource_collection_enabled'] + end + + if attributes.key?(:'user_ocid') + self.user_ocid = attributes[:'user_ocid'] + 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 && + auth_credentials == o.auth_credentials && + cost_collection_enabled == o.cost_collection_enabled && + home_region == o.home_region && + logs_config == o.logs_config && + metrics_config == o.metrics_config && + regions_config == o.regions_config && + resource_collection_enabled == o.resource_collection_enabled && + user_ocid == o.user_ocid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_credentials, cost_collection_enabled, home_region, logs_config, metrics_config, regions_config, resource_collection_enabled, user_ocid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_auth_credentials.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_auth_credentials.rb new file mode 100644 index 00000000000..fda6cf5d1b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_auth_credentials.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateTenancyConfigDataAttributesAuthCredentials + include BaseGenericModel + + # + attr_accessor :fingerprint + + # + attr_reader :private_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fingerprint' => :'fingerprint', + :'private_key' => :'private_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fingerprint' => :'String', + :'private_key' => :'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::UpdateTenancyConfigDataAttributesAuthCredentials` 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?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'private_key') + self.private_key = attributes[:'private_key'] + 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? + 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 + + # 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 && + fingerprint == o.fingerprint && + private_key == o.private_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fingerprint, private_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_logs_config.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_logs_config.rb new file mode 100644 index 00000000000..8f67b9b41a2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_logs_config.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateTenancyConfigDataAttributesLogsConfig + include BaseGenericModel + + # + attr_accessor :compartment_tag_filters + + # + attr_accessor :enabled + + # + attr_accessor :enabled_services + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compartment_tag_filters' => :'compartment_tag_filters', + :'enabled' => :'enabled', + :'enabled_services' => :'enabled_services' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compartment_tag_filters' => :'Array', + :'enabled' => :'Boolean', + :'enabled_services' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateTenancyConfigDataAttributesLogsConfig` 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?(:'compartment_tag_filters') + if (value = attributes[:'compartment_tag_filters']).is_a?(Array) + self.compartment_tag_filters = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'enabled_services') + if (value = attributes[:'enabled_services']).is_a?(Array) + self.enabled_services = 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 && + compartment_tag_filters == o.compartment_tag_filters && + enabled == o.enabled && + enabled_services == o.enabled_services && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compartment_tag_filters, enabled, enabled_services, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_metrics_config.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_metrics_config.rb new file mode 100644 index 00000000000..75694da0841 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_metrics_config.rb @@ -0,0 +1,129 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateTenancyConfigDataAttributesMetricsConfig + include BaseGenericModel + + # + attr_accessor :compartment_tag_filters + + # + attr_accessor :enabled + + # + attr_accessor :excluded_services + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compartment_tag_filters' => :'compartment_tag_filters', + :'enabled' => :'enabled', + :'excluded_services' => :'excluded_services' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compartment_tag_filters' => :'Array', + :'enabled' => :'Boolean', + :'excluded_services' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateTenancyConfigDataAttributesMetricsConfig` 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?(:'compartment_tag_filters') + if (value = attributes[:'compartment_tag_filters']).is_a?(Array) + self.compartment_tag_filters = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'excluded_services') + if (value = attributes[:'excluded_services']).is_a?(Array) + self.excluded_services = 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 && + compartment_tag_filters == o.compartment_tag_filters && + enabled == o.enabled && + excluded_services == o.excluded_services && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compartment_tag_filters, enabled, excluded_services, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_regions_config.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_regions_config.rb new file mode 100644 index 00000000000..35aa184e1c2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_data_attributes_regions_config.rb @@ -0,0 +1,131 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateTenancyConfigDataAttributesRegionsConfig + include BaseGenericModel + + # + attr_accessor :available + + # + attr_accessor :disabled + + # + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'available' => :'available', + :'disabled' => :'disabled', + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'available' => :'Array', + :'disabled' => :'Array', + :'enabled' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::UpdateTenancyConfigDataAttributesRegionsConfig` 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?(:'available') + if (value = attributes[:'available']).is_a?(Array) + self.available = value + end + end + + if attributes.key?(:'disabled') + if (value = attributes[:'disabled']).is_a?(Array) + self.disabled = value + end + end + + if attributes.key?(:'enabled') + if (value = attributes[:'enabled']).is_a?(Array) + self.enabled = 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 && + available == o.available && + disabled == o.disabled && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [available, disabled, enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_data_type.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_data_type.rb new file mode 100644 index 00000000000..ec1165ed099 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # OCI tenancy resource type. + class UpdateTenancyConfigDataType + include BaseEnumModel + + OCI_TENANCY = "oci_tenancy".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/update_tenancy_config_request.rb b/lib/datadog_api_client/v2/models/update_tenancy_config_request.rb new file mode 100644 index 00000000000..7f9a308d534 --- /dev/null +++ b/lib/datadog_api_client/v2/models/update_tenancy_config_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class UpdateTenancyConfigRequest + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'UpdateTenancyConfigData' + } + 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::UpdateTenancyConfigRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end