diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4ed0b352040..35ff674a300 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -2153,6 +2153,7 @@ components: description: Whether or not to automatically include new member accounts by default in your billing dataset. example: true + nullable: true type: boolean included_accounts: description: The AWS account IDs to be included in your billing dataset. @@ -3948,6 +3949,634 @@ components: - CREATED_AT_DESC - UPDATED_AT_DESC - USER_NAME_DESC + ArbitraryCostUpsertRequest: + description: The definition of `ArbitraryCostUpsertRequest` object. + example: + data: + attributes: + costs_to_allocate: + - condition: is + tag: account_id + value: '123456789' + values: null + - condition: in + tag: environment + value: '' + values: + - production + - staging + enabled: true + order_id: 1 + provider: + - aws + - gcp + rule_name: example-arbitrary-cost-rule + strategy: + allocated_by_tag_keys: + - team + - environment + based_on_costs: + - condition: is + tag: service + value: web-api + values: null + - condition: not in + tag: team + value: '' + values: + - legacy + - deprecated + granularity: daily + method: proportional + type: shared + type: upsert_arbitrary_rule + properties: + data: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestData' + type: object + ArbitraryCostUpsertRequestData: + description: The definition of `ArbitraryCostUpsertRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributes' + id: + description: The `ArbitraryCostUpsertRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataType' + required: + - type + type: object + ArbitraryCostUpsertRequestDataAttributes: + description: The definition of `ArbitraryCostUpsertRequestDataAttributes` object. + properties: + costs_to_allocate: + description: The `attributes` `costs_to_allocate`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems' + type: array + enabled: + description: The `attributes` `enabled`. + type: boolean + order_id: + description: The `attributes` `order_id`. + format: int64 + type: integer + provider: + description: The `attributes` `provider`. + example: + - '' + items: + type: string + type: array + rejected: + description: The `attributes` `rejected`. + type: boolean + rule_name: + description: The `attributes` `rule_name`. + example: '' + type: string + strategy: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategy' + type: + description: The `attributes` `type`. + example: '' + type: string + required: + - costs_to_allocate + - provider + - rule_name + - strategy + - type + type: object + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataAttributesStrategy: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategy` + object. + properties: + allocated_by: + description: The `strategy` `allocated_by`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems' + type: array + allocated_by_filters: + description: The `strategy` `allocated_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems' + type: array + allocated_by_tag_keys: + description: The `strategy` `allocated_by_tag_keys`. + items: + type: string + type: array + based_on_costs: + description: The `strategy` `based_on_costs`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems' + type: array + based_on_timeseries: + additionalProperties: {} + description: The `strategy` `based_on_timeseries`. + type: object + evaluate_grouped_by_filters: + description: The `strategy` `evaluate_grouped_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems' + type: array + evaluate_grouped_by_tag_keys: + description: The `strategy` `evaluate_grouped_by_tag_keys`. + items: + type: string + type: array + granularity: + description: The `strategy` `granularity`. + type: string + method: + description: The `strategy` `method`. + example: '' + type: string + required: + - method + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems` + object. + properties: + allocated_tags: + description: The `items` `allocated_tags`. + items: + $ref: '#/components/schemas/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems' + type: array + percentage: + description: The `items` `percentage`. The numeric value format should be + a 32bit float value. + example: 0.0 + format: double + type: number + required: + - allocated_tags + - percentage + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` + object. + properties: + key: + description: The `items` `key`. + example: '' + type: string + value: + description: The `items` `value`. + example: '' + type: string + required: + - key + - value + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems: + description: The definition of `ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryCostUpsertRequestDataType: + default: upsert_arbitrary_rule + description: Upsert arbitrary rule resource type. + enum: + - upsert_arbitrary_rule + example: upsert_arbitrary_rule + type: string + x-enum-varnames: + - UPSERT_ARBITRARY_RULE + ArbitraryRuleResponse: + description: The definition of `ArbitraryRuleResponse` object. + example: + data: + attributes: + costs_to_allocate: + - condition: is + tag: account_id + value: '123456789' + values: null + - condition: in + tag: environment + value: '' + values: + - production + - staging + created: '2023-01-01T12:00:00Z' + enabled: true + last_modified_user_uuid: user-123-uuid + order_id: 1 + provider: + - aws + - gcp + rule_name: Example Arbitrary Cost Rule + strategy: + allocated_by_tag_keys: + - team + - environment + based_on_costs: + - condition: is + tag: service + value: web-api + values: null + - condition: not in + tag: team + value: '' + values: + - legacy + - deprecated + granularity: daily + method: proportional + type: shared + updated: '2023-01-01T12:00:00Z' + version: 1 + id: '123' + type: arbitrary_rule + properties: + data: + $ref: '#/components/schemas/ArbitraryRuleResponseData' + type: object + ArbitraryRuleResponseArray: + description: The definition of `ArbitraryRuleResponseArray` object. + properties: + data: + description: The `ArbitraryRuleResponseArray` `data`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseData' + type: array + required: + - data + type: object + ArbitraryRuleResponseData: + description: The definition of `ArbitraryRuleResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributes' + id: + description: The `ArbitraryRuleResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/ArbitraryRuleResponseDataType' + required: + - type + type: object + ArbitraryRuleResponseDataAttributes: + description: The definition of `ArbitraryRuleResponseDataAttributes` object. + properties: + costs_to_allocate: + description: The `attributes` `costs_to_allocate`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesCostsToAllocateItems' + type: array + created: + description: The `attributes` `created`. + example: '' + format: date-time + type: string + enabled: + description: The `attributes` `enabled`. + example: false + type: boolean + last_modified_user_uuid: + description: The `attributes` `last_modified_user_uuid`. + example: '' + type: string + order_id: + description: The `attributes` `order_id`. + example: 0 + format: int64 + type: integer + provider: + description: The `attributes` `provider`. + example: + - '' + items: + type: string + type: array + rejected: + description: The `attributes` `rejected`. + type: boolean + rule_name: + description: The `attributes` `rule_name`. + example: '' + type: string + strategy: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategy' + type: + description: The `attributes` `type`. + example: '' + type: string + updated: + description: The `attributes` `updated`. + example: '' + format: date-time + type: string + version: + description: The `attributes` `version`. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + required: + - costs_to_allocate + - created + - enabled + - last_modified_user_uuid + - order_id + - provider + - rule_name + - strategy + - type + - updated + - version + type: object + ArbitraryRuleResponseDataAttributesCostsToAllocateItems: + description: The definition of `ArbitraryRuleResponseDataAttributesCostsToAllocateItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataAttributesStrategy: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategy` + object. + properties: + allocated_by: + description: The `strategy` `allocated_by`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems' + type: array + allocated_by_filters: + description: The `strategy` `allocated_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems' + type: array + allocated_by_tag_keys: + description: The `strategy` `allocated_by_tag_keys`. + items: + type: string + type: array + based_on_costs: + description: The `strategy` `based_on_costs`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems' + type: array + based_on_timeseries: + additionalProperties: {} + description: The rule `strategy` `based_on_timeseries`. + type: object + evaluate_grouped_by_filters: + description: The `strategy` `evaluate_grouped_by_filters`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems' + type: array + evaluate_grouped_by_tag_keys: + description: The `strategy` `evaluate_grouped_by_tag_keys`. + items: + type: string + type: array + granularity: + description: The `strategy` `granularity`. + type: string + method: + description: The `strategy` `method`. + example: '' + type: string + required: + - method + type: object + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems` + object. + properties: + allocated_tags: + description: The `items` `allocated_tags`. + items: + $ref: '#/components/schemas/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems' + type: array + percentage: + description: The `items` `percentage`. The numeric value format should be + a 32bit float value. + example: 0.0 + format: double + type: number + required: + - allocated_tags + - percentage + type: object + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems` + object. + properties: + key: + description: The `items` `key`. + example: '' + type: string + value: + description: The `items` `value`. + example: '' + type: string + required: + - key + - value + type: object + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems: + description: The definition of `ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems` + object. + properties: + condition: + description: The `items` `condition`. + example: '' + type: string + tag: + description: The `items` `tag`. + example: '' + type: string + value: + description: The `items` `value`. + type: string + values: + description: The `items` `values`. + items: + type: string + nullable: true + type: array + required: + - condition + - tag + type: object + ArbitraryRuleResponseDataType: + default: arbitrary_rule + description: Arbitrary rule resource type. + enum: + - arbitrary_rule + example: arbitrary_rule + type: string + x-enum-varnames: + - ARBITRARY_RULE AsanaAccessToken: description: The definition of the `AsanaAccessToken` object. properties: @@ -4701,6 +5330,7 @@ components: description: The error messages for the AWS CUR config. items: type: string + nullable: true type: array months: deprecated: true @@ -4782,7 +5412,6 @@ components: type: $ref: '#/components/schemas/AwsCURConfigPostRequestType' required: - - attributes - type type: object AwsCURConfigPostRequest: @@ -4838,12 +5467,6 @@ components: type: string x-enum-varnames: - AWS_CUR_CONFIG_POST_REQUEST - AwsCURConfigResponse: - description: Response of AWS CUR config. - properties: - data: - $ref: '#/components/schemas/AwsCURConfig' - type: object AwsCURConfigType: default: aws_cur_config description: Type of AWS CUR config. @@ -4861,7 +5484,120 @@ components: items: $ref: '#/components/schemas/AwsCURConfig' type: array + required: + - data + type: object + AwsCurConfigResponse: + description: The definition of `AwsCurConfigResponse` object. + example: + data: + attributes: + account_filters: + excluded_accounts: + - '123456789124' + - '123456789125' + include_new_accounts: true + account_id: '123456789123' + bucket_name: dd-cost-bucket + bucket_region: us-east-1 + created_at: 2023-01-01 12:00:00 + error_messages: [] + months: 36 + report_name: dd-report-name + report_prefix: dd-report-prefix + status: active + status_updated_at: 2023-01-01 12:00:00 + updated_at: 2023-01-01 12:00:00 + id: '123456789123' + type: aws_cur_config + properties: + data: + $ref: '#/components/schemas/AwsCurConfigResponseData' + type: object + AwsCurConfigResponseData: + description: The definition of `AwsCurConfigResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/AwsCurConfigResponseDataAttributes' + id: + description: The `AwsCurConfigResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/AwsCurConfigResponseDataType' + required: + - type + type: object + AwsCurConfigResponseDataAttributes: + description: The definition of `AwsCurConfigResponseDataAttributes` object. + properties: + account_filters: + $ref: '#/components/schemas/AwsCurConfigResponseDataAttributesAccountFilters' + account_id: + description: The `attributes` `account_id`. + type: string + bucket_name: + description: The `attributes` `bucket_name`. + type: string + bucket_region: + description: The `attributes` `bucket_region`. + type: string + created_at: + description: The `attributes` `created_at`. + type: string + error_messages: + description: The `attributes` `error_messages`. + items: + type: string + nullable: true + type: array + months: + description: The `attributes` `months`. + format: int64 + type: integer + report_name: + description: The `attributes` `report_name`. + type: string + report_prefix: + description: The `attributes` `report_prefix`. + type: string + status: + description: The `attributes` `status`. + type: string + status_updated_at: + description: The `attributes` `status_updated_at`. + type: string + updated_at: + description: The `attributes` `updated_at`. + type: string type: object + AwsCurConfigResponseDataAttributesAccountFilters: + description: The definition of `AwsCurConfigResponseDataAttributesAccountFilters` + object. + properties: + excluded_accounts: + description: The `account_filters` `excluded_accounts`. + items: + type: string + type: array + include_new_accounts: + description: The `account_filters` `include_new_accounts`. + nullable: true + type: boolean + included_accounts: + description: The `account_filters` `included_accounts`. + items: + type: string + type: array + type: object + AwsCurConfigResponseDataType: + default: aws_cur_config + description: AWS CUR config resource type. + enum: + - aws_cur_config + example: aws_cur_config + type: string + x-enum-varnames: + - AWS_CUR_CONFIG AwsOnDemandAttributes: description: Attributes for the AWS on demand task. properties: @@ -5271,7 +6007,7 @@ components: description: Azure config. properties: account_id: - description: The tenant ID of the azure account. + description: The tenant ID of the Azure account. example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string client_id: @@ -5290,6 +6026,7 @@ components: description: The error messages for the Azure config. items: type: string + nullable: true type: array export_name: description: The name of the configured Azure Export. @@ -5395,7 +6132,6 @@ components: type: $ref: '#/components/schemas/AzureUCConfigPatchRequestType' required: - - attributes - type type: object AzureUCConfigPatchRequest: @@ -5433,7 +6169,6 @@ components: type: $ref: '#/components/schemas/AzureUCConfigPostRequestType' required: - - attributes - type type: object AzureUCConfigPostRequest: @@ -5448,7 +6183,7 @@ components: description: Attributes for Azure config Post Request. properties: account_id: - description: The tenant ID of the azure account. + description: The tenant ID of the Azure account. example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string actual_bill_config: @@ -5456,12 +6191,9 @@ components: amortized_bill_config: $ref: '#/components/schemas/BillConfig' client_id: - description: The client ID of the azure account. + description: The client ID of the Azure account. example: 1234abcd-1234-abcd-1234-1234abcd1234 type: string - is_enabled: - description: Whether or not the Cloud Cost Management account is enabled. - type: boolean scope: description: The scope of your observed subscription. example: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 @@ -5490,6 +6222,8 @@ components: items: $ref: '#/components/schemas/AzureUCConfigPair' type: array + required: + - data type: object BillConfig: description: Bill config. @@ -11205,6 +11939,204 @@ components: type: $ref: '#/components/schemas/RuleType' type: object + CreateRulesetRequest: + description: The definition of `CreateRulesetRequest` object. + example: + data: + attributes: + enabled: true + rules: + - enabled: true + mapping: null + metadata: null + name: Add Cost Center Tag + query: + addition: + key: cost_center + value: engineering + case_insensitivity: false + if_not_exists: true + query: account_id:"123456789" AND service:"web-api" + reference_table: null + id: New Ruleset + type: create_ruleset + properties: + data: + $ref: '#/components/schemas/CreateRulesetRequestData' + type: object + CreateRulesetRequestData: + description: The definition of `CreateRulesetRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributes' + id: + description: The `CreateRulesetRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/CreateRulesetRequestDataType' + required: + - type + type: object + CreateRulesetRequestDataAttributes: + description: The definition of `CreateRulesetRequestDataAttributes` object. + properties: + enabled: + description: The `attributes` `enabled`. + type: boolean + rules: + description: The `attributes` `rules`. + items: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItems' + type: array + required: + - rules + type: object + CreateRulesetRequestDataAttributesRulesItems: + description: The definition of `CreateRulesetRequestDataAttributesRulesItems` + object. + properties: + enabled: + description: The `items` `enabled`. + example: false + type: boolean + mapping: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsMapping' + metadata: + $ref: '#/components/schemas/RulesetItemMetadata' + name: + description: The `items` `name`. + example: '' + type: string + query: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsQuery' + reference_table: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsReferenceTable' + required: + - enabled + - name + type: object + CreateRulesetRequestDataAttributesRulesItemsMapping: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsMapping` + object. + nullable: true + properties: + destination_key: + description: The `mapping` `destination_key`. + example: '' + type: string + if_not_exists: + description: The `mapping` `if_not_exists`. + example: false + type: boolean + source_keys: + description: The `mapping` `source_keys`. + example: + - '' + items: + type: string + type: array + required: + - destination_key + - if_not_exists + - source_keys + type: object + CreateRulesetRequestDataAttributesRulesItemsQuery: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsQuery` + object. + nullable: true + properties: + addition: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsQueryAddition' + case_insensitivity: + description: The `query` `case_insensitivity`. + type: boolean + if_not_exists: + description: The `query` `if_not_exists`. + example: false + type: boolean + query: + description: The `query` `query`. + example: '' + type: string + required: + - addition + - if_not_exists + - query + type: object + CreateRulesetRequestDataAttributesRulesItemsQueryAddition: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsQueryAddition` + object. + nullable: true + properties: + key: + description: The `addition` `key`. + example: '' + type: string + value: + description: The `addition` `value`. + example: '' + type: string + required: + - key + - value + type: object + CreateRulesetRequestDataAttributesRulesItemsReferenceTable: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsReferenceTable` + object. + nullable: true + properties: + case_insensitivity: + description: The `reference_table` `case_insensitivity`. + type: boolean + field_pairs: + description: The `reference_table` `field_pairs`. + items: + $ref: '#/components/schemas/CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems' + type: array + if_not_exists: + description: The `reference_table` `if_not_exists`. + type: boolean + source_keys: + description: The `reference_table` `source_keys`. + example: + - '' + items: + type: string + type: array + table_name: + description: The `reference_table` `table_name`. + example: '' + type: string + required: + - field_pairs + - source_keys + - table_name + type: object + CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems: + description: The definition of `CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` + object. + properties: + input_column: + description: The `items` `input_column`. + example: '' + type: string + output_key: + description: The `items` `output_key`. + example: '' + type: string + required: + - input_column + - output_key + type: object + CreateRulesetRequestDataType: + default: create_ruleset + description: Create ruleset resource type. + enum: + - create_ruleset + example: create_ruleset + type: string + x-enum-varnames: + - CREATE_RULESET CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -18282,12 +19214,12 @@ components: - type type: object GCPUsageCostConfig: - description: GCP Usage Cost config. + description: Google Cloud Usage Cost config. properties: attributes: $ref: '#/components/schemas/GCPUsageCostConfigAttributes' id: - description: The ID of the GCP Usage Cost config. + description: The ID of the Google Cloud Usage Cost config. type: string type: $ref: '#/components/schemas/GCPUsageCostConfigType' @@ -18296,36 +19228,37 @@ components: - type type: object GCPUsageCostConfigAttributes: - description: Attributes for a GCP Usage Cost config. + description: Attributes for a Google Cloud Usage Cost config. properties: account_id: - description: The GCP account ID. + description: The Google Cloud account ID. example: 123456_A123BC_12AB34 type: string bucket_name: - description: The GCP bucket name used to store the Usage Cost export. + description: The Google Cloud bucket name used to store the Usage Cost export. example: dd-cost-bucket type: string created_at: - description: The timestamp when the GCP Usage Cost config was created. + description: The timestamp when the Google Cloud Usage Cost config was created. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string dataset: - description: The export dataset name used for the GCP Usage Cost Report. + description: The export dataset name used for the Google Cloud Usage Cost + Report. example: billing type: string error_messages: - description: The error messages for the GCP Usage Cost config. + description: The error messages for the Google Cloud Usage Cost config. items: type: string nullable: true type: array export_prefix: - description: The export prefix used for the GCP Usage Cost Report. + description: The export prefix used for the Google Cloud Usage Cost Report. example: datadog_cloud_cost_usage_export type: string export_project_name: - description: The name of the GCP Usage Cost Report. + description: The name of the Google Cloud Usage Cost Report. example: dd-cloud-cost-report type: string months: @@ -18335,23 +19268,25 @@ components: maximum: 36 type: integer project_id: - description: The `project_id` of the GCP Usage Cost report. + description: The `project_id` of the Google Cloud Usage Cost report. example: my-project-123 type: string service_account: - description: The unique GCP service account email. + description: The unique Google Cloud service account email. example: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com type: string status: - description: The status of the GCP Usage Cost config. + description: The status of the Google Cloud Usage Cost config. example: active type: string status_updated_at: - description: The timestamp when the GCP Usage Cost config status was updated. + description: The timestamp when the Google Cloud Usage Cost config status + was updated. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string updated_at: - description: The timestamp when the GCP Usage Cost config status was updated. + description: The timestamp when the Google Cloud Usage Cost config status + was updated. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}$ type: string required: @@ -18364,7 +19299,7 @@ components: - status type: object GCPUsageCostConfigPatchData: - description: GCP Usage Cost config patch data. + description: Google Cloud Usage Cost config patch data. properties: attributes: $ref: '#/components/schemas/GCPUsageCostConfigPatchRequestAttributes' @@ -18375,7 +19310,7 @@ components: - type type: object GCPUsageCostConfigPatchRequest: - description: GCP Usage Cost config patch request. + description: Google Cloud Usage Cost config patch request. properties: data: $ref: '#/components/schemas/GCPUsageCostConfigPatchData' @@ -18383,7 +19318,7 @@ components: - data type: object GCPUsageCostConfigPatchRequestAttributes: - description: Attributes for GCP Usage Cost config patch request. + description: Attributes for Google Cloud Usage Cost config patch request. properties: is_enabled: description: Whether or not the Cloud Cost Management account is enabled. @@ -18394,7 +19329,7 @@ components: type: object GCPUsageCostConfigPatchRequestType: default: gcp_uc_config_patch_request - description: Type of GCP Usage Cost config patch request. + description: Type of Google Cloud Usage Cost config patch request. enum: - gcp_uc_config_patch_request example: gcp_uc_config_patch_request @@ -18402,18 +19337,17 @@ components: x-enum-varnames: - GCP_USAGE_COST_CONFIG_PATCH_REQUEST GCPUsageCostConfigPostData: - description: GCP Usage Cost config post data. + description: Google Cloud Usage Cost config post data. properties: attributes: $ref: '#/components/schemas/GCPUsageCostConfigPostRequestAttributes' type: $ref: '#/components/schemas/GCPUsageCostConfigPostRequestType' required: - - attributes - type type: object GCPUsageCostConfigPostRequest: - description: GCP Usage Cost config post request. + description: Google Cloud Usage Cost config post request. properties: data: $ref: '#/components/schemas/GCPUsageCostConfigPostData' @@ -18421,30 +19355,31 @@ components: - data type: object GCPUsageCostConfigPostRequestAttributes: - description: Attributes for GCP Usage Cost config post request. + description: Attributes for Google Cloud Usage Cost config post request. properties: billing_account_id: - description: The GCP account ID. + description: The Google Cloud account ID. example: 123456_A123BC_12AB34 type: string bucket_name: - description: The GCP bucket name used to store the Usage Cost export. + description: The Google Cloud bucket name used to store the Usage Cost export. example: dd-cost-bucket type: string export_dataset_name: - description: The export dataset name used for the GCP Usage Cost report. + description: The export dataset name used for the Google Cloud Usage Cost + report. example: billing type: string export_prefix: - description: The export prefix used for the GCP Usage Cost report. + description: The export prefix used for the Google Cloud Usage Cost report. example: datadog_cloud_cost_usage_export type: string export_project_name: - description: The name of the GCP Usage Cost report. + description: The name of the Google Cloud Usage Cost report. example: dd-cloud-cost-report type: string service_account: - description: The unique GCP service account email. + description: The unique Google Cloud service account email. example: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com type: string required: @@ -18456,7 +19391,7 @@ components: type: object GCPUsageCostConfigPostRequestType: default: gcp_uc_config_post_request - description: Type of GCP Usage Cost config post request. + description: Type of Google Cloud Usage Cost config post request. enum: - gcp_uc_config_post_request example: gcp_usage_cost_config_post_request @@ -18464,14 +19399,14 @@ components: x-enum-varnames: - GCP_USAGE_COST_CONFIG_POST_REQUEST GCPUsageCostConfigResponse: - description: Response of GCP Usage Cost config. + description: Response of Google Cloud Usage Cost config. properties: data: $ref: '#/components/schemas/GCPUsageCostConfig' type: object GCPUsageCostConfigType: default: gcp_uc_config - description: Type of GCP Usage Cost config. + description: Type of Google Cloud Usage Cost config. enum: - gcp_uc_config example: gcp_uc_config @@ -18479,14 +19414,109 @@ components: x-enum-varnames: - GCP_UC_CONFIG GCPUsageCostConfigsResponse: - description: List of GCP Usage Cost configs. + description: List of Google Cloud Usage Cost configs. properties: data: - description: A GCP Usage Cost config. + description: A Google Cloud Usage Cost config. items: $ref: '#/components/schemas/GCPUsageCostConfig' type: array + required: + - data + type: object + GcpUcConfigResponse: + description: The definition of `GcpUcConfigResponse` object. + example: + data: + attributes: + account_id: 123456_A123BC_12AB34 + bucket_name: dd-cost-bucket + created_at: 2023-01-01 12:00:00 + dataset: billing + error_messages: [] + export_prefix: datadog_cloud_cost_usage_export + export_project_name: dd-cloud-cost-report + months: 36 + project_id: my-project-123 + service_account: dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com + status: active + status_updated_at: 2023-01-01 12:00:00 + updated_at: 2023-01-01 12:00:00 + id: '123456789123' + type: gcp_uc_config + properties: + data: + $ref: '#/components/schemas/GcpUcConfigResponseData' + type: object + GcpUcConfigResponseData: + description: The definition of `GcpUcConfigResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/GcpUcConfigResponseDataAttributes' + id: + description: The `GcpUcConfigResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/GcpUcConfigResponseDataType' + required: + - type + type: object + GcpUcConfigResponseDataAttributes: + description: The definition of `GcpUcConfigResponseDataAttributes` object. + properties: + account_id: + description: The `attributes` `account_id`. + type: string + bucket_name: + description: The `attributes` `bucket_name`. + type: string + created_at: + description: The `attributes` `created_at`. + type: string + dataset: + description: The `attributes` `dataset`. + type: string + error_messages: + description: The `attributes` `error_messages`. + items: + type: string + nullable: true + type: array + export_prefix: + description: The `attributes` `export_prefix`. + type: string + export_project_name: + description: The `attributes` `export_project_name`. + type: string + months: + description: The `attributes` `months`. + format: int64 + type: integer + project_id: + description: The `attributes` `project_id`. + type: string + service_account: + description: The `attributes` `service_account`. + type: string + status: + description: The `attributes` `status`. + type: string + status_updated_at: + description: The `attributes` `status_updated_at`. + type: string + updated_at: + description: The `attributes` `updated_at`. + type: string type: object + GcpUcConfigResponseDataType: + default: gcp_uc_config + description: Google Cloud Usage Cost config resource type. + enum: + - gcp_uc_config + example: gcp_uc_config + type: string + x-enum-varnames: + - GCP_UC_CONFIG GeminiAPIKey: description: The definition of the `GeminiAPIKey` object. properties: @@ -36173,6 +37203,76 @@ components: required: - data type: object + ReorderRuleResourceArray: + description: The definition of `ReorderRuleResourceArray` object. + example: + data: + - id: '456' + type: arbitrary_rule + - id: '123' + type: arbitrary_rule + - id: '789' + type: arbitrary_rule + properties: + data: + description: The `ReorderRuleResourceArray` `data`. + items: + $ref: '#/components/schemas/ReorderRuleResourceData' + type: array + required: + - data + type: object + ReorderRuleResourceData: + description: The definition of `ReorderRuleResourceData` object. + properties: + id: + description: The `ReorderRuleResourceData` `id`. + type: string + type: + $ref: '#/components/schemas/ReorderRuleResourceDataType' + required: + - type + type: object + ReorderRuleResourceDataType: + default: arbitrary_rule + description: Arbitrary rule resource type. + enum: + - arbitrary_rule + example: arbitrary_rule + type: string + x-enum-varnames: + - ARBITRARY_RULE + ReorderRulesetResourceArray: + description: The definition of `ReorderRulesetResourceArray` object. + properties: + data: + description: The `ReorderRulesetResourceArray` `data`. + items: + $ref: '#/components/schemas/ReorderRulesetResourceData' + type: array + required: + - data + type: object + ReorderRulesetResourceData: + description: The definition of `ReorderRulesetResourceData` object. + properties: + id: + description: The `ReorderRulesetResourceData` `id`. + type: string + type: + $ref: '#/components/schemas/ReorderRulesetResourceDataType' + required: + - type + type: object + ReorderRulesetResourceDataType: + default: ruleset + description: Ruleset resource type. + enum: + - ruleset + example: ruleset + type: string + x-enum-varnames: + - RULESET ResourceFilterAttributes: description: Attributes of a resource filter. example: @@ -37207,6 +38307,396 @@ components: rule: $ref: '#/components/schemas/SecurityMonitoringRuleResponse' type: object + RulesValidateQueryRequest: + description: The definition of `RulesValidateQueryRequest` object. + example: + data: + attributes: + Query: example:query AND test:true + type: validate_query + properties: + data: + $ref: '#/components/schemas/RulesValidateQueryRequestData' + type: object + RulesValidateQueryRequestData: + description: The definition of `RulesValidateQueryRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/RulesValidateQueryRequestDataAttributes' + id: + description: The `RulesValidateQueryRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/RulesValidateQueryRequestDataType' + required: + - type + type: object + RulesValidateQueryRequestDataAttributes: + description: The definition of `RulesValidateQueryRequestDataAttributes` object. + properties: + Query: + description: The `attributes` `Query`. + example: '' + type: string + required: + - Query + type: object + RulesValidateQueryRequestDataType: + default: validate_query + description: Validate query resource type. + enum: + - validate_query + example: validate_query + type: string + x-enum-varnames: + - VALIDATE_QUERY + RulesValidateQueryResponse: + description: The definition of `RulesValidateQueryResponse` object. + example: + data: + attributes: + Canonical: canonical query representation + type: validate_response + properties: + data: + $ref: '#/components/schemas/RulesValidateQueryResponseData' + type: object + RulesValidateQueryResponseData: + description: The definition of `RulesValidateQueryResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/RulesValidateQueryResponseDataAttributes' + id: + description: The `RulesValidateQueryResponseData` `id`. + type: string + type: + $ref: '#/components/schemas/RulesValidateQueryResponseDataType' + required: + - type + type: object + RulesValidateQueryResponseDataAttributes: + description: The definition of `RulesValidateQueryResponseDataAttributes` object. + properties: + Canonical: + description: The `attributes` `Canonical`. + example: '' + type: string + required: + - Canonical + type: object + RulesValidateQueryResponseDataType: + default: validate_response + description: Validate response resource type. + enum: + - validate_response + example: validate_response + type: string + x-enum-varnames: + - VALIDATE_RESPONSE + RulesetItemMetadata: + additionalProperties: + type: string + description: The `items` `metadata`. + nullable: true + type: object + RulesetResp: + description: The definition of `RulesetResp` object. + example: + data: + attributes: + created: null + enabled: true + last_modified_user_uuid: '' + modified: null + name: Example Ruleset + position: 0 + rules: + - enabled: false + mapping: null + metadata: null + name: RC test rule edited1 + query: + addition: + key: abc + value: ww + case_insensitivity: false + if_not_exists: true + query: billingcurrency:"USD" AND account_name:"SZA96462" AND billingcurrency:"USD" + reference_table: null + - enabled: true + mapping: + destination_key: h + if_not_exists: true + source_keys: + - accountname + - accountownerid + metadata: null + name: rule with empty source key + query: null + reference_table: null + - enabled: true + mapping: null + metadata: null + name: New table rule with new UI + query: null + reference_table: + case_insensitivity: true + field_pairs: + - input_column: status_type + output_key: status + - input_column: status_description + output_key: dess + if_not_exists: false + source_keys: + - http_status + - status_description + table_name: http_status_codes + version: 1 + id: '12345' + type: ruleset + properties: + data: + $ref: '#/components/schemas/RulesetRespData' + type: object + RulesetRespArray: + description: The definition of `RulesetRespArray` object. + properties: + data: + description: The `RulesetRespArray` `data`. + items: + $ref: '#/components/schemas/RulesetRespData' + type: array + required: + - data + type: object + RulesetRespData: + description: The definition of `RulesetRespData` object. + properties: + attributes: + $ref: '#/components/schemas/RulesetRespDataAttributes' + id: + description: The `RulesetRespData` `id`. + type: string + type: + $ref: '#/components/schemas/RulesetRespDataType' + required: + - type + type: object + RulesetRespDataAttributes: + description: The definition of `RulesetRespDataAttributes` object. + properties: + created: + $ref: '#/components/schemas/RulesetRespDataAttributesCreated' + enabled: + description: The `attributes` `enabled`. + example: false + type: boolean + last_modified_user_uuid: + description: The `attributes` `last_modified_user_uuid`. + example: '' + type: string + modified: + $ref: '#/components/schemas/RulesetRespDataAttributesModified' + name: + description: The `attributes` `name`. + example: '' + type: string + position: + description: The `attributes` `position`. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + rules: + description: The `attributes` `rules`. + items: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItems' + type: array + version: + description: The `attributes` `version`. + example: 0 + format: int64 + type: integer + required: + - created + - enabled + - last_modified_user_uuid + - modified + - name + - position + - rules + - version + type: object + RulesetRespDataAttributesCreated: + description: The definition of `RulesetRespDataAttributesCreated` object. + properties: + nanos: + description: The `created` `nanos`. + format: int32 + maximum: 2147483647 + type: integer + seconds: + description: The `created` `seconds`. + format: int64 + type: integer + type: object + RulesetRespDataAttributesModified: + description: The definition of `RulesetRespDataAttributesModified` object. + properties: + nanos: + description: The `modified` `nanos`. + format: int32 + maximum: 2147483647 + type: integer + seconds: + description: The `modified` `seconds`. + format: int64 + type: integer + type: object + RulesetRespDataAttributesRulesItems: + description: The definition of `RulesetRespDataAttributesRulesItems` object. + properties: + enabled: + description: The `items` `enabled`. + example: false + type: boolean + mapping: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsMapping' + metadata: + $ref: '#/components/schemas/RulesetItemMetadata' + name: + description: The `items` `name`. + example: '' + type: string + query: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsQuery' + reference_table: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsReferenceTable' + required: + - enabled + - name + type: object + RulesetRespDataAttributesRulesItemsMapping: + description: The definition of `RulesetRespDataAttributesRulesItemsMapping` + object. + nullable: true + properties: + destination_key: + description: The `mapping` `destination_key`. + example: '' + type: string + if_not_exists: + description: The `mapping` `if_not_exists`. + example: false + type: boolean + source_keys: + description: The `mapping` `source_keys`. + example: + - '' + items: + type: string + type: array + required: + - destination_key + - if_not_exists + - source_keys + type: object + RulesetRespDataAttributesRulesItemsQuery: + description: The definition of `RulesetRespDataAttributesRulesItemsQuery` object. + nullable: true + properties: + addition: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsQueryAddition' + case_insensitivity: + description: The `query` `case_insensitivity`. + type: boolean + if_not_exists: + description: The `query` `if_not_exists`. + example: false + type: boolean + query: + description: The `query` `query`. + example: '' + type: string + required: + - addition + - if_not_exists + - query + type: object + RulesetRespDataAttributesRulesItemsQueryAddition: + description: The definition of `RulesetRespDataAttributesRulesItemsQueryAddition` + object. + nullable: true + properties: + key: + description: The `addition` `key`. + example: '' + type: string + value: + description: The `addition` `value`. + example: '' + type: string + required: + - key + - value + type: object + RulesetRespDataAttributesRulesItemsReferenceTable: + description: The definition of `RulesetRespDataAttributesRulesItemsReferenceTable` + object. + nullable: true + properties: + case_insensitivity: + description: The `reference_table` `case_insensitivity`. + type: boolean + field_pairs: + description: The `reference_table` `field_pairs`. + items: + $ref: '#/components/schemas/RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems' + type: array + if_not_exists: + description: The `reference_table` `if_not_exists`. + type: boolean + source_keys: + description: The `reference_table` `source_keys`. + example: + - '' + items: + type: string + type: array + table_name: + description: The `reference_table` `table_name`. + example: '' + type: string + required: + - field_pairs + - source_keys + - table_name + type: object + RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems: + description: The definition of `RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems` + object. + properties: + input_column: + description: The `items` `input_column`. + example: '' + type: string + output_key: + description: The `items` `output_key`. + example: '' + type: string + required: + - input_column + - output_key + type: object + RulesetRespDataType: + default: ruleset + description: Ruleset resource type. + enum: + - ruleset + example: ruleset + type: string + x-enum-varnames: + - RULESET RumMetricCompute: description: The compute rule to compute the rum-based metric. properties: @@ -46182,6 +47672,117 @@ components: x-enum-varnames: - SECURITY_FINDINGS - SECURITY_SIGNALS + UCConfigPair: + description: The definition of `UCConfigPair` object. + example: + data: + attributes: + configs: + - account_id: 1234abcd-1234-abcd-1234-1234abcd1234 + client_id: 1234abcd-1234-abcd-1234-1234abcd1234 + created_at: 2023-01-01 12:00:00 + dataset_type: actual + error_messages: [] + export_name: dd-actual-export + export_path: dd-export-path + id: '123456789123' + months: 36 + scope: /subscriptions/1234abcd-1234-abcd-1234-1234abcd1234 + status: active + status_updated_at: 2023-01-01 12:00:00 + storage_account: dd-storage-account + storage_container: dd-storage-container + updated_at: 2023-01-01 12:00:00 + id: '123456789123' + type: azure_uc_configs + properties: + data: + $ref: '#/components/schemas/UCConfigPairData' + type: object + UCConfigPairData: + description: The definition of `UCConfigPairData` object. + properties: + attributes: + $ref: '#/components/schemas/UCConfigPairDataAttributes' + id: + description: The `UCConfigPairData` `id`. + type: string + type: + $ref: '#/components/schemas/UCConfigPairDataType' + required: + - type + type: object + UCConfigPairDataAttributes: + description: The definition of `UCConfigPairDataAttributes` object. + properties: + configs: + description: The `attributes` `configs`. + items: + $ref: '#/components/schemas/UCConfigPairDataAttributesConfigsItems' + type: array + type: object + UCConfigPairDataAttributesConfigsItems: + description: The definition of `UCConfigPairDataAttributesConfigsItems` object. + properties: + account_id: + description: The `items` `account_id`. + type: string + client_id: + description: The `items` `client_id`. + type: string + created_at: + description: The `items` `created_at`. + type: string + dataset_type: + description: The `items` `dataset_type`. + type: string + error_messages: + description: The `items` `error_messages`. + items: + type: string + nullable: true + type: array + export_name: + description: The `items` `export_name`. + type: string + export_path: + description: The `items` `export_path`. + type: string + id: + description: The `items` `id`. + type: string + months: + description: The `items` `months`. + format: int64 + type: integer + scope: + description: The `items` `scope`. + type: string + status: + description: The `items` `status`. + type: string + status_updated_at: + description: The `items` `status_updated_at`. + type: string + storage_account: + description: The `items` `storage_account`. + type: string + storage_container: + description: The `items` `storage_container`. + type: string + updated_at: + description: The `items` `updated_at`. + type: string + type: object + UCConfigPairDataType: + default: azure_uc_configs + description: Azure UC configs resource type. + enum: + - azure_uc_configs + example: azure_uc_configs + type: string + x-enum-varnames: + - AZURE_UC_CONFIGS Unit: description: Object containing the metric unit family, scale factor, name, and short name. @@ -46658,6 +48259,209 @@ components: type: $ref: '#/components/schemas/RuleType' type: object + UpdateRulesetRequest: + description: The definition of `UpdateRulesetRequest` object. + example: + data: + attributes: + enabled: true + last_version: 1 + rules: + - enabled: true + mapping: + destination_key: team_owner + if_not_exists: true + source_keys: + - account_name + - account_id + metadata: null + name: Account Name Mapping + query: null + reference_table: null + type: update_ruleset + properties: + data: + $ref: '#/components/schemas/UpdateRulesetRequestData' + type: object + UpdateRulesetRequestData: + description: The definition of `UpdateRulesetRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributes' + id: + description: The `UpdateRulesetRequestData` `id`. + type: string + type: + $ref: '#/components/schemas/UpdateRulesetRequestDataType' + required: + - type + type: object + UpdateRulesetRequestDataAttributes: + description: The definition of `UpdateRulesetRequestDataAttributes` object. + properties: + enabled: + description: The `attributes` `enabled`. + example: false + type: boolean + last_version: + description: The `attributes` `last_version`. + format: int64 + type: integer + rules: + description: The `attributes` `rules`. + items: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItems' + type: array + required: + - enabled + - rules + type: object + UpdateRulesetRequestDataAttributesRulesItems: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItems` + object. + properties: + enabled: + description: The `items` `enabled`. + example: false + type: boolean + mapping: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsMapping' + metadata: + $ref: '#/components/schemas/RulesetItemMetadata' + name: + description: The `items` `name`. + example: '' + type: string + query: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsQuery' + reference_table: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable' + required: + - enabled + - name + type: object + UpdateRulesetRequestDataAttributesRulesItemsMapping: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsMapping` + object. + nullable: true + properties: + destination_key: + description: The `mapping` `destination_key`. + example: '' + type: string + if_not_exists: + description: The `mapping` `if_not_exists`. + example: false + type: boolean + source_keys: + description: The `mapping` `source_keys`. + example: + - '' + items: + type: string + type: array + required: + - destination_key + - if_not_exists + - source_keys + type: object + UpdateRulesetRequestDataAttributesRulesItemsQuery: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsQuery` + object. + nullable: true + properties: + addition: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsQueryAddition' + case_insensitivity: + description: The `query` `case_insensitivity`. + type: boolean + if_not_exists: + description: The `query` `if_not_exists`. + example: false + type: boolean + query: + description: The `query` `query`. + example: '' + type: string + required: + - addition + - if_not_exists + - query + type: object + UpdateRulesetRequestDataAttributesRulesItemsQueryAddition: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsQueryAddition` + object. + nullable: true + properties: + key: + description: The `addition` `key`. + example: '' + type: string + value: + description: The `addition` `value`. + example: '' + type: string + required: + - key + - value + type: object + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsReferenceTable` + object. + nullable: true + properties: + case_insensitivity: + description: The `reference_table` `case_insensitivity`. + type: boolean + field_pairs: + description: The `reference_table` `field_pairs`. + items: + $ref: '#/components/schemas/UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems' + type: array + if_not_exists: + description: The `reference_table` `if_not_exists`. + type: boolean + source_keys: + description: The `reference_table` `source_keys`. + example: + - '' + items: + type: string + type: array + table_name: + description: The `reference_table` `table_name`. + example: '' + type: string + required: + - field_pairs + - source_keys + - table_name + type: object + UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems: + description: The definition of `UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems` + object. + properties: + input_column: + description: The `items` `input_column`. + example: '' + type: string + output_key: + description: The `items` `output_key`. + example: '' + type: string + required: + - input_column + - output_key + type: object + UpdateRulesetRequestDataType: + default: update_ruleset + description: Update ruleset resource type. + enum: + - update_ruleset + example: update_ruleset + type: string + x-enum-varnames: + - UPDATE_RULESET UpdateWorkflowRequest: description: A request object for updating an existing workflow. example: @@ -52755,6 +54559,231 @@ paths: x-permission: operator: OPEN permissions: [] + /api/v2/cost/arbitrary_rule: + get: + description: List all arbitrary cost rules - Retrieve a list of all arbitrary + cost rules for the organization + operationId: ListArbitraryCostRules + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponseArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List arbitrary cost rules + tags: + - Cloud Cost Management + post: + description: 'Create a new arbitrary cost rule with the specified filters and + allocation strategy. + + + **Strategy Methods:** + + - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing + costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, + allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. + + - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries + data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. + + - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by + (array of percentage allocations). + + + **Filter Conditions:** + + - Use **value** for single-value conditions: "is", "is not", "contains", "does + not contain", "=", "!=", "like", "not like", "is all values", "is untagged" + + - Use **values** for multi-value conditions: "in", "not in" + + - Cannot use both value and values simultaneously. + + + **Supported operators**: is, is not, is all values, is untagged, contains, + does not contain, in, not in, =, !=, like, not like' + operationId: CreateArbitraryCostRule + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryCostUpsertRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Create arbitrary cost rule + tags: + - Cloud Cost Management + /api/v2/cost/arbitrary_rule/reorder: + post: + description: "Reorder arbitrary cost rules - Change the execution order of arbitrary + cost rules.\n\n**Important**: You must provide the **complete list** of all + rule IDs in the desired execution order. The API will reorder ALL rules according + to the provided sequence.\n\nRules are executed in the order specified, with + lower indices (earlier in the array) having higher priority.\n\n**Example**: + If you have rules with IDs [123, 456, 789] and want to change order from 123\u2192456\u2192789 + to 456\u2192123\u2192789, send: [{\"id\": \"456\"}, {\"id\": \"123\"}, {\"id\": + \"789\"}]" + operationId: ReorderArbitraryCostRules + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReorderRuleResourceArray' + required: true + responses: + '204': + description: Successfully reordered rules + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Reorder arbitrary cost rules + tags: + - Cloud Cost Management + /api/v2/cost/arbitrary_rule/{rule_id}: + delete: + description: Delete an arbitrary cost rule - Delete an existing arbitrary cost + rule by its ID + operationId: DeleteArbitraryCostRule + parameters: + - description: The unique identifier of the arbitrary cost rule + in: path + name: rule_id + required: true + schema: + format: int64 + type: integer + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Delete arbitrary cost rule + tags: + - Cloud Cost Management + get: + description: Get a specific arbitrary cost rule - Retrieve a specific arbitrary + cost rule by its ID + operationId: GetArbitraryCostRule + parameters: + - description: The unique identifier of the arbitrary cost rule + in: path + name: rule_id + required: true + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get arbitrary cost rule + tags: + - Cloud Cost Management + patch: + description: 'Update an existing arbitrary cost rule with new filters and allocation + strategy. + + + **Strategy Methods:** + + - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing + costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, + allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. + + - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries + data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. + + - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by + (array of percentage allocations). + + - **USAGE_METRIC**: Allocates based on usage metrics (implementation varies). + + + **Filter Conditions:** + + - Use **value** for single-value conditions: "is", "is not", "contains", "does + not contain", "=", "!=", "like", "not like", "is all values", "is untagged" + + - Use **values** for multi-value conditions: "in", "not in" + + - Cannot use both value and values simultaneously. + + + **Supported operators**: is, is not, is all values, is untagged, contains, + does not contain, in, not in, =, !=, like, not like' + operationId: UpdateArbitraryCostRule + parameters: + - description: The unique identifier of the arbitrary cost rule + in: path + name: rule_id + required: true + schema: + format: int64 + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryCostUpsertRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ArbitraryRuleResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Update arbitrary cost rule + tags: + - Cloud Cost Management /api/v2/cost/aws_cur_config: get: description: List the AWS CUR configs. @@ -52800,7 +54829,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AwsCURConfigResponse' + $ref: '#/components/schemas/AwsCurConfigResponse' description: OK '400': content: @@ -52856,75 +54885,212 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Delete Cloud Cost Management AWS CUR config + summary: Delete Cloud Cost Management AWS CUR config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + get: + description: Get a specific AWS CUR config. + operationId: GetCostAWSCURConfig + parameters: + - description: The unique identifier of the cloud account + in: path + name: cloud_account_id + required: true + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCurConfigResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get cost AWS CUR config + tags: + - Cloud Cost Management + patch: + description: Update the status (active/archived) and/or account filtering configuration + of an AWS CUR config. + operationId: UpdateCostAWSCURConfig + parameters: + - $ref: '#/components/parameters/CloudAccountID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigPatchRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AwsCURConfigsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Update Cloud Cost Management AWS CUR config + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + /api/v2/cost/azure_uc_config: + get: + description: List the Azure configs. + operationId: ListCostAzureUCConfigs + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigsResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List Cloud Cost Management Azure configs + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_read + post: + description: Create a Cloud Cost Management account for an Azure config. + operationId: CreateCostAzureUCConfigs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPostRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/AzureUCConfigPairsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Create Cloud Cost Management Azure configs + tags: + - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write + /api/v2/cost/azure_uc_config/{cloud_account_id}: + delete: + description: Archive a Cloud Cost Management Account. + operationId: DeleteCostAzureUCConfig + parameters: + - $ref: '#/components/parameters/CloudAccountID' + responses: + '204': + description: No Content + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Delete Cloud Cost Management Azure config tags: - Cloud Cost Management x-permission: operator: OR permissions: - cloud_cost_management_write - patch: - description: Update the status (active/archived) and/or account filtering configuration - of an AWS CUR config. - operationId: UpdateCostAWSCURConfig + get: + description: Get a specific Azure config. + operationId: GetCostAzureUCConfig parameters: - - $ref: '#/components/parameters/CloudAccountID' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AwsCURConfigPatchRequest' + - description: The unique identifier of the cloud account + in: path + name: cloud_account_id required: true + schema: + format: int64 + type: integer responses: '200': content: application/json: schema: - $ref: '#/components/schemas/AwsCURConfigsResponse' - description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cloud_cost_management_write - summary: Update Cloud Cost Management AWS CUR config - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - /api/v2/cost/azure_uc_config: - get: - description: List the Azure configs. - operationId: ListCostAzureUCConfigs - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureUCConfigsResponse' + $ref: '#/components/schemas/UCConfigPair' description: OK - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' security: @@ -52932,90 +55098,9 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_read - summary: List Cloud Cost Management Azure configs + summary: Get cost Azure UC config tags: - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_read - post: - description: Create a Cloud Cost Management account for an Azure config. - operationId: CreateCostAzureUCConfigs - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AzureUCConfigPostRequest' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/AzureUCConfigPairsResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cloud_cost_management_write - summary: Create Cloud Cost Management Azure configs - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - /api/v2/cost/azure_uc_config/{cloud_account_id}: - delete: - description: Archive a Cloud Cost Management Account. - operationId: DeleteCostAzureUCConfig - parameters: - - $ref: '#/components/parameters/CloudAccountID' - responses: - '204': - description: No Content - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Bad Request - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cloud_cost_management_write - summary: Delete Cloud Cost Management Azure config - tags: - - Cloud Cost Management - x-permission: - operator: OR - permissions: - - cloud_cost_management_write patch: description: Update the status of an Azure config (active/archived). operationId: UpdateCostAzureUCConfigs @@ -53223,6 +55308,10 @@ paths: summary: List Custom Costs files tags: - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_read put: description: Upload a Custom Costs file. operationId: UploadCustomCostsFile @@ -53261,6 +55350,10 @@ paths: summary: Upload Custom Costs file tags: - Cloud Cost Management + x-permission: + operator: OR + permissions: + - cloud_cost_management_write /api/v2/cost/custom_costs/{file_id}: delete: description: Delete the specified Custom Costs file. @@ -53328,7 +55421,7 @@ paths: - Cloud Cost Management /api/v2/cost/gcp_uc_config: get: - description: List the GCP Usage Cost configs. + description: List the Google Cloud Usage Cost configs. operationId: ListCostGCPUsageCostConfigs responses: '200': @@ -53350,7 +55443,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_read - summary: List Cloud Cost Management GCP Usage Cost configs + summary: List Google Cloud Usage Cost configs tags: - Cloud Cost Management x-permission: @@ -53358,7 +55451,8 @@ paths: permissions: - cloud_cost_management_read post: - description: Create a Cloud Cost Management account for an GCP Usage Cost config. + description: Create a Cloud Cost Management account for an Google Cloud Usage + Cost config. operationId: CreateCostGCPUsageCostConfig requestBody: content: @@ -53392,7 +55486,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Create Cloud Cost Management GCP Usage Cost config + summary: Create Google Cloud Usage Cost config tags: - Cloud Cost Management x-permission: @@ -53427,15 +55521,43 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Delete Cloud Cost Management GCP Usage Cost config + summary: Delete Google Cloud Usage Cost config tags: - Cloud Cost Management x-permission: operator: OR permissions: - cloud_cost_management_write + get: + description: Get a specific Google Cloud Usage Cost config. + operationId: GetCostGCPUsageCostConfig + parameters: + - description: The unique identifier of the cloud account + in: path + name: cloud_account_id + required: true + schema: + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GcpUcConfigResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get Google Cloud Usage Cost config + tags: + - Cloud Cost Management patch: - description: Update the status of an GCP Usage Cost config (active/archived). + description: Update the status of an Google Cloud Usage Cost config (active/archived). operationId: UpdateCostGCPUsageCostConfig parameters: - $ref: '#/components/parameters/CloudAccountID' @@ -53477,7 +55599,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Update Cloud Cost Management GCP Usage Cost config + summary: Update Google Cloud Usage Cost config tags: - Cloud Cost Management x-permission: @@ -70418,6 +72540,194 @@ paths: operator: OR permissions: - billing_edit + /api/v2/tags/enrichment: + get: + description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline + rulesets for the organization + operationId: ListRulesets + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetRespArray' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: List rulesets + tags: + - Cloud Cost Management + post: + description: Create a new tag pipeline ruleset with the specified rules and + configuration + operationId: CreateRuleset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateRulesetRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetResp' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Create ruleset + tags: + - Cloud Cost Management + /api/v2/tags/enrichment/reorder: + post: + description: Reorder tag pipeline rulesets - Change the execution order of tag + pipeline rulesets + operationId: ReorderRulesets + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReorderRulesetResourceArray' + required: true + responses: + '204': + description: Successfully reordered rulesets + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Reorder rulesets + tags: + - Cloud Cost Management + /api/v2/tags/enrichment/validate-query: + post: + description: Validate a tag pipeline query - Validate the syntax and structure + of a tag pipeline query + operationId: ValidateQuery + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RulesValidateQueryRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesValidateQueryResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Validate query + tags: + - Cloud Cost Management + /api/v2/tags/enrichment/{ruleset_id}: + delete: + description: Delete a tag pipeline ruleset - Delete an existing tag pipeline + ruleset by its ID + operationId: DeleteRuleset + parameters: + - description: The unique identifier of the ruleset + in: path + name: ruleset_id + required: true + schema: + type: string + responses: + '204': + description: No Content + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Delete ruleset + tags: + - Cloud Cost Management + get: + description: Get a specific tag pipeline ruleset - Retrieve a specific tag pipeline + ruleset by its ID + operationId: GetRuleset + parameters: + - description: The unique identifier of the ruleset + in: path + name: ruleset_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetResp' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_read + summary: Get ruleset + tags: + - Cloud Cost Management + patch: + description: Update a tag pipeline ruleset - Update an existing tag pipeline + ruleset with new rules and configuration + operationId: UpdateRuleset + parameters: + - description: The unique identifier of the ruleset + in: path + name: ruleset_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRulesetRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RulesetResp' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cloud_cost_management_write + summary: Update ruleset + tags: + - Cloud Cost Management /api/v2/team: get: description: 'Get all teams. @@ -73291,8 +75601,8 @@ tags: for more information. name: Case Management - description: The Cloud Cost Management API allows you to set up, edit, and delete - Cloud Cost Management accounts for AWS, Azure, and GCP. You can query your cost - data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products) + Cloud Cost Management accounts for AWS, Azure, and Google Cloud. You can query + your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products) and the `cloud_cost` data source. For more information, see the [Cloud Cost Management documentation](https://docs.datadoghq.com/cloud_cost_management/). name: Cloud Cost Management diff --git a/examples/v2/cloud-cost-management/CreateArbitraryCostRule.java b/examples/v2/cloud-cost-management/CreateArbitraryCostRule.java new file mode 100644 index 00000000000..9baef79324e --- /dev/null +++ b/examples/v2/cloud-cost-management/CreateArbitraryCostRule.java @@ -0,0 +1,72 @@ +// Create arbitrary cost rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequest; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestData; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributes; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributesStrategy; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataType; +import com.datadog.api.client.v2.model.ArbitraryRuleResponse; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + ArbitraryCostUpsertRequest body = + new ArbitraryCostUpsertRequest() + .data( + new ArbitraryCostUpsertRequestData() + .attributes( + new ArbitraryCostUpsertRequestDataAttributes() + .costsToAllocate( + Arrays.asList( + new ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems() + .condition("is") + .tag("account_id") + .value("123456789"), + new ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems() + .condition("in") + .tag("environment") + .value("") + .values(Arrays.asList("production", "staging")))) + .enabled(true) + .orderId(1L) + .provider(Arrays.asList("aws", "gcp")) + .ruleName("example-arbitrary-cost-rule") + .strategy( + new ArbitraryCostUpsertRequestDataAttributesStrategy() + .allocatedByTagKeys(Arrays.asList("team", "environment")) + .basedOnCosts( + Arrays.asList( + new ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems() + .condition("is") + .tag("service") + .value("web-api"), + new ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems() + .condition("not in") + .tag("team") + .value("") + .values(Arrays.asList("legacy", "deprecated")))) + .granularity("daily") + .method("proportional")) + .type("shared")) + .type(ArbitraryCostUpsertRequestDataType.UPSERT_ARBITRARY_RULE)); + + try { + ArbitraryRuleResponse result = apiInstance.createArbitraryCostRule(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#createArbitraryCostRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.java b/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.java index e073beefa0a..84ac0840334 100644 --- a/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.java +++ b/examples/v2/cloud-cost-management/CreateCostAWSCURConfig.java @@ -7,7 +7,7 @@ import com.datadog.api.client.v2.model.AwsCURConfigPostRequest; import com.datadog.api.client.v2.model.AwsCURConfigPostRequestAttributes; import com.datadog.api.client.v2.model.AwsCURConfigPostRequestType; -import com.datadog.api.client.v2.model.AwsCURConfigResponse; +import com.datadog.api.client.v2.model.AwsCurConfigResponse; public class Example { public static void main(String[] args) { @@ -28,7 +28,7 @@ public static void main(String[] args) { .type(AwsCURConfigPostRequestType.AWS_CUR_CONFIG_POST_REQUEST)); try { - AwsCURConfigResponse result = apiInstance.createCostAWSCURConfig(body); + AwsCurConfigResponse result = apiInstance.createCostAWSCURConfig(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CloudCostManagementApi#createCostAWSCURConfig"); diff --git a/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.java b/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.java index a2dc4944341..39ae9e75e65 100644 --- a/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.java +++ b/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.java @@ -35,7 +35,6 @@ public static void main(String[] args) { .storageAccount("dd-storage-account") .storageContainer("dd-storage-container")) .clientId("1234abcd-1234-abcd-1234-1234abcd1234") - .isEnabled(true) .scope("subscriptions/1234abcd-1234-abcd-1234-1234abcd1234")) .type(AzureUCConfigPostRequestType.AZURE_UC_CONFIG_POST_REQUEST)); diff --git a/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.java b/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.java index 519f289c9d9..65a83d0f9fd 100644 --- a/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.java +++ b/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.java @@ -1,4 +1,4 @@ -// Create Cloud Cost Management GCP Usage Cost config returns "OK" response +// Create Google Cloud Usage Cost config returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/cloud-cost-management/CreateRuleset.java b/examples/v2/cloud-cost-management/CreateRuleset.java new file mode 100644 index 00000000000..360b3e8b90e --- /dev/null +++ b/examples/v2/cloud-cost-management/CreateRuleset.java @@ -0,0 +1,61 @@ +// Create ruleset returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.CreateRulesetRequest; +import com.datadog.api.client.v2.model.CreateRulesetRequestData; +import com.datadog.api.client.v2.model.CreateRulesetRequestDataAttributes; +import com.datadog.api.client.v2.model.CreateRulesetRequestDataAttributesRulesItems; +import com.datadog.api.client.v2.model.CreateRulesetRequestDataAttributesRulesItemsQuery; +import com.datadog.api.client.v2.model.CreateRulesetRequestDataAttributesRulesItemsQueryAddition; +import com.datadog.api.client.v2.model.CreateRulesetRequestDataType; +import com.datadog.api.client.v2.model.RulesetResp; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + CreateRulesetRequest body = + new CreateRulesetRequest() + .data( + new CreateRulesetRequestData() + .attributes( + new CreateRulesetRequestDataAttributes() + .enabled(true) + .rules( + Collections.singletonList( + new CreateRulesetRequestDataAttributesRulesItems() + .enabled(true) + .mapping(null) + .name("Add Cost Center Tag") + .query( + new CreateRulesetRequestDataAttributesRulesItemsQuery() + .addition( + new CreateRulesetRequestDataAttributesRulesItemsQueryAddition() + .key("cost_center") + .value("engineering")) + .caseInsensitivity(false) + .ifNotExists(true) + .query( + """ +account_id:"123456789" AND service:"web-api" +""")) + .referenceTable(null)))) + .id("New Ruleset") + .type(CreateRulesetRequestDataType.CREATE_RULESET)); + + try { + RulesetResp result = apiInstance.createRuleset(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#createRuleset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.java b/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.java new file mode 100644 index 00000000000..7cbc13e5209 --- /dev/null +++ b/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.java @@ -0,0 +1,22 @@ +// Delete arbitrary cost rule returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + apiInstance.deleteArbitraryCostRule(123456L); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#deleteArbitraryCostRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java b/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java index 3abe7e0cd16..5c303aa34d7 100644 --- a/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java +++ b/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java @@ -1,4 +1,4 @@ -// Delete Cloud Cost Management GCP Usage Cost config returns "No Content" response +// Delete Google Cloud Usage Cost config returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/cloud-cost-management/DeleteRuleset.java b/examples/v2/cloud-cost-management/DeleteRuleset.java new file mode 100644 index 00000000000..e0f32c17ddc --- /dev/null +++ b/examples/v2/cloud-cost-management/DeleteRuleset.java @@ -0,0 +1,22 @@ +// Delete ruleset returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + apiInstance.deleteRuleset("1c5dae14-237d-4b9a-a515-aa55b3939142"); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#deleteRuleset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/GetArbitraryCostRule.java b/examples/v2/cloud-cost-management/GetArbitraryCostRule.java new file mode 100644 index 00000000000..c19bc14117f --- /dev/null +++ b/examples/v2/cloud-cost-management/GetArbitraryCostRule.java @@ -0,0 +1,24 @@ +// Get arbitrary cost rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.ArbitraryRuleResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + ArbitraryRuleResponse result = apiInstance.getArbitraryCostRule(123456L); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getArbitraryCostRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/GetCostAWSCURConfig.java b/examples/v2/cloud-cost-management/GetCostAWSCURConfig.java new file mode 100644 index 00000000000..76f0f356221 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostAWSCURConfig.java @@ -0,0 +1,24 @@ +// Get cost AWS CUR config returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.AwsCurConfigResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + AwsCurConfigResponse result = apiInstance.getCostAWSCURConfig(123456L); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getCostAWSCURConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/GetCostAzureUCConfig.java b/examples/v2/cloud-cost-management/GetCostAzureUCConfig.java new file mode 100644 index 00000000000..cbb36a19003 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostAzureUCConfig.java @@ -0,0 +1,24 @@ +// Get cost Azure UC config returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.UCConfigPair; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + UCConfigPair result = apiInstance.getCostAzureUCConfig(123456L); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getCostAzureUCConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.java b/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.java new file mode 100644 index 00000000000..d5c6b8c4ef4 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.java @@ -0,0 +1,24 @@ +// Get Google Cloud Usage Cost config returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.GcpUcConfigResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + GcpUcConfigResponse result = apiInstance.getCostGCPUsageCostConfig(123456L); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getCostGCPUsageCostConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/GetRuleset.java b/examples/v2/cloud-cost-management/GetRuleset.java new file mode 100644 index 00000000000..90e4a028629 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetRuleset.java @@ -0,0 +1,24 @@ +// Get ruleset returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.RulesetResp; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + RulesetResp result = apiInstance.getRuleset("da0e30e2-615d-4dae-9a22-38cf86a87dde"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getRuleset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/ListArbitraryCostRules.java b/examples/v2/cloud-cost-management/ListArbitraryCostRules.java new file mode 100644 index 00000000000..f112a796cb1 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListArbitraryCostRules.java @@ -0,0 +1,24 @@ +// List arbitrary cost rules returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.ArbitraryRuleResponseArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + ArbitraryRuleResponseArray result = apiInstance.listArbitraryCostRules(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#listArbitraryCostRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.java b/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.java index eab6a6f27b0..99aad8d7e6a 100644 --- a/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.java +++ b/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.java @@ -1,4 +1,4 @@ -// List Cloud Cost Management GCP Usage Cost configs returns "OK" response +// List Google Cloud Usage Cost configs returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/cloud-cost-management/ListRulesets.java b/examples/v2/cloud-cost-management/ListRulesets.java new file mode 100644 index 00000000000..3a22908a4e5 --- /dev/null +++ b/examples/v2/cloud-cost-management/ListRulesets.java @@ -0,0 +1,24 @@ +// List rulesets returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.RulesetRespArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + RulesetRespArray result = apiInstance.listRulesets(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#listRulesets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.java b/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.java new file mode 100644 index 00000000000..5a7430bba9b --- /dev/null +++ b/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.java @@ -0,0 +1,40 @@ +// Reorder arbitrary cost rules returns "Successfully reordered rules" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.ReorderRuleResourceArray; +import com.datadog.api.client.v2.model.ReorderRuleResourceData; +import com.datadog.api.client.v2.model.ReorderRuleResourceDataType; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + ReorderRuleResourceArray body = + new ReorderRuleResourceArray() + .data( + Arrays.asList( + new ReorderRuleResourceData() + .id("456") + .type(ReorderRuleResourceDataType.ARBITRARY_RULE), + new ReorderRuleResourceData() + .id("123") + .type(ReorderRuleResourceDataType.ARBITRARY_RULE), + new ReorderRuleResourceData() + .id("789") + .type(ReorderRuleResourceDataType.ARBITRARY_RULE))); + + try { + apiInstance.reorderArbitraryCostRules(body); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#reorderArbitraryCostRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/ReorderRulesets.java b/examples/v2/cloud-cost-management/ReorderRulesets.java new file mode 100644 index 00000000000..0305c10f340 --- /dev/null +++ b/examples/v2/cloud-cost-management/ReorderRulesets.java @@ -0,0 +1,32 @@ +// Reorder rulesets returns "Successfully reordered rulesets" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.ReorderRulesetResourceArray; +import com.datadog.api.client.v2.model.ReorderRulesetResourceData; +import com.datadog.api.client.v2.model.ReorderRulesetResourceDataType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + ReorderRulesetResourceArray body = + new ReorderRulesetResourceArray() + .data( + Collections.singletonList( + new ReorderRulesetResourceData().type(ReorderRulesetResourceDataType.RULESET))); + + try { + apiInstance.reorderRulesets(body); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#reorderRulesets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.java b/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.java new file mode 100644 index 00000000000..0302db608a6 --- /dev/null +++ b/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.java @@ -0,0 +1,72 @@ +// Update arbitrary cost rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequest; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestData; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributes; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributesStrategy; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequestDataType; +import com.datadog.api.client.v2.model.ArbitraryRuleResponse; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + ArbitraryCostUpsertRequest body = + new ArbitraryCostUpsertRequest() + .data( + new ArbitraryCostUpsertRequestData() + .attributes( + new ArbitraryCostUpsertRequestDataAttributes() + .costsToAllocate( + Arrays.asList( + new ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems() + .condition("is") + .tag("account_id") + .value("123456789"), + new ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems() + .condition("in") + .tag("environment") + .value("") + .values(Arrays.asList("production", "staging")))) + .enabled(true) + .orderId(1L) + .provider(Arrays.asList("aws", "gcp")) + .ruleName("example-arbitrary-cost-rule") + .strategy( + new ArbitraryCostUpsertRequestDataAttributesStrategy() + .allocatedByTagKeys(Arrays.asList("team", "environment")) + .basedOnCosts( + Arrays.asList( + new ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems() + .condition("is") + .tag("service") + .value("web-api"), + new ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems() + .condition("not in") + .tag("team") + .value("") + .values(Arrays.asList("legacy", "deprecated")))) + .granularity("daily") + .method("proportional")) + .type("shared")) + .type(ArbitraryCostUpsertRequestDataType.UPSERT_ARBITRARY_RULE)); + + try { + ArbitraryRuleResponse result = apiInstance.updateArbitraryCostRule(123456L, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#updateArbitraryCostRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java b/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java index 242dc8e16c5..88da5939818 100644 --- a/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java +++ b/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java @@ -1,4 +1,4 @@ -// Update Cloud Cost Management GCP Usage Cost config returns "OK" response +// Update Google Cloud Usage Cost config returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/cloud-cost-management/UpdateRuleset.java b/examples/v2/cloud-cost-management/UpdateRuleset.java new file mode 100644 index 00000000000..10b1d1d3712 --- /dev/null +++ b/examples/v2/cloud-cost-management/UpdateRuleset.java @@ -0,0 +1,55 @@ +// Update ruleset returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.RulesetResp; +import com.datadog.api.client.v2.model.UpdateRulesetRequest; +import com.datadog.api.client.v2.model.UpdateRulesetRequestData; +import com.datadog.api.client.v2.model.UpdateRulesetRequestDataAttributes; +import com.datadog.api.client.v2.model.UpdateRulesetRequestDataAttributesRulesItems; +import com.datadog.api.client.v2.model.UpdateRulesetRequestDataAttributesRulesItemsMapping; +import com.datadog.api.client.v2.model.UpdateRulesetRequestDataType; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + UpdateRulesetRequest body = + new UpdateRulesetRequest() + .data( + new UpdateRulesetRequestData() + .attributes( + new UpdateRulesetRequestDataAttributes() + .enabled(true) + .lastVersion(3601919L) + .rules( + Collections.singletonList( + new UpdateRulesetRequestDataAttributesRulesItems() + .enabled(true) + .mapping( + new UpdateRulesetRequestDataAttributesRulesItemsMapping() + .destinationKey("team_owner") + .ifNotExists(true) + .sourceKeys( + Arrays.asList("account_name", "account_id"))) + .name("Account Name Mapping") + .query(null) + .referenceTable(null)))) + .type(UpdateRulesetRequestDataType.UPDATE_RULESET)); + + try { + RulesetResp result = apiInstance.updateRuleset("1c5dae14-237d-4b9a-a515-aa55b3939142", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#updateRuleset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/ValidateQuery.java b/examples/v2/cloud-cost-management/ValidateQuery.java new file mode 100644 index 00000000000..2e4825a6568 --- /dev/null +++ b/examples/v2/cloud-cost-management/ValidateQuery.java @@ -0,0 +1,37 @@ +// Validate query returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.RulesValidateQueryRequest; +import com.datadog.api.client.v2.model.RulesValidateQueryRequestData; +import com.datadog.api.client.v2.model.RulesValidateQueryRequestDataAttributes; +import com.datadog.api.client.v2.model.RulesValidateQueryRequestDataType; +import com.datadog.api.client.v2.model.RulesValidateQueryResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + RulesValidateQueryRequest body = + new RulesValidateQueryRequest() + .data( + new RulesValidateQueryRequestData() + .attributes( + new RulesValidateQueryRequestDataAttributes() + .query("example:query AND test:true")) + .type(RulesValidateQueryRequestDataType.VALIDATE_QUERY)); + + try { + RulesValidateQueryResponse result = apiInstance.validateQuery(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#validateQuery"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java index 61878d899ad..616af9916a7 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java @@ -4,16 +4,20 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.ArbitraryCostUpsertRequest; +import com.datadog.api.client.v2.model.ArbitraryRuleResponse; +import com.datadog.api.client.v2.model.ArbitraryRuleResponseArray; import com.datadog.api.client.v2.model.AwsCURConfigPatchRequest; import com.datadog.api.client.v2.model.AwsCURConfigPostRequest; -import com.datadog.api.client.v2.model.AwsCURConfigResponse; import com.datadog.api.client.v2.model.AwsCURConfigsResponse; +import com.datadog.api.client.v2.model.AwsCurConfigResponse; import com.datadog.api.client.v2.model.AzureUCConfigPairsResponse; import com.datadog.api.client.v2.model.AzureUCConfigPatchRequest; import com.datadog.api.client.v2.model.AzureUCConfigPostRequest; import com.datadog.api.client.v2.model.AzureUCConfigsResponse; import com.datadog.api.client.v2.model.BudgetArray; import com.datadog.api.client.v2.model.BudgetWithEntries; +import com.datadog.api.client.v2.model.CreateRulesetRequest; import com.datadog.api.client.v2.model.CustomCostsFileGetResponse; import com.datadog.api.client.v2.model.CustomCostsFileLineItem; import com.datadog.api.client.v2.model.CustomCostsFileListResponse; @@ -22,6 +26,15 @@ import com.datadog.api.client.v2.model.GCPUsageCostConfigPostRequest; import com.datadog.api.client.v2.model.GCPUsageCostConfigResponse; import com.datadog.api.client.v2.model.GCPUsageCostConfigsResponse; +import com.datadog.api.client.v2.model.GcpUcConfigResponse; +import com.datadog.api.client.v2.model.ReorderRuleResourceArray; +import com.datadog.api.client.v2.model.ReorderRulesetResourceArray; +import com.datadog.api.client.v2.model.RulesValidateQueryRequest; +import com.datadog.api.client.v2.model.RulesValidateQueryResponse; +import com.datadog.api.client.v2.model.RulesetResp; +import com.datadog.api.client.v2.model.RulesetRespArray; +import com.datadog.api.client.v2.model.UCConfigPair; +import com.datadog.api.client.v2.model.UpdateRulesetRequest; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -61,16 +74,163 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Create arbitrary cost rule. + * + *

See {@link #createArbitraryCostRuleWithHttpInfo}. + * + * @param body (required) + * @return ArbitraryRuleResponse + * @throws ApiException if fails to make API call + */ + public ArbitraryRuleResponse createArbitraryCostRule(ArbitraryCostUpsertRequest body) + throws ApiException { + return createArbitraryCostRuleWithHttpInfo(body).getData(); + } + + /** + * Create arbitrary cost rule. + * + *

See {@link #createArbitraryCostRuleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ArbitraryRuleResponse> + */ + public CompletableFuture createArbitraryCostRuleAsync( + ArbitraryCostUpsertRequest body) { + return createArbitraryCostRuleWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new arbitrary cost rule with the specified filters and allocation strategy. + * + *

Strategy Methods: - PROPORTIONAL/EVEN: Allocates costs + * proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. + * Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, + * evaluate_grouped_by_filters. - PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES: + * Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: + * evaluate_grouped_by_tag_keys. - PERCENT: Allocates fixed percentages to + * specific tags. Requires: allocated_by (array of percentage allocations). + * + *

Filter Conditions: - Use value for single-value + * conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is + * all values", "is untagged" - Use values for multi-value conditions: "in", "not + * in" - Cannot use both value and values simultaneously. + * + *

Supported operators: is, is not, is all values, is untagged, contains, does + * not contain, in, not in, =, !=, like, not like + * + * @param body (required) + * @return ApiResponse<ArbitraryRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse createArbitraryCostRuleWithHttpInfo( + ArbitraryCostUpsertRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createArbitraryCostRule"); + } + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.createArbitraryCostRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create arbitrary cost rule. + * + *

See {@link #createArbitraryCostRuleWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> + */ + public CompletableFuture> + createArbitraryCostRuleWithHttpInfoAsync(ArbitraryCostUpsertRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createArbitraryCostRule")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.createArbitraryCostRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Create Cloud Cost Management AWS CUR config. * *

See {@link #createCostAWSCURConfigWithHttpInfo}. * * @param body (required) - * @return AwsCURConfigResponse + * @return AwsCurConfigResponse * @throws ApiException if fails to make API call */ - public AwsCURConfigResponse createCostAWSCURConfig(AwsCURConfigPostRequest body) + public AwsCurConfigResponse createCostAWSCURConfig(AwsCURConfigPostRequest body) throws ApiException { return createCostAWSCURConfigWithHttpInfo(body).getData(); } @@ -81,9 +241,9 @@ public AwsCURConfigResponse createCostAWSCURConfig(AwsCURConfigPostRequest body) *

See {@link #createCostAWSCURConfigWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<AwsCURConfigResponse> + * @return CompletableFuture<AwsCurConfigResponse> */ - public CompletableFuture createCostAWSCURConfigAsync( + public CompletableFuture createCostAWSCURConfigAsync( AwsCURConfigPostRequest body) { return createCostAWSCURConfigWithHttpInfoAsync(body) .thenApply( @@ -96,7 +256,7 @@ public CompletableFuture createCostAWSCURConfigAsync( * Create a Cloud Cost Management account for an AWS CUR config. * * @param body (required) - * @return ApiResponse<AwsCURConfigResponse> + * @return ApiResponse<AwsCurConfigResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -108,7 +268,7 @@ public CompletableFuture createCostAWSCURConfigAsync( * *
429 Too many requests -
*/ - public ApiResponse createCostAWSCURConfigWithHttpInfo( + public ApiResponse createCostAWSCURConfigWithHttpInfo( AwsCURConfigPostRequest body) throws ApiException { Object localVarPostBody = body; @@ -139,7 +299,7 @@ public ApiResponse createCostAWSCURConfigWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -148,15 +308,15 @@ public ApiResponse createCostAWSCURConfigWithHttpInfo( *

See {@link #createCostAWSCURConfigWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<AwsCURConfigResponse>> + * @return CompletableFuture<ApiResponse<AwsCurConfigResponse>> */ - public CompletableFuture> + public CompletableFuture> createCostAWSCURConfigWithHttpInfoAsync(AwsCURConfigPostRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling createCostAWSCURConfig")); @@ -179,7 +339,7 @@ public ApiResponse createCostAWSCURConfigWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -191,7 +351,7 @@ public ApiResponse createCostAWSCURConfigWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -328,7 +488,7 @@ public ApiResponse createCostAzureUCConfigsWithHttpI } /** - * Create Cloud Cost Management GCP Usage Cost config. + * Create Google Cloud Usage Cost config. * *

See {@link #createCostGCPUsageCostConfigWithHttpInfo}. * @@ -342,7 +502,7 @@ public GCPUsageCostConfigResponse createCostGCPUsageCostConfig(GCPUsageCostConfi } /** - * Create Cloud Cost Management GCP Usage Cost config. + * Create Google Cloud Usage Cost config. * *

See {@link #createCostGCPUsageCostConfigWithHttpInfoAsync}. * @@ -359,7 +519,7 @@ public CompletableFuture createCostGCPUsageCostConfi } /** - * Create a Cloud Cost Management account for an GCP Usage Cost config. + * Create a Cloud Cost Management account for an Google Cloud Usage Cost config. * * @param body (required) * @return ApiResponse<GCPUsageCostConfigResponse> @@ -409,7 +569,7 @@ public ApiResponse createCostGCPUsageCostConfigWithH } /** - * Create Cloud Cost Management GCP Usage Cost config. + * Create Google Cloud Usage Cost config. * *

See {@link #createCostGCPUsageCostConfigWithHttpInfo}. * @@ -462,27 +622,28 @@ public ApiResponse createCostGCPUsageCostConfigWithH } /** - * Delete a budget. + * Create ruleset. * - *

See {@link #deleteBudgetWithHttpInfo}. + *

See {@link #createRulesetWithHttpInfo}. * - * @param budgetId Budget id. (required) + * @param body (required) + * @return RulesetResp * @throws ApiException if fails to make API call */ - public void deleteBudget(String budgetId) throws ApiException { - deleteBudgetWithHttpInfo(budgetId); + public RulesetResp createRuleset(CreateRulesetRequest body) throws ApiException { + return createRulesetWithHttpInfo(body).getData(); } /** - * Delete a budget. + * Create ruleset. * - *

See {@link #deleteBudgetWithHttpInfoAsync}. + *

See {@link #createRulesetWithHttpInfoAsync}. * - * @param budgetId Budget id. (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<RulesetResp> */ - public CompletableFuture deleteBudgetAsync(String budgetId) { - return deleteBudgetWithHttpInfoAsync(budgetId) + public CompletableFuture createRulesetAsync(CreateRulesetRequest body) { + return createRulesetWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -490,78 +651,75 @@ public CompletableFuture deleteBudgetAsync(String budgetId) { } /** - * Delete a budget. + * Create a new tag pipeline ruleset with the specified rules and configuration * - * @param budgetId Budget id. (required) - * @return ApiResponse<Void> + * @param body (required) + * @return ApiResponse<RulesetResp> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteBudgetWithHttpInfo(String budgetId) throws ApiException { - Object localVarPostBody = null; + public ApiResponse createRulesetWithHttpInfo(CreateRulesetRequest body) + throws ApiException { + Object localVarPostBody = body; - // verify the required parameter 'budgetId' is set - if (budgetId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'budgetId' when calling deleteBudget"); + 400, "Missing the required parameter 'body' when calling createRuleset"); } // create path and map variables - String localVarPath = - "/api/v2/cost/budget/{budget_id}" - .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); + String localVarPath = "/api/v2/tags/enrichment"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteBudget", + "v2.CloudCostManagementApi.createRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete a budget. + * Create ruleset. * - *

See {@link #deleteBudgetWithHttpInfo}. + *

See {@link #createRulesetWithHttpInfo}. * - * @param budgetId Budget id. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<RulesetResp>> */ - public CompletableFuture> deleteBudgetWithHttpInfoAsync(String budgetId) { - Object localVarPostBody = null; + public CompletableFuture> createRulesetWithHttpInfoAsync( + CreateRulesetRequest body) { + Object localVarPostBody = body; - // verify the required parameter 'budgetId' is set - if (budgetId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'budgetId' when calling deleteBudget")); + 400, "Missing the required parameter 'body' when calling createRuleset")); return result; } // create path and map variables - String localVarPath = - "/api/v2/cost/budget/{budget_id}" - .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); + String localVarPath = "/api/v2/tags/enrichment"; Map localVarHeaderParams = new HashMap(); @@ -569,51 +727,51 @@ public CompletableFuture> deleteBudgetWithHttpInfoAsync(String try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteBudget", + "v2.CloudCostManagementApi.createRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete Cloud Cost Management AWS CUR config. + * Delete arbitrary cost rule. * - *

See {@link #deleteCostAWSCURConfigWithHttpInfo}. + *

See {@link #deleteArbitraryCostRuleWithHttpInfo}. * - * @param cloudAccountId Cloud Account id. (required) + * @param ruleId The unique identifier of the arbitrary cost rule (required) * @throws ApiException if fails to make API call */ - public void deleteCostAWSCURConfig(Long cloudAccountId) throws ApiException { - deleteCostAWSCURConfigWithHttpInfo(cloudAccountId); + public void deleteArbitraryCostRule(Long ruleId) throws ApiException { + deleteArbitraryCostRuleWithHttpInfo(ruleId); } /** - * Delete Cloud Cost Management AWS CUR config. + * Delete arbitrary cost rule. * - *

See {@link #deleteCostAWSCURConfigWithHttpInfoAsync}. + *

See {@link #deleteArbitraryCostRuleWithHttpInfoAsync}. * - * @param cloudAccountId Cloud Account id. (required) + * @param ruleId The unique identifier of the arbitrary cost rule (required) * @return CompletableFuture */ - public CompletableFuture deleteCostAWSCURConfigAsync(Long cloudAccountId) { - return deleteCostAWSCURConfigWithHttpInfoAsync(cloudAccountId) + public CompletableFuture deleteArbitraryCostRuleAsync(Long ruleId) { + return deleteArbitraryCostRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -621,9 +779,9 @@ public CompletableFuture deleteCostAWSCURConfigAsync(Long cloudAccountId) } /** - * Archive a Cloud Cost Management Account. + * Delete an arbitrary cost rule - Delete an existing arbitrary cost rule by its ID * - * @param cloudAccountId Cloud Account id. (required) + * @param ruleId The unique identifier of the arbitrary cost rule (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -631,33 +789,27 @@ public CompletableFuture deleteCostAWSCURConfigAsync(Long cloudAccountId) * Response details * Status Code Description Response Headers * 204 No Content - - * 400 Bad Request - - * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse deleteCostAWSCURConfigWithHttpInfo(Long cloudAccountId) - throws ApiException { + public ApiResponse deleteArbitraryCostRuleWithHttpInfo(Long ruleId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'cloudAccountId' is set - if (cloudAccountId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, - "Missing the required parameter 'cloudAccountId' when calling deleteCostAWSCURConfig"); + 400, "Missing the required parameter 'ruleId' when calling deleteArbitraryCostRule"); } // create path and map variables String localVarPath = - "/api/v2/cost/aws_cur_config/{cloud_account_id}" - .replaceAll( - "\\{" + "cloud_account_id" + "\\}", - apiClient.escapeString(cloudAccountId.toString())); + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCostAWSCURConfig", + "v2.CloudCostManagementApi.deleteArbitraryCostRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -676,33 +828,29 @@ public ApiResponse deleteCostAWSCURConfigWithHttpInfo(Long cloudAccountId) } /** - * Delete Cloud Cost Management AWS CUR config. + * Delete arbitrary cost rule. * - *

See {@link #deleteCostAWSCURConfigWithHttpInfo}. + *

See {@link #deleteArbitraryCostRuleWithHttpInfo}. * - * @param cloudAccountId Cloud Account id. (required) + * @param ruleId The unique identifier of the arbitrary cost rule (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCostAWSCURConfigWithHttpInfoAsync( - Long cloudAccountId) { + public CompletableFuture> deleteArbitraryCostRuleWithHttpInfoAsync( + Long ruleId) { Object localVarPostBody = null; - // verify the required parameter 'cloudAccountId' is set - if (cloudAccountId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'cloudAccountId' when calling" - + " deleteCostAWSCURConfig")); + 400, "Missing the required parameter 'ruleId' when calling deleteArbitraryCostRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/cost/aws_cur_config/{cloud_account_id}" - .replaceAll( - "\\{" + "cloud_account_id" + "\\}", - apiClient.escapeString(cloudAccountId.toString())); + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -710,7 +858,7 @@ public CompletableFuture> deleteCostAWSCURConfigWithHttpInfoAs try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCostAWSCURConfig", + "v2.CloudCostManagementApi.deleteArbitraryCostRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -734,27 +882,27 @@ public CompletableFuture> deleteCostAWSCURConfigWithHttpInfoAs } /** - * Delete Cloud Cost Management Azure config. + * Delete a budget. * - *

See {@link #deleteCostAzureUCConfigWithHttpInfo}. + *

See {@link #deleteBudgetWithHttpInfo}. * - * @param cloudAccountId Cloud Account id. (required) + * @param budgetId Budget id. (required) * @throws ApiException if fails to make API call */ - public void deleteCostAzureUCConfig(Long cloudAccountId) throws ApiException { - deleteCostAzureUCConfigWithHttpInfo(cloudAccountId); + public void deleteBudget(String budgetId) throws ApiException { + deleteBudgetWithHttpInfo(budgetId); } /** - * Delete Cloud Cost Management Azure config. + * Delete a budget. * - *

See {@link #deleteCostAzureUCConfigWithHttpInfoAsync}. + *

See {@link #deleteBudgetWithHttpInfoAsync}. * - * @param cloudAccountId Cloud Account id. (required) + * @param budgetId Budget id. (required) * @return CompletableFuture */ - public CompletableFuture deleteCostAzureUCConfigAsync(Long cloudAccountId) { - return deleteCostAzureUCConfigWithHttpInfoAsync(cloudAccountId) + public CompletableFuture deleteBudgetAsync(String budgetId) { + return deleteBudgetWithHttpInfoAsync(budgetId) .thenApply( response -> { return response.getData(); @@ -762,9 +910,9 @@ public CompletableFuture deleteCostAzureUCConfigAsync(Long cloudAccountId) } /** - * Archive a Cloud Cost Management Account. + * Delete a budget. * - * @param cloudAccountId Cloud Account id. (required) + * @param budgetId Budget id. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -773,32 +921,27 @@ public CompletableFuture deleteCostAzureUCConfigAsync(Long cloudAccountId) * Status Code Description Response Headers * 204 No Content - * 400 Bad Request - - * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse deleteCostAzureUCConfigWithHttpInfo(Long cloudAccountId) - throws ApiException { + public ApiResponse deleteBudgetWithHttpInfo(String budgetId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'cloudAccountId' is set - if (cloudAccountId == null) { + // verify the required parameter 'budgetId' is set + if (budgetId == null) { throw new ApiException( - 400, - "Missing the required parameter 'cloudAccountId' when calling deleteCostAzureUCConfig"); + 400, "Missing the required parameter 'budgetId' when calling deleteBudget"); } // create path and map variables String localVarPath = - "/api/v2/cost/azure_uc_config/{cloud_account_id}" - .replaceAll( - "\\{" + "cloud_account_id" + "\\}", - apiClient.escapeString(cloudAccountId.toString())); + "/api/v2/cost/budget/{budget_id}" + .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCostAzureUCConfig", + "v2.CloudCostManagementApi.deleteBudget", localVarPath, new ArrayList(), localVarHeaderParams, @@ -817,33 +960,28 @@ public ApiResponse deleteCostAzureUCConfigWithHttpInfo(Long cloudAccountId } /** - * Delete Cloud Cost Management Azure config. + * Delete a budget. * - *

See {@link #deleteCostAzureUCConfigWithHttpInfo}. + *

See {@link #deleteBudgetWithHttpInfo}. * - * @param cloudAccountId Cloud Account id. (required) + * @param budgetId Budget id. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCostAzureUCConfigWithHttpInfoAsync( - Long cloudAccountId) { + public CompletableFuture> deleteBudgetWithHttpInfoAsync(String budgetId) { Object localVarPostBody = null; - // verify the required parameter 'cloudAccountId' is set - if (cloudAccountId == null) { + // verify the required parameter 'budgetId' is set + if (budgetId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'cloudAccountId' when calling" - + " deleteCostAzureUCConfig")); + 400, "Missing the required parameter 'budgetId' when calling deleteBudget")); return result; } // create path and map variables String localVarPath = - "/api/v2/cost/azure_uc_config/{cloud_account_id}" - .replaceAll( - "\\{" + "cloud_account_id" + "\\}", - apiClient.escapeString(cloudAccountId.toString())); + "/api/v2/cost/budget/{budget_id}" + .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -851,7 +989,7 @@ public CompletableFuture> deleteCostAzureUCConfigWithHttpInfoA try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCostAzureUCConfig", + "v2.CloudCostManagementApi.deleteBudget", localVarPath, new ArrayList(), localVarHeaderParams, @@ -875,27 +1013,27 @@ public CompletableFuture> deleteCostAzureUCConfigWithHttpInfoA } /** - * Delete Cloud Cost Management GCP Usage Cost config. + * Delete Cloud Cost Management AWS CUR config. * - *

See {@link #deleteCostGCPUsageCostConfigWithHttpInfo}. + *

See {@link #deleteCostAWSCURConfigWithHttpInfo}. * * @param cloudAccountId Cloud Account id. (required) * @throws ApiException if fails to make API call */ - public void deleteCostGCPUsageCostConfig(Long cloudAccountId) throws ApiException { - deleteCostGCPUsageCostConfigWithHttpInfo(cloudAccountId); + public void deleteCostAWSCURConfig(Long cloudAccountId) throws ApiException { + deleteCostAWSCURConfigWithHttpInfo(cloudAccountId); } /** - * Delete Cloud Cost Management GCP Usage Cost config. + * Delete Cloud Cost Management AWS CUR config. * - *

See {@link #deleteCostGCPUsageCostConfigWithHttpInfoAsync}. + *

See {@link #deleteCostAWSCURConfigWithHttpInfoAsync}. * * @param cloudAccountId Cloud Account id. (required) * @return CompletableFuture */ - public CompletableFuture deleteCostGCPUsageCostConfigAsync(Long cloudAccountId) { - return deleteCostGCPUsageCostConfigWithHttpInfoAsync(cloudAccountId) + public CompletableFuture deleteCostAWSCURConfigAsync(Long cloudAccountId) { + return deleteCostAWSCURConfigWithHttpInfoAsync(cloudAccountId) .thenApply( response -> { return response.getData(); @@ -903,7 +1041,7 @@ public CompletableFuture deleteCostGCPUsageCostConfigAsync(Long cloudAccou } /** - * Archive a Cloud Cost Management account. + * Archive a Cloud Cost Management Account. * * @param cloudAccountId Cloud Account id. (required) * @return ApiResponse<Void> @@ -918,7 +1056,7 @@ public CompletableFuture deleteCostGCPUsageCostConfigAsync(Long cloudAccou * 429 Too many requests - * */ - public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(Long cloudAccountId) + public ApiResponse deleteCostAWSCURConfigWithHttpInfo(Long cloudAccountId) throws ApiException { Object localVarPostBody = null; @@ -926,12 +1064,11 @@ public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(Long cloudAcco if (cloudAccountId == null) { throw new ApiException( 400, - "Missing the required parameter 'cloudAccountId' when calling" - + " deleteCostGCPUsageCostConfig"); + "Missing the required parameter 'cloudAccountId' when calling deleteCostAWSCURConfig"); } // create path and map variables String localVarPath = - "/api/v2/cost/gcp_uc_config/{cloud_account_id}" + "/api/v2/cost/aws_cur_config/{cloud_account_id}" .replaceAll( "\\{" + "cloud_account_id" + "\\}", apiClient.escapeString(cloudAccountId.toString())); @@ -940,7 +1077,7 @@ public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(Long cloudAcco Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCostGCPUsageCostConfig", + "v2.CloudCostManagementApi.deleteCostAWSCURConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -959,14 +1096,14 @@ public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(Long cloudAcco } /** - * Delete Cloud Cost Management GCP Usage Cost config. + * Delete Cloud Cost Management AWS CUR config. * - *

See {@link #deleteCostGCPUsageCostConfigWithHttpInfo}. + *

See {@link #deleteCostAWSCURConfigWithHttpInfo}. * * @param cloudAccountId Cloud Account id. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCostGCPUsageCostConfigWithHttpInfoAsync( + public CompletableFuture> deleteCostAWSCURConfigWithHttpInfoAsync( Long cloudAccountId) { Object localVarPostBody = null; @@ -977,12 +1114,12 @@ public CompletableFuture> deleteCostGCPUsageCostConfigWithHttp new ApiException( 400, "Missing the required parameter 'cloudAccountId' when calling" - + " deleteCostGCPUsageCostConfig")); + + " deleteCostAWSCURConfig")); return result; } // create path and map variables String localVarPath = - "/api/v2/cost/gcp_uc_config/{cloud_account_id}" + "/api/v2/cost/aws_cur_config/{cloud_account_id}" .replaceAll( "\\{" + "cloud_account_id" + "\\}", apiClient.escapeString(cloudAccountId.toString())); @@ -993,7 +1130,7 @@ public CompletableFuture> deleteCostGCPUsageCostConfigWithHttp try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCostGCPUsageCostConfig", + "v2.CloudCostManagementApi.deleteCostAWSCURConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1017,27 +1154,27 @@ public CompletableFuture> deleteCostGCPUsageCostConfigWithHttp } /** - * Delete Custom Costs file. + * Delete Cloud Cost Management Azure config. * - *

See {@link #deleteCustomCostsFileWithHttpInfo}. + *

See {@link #deleteCostAzureUCConfigWithHttpInfo}. * - * @param fileId File ID. (required) + * @param cloudAccountId Cloud Account id. (required) * @throws ApiException if fails to make API call */ - public void deleteCustomCostsFile(String fileId) throws ApiException { - deleteCustomCostsFileWithHttpInfo(fileId); + public void deleteCostAzureUCConfig(Long cloudAccountId) throws ApiException { + deleteCostAzureUCConfigWithHttpInfo(cloudAccountId); } /** - * Delete Custom Costs file. + * Delete Cloud Cost Management Azure config. * - *

See {@link #deleteCustomCostsFileWithHttpInfoAsync}. + *

See {@link #deleteCostAzureUCConfigWithHttpInfoAsync}. * - * @param fileId File ID. (required) + * @param cloudAccountId Cloud Account id. (required) * @return CompletableFuture */ - public CompletableFuture deleteCustomCostsFileAsync(String fileId) { - return deleteCustomCostsFileWithHttpInfoAsync(fileId) + public CompletableFuture deleteCostAzureUCConfigAsync(Long cloudAccountId) { + return deleteCostAzureUCConfigWithHttpInfoAsync(cloudAccountId) .thenApply( response -> { return response.getData(); @@ -1045,9 +1182,9 @@ public CompletableFuture deleteCustomCostsFileAsync(String fileId) { } /** - * Delete the specified Custom Costs file. + * Archive a Cloud Cost Management Account. * - * @param fileId File ID. (required) + * @param cloudAccountId Cloud Account id. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -1055,29 +1192,33 @@ public CompletableFuture deleteCustomCostsFileAsync(String fileId) { * Response details * Status Code Description Response Headers * 204 No Content - - * 403 Forbidden - + * 400 Bad Request - * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse deleteCustomCostsFileWithHttpInfo(String fileId) throws ApiException { + public ApiResponse deleteCostAzureUCConfigWithHttpInfo(Long cloudAccountId) + throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'fileId' is set - if (fileId == null) { + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { throw new ApiException( - 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile"); + 400, + "Missing the required parameter 'cloudAccountId' when calling deleteCostAzureUCConfig"); } // create path and map variables String localVarPath = - "/api/v2/cost/custom_costs/{file_id}" - .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); + "/api/v2/cost/azure_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCustomCostsFile", + "v2.CloudCostManagementApi.deleteCostAzureUCConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1096,29 +1237,33 @@ public ApiResponse deleteCustomCostsFileWithHttpInfo(String fileId) throws } /** - * Delete Custom Costs file. + * Delete Cloud Cost Management Azure config. * - *

See {@link #deleteCustomCostsFileWithHttpInfo}. + *

See {@link #deleteCostAzureUCConfigWithHttpInfo}. * - * @param fileId File ID. (required) + * @param cloudAccountId Cloud Account id. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsync( - String fileId) { + public CompletableFuture> deleteCostAzureUCConfigWithHttpInfoAsync( + Long cloudAccountId) { Object localVarPostBody = null; - // verify the required parameter 'fileId' is set - if (fileId == null) { + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile")); + 400, + "Missing the required parameter 'cloudAccountId' when calling" + + " deleteCostAzureUCConfig")); return result; } // create path and map variables String localVarPath = - "/api/v2/cost/custom_costs/{file_id}" - .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); + "/api/v2/cost/azure_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1126,7 +1271,7 @@ public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsy try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCustomCostsFile", + "v2.CloudCostManagementApi.deleteCostAzureUCConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1150,28 +1295,27 @@ public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsy } /** - * Get a budget. + * Delete Google Cloud Usage Cost config. * - *

See {@link #getBudgetWithHttpInfo}. + *

See {@link #deleteCostGCPUsageCostConfigWithHttpInfo}. * - * @param budgetId Budget id. (required) - * @return BudgetWithEntries + * @param cloudAccountId Cloud Account id. (required) * @throws ApiException if fails to make API call */ - public BudgetWithEntries getBudget(String budgetId) throws ApiException { - return getBudgetWithHttpInfo(budgetId).getData(); + public void deleteCostGCPUsageCostConfig(Long cloudAccountId) throws ApiException { + deleteCostGCPUsageCostConfigWithHttpInfo(cloudAccountId); } /** - * Get a budget. + * Delete Google Cloud Usage Cost config. * - *

See {@link #getBudgetWithHttpInfoAsync}. + *

See {@link #deleteCostGCPUsageCostConfigWithHttpInfoAsync}. * - * @param budgetId Budget id. (required) - * @return CompletableFuture<BudgetWithEntries> + * @param cloudAccountId Cloud Account id. (required) + * @return CompletableFuture */ - public CompletableFuture getBudgetAsync(String budgetId) { - return getBudgetWithHttpInfoAsync(budgetId) + public CompletableFuture deleteCostGCPUsageCostConfigAsync(Long cloudAccountId) { + return deleteCostGCPUsageCostConfigWithHttpInfoAsync(cloudAccountId) .thenApply( response -> { return response.getData(); @@ -1179,80 +1323,89 @@ public CompletableFuture getBudgetAsync(String budgetId) { } /** - * Get a budget. + * Archive a Cloud Cost Management account. * - * @param budgetId Budget id. (required) - * @return ApiResponse<BudgetWithEntries> + * @param cloudAccountId Cloud Account id. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
400 Bad Request -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getBudgetWithHttpInfo(String budgetId) throws ApiException { + public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(Long cloudAccountId) + throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'budgetId' is set - if (budgetId == null) { + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { throw new ApiException( - 400, "Missing the required parameter 'budgetId' when calling getBudget"); + 400, + "Missing the required parameter 'cloudAccountId' when calling" + + " deleteCostGCPUsageCostConfig"); } // create path and map variables String localVarPath = - "/api/v2/cost/budget/{budget_id}" - .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); + "/api/v2/cost/gcp_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getBudget", + "v2.CloudCostManagementApi.deleteCostGCPUsageCostConfig", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get a budget. + * Delete Google Cloud Usage Cost config. * - *

See {@link #getBudgetWithHttpInfo}. + *

See {@link #deleteCostGCPUsageCostConfigWithHttpInfo}. * - * @param budgetId Budget id. (required) - * @return CompletableFuture<ApiResponse<BudgetWithEntries>> + * @param cloudAccountId Cloud Account id. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> getBudgetWithHttpInfoAsync( - String budgetId) { + public CompletableFuture> deleteCostGCPUsageCostConfigWithHttpInfoAsync( + Long cloudAccountId) { Object localVarPostBody = null; - // verify the required parameter 'budgetId' is set - if (budgetId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'budgetId' when calling getBudget")); + 400, + "Missing the required parameter 'cloudAccountId' when calling" + + " deleteCostGCPUsageCostConfig")); return result; } // create path and map variables String localVarPath = - "/api/v2/cost/budget/{budget_id}" - .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); + "/api/v2/cost/gcp_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1260,52 +1413,51 @@ public CompletableFuture> getBudgetWithHttpInfoAs try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getBudget", + "v2.CloudCostManagementApi.deleteCostGCPUsageCostConfig", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get Custom Costs file. + * Delete Custom Costs file. * - *

See {@link #getCustomCostsFileWithHttpInfo}. + *

See {@link #deleteCustomCostsFileWithHttpInfo}. * * @param fileId File ID. (required) - * @return CustomCostsFileGetResponse * @throws ApiException if fails to make API call */ - public CustomCostsFileGetResponse getCustomCostsFile(String fileId) throws ApiException { - return getCustomCostsFileWithHttpInfo(fileId).getData(); + public void deleteCustomCostsFile(String fileId) throws ApiException { + deleteCustomCostsFileWithHttpInfo(fileId); } /** - * Get Custom Costs file. + * Delete Custom Costs file. * - *

See {@link #getCustomCostsFileWithHttpInfoAsync}. + *

See {@link #deleteCustomCostsFileWithHttpInfoAsync}. * * @param fileId File ID. (required) - * @return CompletableFuture<CustomCostsFileGetResponse> + * @return CompletableFuture */ - public CompletableFuture getCustomCostsFileAsync(String fileId) { - return getCustomCostsFileWithHttpInfoAsync(fileId) + public CompletableFuture deleteCustomCostsFileAsync(String fileId) { + return deleteCustomCostsFileWithHttpInfoAsync(fileId) .thenApply( response -> { return response.getData(); @@ -1313,29 +1465,28 @@ public CompletableFuture getCustomCostsFileAsync(Str } /** - * Fetch the specified Custom Costs file. + * Delete the specified Custom Costs file. * * @param fileId File ID. (required) - * @return ApiResponse<CustomCostsFileGetResponse> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getCustomCostsFileWithHttpInfo(String fileId) - throws ApiException { + public ApiResponse deleteCustomCostsFileWithHttpInfo(String fileId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'fileId' is set if (fileId == null) { throw new ApiException( - 400, "Missing the required parameter 'fileId' when calling getCustomCostsFile"); + 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile"); } // create path and map variables String localVarPath = @@ -1346,42 +1497,42 @@ public ApiResponse getCustomCostsFileWithHttpInfo(St Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getCustomCostsFile", + "v2.CloudCostManagementApi.deleteCustomCostsFile", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get Custom Costs file. + * Delete Custom Costs file. * - *

See {@link #getCustomCostsFileWithHttpInfo}. + *

See {@link #deleteCustomCostsFileWithHttpInfo}. * * @param fileId File ID. (required) - * @return CompletableFuture<ApiResponse<CustomCostsFileGetResponse>> + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getCustomCostsFileWithHttpInfoAsync(String fileId) { + public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsync( + String fileId) { Object localVarPostBody = null; // verify the required parameter 'fileId' is set if (fileId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'fileId' when calling getCustomCostsFile")); + 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile")); return result; } // create path and map variables @@ -1395,50 +1546,51 @@ public ApiResponse getCustomCostsFileWithHttpInfo(St try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getCustomCostsFile", + "v2.CloudCostManagementApi.deleteCustomCostsFile", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List budgets. + * Delete ruleset. * - *

See {@link #listBudgetsWithHttpInfo}. + *

See {@link #deleteRulesetWithHttpInfo}. * - * @return BudgetArray + * @param rulesetId The unique identifier of the ruleset (required) * @throws ApiException if fails to make API call */ - public BudgetArray listBudgets() throws ApiException { - return listBudgetsWithHttpInfo().getData(); + public void deleteRuleset(String rulesetId) throws ApiException { + deleteRulesetWithHttpInfo(rulesetId); } /** - * List budgets. + * Delete ruleset. * - *

See {@link #listBudgetsWithHttpInfoAsync}. + *

See {@link #deleteRulesetWithHttpInfoAsync}. * - * @return CompletableFuture<BudgetArray> + * @param rulesetId The unique identifier of the ruleset (required) + * @return CompletableFuture */ - public CompletableFuture listBudgetsAsync() { - return listBudgetsWithHttpInfoAsync() + public CompletableFuture deleteRulesetAsync(String rulesetId) { + return deleteRulesetWithHttpInfoAsync(rulesetId) .thenApply( response -> { return response.getData(); @@ -1446,56 +1598,77 @@ public CompletableFuture listBudgetsAsync() { } /** - * List budgets. + * Delete a tag pipeline ruleset - Delete an existing tag pipeline ruleset by its ID * - * @return ApiResponse<BudgetArray> + * @param rulesetId The unique identifier of the ruleset (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
429 Too many requests -
*/ - public ApiResponse listBudgetsWithHttpInfo() throws ApiException { + public ApiResponse deleteRulesetWithHttpInfo(String rulesetId) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'rulesetId' when calling deleteRuleset"); + } // create path and map variables - String localVarPath = "/api/v2/cost/budgets"; + String localVarPath = + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listBudgets", + "v2.CloudCostManagementApi.deleteRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List budgets. + * Delete ruleset. * - *

See {@link #listBudgetsWithHttpInfo}. + *

See {@link #deleteRulesetWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<BudgetArray>> + * @param rulesetId The unique identifier of the ruleset (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> listBudgetsWithHttpInfoAsync() { + public CompletableFuture> deleteRulesetWithHttpInfoAsync(String rulesetId) { Object localVarPostBody = null; + + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'rulesetId' when calling deleteRuleset")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/cost/budgets"; + String localVarPath = + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1503,50 +1676,52 @@ public CompletableFuture> listBudgetsWithHttpInfoAsync( try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listBudgets", + "v2.CloudCostManagementApi.deleteRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List Cloud Cost Management AWS CUR configs. + * Get arbitrary cost rule. * - *

See {@link #listCostAWSCURConfigsWithHttpInfo}. + *

See {@link #getArbitraryCostRuleWithHttpInfo}. * - * @return AwsCURConfigsResponse + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @return ArbitraryRuleResponse * @throws ApiException if fails to make API call */ - public AwsCURConfigsResponse listCostAWSCURConfigs() throws ApiException { - return listCostAWSCURConfigsWithHttpInfo().getData(); + public ArbitraryRuleResponse getArbitraryCostRule(Long ruleId) throws ApiException { + return getArbitraryCostRuleWithHttpInfo(ruleId).getData(); } /** - * List Cloud Cost Management AWS CUR configs. + * Get arbitrary cost rule. * - *

See {@link #listCostAWSCURConfigsWithHttpInfoAsync}. + *

See {@link #getArbitraryCostRuleWithHttpInfoAsync}. * - * @return CompletableFuture<AwsCURConfigsResponse> + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @return CompletableFuture<ArbitraryRuleResponse> */ - public CompletableFuture listCostAWSCURConfigsAsync() { - return listCostAWSCURConfigsWithHttpInfoAsync() + public CompletableFuture getArbitraryCostRuleAsync(Long ruleId) { + return getArbitraryCostRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -1554,30 +1729,38 @@ public CompletableFuture listCostAWSCURConfigsAsync() { } /** - * List the AWS CUR configs. + * Get a specific arbitrary cost rule - Retrieve a specific arbitrary cost rule by its ID * - * @return ApiResponse<AwsCURConfigsResponse> + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @return ApiResponse<ArbitraryRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listCostAWSCURConfigsWithHttpInfo() + public ApiResponse getArbitraryCostRuleWithHttpInfo(Long ruleId) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'ruleId' when calling getArbitraryCostRule"); + } // create path and map variables - String localVarPath = "/api/v2/cost/aws_cur_config"; + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAWSCURConfigs", + "v2.CloudCostManagementApi.getArbitraryCostRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1592,21 +1775,33 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management AWS CUR configs. + * Get arbitrary cost rule. * - *

See {@link #listCostAWSCURConfigsWithHttpInfo}. + *

See {@link #getArbitraryCostRuleWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<AwsCURConfigsResponse>> + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> */ - public CompletableFuture> - listCostAWSCURConfigsWithHttpInfoAsync() { + public CompletableFuture> + getArbitraryCostRuleWithHttpInfoAsync(Long ruleId) { Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'ruleId' when calling getArbitraryCostRule")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/cost/aws_cur_config"; + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1614,7 +1809,7 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAWSCURConfigs", + "v2.CloudCostManagementApi.getArbitraryCostRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1622,7 +1817,7 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1634,30 +1829,32 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management Azure configs. + * Get a budget. * - *

See {@link #listCostAzureUCConfigsWithHttpInfo}. + *

See {@link #getBudgetWithHttpInfo}. * - * @return AzureUCConfigsResponse + * @param budgetId Budget id. (required) + * @return BudgetWithEntries * @throws ApiException if fails to make API call */ - public AzureUCConfigsResponse listCostAzureUCConfigs() throws ApiException { - return listCostAzureUCConfigsWithHttpInfo().getData(); + public BudgetWithEntries getBudget(String budgetId) throws ApiException { + return getBudgetWithHttpInfo(budgetId).getData(); } /** - * List Cloud Cost Management Azure configs. + * Get a budget. * - *

See {@link #listCostAzureUCConfigsWithHttpInfoAsync}. + *

See {@link #getBudgetWithHttpInfoAsync}. * - * @return CompletableFuture<AzureUCConfigsResponse> + * @param budgetId Budget id. (required) + * @return CompletableFuture<BudgetWithEntries> */ - public CompletableFuture listCostAzureUCConfigsAsync() { - return listCostAzureUCConfigsWithHttpInfoAsync() + public CompletableFuture getBudgetAsync(String budgetId) { + return getBudgetWithHttpInfoAsync(budgetId) .thenApply( response -> { return response.getData(); @@ -1665,30 +1862,39 @@ public CompletableFuture listCostAzureUCConfigsAsync() { } /** - * List the Azure configs. + * Get a budget. * - * @return ApiResponse<AzureUCConfigsResponse> + * @param budgetId Budget id. (required) + * @return ApiResponse<BudgetWithEntries> * @throws ApiException if fails to make API call * @http.response.details * * * * - * + * + * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
400 Bad Request -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listCostAzureUCConfigsWithHttpInfo() - throws ApiException { + public ApiResponse getBudgetWithHttpInfo(String budgetId) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'budgetId' is set + if (budgetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'budgetId' when calling getBudget"); + } // create path and map variables - String localVarPath = "/api/v2/cost/azure_uc_config"; + String localVarPath = + "/api/v2/cost/budget/{budget_id}" + .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAzureUCConfigs", + "v2.CloudCostManagementApi.getBudget", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1703,21 +1909,33 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management Azure configs. + * Get a budget. * - *

See {@link #listCostAzureUCConfigsWithHttpInfo}. + *

See {@link #getBudgetWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<AzureUCConfigsResponse>> + * @param budgetId Budget id. (required) + * @return CompletableFuture<ApiResponse<BudgetWithEntries>> */ - public CompletableFuture> - listCostAzureUCConfigsWithHttpInfoAsync() { + public CompletableFuture> getBudgetWithHttpInfoAsync( + String budgetId) { Object localVarPostBody = null; + + // verify the required parameter 'budgetId' is set + if (budgetId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'budgetId' when calling getBudget")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/cost/azure_uc_config"; + String localVarPath = + "/api/v2/cost/budget/{budget_id}" + .replaceAll("\\{" + "budget_id" + "\\}", apiClient.escapeString(budgetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1725,7 +1943,7 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAzureUCConfigs", + "v2.CloudCostManagementApi.getBudget", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1733,7 +1951,7 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1745,30 +1963,32 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management GCP Usage Cost configs. + * Get cost AWS CUR config. * - *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. + *

See {@link #getCostAWSCURConfigWithHttpInfo}. * - * @return GCPUsageCostConfigsResponse + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return AwsCurConfigResponse * @throws ApiException if fails to make API call */ - public GCPUsageCostConfigsResponse listCostGCPUsageCostConfigs() throws ApiException { - return listCostGCPUsageCostConfigsWithHttpInfo().getData(); + public AwsCurConfigResponse getCostAWSCURConfig(Long cloudAccountId) throws ApiException { + return getCostAWSCURConfigWithHttpInfo(cloudAccountId).getData(); } /** - * List Cloud Cost Management GCP Usage Cost configs. + * Get cost AWS CUR config. * - *

See {@link #listCostGCPUsageCostConfigsWithHttpInfoAsync}. + *

See {@link #getCostAWSCURConfigWithHttpInfoAsync}. * - * @return CompletableFuture<GCPUsageCostConfigsResponse> + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return CompletableFuture<AwsCurConfigResponse> */ - public CompletableFuture listCostGCPUsageCostConfigsAsync() { - return listCostGCPUsageCostConfigsWithHttpInfoAsync() + public CompletableFuture getCostAWSCURConfigAsync(Long cloudAccountId) { + return getCostAWSCURConfigWithHttpInfoAsync(cloudAccountId) .thenApply( response -> { return response.getData(); @@ -1776,30 +1996,40 @@ public CompletableFuture listCostGCPUsageCostConfig } /** - * List the GCP Usage Cost configs. + * Get a specific AWS CUR config. * - * @return ApiResponse<GCPUsageCostConfigsResponse> + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return ApiResponse<AwsCurConfigResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listCostGCPUsageCostConfigsWithHttpInfo() + public ApiResponse getCostAWSCURConfigWithHttpInfo(Long cloudAccountId) throws ApiException { Object localVarPostBody = null; + + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { + throw new ApiException( + 400, "Missing the required parameter 'cloudAccountId' when calling getCostAWSCURConfig"); + } // create path and map variables - String localVarPath = "/api/v2/cost/gcp_uc_config"; + String localVarPath = + "/api/v2/cost/aws_cur_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", + "v2.CloudCostManagementApi.getCostAWSCURConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1814,21 +2044,36 @@ public ApiResponse listCostGCPUsageCostConfigsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management GCP Usage Cost configs. + * Get cost AWS CUR config. * - *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. + *

See {@link #getCostAWSCURConfigWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<GCPUsageCostConfigsResponse>> + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return CompletableFuture<ApiResponse<AwsCurConfigResponse>> */ - public CompletableFuture> - listCostGCPUsageCostConfigsWithHttpInfoAsync() { + public CompletableFuture> getCostAWSCURConfigWithHttpInfoAsync( + Long cloudAccountId) { Object localVarPostBody = null; + + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'cloudAccountId' when calling getCostAWSCURConfig")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/cost/gcp_uc_config"; + String localVarPath = + "/api/v2/cost/aws_cur_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1836,7 +2081,7 @@ public ApiResponse listCostGCPUsageCostConfigsWithH try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", + "v2.CloudCostManagementApi.getCostAWSCURConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1844,8 +2089,7 @@ public ApiResponse listCostGCPUsageCostConfigsWithH new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1857,82 +2101,1594 @@ public ApiResponse listCostGCPUsageCostConfigsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listCustomCostsFiles. */ - public static class ListCustomCostsFilesOptionalParameters { - private Long pageNumber; - private Long pageSize; - private String filterStatus; - private String sort; + /** + * Get cost Azure UC config. + * + *

See {@link #getCostAzureUCConfigWithHttpInfo}. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return UCConfigPair + * @throws ApiException if fails to make API call + */ + public UCConfigPair getCostAzureUCConfig(Long cloudAccountId) throws ApiException { + return getCostAzureUCConfigWithHttpInfo(cloudAccountId).getData(); + } - /** - * Set pageNumber. - * - * @param pageNumber Page number for pagination (optional) - * @return ListCustomCostsFilesOptionalParameters - */ - public ListCustomCostsFilesOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; + /** + * Get cost Azure UC config. + * + *

See {@link #getCostAzureUCConfigWithHttpInfoAsync}. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return CompletableFuture<UCConfigPair> + */ + public CompletableFuture getCostAzureUCConfigAsync(Long cloudAccountId) { + return getCostAzureUCConfigWithHttpInfoAsync(cloudAccountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a specific Azure config. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return ApiResponse<UCConfigPair> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse getCostAzureUCConfigWithHttpInfo(Long cloudAccountId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { + throw new ApiException( + 400, "Missing the required parameter 'cloudAccountId' when calling getCostAzureUCConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/cost/azure_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostAzureUCConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get cost Azure UC config. + * + *

See {@link #getCostAzureUCConfigWithHttpInfo}. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return CompletableFuture<ApiResponse<UCConfigPair>> + */ + public CompletableFuture> getCostAzureUCConfigWithHttpInfoAsync( + Long cloudAccountId) { + Object localVarPostBody = null; + + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'cloudAccountId' when calling getCostAzureUCConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cost/azure_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostAzureUCConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Google Cloud Usage Cost config. + * + *

See {@link #getCostGCPUsageCostConfigWithHttpInfo}. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return GcpUcConfigResponse + * @throws ApiException if fails to make API call + */ + public GcpUcConfigResponse getCostGCPUsageCostConfig(Long cloudAccountId) throws ApiException { + return getCostGCPUsageCostConfigWithHttpInfo(cloudAccountId).getData(); + } + + /** + * Get Google Cloud Usage Cost config. + * + *

See {@link #getCostGCPUsageCostConfigWithHttpInfoAsync}. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return CompletableFuture<GcpUcConfigResponse> + */ + public CompletableFuture getCostGCPUsageCostConfigAsync( + Long cloudAccountId) { + return getCostGCPUsageCostConfigWithHttpInfoAsync(cloudAccountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a specific Google Cloud Usage Cost config. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return ApiResponse<GcpUcConfigResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse getCostGCPUsageCostConfigWithHttpInfo(Long cloudAccountId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'cloudAccountId' when calling getCostGCPUsageCostConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/cost/gcp_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostGCPUsageCostConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Google Cloud Usage Cost config. + * + *

See {@link #getCostGCPUsageCostConfigWithHttpInfo}. + * + * @param cloudAccountId The unique identifier of the cloud account (required) + * @return CompletableFuture<ApiResponse<GcpUcConfigResponse>> + */ + public CompletableFuture> + getCostGCPUsageCostConfigWithHttpInfoAsync(Long cloudAccountId) { + Object localVarPostBody = null; + + // verify the required parameter 'cloudAccountId' is set + if (cloudAccountId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'cloudAccountId' when calling" + + " getCostGCPUsageCostConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cost/gcp_uc_config/{cloud_account_id}" + .replaceAll( + "\\{" + "cloud_account_id" + "\\}", + apiClient.escapeString(cloudAccountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCostGCPUsageCostConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Custom Costs file. + * + *

See {@link #getCustomCostsFileWithHttpInfo}. + * + * @param fileId File ID. (required) + * @return CustomCostsFileGetResponse + * @throws ApiException if fails to make API call + */ + public CustomCostsFileGetResponse getCustomCostsFile(String fileId) throws ApiException { + return getCustomCostsFileWithHttpInfo(fileId).getData(); + } + + /** + * Get Custom Costs file. + * + *

See {@link #getCustomCostsFileWithHttpInfoAsync}. + * + * @param fileId File ID. (required) + * @return CompletableFuture<CustomCostsFileGetResponse> + */ + public CompletableFuture getCustomCostsFileAsync(String fileId) { + return getCustomCostsFileWithHttpInfoAsync(fileId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Fetch the specified Custom Costs file. + * + * @param fileId File ID. (required) + * @return ApiResponse<CustomCostsFileGetResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getCustomCostsFileWithHttpInfo(String fileId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'fileId' is set + if (fileId == null) { + throw new ApiException( + 400, "Missing the required parameter 'fileId' when calling getCustomCostsFile"); + } + // create path and map variables + String localVarPath = + "/api/v2/cost/custom_costs/{file_id}" + .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCustomCostsFile", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get Custom Costs file. + * + *

See {@link #getCustomCostsFileWithHttpInfo}. + * + * @param fileId File ID. (required) + * @return CompletableFuture<ApiResponse<CustomCostsFileGetResponse>> + */ + public CompletableFuture> + getCustomCostsFileWithHttpInfoAsync(String fileId) { + Object localVarPostBody = null; + + // verify the required parameter 'fileId' is set + if (fileId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'fileId' when calling getCustomCostsFile")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cost/custom_costs/{file_id}" + .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCustomCostsFile", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get ruleset. + * + *

See {@link #getRulesetWithHttpInfo}. + * + * @param rulesetId The unique identifier of the ruleset (required) + * @return RulesetResp + * @throws ApiException if fails to make API call + */ + public RulesetResp getRuleset(String rulesetId) throws ApiException { + return getRulesetWithHttpInfo(rulesetId).getData(); + } + + /** + * Get ruleset. + * + *

See {@link #getRulesetWithHttpInfoAsync}. + * + * @param rulesetId The unique identifier of the ruleset (required) + * @return CompletableFuture<RulesetResp> + */ + public CompletableFuture getRulesetAsync(String rulesetId) { + return getRulesetWithHttpInfoAsync(rulesetId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a specific tag pipeline ruleset - Retrieve a specific tag pipeline ruleset by its ID + * + * @param rulesetId The unique identifier of the ruleset (required) + * @return ApiResponse<RulesetResp> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse getRulesetWithHttpInfo(String rulesetId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'rulesetId' when calling getRuleset"); + } + // create path and map variables + String localVarPath = + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getRuleset", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get ruleset. + * + *

See {@link #getRulesetWithHttpInfo}. + * + * @param rulesetId The unique identifier of the ruleset (required) + * @return CompletableFuture<ApiResponse<RulesetResp>> + */ + public CompletableFuture> getRulesetWithHttpInfoAsync(String rulesetId) { + Object localVarPostBody = null; + + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'rulesetId' when calling getRuleset")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getRuleset", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List arbitrary cost rules. + * + *

See {@link #listArbitraryCostRulesWithHttpInfo}. + * + * @return ArbitraryRuleResponseArray + * @throws ApiException if fails to make API call + */ + public ArbitraryRuleResponseArray listArbitraryCostRules() throws ApiException { + return listArbitraryCostRulesWithHttpInfo().getData(); + } + + /** + * List arbitrary cost rules. + * + *

See {@link #listArbitraryCostRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<ArbitraryRuleResponseArray> + */ + public CompletableFuture listArbitraryCostRulesAsync() { + return listArbitraryCostRulesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all arbitrary cost rules - Retrieve a list of all arbitrary cost rules for the + * organization + * + * @return ApiResponse<ArbitraryRuleResponseArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listArbitraryCostRulesWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listArbitraryCostRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List arbitrary cost rules. + * + *

See {@link #listArbitraryCostRulesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponseArray>> + */ + public CompletableFuture> + listArbitraryCostRulesWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listArbitraryCostRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List budgets. + * + *

See {@link #listBudgetsWithHttpInfo}. + * + * @return BudgetArray + * @throws ApiException if fails to make API call + */ + public BudgetArray listBudgets() throws ApiException { + return listBudgetsWithHttpInfo().getData(); + } + + /** + * List budgets. + * + *

See {@link #listBudgetsWithHttpInfoAsync}. + * + * @return CompletableFuture<BudgetArray> + */ + public CompletableFuture listBudgetsAsync() { + return listBudgetsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List budgets. + * + * @return ApiResponse<BudgetArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listBudgetsWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/budgets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listBudgets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List budgets. + * + *

See {@link #listBudgetsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<BudgetArray>> + */ + public CompletableFuture> listBudgetsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/budgets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listBudgets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Cloud Cost Management AWS CUR configs. + * + *

See {@link #listCostAWSCURConfigsWithHttpInfo}. + * + * @return AwsCURConfigsResponse + * @throws ApiException if fails to make API call + */ + public AwsCURConfigsResponse listCostAWSCURConfigs() throws ApiException { + return listCostAWSCURConfigsWithHttpInfo().getData(); + } + + /** + * List Cloud Cost Management AWS CUR configs. + * + *

See {@link #listCostAWSCURConfigsWithHttpInfoAsync}. + * + * @return CompletableFuture<AwsCURConfigsResponse> + */ + public CompletableFuture listCostAWSCURConfigsAsync() { + return listCostAWSCURConfigsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the AWS CUR configs. + * + * @return ApiResponse<AwsCURConfigsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listCostAWSCURConfigsWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/aws_cur_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostAWSCURConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Cloud Cost Management AWS CUR configs. + * + *

See {@link #listCostAWSCURConfigsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AwsCURConfigsResponse>> + */ + public CompletableFuture> + listCostAWSCURConfigsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/aws_cur_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostAWSCURConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Cloud Cost Management Azure configs. + * + *

See {@link #listCostAzureUCConfigsWithHttpInfo}. + * + * @return AzureUCConfigsResponse + * @throws ApiException if fails to make API call + */ + public AzureUCConfigsResponse listCostAzureUCConfigs() throws ApiException { + return listCostAzureUCConfigsWithHttpInfo().getData(); + } + + /** + * List Cloud Cost Management Azure configs. + * + *

See {@link #listCostAzureUCConfigsWithHttpInfoAsync}. + * + * @return CompletableFuture<AzureUCConfigsResponse> + */ + public CompletableFuture listCostAzureUCConfigsAsync() { + return listCostAzureUCConfigsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the Azure configs. + * + * @return ApiResponse<AzureUCConfigsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listCostAzureUCConfigsWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/azure_uc_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostAzureUCConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Cloud Cost Management Azure configs. + * + *

See {@link #listCostAzureUCConfigsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<AzureUCConfigsResponse>> + */ + public CompletableFuture> + listCostAzureUCConfigsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/azure_uc_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostAzureUCConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Google Cloud Usage Cost configs. + * + *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. + * + * @return GCPUsageCostConfigsResponse + * @throws ApiException if fails to make API call + */ + public GCPUsageCostConfigsResponse listCostGCPUsageCostConfigs() throws ApiException { + return listCostGCPUsageCostConfigsWithHttpInfo().getData(); + } + + /** + * List Google Cloud Usage Cost configs. + * + *

See {@link #listCostGCPUsageCostConfigsWithHttpInfoAsync}. + * + * @return CompletableFuture<GCPUsageCostConfigsResponse> + */ + public CompletableFuture listCostGCPUsageCostConfigsAsync() { + return listCostGCPUsageCostConfigsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the Google Cloud Usage Cost configs. + * + * @return ApiResponse<GCPUsageCostConfigsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listCostGCPUsageCostConfigsWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/gcp_uc_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Google Cloud Usage Cost configs. + * + *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<GCPUsageCostConfigsResponse>> + */ + public CompletableFuture> + listCostGCPUsageCostConfigsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/cost/gcp_uc_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listCustomCostsFiles. */ + public static class ListCustomCostsFilesOptionalParameters { + private Long pageNumber; + private Long pageSize; + private String filterStatus; + private String sort; + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (optional) + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Page size for pagination (optional, default to 100) + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterStatus. + * + * @param filterStatus Filter by file status (optional) + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters filterStatus(String filterStatus) { + this.filterStatus = filterStatus; + return this; + } + + /** + * Set sort. + * + * @param sort Sort key with optional descending prefix (optional, default to "created_at") + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters sort(String sort) { + this.sort = sort; return this; } + } + + /** + * List Custom Costs files. + * + *

See {@link #listCustomCostsFilesWithHttpInfo}. + * + * @return CustomCostsFileListResponse + * @throws ApiException if fails to make API call + */ + public CustomCostsFileListResponse listCustomCostsFiles() throws ApiException { + return listCustomCostsFilesWithHttpInfo(new ListCustomCostsFilesOptionalParameters()).getData(); + } + + /** + * List Custom Costs files. + * + *

See {@link #listCustomCostsFilesWithHttpInfoAsync}. + * + * @return CompletableFuture<CustomCostsFileListResponse> + */ + public CompletableFuture listCustomCostsFilesAsync() { + return listCustomCostsFilesWithHttpInfoAsync(new ListCustomCostsFilesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List Custom Costs files. + * + *

See {@link #listCustomCostsFilesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CustomCostsFileListResponse + * @throws ApiException if fails to make API call + */ + public CustomCostsFileListResponse listCustomCostsFiles( + ListCustomCostsFilesOptionalParameters parameters) throws ApiException { + return listCustomCostsFilesWithHttpInfo(parameters).getData(); + } + + /** + * List Custom Costs files. + * + *

See {@link #listCustomCostsFilesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CustomCostsFileListResponse> + */ + public CompletableFuture listCustomCostsFilesAsync( + ListCustomCostsFilesOptionalParameters parameters) { + return listCustomCostsFilesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the Custom Costs files. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<CustomCostsFileListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listCustomCostsFilesWithHttpInfo( + ListCustomCostsFilesOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String filterStatus = parameters.filterStatus; + String sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/cost/custom_costs"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCustomCostsFiles", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Custom Costs files. + * + *

See {@link #listCustomCostsFilesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<CustomCostsFileListResponse>> + */ + public CompletableFuture> + listCustomCostsFilesWithHttpInfoAsync(ListCustomCostsFilesOptionalParameters parameters) { + Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String filterStatus = parameters.filterStatus; + String sort = parameters.sort; + // create path and map variables + String localVarPath = "/api/v2/cost/custom_costs"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listCustomCostsFiles", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List rulesets. + * + *

See {@link #listRulesetsWithHttpInfo}. + * + * @return RulesetRespArray + * @throws ApiException if fails to make API call + */ + public RulesetRespArray listRulesets() throws ApiException { + return listRulesetsWithHttpInfo().getData(); + } + + /** + * List rulesets. + * + *

See {@link #listRulesetsWithHttpInfoAsync}. + * + * @return CompletableFuture<RulesetRespArray> + */ + public CompletableFuture listRulesetsAsync() { + return listRulesetsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all tag pipeline rulesets - Retrieve a list of all tag pipeline rulesets for the + * organization + * + * @return ApiResponse<RulesetRespArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse listRulesetsWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List rulesets. + * + *

See {@link #listRulesetsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<RulesetRespArray>> + */ + public CompletableFuture> listRulesetsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.listRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Reorder arbitrary cost rules. + * + *

See {@link #reorderArbitraryCostRulesWithHttpInfo}. + * + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void reorderArbitraryCostRules(ReorderRuleResourceArray body) throws ApiException { + reorderArbitraryCostRulesWithHttpInfo(body); + } + + /** + * Reorder arbitrary cost rules. + * + *

See {@link #reorderArbitraryCostRulesWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture reorderArbitraryCostRulesAsync(ReorderRuleResourceArray body) { + return reorderArbitraryCostRulesWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Reorder arbitrary cost rules - Change the execution order of arbitrary cost rules. + * + *

Important: You must provide the complete list of all rule + * IDs in the desired execution order. The API will reorder ALL rules according to the provided + * sequence. + * + *

Rules are executed in the order specified, with lower indices (earlier in the array) having + * higher priority. + * + *

Example: If you have rules with IDs [123, 456, 789] and want to change + * order from 123→456→789 to 456→123→789, send: [{"id": "456"}, {"id": "123"}, {"id": "789"}] + * + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 Successfully reordered rules -
429 Too many requests -
+ */ + public ApiResponse reorderArbitraryCostRulesWithHttpInfo(ReorderRuleResourceArray body) + throws ApiException { + Object localVarPostBody = body; - /** - * Set pageSize. - * - * @param pageSize Page size for pagination (optional, default to 100) - * @return ListCustomCostsFilesOptionalParameters - */ - public ListCustomCostsFilesOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling reorderArbitraryCostRules"); } + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule/reorder"; - /** - * Set filterStatus. - * - * @param filterStatus Filter by file status (optional) - * @return ListCustomCostsFilesOptionalParameters - */ - public ListCustomCostsFilesOptionalParameters filterStatus(String filterStatus) { - this.filterStatus = filterStatus; - return this; + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.reorderArbitraryCostRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Reorder arbitrary cost rules. + * + *

See {@link #reorderArbitraryCostRulesWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> reorderArbitraryCostRulesWithHttpInfoAsync( + ReorderRuleResourceArray body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling reorderArbitraryCostRules")); + return result; } + // create path and map variables + String localVarPath = "/api/v2/cost/arbitrary_rule/reorder"; - /** - * Set sort. - * - * @param sort Sort key with optional descending prefix (optional, default to "created_at") - * @return ListCustomCostsFilesOptionalParameters - */ - public ListCustomCostsFilesOptionalParameters sort(String sort) { - this.sort = sort; - return this; + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.reorderArbitraryCostRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); } /** - * List Custom Costs files. + * Reorder rulesets. * - *

See {@link #listCustomCostsFilesWithHttpInfo}. + *

See {@link #reorderRulesetsWithHttpInfo}. * - * @return CustomCostsFileListResponse + * @param body (required) * @throws ApiException if fails to make API call */ - public CustomCostsFileListResponse listCustomCostsFiles() throws ApiException { - return listCustomCostsFilesWithHttpInfo(new ListCustomCostsFilesOptionalParameters()).getData(); + public void reorderRulesets(ReorderRulesetResourceArray body) throws ApiException { + reorderRulesetsWithHttpInfo(body); } /** - * List Custom Costs files. + * Reorder rulesets. * - *

See {@link #listCustomCostsFilesWithHttpInfoAsync}. + *

See {@link #reorderRulesetsWithHttpInfoAsync}. * - * @return CompletableFuture<CustomCostsFileListResponse> + * @param body (required) + * @return CompletableFuture */ - public CompletableFuture listCustomCostsFilesAsync() { - return listCustomCostsFilesWithHttpInfoAsync(new ListCustomCostsFilesOptionalParameters()) + public CompletableFuture reorderRulesetsAsync(ReorderRulesetResourceArray body) { + return reorderRulesetsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -1940,30 +3696,132 @@ public CompletableFuture listCustomCostsFilesAsync( } /** - * List Custom Costs files. + * Reorder tag pipeline rulesets - Change the execution order of tag pipeline rulesets * - *

See {@link #listCustomCostsFilesWithHttpInfo}. + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 Successfully reordered rulesets -
429 Too many requests -
+ */ + public ApiResponse reorderRulesetsWithHttpInfo(ReorderRulesetResourceArray body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling reorderRulesets"); + } + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment/reorder"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.reorderRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Reorder rulesets. * - * @param parameters Optional parameters for the request. - * @return CustomCostsFileListResponse + *

See {@link #reorderRulesetsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> reorderRulesetsWithHttpInfoAsync( + ReorderRulesetResourceArray body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling reorderRulesets")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment/reorder"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.reorderRulesets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Update arbitrary cost rule. + * + *

See {@link #updateArbitraryCostRuleWithHttpInfo}. + * + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @param body (required) + * @return ArbitraryRuleResponse * @throws ApiException if fails to make API call */ - public CustomCostsFileListResponse listCustomCostsFiles( - ListCustomCostsFilesOptionalParameters parameters) throws ApiException { - return listCustomCostsFilesWithHttpInfo(parameters).getData(); + public ArbitraryRuleResponse updateArbitraryCostRule(Long ruleId, ArbitraryCostUpsertRequest body) + throws ApiException { + return updateArbitraryCostRuleWithHttpInfo(ruleId, body).getData(); } /** - * List Custom Costs files. + * Update arbitrary cost rule. * - *

See {@link #listCustomCostsFilesWithHttpInfoAsync}. + *

See {@link #updateArbitraryCostRuleWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<CustomCostsFileListResponse> + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @param body (required) + * @return CompletableFuture<ArbitraryRuleResponse> */ - public CompletableFuture listCustomCostsFilesAsync( - ListCustomCostsFilesOptionalParameters parameters) { - return listCustomCostsFilesWithHttpInfoAsync(parameters) + public CompletableFuture updateArbitraryCostRuleAsync( + Long ruleId, ArbitraryCostUpsertRequest body) { + return updateArbitraryCostRuleWithHttpInfoAsync(ruleId, body) .thenApply( response -> { return response.getData(); @@ -1971,111 +3829,141 @@ public CompletableFuture listCustomCostsFilesAsync( } /** - * List the Custom Costs files. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<CustomCostsFileListResponse> + * Update an existing arbitrary cost rule with new filters and allocation strategy. + * + *

Strategy Methods: - PROPORTIONAL/EVEN: Allocates costs + * proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. + * Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, + * evaluate_grouped_by_filters. - PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES: + * Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: + * evaluate_grouped_by_tag_keys. - PERCENT: Allocates fixed percentages to + * specific tags. Requires: allocated_by (array of percentage allocations). - + * USAGE_METRIC: Allocates based on usage metrics (implementation varies). + * + *

Filter Conditions: - Use value for single-value + * conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is + * all values", "is untagged" - Use values for multi-value conditions: "in", "not + * in" - Cannot use both value and values simultaneously. + * + *

Supported operators: is, is not, is all values, is untagged, contains, does + * not contain, in, not in, =, !=, like, not like + * + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @param body (required) + * @return ApiResponse<ArbitraryRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * - * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listCustomCostsFilesWithHttpInfo( - ListCustomCostsFilesOptionalParameters parameters) throws ApiException { - Object localVarPostBody = null; - Long pageNumber = parameters.pageNumber; - Long pageSize = parameters.pageSize; - String filterStatus = parameters.filterStatus; - String sort = parameters.sort; + public ApiResponse updateArbitraryCostRuleWithHttpInfo( + Long ruleId, ArbitraryCostUpsertRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'ruleId' when calling updateArbitraryCostRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateArbitraryCostRule"); + } // create path and map variables - String localVarPath = "/api/v2/cost/custom_costs"; + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCustomCostsFiles", + "v2.CloudCostManagementApi.updateArbitraryCostRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Custom Costs files. + * Update arbitrary cost rule. * - *

See {@link #listCustomCostsFilesWithHttpInfo}. + *

See {@link #updateArbitraryCostRuleWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<CustomCostsFileListResponse>> + * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> */ - public CompletableFuture> - listCustomCostsFilesWithHttpInfoAsync(ListCustomCostsFilesOptionalParameters parameters) { - Object localVarPostBody = null; - Long pageNumber = parameters.pageNumber; - Long pageSize = parameters.pageSize; - String filterStatus = parameters.filterStatus; - String sort = parameters.sort; + public CompletableFuture> + updateArbitraryCostRuleWithHttpInfoAsync(Long ruleId, ArbitraryCostUpsertRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'ruleId' when calling updateArbitraryCostRule")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateArbitraryCostRule")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/cost/custom_costs"; + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCustomCostsFiles", + "v2.CloudCostManagementApi.updateArbitraryCostRule", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "PATCH", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -2408,7 +4296,7 @@ public ApiResponse updateCostAzureUCConfigsWithHttpI } /** - * Update Cloud Cost Management GCP Usage Cost config. + * Update Google Cloud Usage Cost config. * *

See {@link #updateCostGCPUsageCostConfigWithHttpInfo}. * @@ -2423,7 +4311,7 @@ public GCPUsageCostConfigResponse updateCostGCPUsageCostConfig( } /** - * Update Cloud Cost Management GCP Usage Cost config. + * Update Google Cloud Usage Cost config. * *

See {@link #updateCostGCPUsageCostConfigWithHttpInfoAsync}. * @@ -2441,7 +4329,7 @@ public CompletableFuture updateCostGCPUsageCostConfi } /** - * Update the status of an GCP Usage Cost config (active/archived). + * Update the status of an Google Cloud Usage Cost config (active/archived). * * @param cloudAccountId Cloud Account id. (required) * @param body (required) @@ -2505,7 +4393,7 @@ public ApiResponse updateCostGCPUsageCostConfigWithH } /** - * Update Cloud Cost Management GCP Usage Cost config. + * Update Google Cloud Usage Cost config. * *

See {@link #updateCostGCPUsageCostConfigWithHttpInfo}. * @@ -2574,6 +4462,161 @@ public ApiResponse updateCostGCPUsageCostConfigWithH new GenericType() {}); } + /** + * Update ruleset. + * + *

See {@link #updateRulesetWithHttpInfo}. + * + * @param rulesetId The unique identifier of the ruleset (required) + * @param body (required) + * @return RulesetResp + * @throws ApiException if fails to make API call + */ + public RulesetResp updateRuleset(String rulesetId, UpdateRulesetRequest body) + throws ApiException { + return updateRulesetWithHttpInfo(rulesetId, body).getData(); + } + + /** + * Update ruleset. + * + *

See {@link #updateRulesetWithHttpInfoAsync}. + * + * @param rulesetId The unique identifier of the ruleset (required) + * @param body (required) + * @return CompletableFuture<RulesetResp> + */ + public CompletableFuture updateRulesetAsync( + String rulesetId, UpdateRulesetRequest body) { + return updateRulesetWithHttpInfoAsync(rulesetId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a tag pipeline ruleset - Update an existing tag pipeline ruleset with new rules and + * configuration + * + * @param rulesetId The unique identifier of the ruleset (required) + * @param body (required) + * @return ApiResponse<RulesetResp> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse updateRulesetWithHttpInfo( + String rulesetId, UpdateRulesetRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'rulesetId' when calling updateRuleset"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateRuleset"); + } + // create path and map variables + String localVarPath = + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.updateRuleset", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update ruleset. + * + *

See {@link #updateRulesetWithHttpInfo}. + * + * @param rulesetId The unique identifier of the ruleset (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<RulesetResp>> + */ + public CompletableFuture> updateRulesetWithHttpInfoAsync( + String rulesetId, UpdateRulesetRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'rulesetId' when calling updateRuleset")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateRuleset")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.updateRuleset", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Upload Custom Costs file. * @@ -2838,4 +4881,135 @@ public CompletableFuture> upsertBudgetWithHttpInf false, new GenericType() {}); } + + /** + * Validate query. + * + *

See {@link #validateQueryWithHttpInfo}. + * + * @param body (required) + * @return RulesValidateQueryResponse + * @throws ApiException if fails to make API call + */ + public RulesValidateQueryResponse validateQuery(RulesValidateQueryRequest body) + throws ApiException { + return validateQueryWithHttpInfo(body).getData(); + } + + /** + * Validate query. + * + *

See {@link #validateQueryWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<RulesValidateQueryResponse> + */ + public CompletableFuture validateQueryAsync( + RulesValidateQueryRequest body) { + return validateQueryWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Validate a tag pipeline query - Validate the syntax and structure of a tag pipeline query + * + * @param body (required) + * @return ApiResponse<RulesValidateQueryResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse validateQueryWithHttpInfo( + RulesValidateQueryRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling validateQuery"); + } + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment/validate-query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.validateQuery", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Validate query. + * + *

See {@link #validateQueryWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<RulesValidateQueryResponse>> + */ + public CompletableFuture> validateQueryWithHttpInfoAsync( + RulesValidateQueryRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling validateQuery")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/tags/enrichment/validate-query"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.validateQuery", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/AccountFilteringConfig.java b/src/main/java/com/datadog/api/client/v2/model/AccountFilteringConfig.java index 0ce71d6aa91..93cf23954f1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AccountFilteringConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/AccountFilteringConfig.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** The account filtering configuration. */ @JsonPropertyOrder({ @@ -32,7 +33,7 @@ public class AccountFilteringConfig { private List excludedAccounts = null; public static final String JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS = "include_new_accounts"; - private Boolean includeNewAccounts; + private JsonNullable includeNewAccounts = JsonNullable.undefined(); public static final String JSON_PROPERTY_INCLUDED_ACCOUNTS = "included_accounts"; private List includedAccounts = null; @@ -68,7 +69,7 @@ public void setExcludedAccounts(List excludedAccounts) { } public AccountFilteringConfig includeNewAccounts(Boolean includeNewAccounts) { - this.includeNewAccounts = includeNewAccounts; + this.includeNewAccounts = JsonNullable.of(includeNewAccounts); return this; } @@ -78,16 +79,26 @@ public AccountFilteringConfig includeNewAccounts(Boolean includeNewAccounts) { * @return includeNewAccounts */ @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getIncludeNewAccounts() { + return includeNewAccounts.orElse(null); + } + @JsonProperty(JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIncludeNewAccounts() { + public JsonNullable getIncludeNewAccounts_JsonNullable() { return includeNewAccounts; } - public void setIncludeNewAccounts(Boolean includeNewAccounts) { + @JsonProperty(JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS) + public void setIncludeNewAccounts_JsonNullable(JsonNullable includeNewAccounts) { this.includeNewAccounts = includeNewAccounts; } + public void setIncludeNewAccounts(Boolean includeNewAccounts) { + this.includeNewAccounts = JsonNullable.of(includeNewAccounts); + } + public AccountFilteringConfig includedAccounts(List includedAccounts) { this.includedAccounts = includedAccounts; return this; diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequest.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequest.java new file mode 100644 index 00000000000..ef600aa5516 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequest.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryCostUpsertRequest object. */ +@JsonPropertyOrder({ArbitraryCostUpsertRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ArbitraryCostUpsertRequestData data; + + public ArbitraryCostUpsertRequest data(ArbitraryCostUpsertRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of ArbitraryCostUpsertRequestData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ArbitraryCostUpsertRequestData getData() { + return data; + } + + public void setData(ArbitraryCostUpsertRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequest + */ + @JsonAnySetter + public ArbitraryCostUpsertRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryCostUpsertRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequest arbitraryCostUpsertRequest = (ArbitraryCostUpsertRequest) o; + return Objects.equals(this.data, arbitraryCostUpsertRequest.data) + && Objects.equals( + this.additionalProperties, arbitraryCostUpsertRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestData.java new file mode 100644 index 00000000000..e020965ca29 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryCostUpsertRequestData object. */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestData.JSON_PROPERTY_ATTRIBUTES, + ArbitraryCostUpsertRequestData.JSON_PROPERTY_ID, + ArbitraryCostUpsertRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ArbitraryCostUpsertRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ArbitraryCostUpsertRequestDataType type = + ArbitraryCostUpsertRequestDataType.UPSERT_ARBITRARY_RULE; + + public ArbitraryCostUpsertRequestData() {} + + @JsonCreator + public ArbitraryCostUpsertRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ArbitraryCostUpsertRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ArbitraryCostUpsertRequestData attributes( + ArbitraryCostUpsertRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of ArbitraryCostUpsertRequestDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ArbitraryCostUpsertRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ArbitraryCostUpsertRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public ArbitraryCostUpsertRequestData id(String id) { + this.id = id; + return this; + } + + /** + * The ArbitraryCostUpsertRequestData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ArbitraryCostUpsertRequestData type(ArbitraryCostUpsertRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Upsert arbitrary rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ArbitraryCostUpsertRequestDataType getType() { + return type; + } + + public void setType(ArbitraryCostUpsertRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestData + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryCostUpsertRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestData arbitraryCostUpsertRequestData = + (ArbitraryCostUpsertRequestData) o; + return Objects.equals(this.attributes, arbitraryCostUpsertRequestData.attributes) + && Objects.equals(this.id, arbitraryCostUpsertRequestData.id) + && Objects.equals(this.type, arbitraryCostUpsertRequestData.type) + && Objects.equals( + this.additionalProperties, arbitraryCostUpsertRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributes.java new file mode 100644 index 00000000000..ab9b83ab4ce --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributes.java @@ -0,0 +1,376 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryCostUpsertRequestDataAttributes object. */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_COSTS_TO_ALLOCATE, + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_ENABLED, + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_ORDER_ID, + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_PROVIDER, + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_REJECTED, + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_RULE_NAME, + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_STRATEGY, + ArbitraryCostUpsertRequestDataAttributes.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COSTS_TO_ALLOCATE = "costs_to_allocate"; + private List costsToAllocate = + new ArrayList<>(); + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ORDER_ID = "order_id"; + private Long orderId; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private List provider = new ArrayList<>(); + + public static final String JSON_PROPERTY_REJECTED = "rejected"; + private Boolean rejected; + + public static final String JSON_PROPERTY_RULE_NAME = "rule_name"; + private String ruleName; + + public static final String JSON_PROPERTY_STRATEGY = "strategy"; + private ArbitraryCostUpsertRequestDataAttributesStrategy strategy; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public ArbitraryCostUpsertRequestDataAttributes() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_COSTS_TO_ALLOCATE) + List costsToAllocate, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER) List provider, + @JsonProperty(required = true, value = JSON_PROPERTY_RULE_NAME) String ruleName, + @JsonProperty(required = true, value = JSON_PROPERTY_STRATEGY) + ArbitraryCostUpsertRequestDataAttributesStrategy strategy, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.costsToAllocate = costsToAllocate; + this.provider = provider; + this.ruleName = ruleName; + this.strategy = strategy; + this.unparsed |= strategy.unparsed; + this.type = type; + } + + public ArbitraryCostUpsertRequestDataAttributes costsToAllocate( + List costsToAllocate) { + this.costsToAllocate = costsToAllocate; + for (ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems item : costsToAllocate) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryCostUpsertRequestDataAttributes addCostsToAllocateItem( + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems costsToAllocateItem) { + this.costsToAllocate.add(costsToAllocateItem); + this.unparsed |= costsToAllocateItem.unparsed; + return this; + } + + /** + * The attributes costs_to_allocate. + * + * @return costsToAllocate + */ + @JsonProperty(JSON_PROPERTY_COSTS_TO_ALLOCATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCostsToAllocate() { + return costsToAllocate; + } + + public void setCostsToAllocate( + List costsToAllocate) { + this.costsToAllocate = costsToAllocate; + } + + public ArbitraryCostUpsertRequestDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The attributes enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public ArbitraryCostUpsertRequestDataAttributes orderId(Long orderId) { + this.orderId = orderId; + return this; + } + + /** + * The attributes order_id. + * + * @return orderId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrderId() { + return orderId; + } + + public void setOrderId(Long orderId) { + this.orderId = orderId; + } + + public ArbitraryCostUpsertRequestDataAttributes provider(List provider) { + this.provider = provider; + return this; + } + + public ArbitraryCostUpsertRequestDataAttributes addProviderItem(String providerItem) { + this.provider.add(providerItem); + return this; + } + + /** + * The attributes provider. + * + * @return provider + */ + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProvider() { + return provider; + } + + public void setProvider(List provider) { + this.provider = provider; + } + + public ArbitraryCostUpsertRequestDataAttributes rejected(Boolean rejected) { + this.rejected = rejected; + return this; + } + + /** + * The attributes rejected. + * + * @return rejected + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REJECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRejected() { + return rejected; + } + + public void setRejected(Boolean rejected) { + this.rejected = rejected; + } + + public ArbitraryCostUpsertRequestDataAttributes ruleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * The attributes rule_name. + * + * @return ruleName + */ + @JsonProperty(JSON_PROPERTY_RULE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRuleName() { + return ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public ArbitraryCostUpsertRequestDataAttributes strategy( + ArbitraryCostUpsertRequestDataAttributesStrategy strategy) { + this.strategy = strategy; + this.unparsed |= strategy.unparsed; + return this; + } + + /** + * The definition of ArbitraryCostUpsertRequestDataAttributesStrategy object. + * + * @return strategy + */ + @JsonProperty(JSON_PROPERTY_STRATEGY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ArbitraryCostUpsertRequestDataAttributesStrategy getStrategy() { + return strategy; + } + + public void setStrategy(ArbitraryCostUpsertRequestDataAttributesStrategy strategy) { + this.strategy = strategy; + } + + public ArbitraryCostUpsertRequestDataAttributes type(String type) { + this.type = type; + return this; + } + + /** + * The attributes type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributes + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryCostUpsertRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributes arbitraryCostUpsertRequestDataAttributes = + (ArbitraryCostUpsertRequestDataAttributes) o; + return Objects.equals( + this.costsToAllocate, arbitraryCostUpsertRequestDataAttributes.costsToAllocate) + && Objects.equals(this.enabled, arbitraryCostUpsertRequestDataAttributes.enabled) + && Objects.equals(this.orderId, arbitraryCostUpsertRequestDataAttributes.orderId) + && Objects.equals(this.provider, arbitraryCostUpsertRequestDataAttributes.provider) + && Objects.equals(this.rejected, arbitraryCostUpsertRequestDataAttributes.rejected) + && Objects.equals(this.ruleName, arbitraryCostUpsertRequestDataAttributes.ruleName) + && Objects.equals(this.strategy, arbitraryCostUpsertRequestDataAttributes.strategy) + && Objects.equals(this.type, arbitraryCostUpsertRequestDataAttributes.type) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + costsToAllocate, + enabled, + orderId, + provider, + rejected, + ruleName, + strategy, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequestDataAttributes {\n"); + sb.append(" costsToAllocate: ").append(toIndentedString(costsToAllocate)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" rejected: ").append(toIndentedString(rejected)).append("\n"); + sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n"); + sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.java new file mode 100644 index 00000000000..596f15d5427 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.java @@ -0,0 +1,268 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.JSON_PROPERTY_CONDITION, + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.JSON_PROPERTY_TAG, + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.JSON_PROPERTY_VALUE, + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems condition(String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems value(String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems values(List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems addValuesItem( + String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems + arbitraryCostUpsertRequestDataAttributesCostsToAllocateItems = + (ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems) o; + return Objects.equals( + this.condition, arbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.condition) + && Objects.equals( + this.tag, arbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.tag) + && Objects.equals( + this.value, arbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.value) + && Objects.equals( + this.values, arbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategy.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategy.java new file mode 100644 index 00000000000..141c3c0ea25 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategy.java @@ -0,0 +1,500 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryCostUpsertRequestDataAttributesStrategy object. */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_ALLOCATED_BY, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_ALLOCATED_BY_FILTERS, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_ALLOCATED_BY_TAG_KEYS, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_BASED_ON_COSTS, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_BASED_ON_TIMESERIES, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_EVALUATE_GROUPED_BY_FILTERS, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_EVALUATE_GROUPED_BY_TAG_KEYS, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_GRANULARITY, + ArbitraryCostUpsertRequestDataAttributesStrategy.JSON_PROPERTY_METHOD +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributesStrategy { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOCATED_BY = "allocated_by"; + private List allocatedBy = null; + + public static final String JSON_PROPERTY_ALLOCATED_BY_FILTERS = "allocated_by_filters"; + private List + allocatedByFilters = null; + + public static final String JSON_PROPERTY_ALLOCATED_BY_TAG_KEYS = "allocated_by_tag_keys"; + private List allocatedByTagKeys = null; + + public static final String JSON_PROPERTY_BASED_ON_COSTS = "based_on_costs"; + private List basedOnCosts = + null; + + public static final String JSON_PROPERTY_BASED_ON_TIMESERIES = "based_on_timeseries"; + private Map basedOnTimeseries = null; + + public static final String JSON_PROPERTY_EVALUATE_GROUPED_BY_FILTERS = + "evaluate_grouped_by_filters"; + private List + evaluateGroupedByFilters = null; + + public static final String JSON_PROPERTY_EVALUATE_GROUPED_BY_TAG_KEYS = + "evaluate_grouped_by_tag_keys"; + private List evaluateGroupedByTagKeys = null; + + public static final String JSON_PROPERTY_GRANULARITY = "granularity"; + private String granularity; + + public static final String JSON_PROPERTY_METHOD = "method"; + private String method; + + public ArbitraryCostUpsertRequestDataAttributesStrategy() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributesStrategy( + @JsonProperty(required = true, value = JSON_PROPERTY_METHOD) String method) { + this.method = method; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy allocatedBy( + List allocatedBy) { + this.allocatedBy = allocatedBy; + for (ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems item : allocatedBy) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy addAllocatedByItem( + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems allocatedByItem) { + if (this.allocatedBy == null) { + this.allocatedBy = new ArrayList<>(); + } + this.allocatedBy.add(allocatedByItem); + this.unparsed |= allocatedByItem.unparsed; + return this; + } + + /** + * The strategy allocated_by. + * + * @return allocatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOCATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAllocatedBy() { + return allocatedBy; + } + + public void setAllocatedBy( + List allocatedBy) { + this.allocatedBy = allocatedBy; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy allocatedByFilters( + List + allocatedByFilters) { + this.allocatedByFilters = allocatedByFilters; + for (ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems item : + allocatedByFilters) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy addAllocatedByFiltersItem( + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + allocatedByFiltersItem) { + if (this.allocatedByFilters == null) { + this.allocatedByFilters = new ArrayList<>(); + } + this.allocatedByFilters.add(allocatedByFiltersItem); + this.unparsed |= allocatedByFiltersItem.unparsed; + return this; + } + + /** + * The strategy allocated_by_filters. + * + * @return allocatedByFilters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOCATED_BY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getAllocatedByFilters() { + return allocatedByFilters; + } + + public void setAllocatedByFilters( + List + allocatedByFilters) { + this.allocatedByFilters = allocatedByFilters; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy allocatedByTagKeys( + List allocatedByTagKeys) { + this.allocatedByTagKeys = allocatedByTagKeys; + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy addAllocatedByTagKeysItem( + String allocatedByTagKeysItem) { + if (this.allocatedByTagKeys == null) { + this.allocatedByTagKeys = new ArrayList<>(); + } + this.allocatedByTagKeys.add(allocatedByTagKeysItem); + return this; + } + + /** + * The strategy allocated_by_tag_keys. + * + * @return allocatedByTagKeys + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOCATED_BY_TAG_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAllocatedByTagKeys() { + return allocatedByTagKeys; + } + + public void setAllocatedByTagKeys(List allocatedByTagKeys) { + this.allocatedByTagKeys = allocatedByTagKeys; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy basedOnCosts( + List basedOnCosts) { + this.basedOnCosts = basedOnCosts; + for (ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems item : basedOnCosts) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy addBasedOnCostsItem( + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems basedOnCostsItem) { + if (this.basedOnCosts == null) { + this.basedOnCosts = new ArrayList<>(); + } + this.basedOnCosts.add(basedOnCostsItem); + this.unparsed |= basedOnCostsItem.unparsed; + return this; + } + + /** + * The strategy based_on_costs. + * + * @return basedOnCosts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASED_ON_COSTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getBasedOnCosts() { + return basedOnCosts; + } + + public void setBasedOnCosts( + List basedOnCosts) { + this.basedOnCosts = basedOnCosts; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy basedOnTimeseries( + Map basedOnTimeseries) { + this.basedOnTimeseries = basedOnTimeseries; + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy putBasedOnTimeseriesItem( + String key, Object basedOnTimeseriesItem) { + if (this.basedOnTimeseries == null) { + this.basedOnTimeseries = new HashMap<>(); + } + this.basedOnTimeseries.put(key, basedOnTimeseriesItem); + return this; + } + + /** + * The strategy based_on_timeseries. + * + * @return basedOnTimeseries + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASED_ON_TIMESERIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getBasedOnTimeseries() { + return basedOnTimeseries; + } + + public void setBasedOnTimeseries(Map basedOnTimeseries) { + this.basedOnTimeseries = basedOnTimeseries; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy evaluateGroupedByFilters( + List + evaluateGroupedByFilters) { + this.evaluateGroupedByFilters = evaluateGroupedByFilters; + for (ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems item : + evaluateGroupedByFilters) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy addEvaluateGroupedByFiltersItem( + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + evaluateGroupedByFiltersItem) { + if (this.evaluateGroupedByFilters == null) { + this.evaluateGroupedByFilters = new ArrayList<>(); + } + this.evaluateGroupedByFilters.add(evaluateGroupedByFiltersItem); + this.unparsed |= evaluateGroupedByFiltersItem.unparsed; + return this; + } + + /** + * The strategy evaluate_grouped_by_filters. + * + * @return evaluateGroupedByFilters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATE_GROUPED_BY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getEvaluateGroupedByFilters() { + return evaluateGroupedByFilters; + } + + public void setEvaluateGroupedByFilters( + List + evaluateGroupedByFilters) { + this.evaluateGroupedByFilters = evaluateGroupedByFilters; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy evaluateGroupedByTagKeys( + List evaluateGroupedByTagKeys) { + this.evaluateGroupedByTagKeys = evaluateGroupedByTagKeys; + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy addEvaluateGroupedByTagKeysItem( + String evaluateGroupedByTagKeysItem) { + if (this.evaluateGroupedByTagKeys == null) { + this.evaluateGroupedByTagKeys = new ArrayList<>(); + } + this.evaluateGroupedByTagKeys.add(evaluateGroupedByTagKeysItem); + return this; + } + + /** + * The strategy evaluate_grouped_by_tag_keys. + * + * @return evaluateGroupedByTagKeys + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATE_GROUPED_BY_TAG_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvaluateGroupedByTagKeys() { + return evaluateGroupedByTagKeys; + } + + public void setEvaluateGroupedByTagKeys(List evaluateGroupedByTagKeys) { + this.evaluateGroupedByTagKeys = evaluateGroupedByTagKeys; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy granularity(String granularity) { + this.granularity = granularity; + return this; + } + + /** + * The strategy granularity. + * + * @return granularity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRANULARITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGranularity() { + return granularity; + } + + public void setGranularity(String granularity) { + this.granularity = granularity; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategy method(String method) { + this.method = method; + return this; + } + + /** + * The strategy method. + * + * @return method + */ + @JsonProperty(JSON_PROPERTY_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributesStrategy + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributesStrategy putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryCostUpsertRequestDataAttributesStrategy object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributesStrategy + arbitraryCostUpsertRequestDataAttributesStrategy = + (ArbitraryCostUpsertRequestDataAttributesStrategy) o; + return Objects.equals( + this.allocatedBy, arbitraryCostUpsertRequestDataAttributesStrategy.allocatedBy) + && Objects.equals( + this.allocatedByFilters, + arbitraryCostUpsertRequestDataAttributesStrategy.allocatedByFilters) + && Objects.equals( + this.allocatedByTagKeys, + arbitraryCostUpsertRequestDataAttributesStrategy.allocatedByTagKeys) + && Objects.equals( + this.basedOnCosts, arbitraryCostUpsertRequestDataAttributesStrategy.basedOnCosts) + && Objects.equals( + this.basedOnTimeseries, + arbitraryCostUpsertRequestDataAttributesStrategy.basedOnTimeseries) + && Objects.equals( + this.evaluateGroupedByFilters, + arbitraryCostUpsertRequestDataAttributesStrategy.evaluateGroupedByFilters) + && Objects.equals( + this.evaluateGroupedByTagKeys, + arbitraryCostUpsertRequestDataAttributesStrategy.evaluateGroupedByTagKeys) + && Objects.equals( + this.granularity, arbitraryCostUpsertRequestDataAttributesStrategy.granularity) + && Objects.equals(this.method, arbitraryCostUpsertRequestDataAttributesStrategy.method) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributesStrategy.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + allocatedBy, + allocatedByFilters, + allocatedByTagKeys, + basedOnCosts, + basedOnTimeseries, + evaluateGroupedByFilters, + evaluateGroupedByTagKeys, + granularity, + method, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequestDataAttributesStrategy {\n"); + sb.append(" allocatedBy: ").append(toIndentedString(allocatedBy)).append("\n"); + sb.append(" allocatedByFilters: ").append(toIndentedString(allocatedByFilters)).append("\n"); + sb.append(" allocatedByTagKeys: ").append(toIndentedString(allocatedByTagKeys)).append("\n"); + sb.append(" basedOnCosts: ").append(toIndentedString(basedOnCosts)).append("\n"); + sb.append(" basedOnTimeseries: ").append(toIndentedString(basedOnTimeseries)).append("\n"); + sb.append(" evaluateGroupedByFilters: ") + .append(toIndentedString(evaluateGroupedByFilters)) + .append("\n"); + sb.append(" evaluateGroupedByTagKeys: ") + .append(toIndentedString(evaluateGroupedByTagKeys)) + .append("\n"); + sb.append(" granularity: ").append(toIndentedString(granularity)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.java new file mode 100644 index 00000000000..6fb0ea7aa0a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.java @@ -0,0 +1,275 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_CONDITION, + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_TAG, + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_VALUE, + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems condition( + String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems value( + String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems values( + List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems addValuesItem( + String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems = + (ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems) o; + return Objects.equals( + this.condition, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.condition) + && Objects.equals( + this.tag, arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.tag) + && Objects.equals( + this.value, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.value) + && Objects.equals( + this.values, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByFiltersItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.java new file mode 100644 index 00000000000..35e875a0a33 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.JSON_PROPERTY_ALLOCATED_TAGS, + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.JSON_PROPERTY_PERCENTAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOCATED_TAGS = "allocated_tags"; + private List + allocatedTags = new ArrayList<>(); + + public static final String JSON_PROPERTY_PERCENTAGE = "percentage"; + private Double percentage; + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ALLOCATED_TAGS) + List + allocatedTags, + @JsonProperty(required = true, value = JSON_PROPERTY_PERCENTAGE) Double percentage) { + this.allocatedTags = allocatedTags; + this.percentage = percentage; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems allocatedTags( + List + allocatedTags) { + this.allocatedTags = allocatedTags; + for (ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems item : + allocatedTags) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems addAllocatedTagsItem( + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + allocatedTagsItem) { + this.allocatedTags.add(allocatedTagsItem); + this.unparsed |= allocatedTagsItem.unparsed; + return this; + } + + /** + * The items allocated_tags. + * + * @return allocatedTags + */ + @JsonProperty(JSON_PROPERTY_ALLOCATED_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List + getAllocatedTags() { + return allocatedTags; + } + + public void setAllocatedTags( + List + allocatedTags) { + this.allocatedTags = allocatedTags; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems percentage( + Double percentage) { + this.percentage = percentage; + return this; + } + + /** + * The items percentage. The numeric value format should be a 32bit + * float value. + * + * @return percentage + */ + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getPercentage() { + return percentage; + } + + public void setPercentage(Double percentage) { + this.percentage = percentage; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems = + (ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems) o; + return Objects.equals( + this.allocatedTags, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.allocatedTags) + && Objects.equals( + this.percentage, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.percentage) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(allocatedTags, percentage, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItems {\n"); + sb.append(" allocatedTags: ").append(toIndentedString(allocatedTags)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.java new file mode 100644 index 00000000000..a3fa4917e26 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.java @@ -0,0 +1,197 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of + * ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems object. + */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + .JSON_PROPERTY_KEY, + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + .JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_KEY) String key, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.key = key; + this.value = value; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems key( + String key) { + this.key = key; + return this; + } + + /** + * The items key. + * + * @return key + */ + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems value( + String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this + * ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems = + (ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems) o; + return Objects.equals( + this.key, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.key) + && Objects.equals( + this.value, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + .value) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class ArbitraryCostUpsertRequestDataAttributesStrategyAllocatedByItemsAllocatedTagsItems" + + " {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.java new file mode 100644 index 00000000000..e316def4360 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.java @@ -0,0 +1,271 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_CONDITION, + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_TAG, + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_VALUE, + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems condition( + String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems value(String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems values( + List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems addValuesItem( + String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems + arbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems = + (ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems) o; + return Objects.equals( + this.condition, + arbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.condition) + && Objects.equals( + this.tag, arbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.tag) + && Objects.equals( + this.value, arbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.value) + && Objects.equals( + this.values, arbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.java new file mode 100644 index 00000000000..bed65309c2a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.java @@ -0,0 +1,280 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of + * ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems object. + */ +@JsonPropertyOrder({ + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + .JSON_PROPERTY_CONDITION, + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.JSON_PROPERTY_TAG, + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.JSON_PROPERTY_VALUE, + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems() {} + + @JsonCreator + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems condition( + String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems tag( + String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems value( + String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems values( + List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + addValuesItem(String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + */ + @JsonAnySetter + public ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this + * ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + arbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems = + (ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems) o; + return Objects.equals( + this.condition, + arbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.condition) + && Objects.equals( + this.tag, + arbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.tag) + && Objects.equals( + this.value, + arbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.value) + && Objects.equals( + this.values, + arbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class ArbitraryCostUpsertRequestDataAttributesStrategyEvaluateGroupedByFiltersItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataType.java new file mode 100644 index 00000000000..3460efd18b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryCostUpsertRequestDataType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Upsert arbitrary rule resource type. */ +@JsonSerialize( + using = ArbitraryCostUpsertRequestDataType.ArbitraryCostUpsertRequestDataTypeSerializer.class) +public class ArbitraryCostUpsertRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("upsert_arbitrary_rule")); + + public static final ArbitraryCostUpsertRequestDataType UPSERT_ARBITRARY_RULE = + new ArbitraryCostUpsertRequestDataType("upsert_arbitrary_rule"); + + ArbitraryCostUpsertRequestDataType(String value) { + super(value, allowedValues); + } + + public static class ArbitraryCostUpsertRequestDataTypeSerializer + extends StdSerializer { + public ArbitraryCostUpsertRequestDataTypeSerializer( + Class t) { + super(t); + } + + public ArbitraryCostUpsertRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ArbitraryCostUpsertRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ArbitraryCostUpsertRequestDataType fromValue(String value) { + return new ArbitraryCostUpsertRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponse.java new file mode 100644 index 00000000000..863f39875a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponse.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryRuleResponse object. */ +@JsonPropertyOrder({ArbitraryRuleResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ArbitraryRuleResponseData data; + + public ArbitraryRuleResponse data(ArbitraryRuleResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of ArbitraryRuleResponseData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ArbitraryRuleResponseData getData() { + return data; + } + + public void setData(ArbitraryRuleResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponse + */ + @JsonAnySetter + public ArbitraryRuleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryRuleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponse arbitraryRuleResponse = (ArbitraryRuleResponse) o; + return Objects.equals(this.data, arbitraryRuleResponse.data) + && Objects.equals(this.additionalProperties, arbitraryRuleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArray.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArray.java new file mode 100644 index 00000000000..78e153a2e80 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArray.java @@ -0,0 +1,156 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryRuleResponseArray object. */ +@JsonPropertyOrder({ArbitraryRuleResponseArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public ArbitraryRuleResponseArray() {} + + @JsonCreator + public ArbitraryRuleResponseArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public ArbitraryRuleResponseArray data(List data) { + this.data = data; + for (ArbitraryRuleResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleResponseArray addDataItem(ArbitraryRuleResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The ArbitraryRuleResponseArray data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseArray + */ + @JsonAnySetter + public ArbitraryRuleResponseArray putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryRuleResponseArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseArray arbitraryRuleResponseArray = (ArbitraryRuleResponseArray) o; + return Objects.equals(this.data, arbitraryRuleResponseArray.data) + && Objects.equals( + this.additionalProperties, arbitraryRuleResponseArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseArray {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseData.java new file mode 100644 index 00000000000..b95b74a7a65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseData.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryRuleResponseData object. */ +@JsonPropertyOrder({ + ArbitraryRuleResponseData.JSON_PROPERTY_ATTRIBUTES, + ArbitraryRuleResponseData.JSON_PROPERTY_ID, + ArbitraryRuleResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ArbitraryRuleResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ArbitraryRuleResponseDataType type = ArbitraryRuleResponseDataType.ARBITRARY_RULE; + + public ArbitraryRuleResponseData() {} + + @JsonCreator + public ArbitraryRuleResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ArbitraryRuleResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ArbitraryRuleResponseData attributes(ArbitraryRuleResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of ArbitraryRuleResponseDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ArbitraryRuleResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ArbitraryRuleResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public ArbitraryRuleResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ArbitraryRuleResponseData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ArbitraryRuleResponseData type(ArbitraryRuleResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Arbitrary rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ArbitraryRuleResponseDataType getType() { + return type; + } + + public void setType(ArbitraryRuleResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseData + */ + @JsonAnySetter + public ArbitraryRuleResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryRuleResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseData arbitraryRuleResponseData = (ArbitraryRuleResponseData) o; + return Objects.equals(this.attributes, arbitraryRuleResponseData.attributes) + && Objects.equals(this.id, arbitraryRuleResponseData.id) + && Objects.equals(this.type, arbitraryRuleResponseData.type) + && Objects.equals( + this.additionalProperties, arbitraryRuleResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributes.java new file mode 100644 index 00000000000..10aed596aea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributes.java @@ -0,0 +1,497 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryRuleResponseDataAttributes object. */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_COSTS_TO_ALLOCATE, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_CREATED, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_ENABLED, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_LAST_MODIFIED_USER_UUID, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_ORDER_ID, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_PROVIDER, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_REJECTED, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_RULE_NAME, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_STRATEGY, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_TYPE, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_UPDATED, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COSTS_TO_ALLOCATE = "costs_to_allocate"; + private List costsToAllocate = + new ArrayList<>(); + + public static final String JSON_PROPERTY_CREATED = "created"; + private OffsetDateTime created; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_LAST_MODIFIED_USER_UUID = "last_modified_user_uuid"; + private String lastModifiedUserUuid; + + public static final String JSON_PROPERTY_ORDER_ID = "order_id"; + private Long orderId; + + public static final String JSON_PROPERTY_PROVIDER = "provider"; + private List provider = new ArrayList<>(); + + public static final String JSON_PROPERTY_REJECTED = "rejected"; + private Boolean rejected; + + public static final String JSON_PROPERTY_RULE_NAME = "rule_name"; + private String ruleName; + + public static final String JSON_PROPERTY_STRATEGY = "strategy"; + private ArbitraryRuleResponseDataAttributesStrategy strategy; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_UPDATED = "updated"; + private OffsetDateTime updated; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Integer version; + + public ArbitraryRuleResponseDataAttributes() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_COSTS_TO_ALLOCATE) + List costsToAllocate, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) OffsetDateTime created, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_MODIFIED_USER_UUID) + String lastModifiedUserUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_ORDER_ID) Long orderId, + @JsonProperty(required = true, value = JSON_PROPERTY_PROVIDER) List provider, + @JsonProperty(required = true, value = JSON_PROPERTY_RULE_NAME) String ruleName, + @JsonProperty(required = true, value = JSON_PROPERTY_STRATEGY) + ArbitraryRuleResponseDataAttributesStrategy strategy, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED) OffsetDateTime updated, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Integer version) { + this.costsToAllocate = costsToAllocate; + this.created = created; + this.enabled = enabled; + this.lastModifiedUserUuid = lastModifiedUserUuid; + this.orderId = orderId; + this.provider = provider; + this.ruleName = ruleName; + this.strategy = strategy; + this.unparsed |= strategy.unparsed; + this.type = type; + this.updated = updated; + this.version = version; + } + + public ArbitraryRuleResponseDataAttributes costsToAllocate( + List costsToAllocate) { + this.costsToAllocate = costsToAllocate; + for (ArbitraryRuleResponseDataAttributesCostsToAllocateItems item : costsToAllocate) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleResponseDataAttributes addCostsToAllocateItem( + ArbitraryRuleResponseDataAttributesCostsToAllocateItems costsToAllocateItem) { + this.costsToAllocate.add(costsToAllocateItem); + this.unparsed |= costsToAllocateItem.unparsed; + return this; + } + + /** + * The attributes costs_to_allocate. + * + * @return costsToAllocate + */ + @JsonProperty(JSON_PROPERTY_COSTS_TO_ALLOCATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCostsToAllocate() { + return costsToAllocate; + } + + public void setCostsToAllocate( + List costsToAllocate) { + this.costsToAllocate = costsToAllocate; + } + + public ArbitraryRuleResponseDataAttributes created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * The attributes created. + * + * @return created + */ + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(OffsetDateTime created) { + this.created = created; + } + + public ArbitraryRuleResponseDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The attributes enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public ArbitraryRuleResponseDataAttributes lastModifiedUserUuid(String lastModifiedUserUuid) { + this.lastModifiedUserUuid = lastModifiedUserUuid; + return this; + } + + /** + * The attributes last_modified_user_uuid. + * + * @return lastModifiedUserUuid + */ + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_USER_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLastModifiedUserUuid() { + return lastModifiedUserUuid; + } + + public void setLastModifiedUserUuid(String lastModifiedUserUuid) { + this.lastModifiedUserUuid = lastModifiedUserUuid; + } + + public ArbitraryRuleResponseDataAttributes orderId(Long orderId) { + this.orderId = orderId; + return this; + } + + /** + * The attributes order_id. + * + * @return orderId + */ + @JsonProperty(JSON_PROPERTY_ORDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrderId() { + return orderId; + } + + public void setOrderId(Long orderId) { + this.orderId = orderId; + } + + public ArbitraryRuleResponseDataAttributes provider(List provider) { + this.provider = provider; + return this; + } + + public ArbitraryRuleResponseDataAttributes addProviderItem(String providerItem) { + this.provider.add(providerItem); + return this; + } + + /** + * The attributes provider. + * + * @return provider + */ + @JsonProperty(JSON_PROPERTY_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProvider() { + return provider; + } + + public void setProvider(List provider) { + this.provider = provider; + } + + public ArbitraryRuleResponseDataAttributes rejected(Boolean rejected) { + this.rejected = rejected; + return this; + } + + /** + * The attributes rejected. + * + * @return rejected + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REJECTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRejected() { + return rejected; + } + + public void setRejected(Boolean rejected) { + this.rejected = rejected; + } + + public ArbitraryRuleResponseDataAttributes ruleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * The attributes rule_name. + * + * @return ruleName + */ + @JsonProperty(JSON_PROPERTY_RULE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRuleName() { + return ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + + public ArbitraryRuleResponseDataAttributes strategy( + ArbitraryRuleResponseDataAttributesStrategy strategy) { + this.strategy = strategy; + this.unparsed |= strategy.unparsed; + return this; + } + + /** + * The definition of ArbitraryRuleResponseDataAttributesStrategy object. + * + * @return strategy + */ + @JsonProperty(JSON_PROPERTY_STRATEGY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ArbitraryRuleResponseDataAttributesStrategy getStrategy() { + return strategy; + } + + public void setStrategy(ArbitraryRuleResponseDataAttributesStrategy strategy) { + this.strategy = strategy; + } + + public ArbitraryRuleResponseDataAttributes type(String type) { + this.type = type; + return this; + } + + /** + * The attributes type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ArbitraryRuleResponseDataAttributes updated(OffsetDateTime updated) { + this.updated = updated; + return this; + } + + /** + * The attributes updated. + * + * @return updated + */ + @JsonProperty(JSON_PROPERTY_UPDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdated() { + return updated; + } + + public void setUpdated(OffsetDateTime updated) { + this.updated = updated; + } + + public ArbitraryRuleResponseDataAttributes version(Integer version) { + this.version = version; + return this; + } + + /** + * The attributes version. maximum: 2147483647 + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributes + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryRuleResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributes arbitraryRuleResponseDataAttributes = + (ArbitraryRuleResponseDataAttributes) o; + return Objects.equals(this.costsToAllocate, arbitraryRuleResponseDataAttributes.costsToAllocate) + && Objects.equals(this.created, arbitraryRuleResponseDataAttributes.created) + && Objects.equals(this.enabled, arbitraryRuleResponseDataAttributes.enabled) + && Objects.equals( + this.lastModifiedUserUuid, arbitraryRuleResponseDataAttributes.lastModifiedUserUuid) + && Objects.equals(this.orderId, arbitraryRuleResponseDataAttributes.orderId) + && Objects.equals(this.provider, arbitraryRuleResponseDataAttributes.provider) + && Objects.equals(this.rejected, arbitraryRuleResponseDataAttributes.rejected) + && Objects.equals(this.ruleName, arbitraryRuleResponseDataAttributes.ruleName) + && Objects.equals(this.strategy, arbitraryRuleResponseDataAttributes.strategy) + && Objects.equals(this.type, arbitraryRuleResponseDataAttributes.type) + && Objects.equals(this.updated, arbitraryRuleResponseDataAttributes.updated) + && Objects.equals(this.version, arbitraryRuleResponseDataAttributes.version) + && Objects.equals( + this.additionalProperties, arbitraryRuleResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + costsToAllocate, + created, + enabled, + lastModifiedUserUuid, + orderId, + provider, + rejected, + ruleName, + strategy, + type, + updated, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseDataAttributes {\n"); + sb.append(" costsToAllocate: ").append(toIndentedString(costsToAllocate)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" lastModifiedUserUuid: ") + .append(toIndentedString(lastModifiedUserUuid)) + .append("\n"); + sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); + sb.append(" rejected: ").append(toIndentedString(rejected)).append("\n"); + sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n"); + sb.append(" strategy: ").append(toIndentedString(strategy)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesCostsToAllocateItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesCostsToAllocateItems.java new file mode 100644 index 00000000000..81dac1242db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesCostsToAllocateItems.java @@ -0,0 +1,264 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of ArbitraryRuleResponseDataAttributesCostsToAllocateItems object. + */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributesCostsToAllocateItems.JSON_PROPERTY_CONDITION, + ArbitraryRuleResponseDataAttributesCostsToAllocateItems.JSON_PROPERTY_TAG, + ArbitraryRuleResponseDataAttributesCostsToAllocateItems.JSON_PROPERTY_VALUE, + ArbitraryRuleResponseDataAttributesCostsToAllocateItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributesCostsToAllocateItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems condition(String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems value(String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems values(List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems addValuesItem(String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributesCostsToAllocateItems + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributesCostsToAllocateItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryRuleResponseDataAttributesCostsToAllocateItems object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributesCostsToAllocateItems + arbitraryRuleResponseDataAttributesCostsToAllocateItems = + (ArbitraryRuleResponseDataAttributesCostsToAllocateItems) o; + return Objects.equals( + this.condition, arbitraryRuleResponseDataAttributesCostsToAllocateItems.condition) + && Objects.equals(this.tag, arbitraryRuleResponseDataAttributesCostsToAllocateItems.tag) + && Objects.equals(this.value, arbitraryRuleResponseDataAttributesCostsToAllocateItems.value) + && Objects.equals( + this.values, arbitraryRuleResponseDataAttributesCostsToAllocateItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryRuleResponseDataAttributesCostsToAllocateItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseDataAttributesCostsToAllocateItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategy.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategy.java new file mode 100644 index 00000000000..9faefcf56ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategy.java @@ -0,0 +1,490 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ArbitraryRuleResponseDataAttributesStrategy object. */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_ALLOCATED_BY, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_ALLOCATED_BY_FILTERS, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_ALLOCATED_BY_TAG_KEYS, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_BASED_ON_COSTS, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_BASED_ON_TIMESERIES, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_EVALUATE_GROUPED_BY_FILTERS, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_EVALUATE_GROUPED_BY_TAG_KEYS, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_GRANULARITY, + ArbitraryRuleResponseDataAttributesStrategy.JSON_PROPERTY_METHOD +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributesStrategy { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOCATED_BY = "allocated_by"; + private List allocatedBy = null; + + public static final String JSON_PROPERTY_ALLOCATED_BY_FILTERS = "allocated_by_filters"; + private List + allocatedByFilters = null; + + public static final String JSON_PROPERTY_ALLOCATED_BY_TAG_KEYS = "allocated_by_tag_keys"; + private List allocatedByTagKeys = null; + + public static final String JSON_PROPERTY_BASED_ON_COSTS = "based_on_costs"; + private List basedOnCosts = null; + + public static final String JSON_PROPERTY_BASED_ON_TIMESERIES = "based_on_timeseries"; + private Map basedOnTimeseries = null; + + public static final String JSON_PROPERTY_EVALUATE_GROUPED_BY_FILTERS = + "evaluate_grouped_by_filters"; + private List + evaluateGroupedByFilters = null; + + public static final String JSON_PROPERTY_EVALUATE_GROUPED_BY_TAG_KEYS = + "evaluate_grouped_by_tag_keys"; + private List evaluateGroupedByTagKeys = null; + + public static final String JSON_PROPERTY_GRANULARITY = "granularity"; + private String granularity; + + public static final String JSON_PROPERTY_METHOD = "method"; + private String method; + + public ArbitraryRuleResponseDataAttributesStrategy() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributesStrategy( + @JsonProperty(required = true, value = JSON_PROPERTY_METHOD) String method) { + this.method = method; + } + + public ArbitraryRuleResponseDataAttributesStrategy allocatedBy( + List allocatedBy) { + this.allocatedBy = allocatedBy; + for (ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems item : allocatedBy) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategy addAllocatedByItem( + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems allocatedByItem) { + if (this.allocatedBy == null) { + this.allocatedBy = new ArrayList<>(); + } + this.allocatedBy.add(allocatedByItem); + this.unparsed |= allocatedByItem.unparsed; + return this; + } + + /** + * The strategy allocated_by. + * + * @return allocatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOCATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAllocatedBy() { + return allocatedBy; + } + + public void setAllocatedBy( + List allocatedBy) { + this.allocatedBy = allocatedBy; + } + + public ArbitraryRuleResponseDataAttributesStrategy allocatedByFilters( + List allocatedByFilters) { + this.allocatedByFilters = allocatedByFilters; + for (ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems item : + allocatedByFilters) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategy addAllocatedByFiltersItem( + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems allocatedByFiltersItem) { + if (this.allocatedByFilters == null) { + this.allocatedByFilters = new ArrayList<>(); + } + this.allocatedByFilters.add(allocatedByFiltersItem); + this.unparsed |= allocatedByFiltersItem.unparsed; + return this; + } + + /** + * The strategy allocated_by_filters. + * + * @return allocatedByFilters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOCATED_BY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getAllocatedByFilters() { + return allocatedByFilters; + } + + public void setAllocatedByFilters( + List allocatedByFilters) { + this.allocatedByFilters = allocatedByFilters; + } + + public ArbitraryRuleResponseDataAttributesStrategy allocatedByTagKeys( + List allocatedByTagKeys) { + this.allocatedByTagKeys = allocatedByTagKeys; + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategy addAllocatedByTagKeysItem( + String allocatedByTagKeysItem) { + if (this.allocatedByTagKeys == null) { + this.allocatedByTagKeys = new ArrayList<>(); + } + this.allocatedByTagKeys.add(allocatedByTagKeysItem); + return this; + } + + /** + * The strategy allocated_by_tag_keys. + * + * @return allocatedByTagKeys + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOCATED_BY_TAG_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAllocatedByTagKeys() { + return allocatedByTagKeys; + } + + public void setAllocatedByTagKeys(List allocatedByTagKeys) { + this.allocatedByTagKeys = allocatedByTagKeys; + } + + public ArbitraryRuleResponseDataAttributesStrategy basedOnCosts( + List basedOnCosts) { + this.basedOnCosts = basedOnCosts; + for (ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems item : basedOnCosts) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategy addBasedOnCostsItem( + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems basedOnCostsItem) { + if (this.basedOnCosts == null) { + this.basedOnCosts = new ArrayList<>(); + } + this.basedOnCosts.add(basedOnCostsItem); + this.unparsed |= basedOnCostsItem.unparsed; + return this; + } + + /** + * The strategy based_on_costs. + * + * @return basedOnCosts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASED_ON_COSTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getBasedOnCosts() { + return basedOnCosts; + } + + public void setBasedOnCosts( + List basedOnCosts) { + this.basedOnCosts = basedOnCosts; + } + + public ArbitraryRuleResponseDataAttributesStrategy basedOnTimeseries( + Map basedOnTimeseries) { + this.basedOnTimeseries = basedOnTimeseries; + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategy putBasedOnTimeseriesItem( + String key, Object basedOnTimeseriesItem) { + if (this.basedOnTimeseries == null) { + this.basedOnTimeseries = new HashMap<>(); + } + this.basedOnTimeseries.put(key, basedOnTimeseriesItem); + return this; + } + + /** + * The rule strategy based_on_timeseries. + * + * @return basedOnTimeseries + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASED_ON_TIMESERIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getBasedOnTimeseries() { + return basedOnTimeseries; + } + + public void setBasedOnTimeseries(Map basedOnTimeseries) { + this.basedOnTimeseries = basedOnTimeseries; + } + + public ArbitraryRuleResponseDataAttributesStrategy evaluateGroupedByFilters( + List + evaluateGroupedByFilters) { + this.evaluateGroupedByFilters = evaluateGroupedByFilters; + for (ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems item : + evaluateGroupedByFilters) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategy addEvaluateGroupedByFiltersItem( + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + evaluateGroupedByFiltersItem) { + if (this.evaluateGroupedByFilters == null) { + this.evaluateGroupedByFilters = new ArrayList<>(); + } + this.evaluateGroupedByFilters.add(evaluateGroupedByFiltersItem); + this.unparsed |= evaluateGroupedByFiltersItem.unparsed; + return this; + } + + /** + * The strategy evaluate_grouped_by_filters. + * + * @return evaluateGroupedByFilters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATE_GROUPED_BY_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List + getEvaluateGroupedByFilters() { + return evaluateGroupedByFilters; + } + + public void setEvaluateGroupedByFilters( + List + evaluateGroupedByFilters) { + this.evaluateGroupedByFilters = evaluateGroupedByFilters; + } + + public ArbitraryRuleResponseDataAttributesStrategy evaluateGroupedByTagKeys( + List evaluateGroupedByTagKeys) { + this.evaluateGroupedByTagKeys = evaluateGroupedByTagKeys; + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategy addEvaluateGroupedByTagKeysItem( + String evaluateGroupedByTagKeysItem) { + if (this.evaluateGroupedByTagKeys == null) { + this.evaluateGroupedByTagKeys = new ArrayList<>(); + } + this.evaluateGroupedByTagKeys.add(evaluateGroupedByTagKeysItem); + return this; + } + + /** + * The strategy evaluate_grouped_by_tag_keys. + * + * @return evaluateGroupedByTagKeys + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATE_GROUPED_BY_TAG_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvaluateGroupedByTagKeys() { + return evaluateGroupedByTagKeys; + } + + public void setEvaluateGroupedByTagKeys(List evaluateGroupedByTagKeys) { + this.evaluateGroupedByTagKeys = evaluateGroupedByTagKeys; + } + + public ArbitraryRuleResponseDataAttributesStrategy granularity(String granularity) { + this.granularity = granularity; + return this; + } + + /** + * The strategy granularity. + * + * @return granularity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRANULARITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGranularity() { + return granularity; + } + + public void setGranularity(String granularity) { + this.granularity = granularity; + } + + public ArbitraryRuleResponseDataAttributesStrategy method(String method) { + this.method = method; + return this; + } + + /** + * The strategy method. + * + * @return method + */ + @JsonProperty(JSON_PROPERTY_METHOD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributesStrategy + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributesStrategy putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryRuleResponseDataAttributesStrategy object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributesStrategy arbitraryRuleResponseDataAttributesStrategy = + (ArbitraryRuleResponseDataAttributesStrategy) o; + return Objects.equals(this.allocatedBy, arbitraryRuleResponseDataAttributesStrategy.allocatedBy) + && Objects.equals( + this.allocatedByFilters, arbitraryRuleResponseDataAttributesStrategy.allocatedByFilters) + && Objects.equals( + this.allocatedByTagKeys, arbitraryRuleResponseDataAttributesStrategy.allocatedByTagKeys) + && Objects.equals( + this.basedOnCosts, arbitraryRuleResponseDataAttributesStrategy.basedOnCosts) + && Objects.equals( + this.basedOnTimeseries, arbitraryRuleResponseDataAttributesStrategy.basedOnTimeseries) + && Objects.equals( + this.evaluateGroupedByFilters, + arbitraryRuleResponseDataAttributesStrategy.evaluateGroupedByFilters) + && Objects.equals( + this.evaluateGroupedByTagKeys, + arbitraryRuleResponseDataAttributesStrategy.evaluateGroupedByTagKeys) + && Objects.equals(this.granularity, arbitraryRuleResponseDataAttributesStrategy.granularity) + && Objects.equals(this.method, arbitraryRuleResponseDataAttributesStrategy.method) + && Objects.equals( + this.additionalProperties, + arbitraryRuleResponseDataAttributesStrategy.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + allocatedBy, + allocatedByFilters, + allocatedByTagKeys, + basedOnCosts, + basedOnTimeseries, + evaluateGroupedByFilters, + evaluateGroupedByTagKeys, + granularity, + method, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseDataAttributesStrategy {\n"); + sb.append(" allocatedBy: ").append(toIndentedString(allocatedBy)).append("\n"); + sb.append(" allocatedByFilters: ").append(toIndentedString(allocatedByFilters)).append("\n"); + sb.append(" allocatedByTagKeys: ").append(toIndentedString(allocatedByTagKeys)).append("\n"); + sb.append(" basedOnCosts: ").append(toIndentedString(basedOnCosts)).append("\n"); + sb.append(" basedOnTimeseries: ").append(toIndentedString(basedOnTimeseries)).append("\n"); + sb.append(" evaluateGroupedByFilters: ") + .append(toIndentedString(evaluateGroupedByFilters)) + .append("\n"); + sb.append(" evaluateGroupedByTagKeys: ") + .append(toIndentedString(evaluateGroupedByTagKeys)) + .append("\n"); + sb.append(" granularity: ").append(toIndentedString(granularity)).append("\n"); + sb.append(" method: ").append(toIndentedString(method)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.java new file mode 100644 index 00000000000..0b214efdf74 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.java @@ -0,0 +1,272 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_CONDITION, + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_TAG, + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_VALUE, + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems condition( + String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems value(String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems values( + List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems addValuesItem( + String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems + arbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems = + (ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems) o; + return Objects.equals( + this.condition, + arbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.condition) + && Objects.equals( + this.tag, arbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.tag) + && Objects.equals( + this.value, arbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.value) + && Objects.equals( + this.values, arbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems.java new file mode 100644 index 00000000000..ea649e098ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems.JSON_PROPERTY_ALLOCATED_TAGS, + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems.JSON_PROPERTY_PERCENTAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOCATED_TAGS = "allocated_tags"; + private List + allocatedTags = new ArrayList<>(); + + public static final String JSON_PROPERTY_PERCENTAGE = "percentage"; + private Double percentage; + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ALLOCATED_TAGS) + List + allocatedTags, + @JsonProperty(required = true, value = JSON_PROPERTY_PERCENTAGE) Double percentage) { + this.allocatedTags = allocatedTags; + this.percentage = percentage; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems allocatedTags( + List + allocatedTags) { + this.allocatedTags = allocatedTags; + for (ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems item : + allocatedTags) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems addAllocatedTagsItem( + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + allocatedTagsItem) { + this.allocatedTags.add(allocatedTagsItem); + this.unparsed |= allocatedTagsItem.unparsed; + return this; + } + + /** + * The items allocated_tags. + * + * @return allocatedTags + */ + @JsonProperty(JSON_PROPERTY_ALLOCATED_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List + getAllocatedTags() { + return allocatedTags; + } + + public void setAllocatedTags( + List + allocatedTags) { + this.allocatedTags = allocatedTags; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems percentage(Double percentage) { + this.percentage = percentage; + return this; + } + + /** + * The items percentage. The numeric value format should be a 32bit + * float value. + * + * @return percentage + */ + @JsonProperty(JSON_PROPERTY_PERCENTAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getPercentage() { + return percentage; + } + + public void setPercentage(Double percentage) { + this.percentage = percentage; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems + arbitraryRuleResponseDataAttributesStrategyAllocatedByItems = + (ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems) o; + return Objects.equals( + this.allocatedTags, + arbitraryRuleResponseDataAttributesStrategyAllocatedByItems.allocatedTags) + && Objects.equals( + this.percentage, arbitraryRuleResponseDataAttributesStrategyAllocatedByItems.percentage) + && Objects.equals( + this.additionalProperties, + arbitraryRuleResponseDataAttributesStrategyAllocatedByItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(allocatedTags, percentage, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems {\n"); + sb.append(" allocatedTags: ").append(toIndentedString(allocatedTags)).append("\n"); + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.java new file mode 100644 index 00000000000..ee1d66c371f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.java @@ -0,0 +1,193 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of + * ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems object. + */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.JSON_PROPERTY_KEY, + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_KEY) String key, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.key = key; + this.value = value; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems key( + String key) { + this.key = key; + return this; + } + + /** + * The items key. + * + * @return key + */ + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems value( + String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this + * ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + arbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems = + (ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems) o; + return Objects.equals( + this.key, + arbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.key) + && Objects.equals( + this.value, + arbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems.value) + && Objects.equals( + this.additionalProperties, + arbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.java new file mode 100644 index 00000000000..335c63dd6e5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.java @@ -0,0 +1,268 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_CONDITION, + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_TAG, + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_VALUE, + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems condition(String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems value(String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems values(List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems addValuesItem( + String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems + arbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems = + (ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems) o; + return Objects.equals( + this.condition, arbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.condition) + && Objects.equals( + this.tag, arbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.tag) + && Objects.equals( + this.value, arbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.value) + && Objects.equals( + this.values, arbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.java new file mode 100644 index 00000000000..07b06f3db50 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.java @@ -0,0 +1,275 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * The definition of ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + * object. + */ +@JsonPropertyOrder({ + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.JSON_PROPERTY_CONDITION, + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.JSON_PROPERTY_TAG, + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.JSON_PROPERTY_VALUE, + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONDITION = "condition"; + private String condition; + + public static final String JSON_PROPERTY_TAG = "tag"; + private String tag; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public static final String JSON_PROPERTY_VALUES = "values"; + private JsonNullable> values = JsonNullable.>undefined(); + + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems() {} + + @JsonCreator + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems( + @JsonProperty(required = true, value = JSON_PROPERTY_CONDITION) String condition, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG) String tag) { + this.condition = condition; + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems condition( + String condition) { + this.condition = condition; + return this; + } + + /** + * The items condition. + * + * @return condition + */ + @JsonProperty(JSON_PROPERTY_CONDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCondition() { + return condition; + } + + public void setCondition(String condition) { + this.condition = condition; + } + + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems tag(String tag) { + this.tag = tag; + return this; + } + + /** + * The items tag. + * + * @return tag + */ + @JsonProperty(JSON_PROPERTY_TAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems value( + String value) { + this.value = value; + return this; + } + + /** + * The items value. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems values( + List values) { + this.values = JsonNullable.>of(values); + return this; + } + + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems addValuesItem( + String valuesItem) { + if (this.values == null || !this.values.isPresent()) { + this.values = JsonNullable.>of(new ArrayList<>()); + } + try { + this.values.get().add(valuesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items values. + * + * @return values + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getValues() { + return values.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getValues_JsonNullable() { + return values; + } + + @JsonProperty(JSON_PROPERTY_VALUES) + public void setValues_JsonNullable(JsonNullable> values) { + this.values = values; + } + + public void setValues(List values) { + this.values = JsonNullable.>of(values); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + */ + @JsonAnySetter + public ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + arbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems = + (ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems) o; + return Objects.equals( + this.condition, + arbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.condition) + && Objects.equals( + this.tag, arbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.tag) + && Objects.equals( + this.value, + arbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.value) + && Objects.equals( + this.values, + arbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems.values) + && Objects.equals( + this.additionalProperties, + arbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(condition, tag, value, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems {\n"); + sb.append(" condition: ").append(toIndentedString(condition)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataType.java new file mode 100644 index 00000000000..d30ddd06f55 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Arbitrary rule resource type. */ +@JsonSerialize(using = ArbitraryRuleResponseDataType.ArbitraryRuleResponseDataTypeSerializer.class) +public class ArbitraryRuleResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("arbitrary_rule")); + + public static final ArbitraryRuleResponseDataType ARBITRARY_RULE = + new ArbitraryRuleResponseDataType("arbitrary_rule"); + + ArbitraryRuleResponseDataType(String value) { + super(value, allowedValues); + } + + public static class ArbitraryRuleResponseDataTypeSerializer + extends StdSerializer { + public ArbitraryRuleResponseDataTypeSerializer(Class t) { + super(t); + } + + public ArbitraryRuleResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ArbitraryRuleResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ArbitraryRuleResponseDataType fromValue(String value) { + return new ArbitraryRuleResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigAttributes.java index a29bf64b5a0..c7e4640c135 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigAttributes.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** Attributes for An AWS CUR config. */ @JsonPropertyOrder({ @@ -54,7 +55,7 @@ public class AwsCURConfigAttributes { private String createdAt; public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; - private List errorMessages = null; + private JsonNullable> errorMessages = JsonNullable.>undefined(); public static final String JSON_PROPERTY_MONTHS = "months"; private Integer months; @@ -196,15 +197,19 @@ public void setCreatedAt(String createdAt) { } public AwsCURConfigAttributes errorMessages(List errorMessages) { - this.errorMessages = errorMessages; + this.errorMessages = JsonNullable.>of(errorMessages); return this; } public AwsCURConfigAttributes addErrorMessagesItem(String errorMessagesItem) { - if (this.errorMessages == null) { - this.errorMessages = new ArrayList<>(); + if (this.errorMessages == null || !this.errorMessages.isPresent()) { + this.errorMessages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.errorMessages.get().add(errorMessagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present } - this.errorMessages.add(errorMessagesItem); return this; } @@ -214,16 +219,26 @@ public AwsCURConfigAttributes addErrorMessagesItem(String errorMessagesItem) { * @return errorMessages */ @jakarta.annotation.Nullable + @JsonIgnore + public List getErrorMessages() { + return errorMessages.orElse(null); + } + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrorMessages() { + public JsonNullable> getErrorMessages_JsonNullable() { return errorMessages; } - public void setErrorMessages(List errorMessages) { + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + public void setErrorMessages_JsonNullable(JsonNullable> errorMessages) { this.errorMessages = errorMessages; } + public void setErrorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + } + public AwsCURConfigAttributes months(Integer months) { this.months = months; return this; diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostData.java b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostData.java index 5d4da486043..d0add225ac3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostData.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostData.java @@ -37,11 +37,7 @@ public AwsCURConfigPostData() {} @JsonCreator public AwsCURConfigPostData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - AwsCURConfigPostRequestAttributes attributes, @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AwsCURConfigPostRequestType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; this.type = type; this.unparsed |= !type.isValid(); } @@ -57,8 +53,9 @@ public AwsCURConfigPostData attributes(AwsCURConfigPostRequestAttributes attribu * * @return attributes */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public AwsCURConfigPostRequestAttributes getAttributes() { return attributes; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigsResponse.java b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigsResponse.java index a475a769b7f..5b1e95a05ac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigsResponse.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,7 +26,15 @@ public class AwsCURConfigsResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = new ArrayList<>(); + + public AwsCURConfigsResponse() {} + + @JsonCreator + public AwsCURConfigsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } public AwsCURConfigsResponse data(List data) { this.data = data; @@ -36,9 +45,6 @@ public AwsCURConfigsResponse data(List data) { } public AwsCURConfigsResponse addDataItem(AwsCURConfig dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } this.data.add(dataItem); this.unparsed |= dataItem.unparsed; return this; @@ -49,9 +55,8 @@ public AwsCURConfigsResponse addDataItem(AwsCURConfig dataItem) { * * @return data */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getData() { return data; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponse.java similarity index 83% rename from src/main/java/com/datadog/api/client/v2/model/AwsCURConfigResponse.java rename to src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponse.java index a3c00c52167..4839ab056ff 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponse.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** Response of AWS CUR config. */ -@JsonPropertyOrder({AwsCURConfigResponse.JSON_PROPERTY_DATA}) +/** The definition of AwsCurConfigResponse object. */ +@JsonPropertyOrder({AwsCurConfigResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class AwsCURConfigResponse { +public class AwsCurConfigResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private AwsCURConfig data; + private AwsCurConfigResponseData data; - public AwsCURConfigResponse data(AwsCURConfig data) { + public AwsCurConfigResponse data(AwsCurConfigResponseData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * AWS CUR config. + * The definition of AwsCurConfigResponseData object. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AwsCURConfig getData() { + public AwsCurConfigResponseData getData() { return data; } - public void setData(AwsCURConfig data) { + public void setData(AwsCurConfigResponseData data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(AwsCURConfig data) { * * @param key The arbitrary key to set * @param value The associated value - * @return AwsCURConfigResponse + * @return AwsCurConfigResponse */ @JsonAnySetter - public AwsCURConfigResponse putAdditionalProperty(String key, Object value) { + public AwsCurConfigResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -93,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this AwsCURConfigResponse object is equal to o. */ + /** Return true if this AwsCurConfigResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,7 +102,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AwsCURConfigResponse awsCurConfigResponse = (AwsCURConfigResponse) o; + AwsCurConfigResponse awsCurConfigResponse = (AwsCurConfigResponse) o; return Objects.equals(this.data, awsCurConfigResponse.data) && Objects.equals(this.additionalProperties, awsCurConfigResponse.additionalProperties); } @@ -115,7 +115,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AwsCURConfigResponse {\n"); + sb.append("class AwsCurConfigResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseData.java new file mode 100644 index 00000000000..a790cf44073 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseData.java @@ -0,0 +1,206 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of AwsCurConfigResponseData object. */ +@JsonPropertyOrder({ + AwsCurConfigResponseData.JSON_PROPERTY_ATTRIBUTES, + AwsCurConfigResponseData.JSON_PROPERTY_ID, + AwsCurConfigResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AwsCurConfigResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AwsCurConfigResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AwsCurConfigResponseDataType type = AwsCurConfigResponseDataType.AWS_CUR_CONFIG; + + public AwsCurConfigResponseData() {} + + @JsonCreator + public AwsCurConfigResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + AwsCurConfigResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AwsCurConfigResponseData attributes(AwsCurConfigResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of AwsCurConfigResponseDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AwsCurConfigResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AwsCurConfigResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public AwsCurConfigResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The AwsCurConfigResponseData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AwsCurConfigResponseData type(AwsCurConfigResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AWS CUR config resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AwsCurConfigResponseDataType getType() { + return type; + } + + public void setType(AwsCurConfigResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AwsCurConfigResponseData + */ + @JsonAnySetter + public AwsCurConfigResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AwsCurConfigResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AwsCurConfigResponseData awsCurConfigResponseData = (AwsCurConfigResponseData) o; + return Objects.equals(this.attributes, awsCurConfigResponseData.attributes) + && Objects.equals(this.id, awsCurConfigResponseData.id) + && Objects.equals(this.type, awsCurConfigResponseData.type) + && Objects.equals(this.additionalProperties, awsCurConfigResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AwsCurConfigResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataAttributes.java new file mode 100644 index 00000000000..f041d6f0b48 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataAttributes.java @@ -0,0 +1,476 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of AwsCurConfigResponseDataAttributes object. */ +@JsonPropertyOrder({ + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_ACCOUNT_FILTERS, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_ACCOUNT_ID, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_BUCKET_NAME, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_BUCKET_REGION, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_CREATED_AT, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_ERROR_MESSAGES, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_MONTHS, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_REPORT_NAME, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_REPORT_PREFIX, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_STATUS, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_STATUS_UPDATED_AT, + AwsCurConfigResponseDataAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AwsCurConfigResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_FILTERS = "account_filters"; + private AwsCurConfigResponseDataAttributesAccountFilters accountFilters; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_BUCKET_NAME = "bucket_name"; + private String bucketName; + + public static final String JSON_PROPERTY_BUCKET_REGION = "bucket_region"; + private String bucketRegion; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; + private JsonNullable> errorMessages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_MONTHS = "months"; + private Long months; + + public static final String JSON_PROPERTY_REPORT_NAME = "report_name"; + private String reportName; + + public static final String JSON_PROPERTY_REPORT_PREFIX = "report_prefix"; + private String reportPrefix; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_STATUS_UPDATED_AT = "status_updated_at"; + private String statusUpdatedAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public AwsCurConfigResponseDataAttributes accountFilters( + AwsCurConfigResponseDataAttributesAccountFilters accountFilters) { + this.accountFilters = accountFilters; + this.unparsed |= accountFilters.unparsed; + return this; + } + + /** + * The definition of AwsCurConfigResponseDataAttributesAccountFilters object. + * + * @return accountFilters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public AwsCurConfigResponseDataAttributesAccountFilters getAccountFilters() { + return accountFilters; + } + + public void setAccountFilters(AwsCurConfigResponseDataAttributesAccountFilters accountFilters) { + this.accountFilters = accountFilters; + } + + public AwsCurConfigResponseDataAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The attributes account_id. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public AwsCurConfigResponseDataAttributes bucketName(String bucketName) { + this.bucketName = bucketName; + return this; + } + + /** + * The attributes bucket_name. + * + * @return bucketName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUCKET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBucketName() { + return bucketName; + } + + public void setBucketName(String bucketName) { + this.bucketName = bucketName; + } + + public AwsCurConfigResponseDataAttributes bucketRegion(String bucketRegion) { + this.bucketRegion = bucketRegion; + return this; + } + + /** + * The attributes bucket_region. + * + * @return bucketRegion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUCKET_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBucketRegion() { + return bucketRegion; + } + + public void setBucketRegion(String bucketRegion) { + this.bucketRegion = bucketRegion; + } + + public AwsCurConfigResponseDataAttributes createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The attributes created_at. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public AwsCurConfigResponseDataAttributes errorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + return this; + } + + public AwsCurConfigResponseDataAttributes addErrorMessagesItem(String errorMessagesItem) { + if (this.errorMessages == null || !this.errorMessages.isPresent()) { + this.errorMessages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.errorMessages.get().add(errorMessagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The attributes error_messages. + * + * @return errorMessages + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getErrorMessages() { + return errorMessages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getErrorMessages_JsonNullable() { + return errorMessages; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + public void setErrorMessages_JsonNullable(JsonNullable> errorMessages) { + this.errorMessages = errorMessages; + } + + public void setErrorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + } + + public AwsCurConfigResponseDataAttributes months(Long months) { + this.months = months; + return this; + } + + /** + * The attributes months. + * + * @return months + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTHS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonths() { + return months; + } + + public void setMonths(Long months) { + this.months = months; + } + + public AwsCurConfigResponseDataAttributes reportName(String reportName) { + this.reportName = reportName; + return this; + } + + /** + * The attributes report_name. + * + * @return reportName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPORT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReportName() { + return reportName; + } + + public void setReportName(String reportName) { + this.reportName = reportName; + } + + public AwsCurConfigResponseDataAttributes reportPrefix(String reportPrefix) { + this.reportPrefix = reportPrefix; + return this; + } + + /** + * The attributes report_prefix. + * + * @return reportPrefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPORT_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReportPrefix() { + return reportPrefix; + } + + public void setReportPrefix(String reportPrefix) { + this.reportPrefix = reportPrefix; + } + + public AwsCurConfigResponseDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The attributes status. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public AwsCurConfigResponseDataAttributes statusUpdatedAt(String statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + return this; + } + + /** + * The attributes status_updated_at. + * + * @return statusUpdatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusUpdatedAt() { + return statusUpdatedAt; + } + + public void setStatusUpdatedAt(String statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + } + + public AwsCurConfigResponseDataAttributes updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The attributes updated_at. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AwsCurConfigResponseDataAttributes + */ + @JsonAnySetter + public AwsCurConfigResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AwsCurConfigResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AwsCurConfigResponseDataAttributes awsCurConfigResponseDataAttributes = + (AwsCurConfigResponseDataAttributes) o; + return Objects.equals(this.accountFilters, awsCurConfigResponseDataAttributes.accountFilters) + && Objects.equals(this.accountId, awsCurConfigResponseDataAttributes.accountId) + && Objects.equals(this.bucketName, awsCurConfigResponseDataAttributes.bucketName) + && Objects.equals(this.bucketRegion, awsCurConfigResponseDataAttributes.bucketRegion) + && Objects.equals(this.createdAt, awsCurConfigResponseDataAttributes.createdAt) + && Objects.equals(this.errorMessages, awsCurConfigResponseDataAttributes.errorMessages) + && Objects.equals(this.months, awsCurConfigResponseDataAttributes.months) + && Objects.equals(this.reportName, awsCurConfigResponseDataAttributes.reportName) + && Objects.equals(this.reportPrefix, awsCurConfigResponseDataAttributes.reportPrefix) + && Objects.equals(this.status, awsCurConfigResponseDataAttributes.status) + && Objects.equals(this.statusUpdatedAt, awsCurConfigResponseDataAttributes.statusUpdatedAt) + && Objects.equals(this.updatedAt, awsCurConfigResponseDataAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, awsCurConfigResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountFilters, + accountId, + bucketName, + bucketRegion, + createdAt, + errorMessages, + months, + reportName, + reportPrefix, + status, + statusUpdatedAt, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AwsCurConfigResponseDataAttributes {\n"); + sb.append(" accountFilters: ").append(toIndentedString(accountFilters)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); + sb.append(" bucketRegion: ").append(toIndentedString(bucketRegion)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); + sb.append(" months: ").append(toIndentedString(months)).append("\n"); + sb.append(" reportName: ").append(toIndentedString(reportName)).append("\n"); + sb.append(" reportPrefix: ").append(toIndentedString(reportPrefix)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusUpdatedAt: ").append(toIndentedString(statusUpdatedAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataAttributesAccountFilters.java b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataAttributesAccountFilters.java new file mode 100644 index 00000000000..ab93e712f9d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataAttributesAccountFilters.java @@ -0,0 +1,237 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of AwsCurConfigResponseDataAttributesAccountFilters object. */ +@JsonPropertyOrder({ + AwsCurConfigResponseDataAttributesAccountFilters.JSON_PROPERTY_EXCLUDED_ACCOUNTS, + AwsCurConfigResponseDataAttributesAccountFilters.JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS, + AwsCurConfigResponseDataAttributesAccountFilters.JSON_PROPERTY_INCLUDED_ACCOUNTS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AwsCurConfigResponseDataAttributesAccountFilters { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXCLUDED_ACCOUNTS = "excluded_accounts"; + private List excludedAccounts = null; + + public static final String JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS = "include_new_accounts"; + private JsonNullable includeNewAccounts = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INCLUDED_ACCOUNTS = "included_accounts"; + private List includedAccounts = null; + + public AwsCurConfigResponseDataAttributesAccountFilters excludedAccounts( + List excludedAccounts) { + this.excludedAccounts = excludedAccounts; + return this; + } + + public AwsCurConfigResponseDataAttributesAccountFilters addExcludedAccountsItem( + String excludedAccountsItem) { + if (this.excludedAccounts == null) { + this.excludedAccounts = new ArrayList<>(); + } + this.excludedAccounts.add(excludedAccountsItem); + return this; + } + + /** + * The account_filters excluded_accounts. + * + * @return excludedAccounts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDED_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExcludedAccounts() { + return excludedAccounts; + } + + public void setExcludedAccounts(List excludedAccounts) { + this.excludedAccounts = excludedAccounts; + } + + public AwsCurConfigResponseDataAttributesAccountFilters includeNewAccounts( + Boolean includeNewAccounts) { + this.includeNewAccounts = JsonNullable.of(includeNewAccounts); + return this; + } + + /** + * The account_filters include_new_accounts. + * + * @return includeNewAccounts + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getIncludeNewAccounts() { + return includeNewAccounts.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIncludeNewAccounts_JsonNullable() { + return includeNewAccounts; + } + + @JsonProperty(JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS) + public void setIncludeNewAccounts_JsonNullable(JsonNullable includeNewAccounts) { + this.includeNewAccounts = includeNewAccounts; + } + + public void setIncludeNewAccounts(Boolean includeNewAccounts) { + this.includeNewAccounts = JsonNullable.of(includeNewAccounts); + } + + public AwsCurConfigResponseDataAttributesAccountFilters includedAccounts( + List includedAccounts) { + this.includedAccounts = includedAccounts; + return this; + } + + public AwsCurConfigResponseDataAttributesAccountFilters addIncludedAccountsItem( + String includedAccountsItem) { + if (this.includedAccounts == null) { + this.includedAccounts = new ArrayList<>(); + } + this.includedAccounts.add(includedAccountsItem); + return this; + } + + /** + * The account_filters included_accounts. + * + * @return includedAccounts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncludedAccounts() { + return includedAccounts; + } + + public void setIncludedAccounts(List includedAccounts) { + this.includedAccounts = includedAccounts; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AwsCurConfigResponseDataAttributesAccountFilters + */ + @JsonAnySetter + public AwsCurConfigResponseDataAttributesAccountFilters putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AwsCurConfigResponseDataAttributesAccountFilters object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AwsCurConfigResponseDataAttributesAccountFilters + awsCurConfigResponseDataAttributesAccountFilters = + (AwsCurConfigResponseDataAttributesAccountFilters) o; + return Objects.equals( + this.excludedAccounts, + awsCurConfigResponseDataAttributesAccountFilters.excludedAccounts) + && Objects.equals( + this.includeNewAccounts, + awsCurConfigResponseDataAttributesAccountFilters.includeNewAccounts) + && Objects.equals( + this.includedAccounts, + awsCurConfigResponseDataAttributesAccountFilters.includedAccounts) + && Objects.equals( + this.additionalProperties, + awsCurConfigResponseDataAttributesAccountFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + excludedAccounts, includeNewAccounts, includedAccounts, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AwsCurConfigResponseDataAttributesAccountFilters {\n"); + sb.append(" excludedAccounts: ").append(toIndentedString(excludedAccounts)).append("\n"); + sb.append(" includeNewAccounts: ").append(toIndentedString(includeNewAccounts)).append("\n"); + sb.append(" includedAccounts: ").append(toIndentedString(includedAccounts)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataType.java new file mode 100644 index 00000000000..ced2d44135e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCurConfigResponseDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** AWS CUR config resource type. */ +@JsonSerialize(using = AwsCurConfigResponseDataType.AwsCurConfigResponseDataTypeSerializer.class) +public class AwsCurConfigResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("aws_cur_config")); + + public static final AwsCurConfigResponseDataType AWS_CUR_CONFIG = + new AwsCurConfigResponseDataType("aws_cur_config"); + + AwsCurConfigResponseDataType(String value) { + super(value, allowedValues); + } + + public static class AwsCurConfigResponseDataTypeSerializer + extends StdSerializer { + public AwsCurConfigResponseDataTypeSerializer(Class t) { + super(t); + } + + public AwsCurConfigResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AwsCurConfigResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AwsCurConfigResponseDataType fromValue(String value) { + return new AwsCurConfigResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java index 6032da52b51..f2f31de2720 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** Azure config. */ @JsonPropertyOrder({ @@ -54,7 +55,7 @@ public class AzureUCConfig { private String datasetType; public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; - private List errorMessages = null; + private JsonNullable> errorMessages = JsonNullable.>undefined(); public static final String JSON_PROPERTY_EXPORT_NAME = "export_name"; private String exportName; @@ -117,7 +118,7 @@ public AzureUCConfig accountId(String accountId) { } /** - * The tenant ID of the azure account. + * The tenant ID of the Azure account. * * @return accountId */ @@ -193,15 +194,19 @@ public void setDatasetType(String datasetType) { } public AzureUCConfig errorMessages(List errorMessages) { - this.errorMessages = errorMessages; + this.errorMessages = JsonNullable.>of(errorMessages); return this; } public AzureUCConfig addErrorMessagesItem(String errorMessagesItem) { - if (this.errorMessages == null) { - this.errorMessages = new ArrayList<>(); + if (this.errorMessages == null || !this.errorMessages.isPresent()) { + this.errorMessages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.errorMessages.get().add(errorMessagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present } - this.errorMessages.add(errorMessagesItem); return this; } @@ -211,16 +216,26 @@ public AzureUCConfig addErrorMessagesItem(String errorMessagesItem) { * @return errorMessages */ @jakarta.annotation.Nullable + @JsonIgnore + public List getErrorMessages() { + return errorMessages.orElse(null); + } + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrorMessages() { + public JsonNullable> getErrorMessages_JsonNullable() { return errorMessages; } - public void setErrorMessages(List errorMessages) { + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + public void setErrorMessages_JsonNullable(JsonNullable> errorMessages) { this.errorMessages = errorMessages; } + public void setErrorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + } + public AzureUCConfig exportName(String exportName) { this.exportName = exportName; return this; diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPatchData.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPatchData.java index c64b0df79a9..b76e82bbcec 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPatchData.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPatchData.java @@ -37,12 +37,8 @@ public AzureUCConfigPatchData() {} @JsonCreator public AzureUCConfigPatchData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - AzureUCConfigPatchRequestAttributes attributes, @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AzureUCConfigPatchRequestType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; this.type = type; this.unparsed |= !type.isValid(); } @@ -58,8 +54,9 @@ public AzureUCConfigPatchData attributes(AzureUCConfigPatchRequestAttributes att * * @return attributes */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public AzureUCConfigPatchRequestAttributes getAttributes() { return attributes; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostData.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostData.java index 73f7e3ecc02..02737bccbfb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostData.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostData.java @@ -37,12 +37,8 @@ public AzureUCConfigPostData() {} @JsonCreator public AzureUCConfigPostData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - AzureUCConfigPostRequestAttributes attributes, @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AzureUCConfigPostRequestType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; this.type = type; this.unparsed |= !type.isValid(); } @@ -58,8 +54,9 @@ public AzureUCConfigPostData attributes(AzureUCConfigPostRequestAttributes attri * * @return attributes */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public AzureUCConfigPostRequestAttributes getAttributes() { return attributes; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostRequestAttributes.java index 68d6da53a37..a96e3c6e9dc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPostRequestAttributes.java @@ -23,7 +23,6 @@ AzureUCConfigPostRequestAttributes.JSON_PROPERTY_ACTUAL_BILL_CONFIG, AzureUCConfigPostRequestAttributes.JSON_PROPERTY_AMORTIZED_BILL_CONFIG, AzureUCConfigPostRequestAttributes.JSON_PROPERTY_CLIENT_ID, - AzureUCConfigPostRequestAttributes.JSON_PROPERTY_IS_ENABLED, AzureUCConfigPostRequestAttributes.JSON_PROPERTY_SCOPE }) @jakarta.annotation.Generated( @@ -42,9 +41,6 @@ public class AzureUCConfigPostRequestAttributes { public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; private String clientId; - public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; - private Boolean isEnabled; - public static final String JSON_PROPERTY_SCOPE = "scope"; private String scope; @@ -74,7 +70,7 @@ public AzureUCConfigPostRequestAttributes accountId(String accountId) { } /** - * The tenant ID of the azure account. + * The tenant ID of the Azure account. * * @return accountId */ @@ -136,7 +132,7 @@ public AzureUCConfigPostRequestAttributes clientId(String clientId) { } /** - * The client ID of the azure account. + * The client ID of the Azure account. * * @return clientId */ @@ -150,27 +146,6 @@ public void setClientId(String clientId) { this.clientId = clientId; } - public AzureUCConfigPostRequestAttributes isEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Whether or not the Cloud Cost Management account is enabled. - * - * @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - - public void setIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - } - public AzureUCConfigPostRequestAttributes scope(String scope) { this.scope = scope; return this; @@ -254,7 +229,6 @@ public boolean equals(Object o) { && Objects.equals( this.amortizedBillConfig, azureUcConfigPostRequestAttributes.amortizedBillConfig) && Objects.equals(this.clientId, azureUcConfigPostRequestAttributes.clientId) - && Objects.equals(this.isEnabled, azureUcConfigPostRequestAttributes.isEnabled) && Objects.equals(this.scope, azureUcConfigPostRequestAttributes.scope) && Objects.equals( this.additionalProperties, azureUcConfigPostRequestAttributes.additionalProperties); @@ -263,13 +237,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - accountId, - actualBillConfig, - amortizedBillConfig, - clientId, - isEnabled, - scope, - additionalProperties); + accountId, actualBillConfig, amortizedBillConfig, clientId, scope, additionalProperties); } @Override @@ -282,7 +250,6 @@ public String toString() { .append(toIndentedString(amortizedBillConfig)) .append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); - sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigsResponse.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigsResponse.java index b483d11729c..efb04e43bab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigsResponse.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,7 +26,15 @@ public class AzureUCConfigsResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = new ArrayList<>(); + + public AzureUCConfigsResponse() {} + + @JsonCreator + public AzureUCConfigsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } public AzureUCConfigsResponse data(List data) { this.data = data; @@ -36,9 +45,6 @@ public AzureUCConfigsResponse data(List data) { } public AzureUCConfigsResponse addDataItem(AzureUCConfigPair dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } this.data.add(dataItem); this.unparsed |= dataItem.unparsed; return this; @@ -49,9 +55,8 @@ public AzureUCConfigsResponse addDataItem(AzureUCConfigPair dataItem) { * * @return data */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getData() { return data; } diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequest.java new file mode 100644 index 00000000000..413e40d08d1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequest.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateRulesetRequest object. */ +@JsonPropertyOrder({CreateRulesetRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateRulesetRequestData data; + + public CreateRulesetRequest data(CreateRulesetRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of CreateRulesetRequestData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateRulesetRequestData getData() { + return data; + } + + public void setData(CreateRulesetRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequest + */ + @JsonAnySetter + public CreateRulesetRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateRulesetRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequest createRulesetRequest = (CreateRulesetRequest) o; + return Objects.equals(this.data, createRulesetRequest.data) + && Objects.equals(this.additionalProperties, createRulesetRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestData.java new file mode 100644 index 00000000000..dbbbf28e29b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestData.java @@ -0,0 +1,206 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateRulesetRequestData object. */ +@JsonPropertyOrder({ + CreateRulesetRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateRulesetRequestData.JSON_PROPERTY_ID, + CreateRulesetRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateRulesetRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CreateRulesetRequestDataType type = CreateRulesetRequestDataType.CREATE_RULESET; + + public CreateRulesetRequestData() {} + + @JsonCreator + public CreateRulesetRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CreateRulesetRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateRulesetRequestData attributes(CreateRulesetRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of CreateRulesetRequestDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateRulesetRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateRulesetRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateRulesetRequestData id(String id) { + this.id = id; + return this; + } + + /** + * The CreateRulesetRequestData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CreateRulesetRequestData type(CreateRulesetRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Create ruleset resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateRulesetRequestDataType getType() { + return type; + } + + public void setType(CreateRulesetRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestData + */ + @JsonAnySetter + public CreateRulesetRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateRulesetRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestData createRulesetRequestData = (CreateRulesetRequestData) o; + return Objects.equals(this.attributes, createRulesetRequestData.attributes) + && Objects.equals(this.id, createRulesetRequestData.id) + && Objects.equals(this.type, createRulesetRequestData.type) + && Objects.equals(this.additionalProperties, createRulesetRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributes.java new file mode 100644 index 00000000000..2962d4449cd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributes.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateRulesetRequestDataAttributes object. */ +@JsonPropertyOrder({ + CreateRulesetRequestDataAttributes.JSON_PROPERTY_ENABLED, + CreateRulesetRequestDataAttributes.JSON_PROPERTY_RULES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_RULES = "rules"; + private List rules = new ArrayList<>(); + + public CreateRulesetRequestDataAttributes() {} + + @JsonCreator + public CreateRulesetRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RULES) + List rules) { + this.rules = rules; + } + + public CreateRulesetRequestDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The attributes enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public CreateRulesetRequestDataAttributes rules( + List rules) { + this.rules = rules; + for (CreateRulesetRequestDataAttributesRulesItems item : rules) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateRulesetRequestDataAttributes addRulesItem( + CreateRulesetRequestDataAttributesRulesItems rulesItem) { + this.rules.add(rulesItem); + this.unparsed |= rulesItem.unparsed; + return this; + } + + /** + * The attributes rules. + * + * @return rules + */ + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestDataAttributes + */ + @JsonAnySetter + public CreateRulesetRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateRulesetRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestDataAttributes createRulesetRequestDataAttributes = + (CreateRulesetRequestDataAttributes) o; + return Objects.equals(this.enabled, createRulesetRequestDataAttributes.enabled) + && Objects.equals(this.rules, createRulesetRequestDataAttributes.rules) + && Objects.equals( + this.additionalProperties, createRulesetRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, rules, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequestDataAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItems.java new file mode 100644 index 00000000000..6872437291c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItems.java @@ -0,0 +1,357 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of CreateRulesetRequestDataAttributesRulesItems object. */ +@JsonPropertyOrder({ + CreateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_ENABLED, + CreateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_MAPPING, + CreateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_METADATA, + CreateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_NAME, + CreateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_QUERY, + CreateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_REFERENCE_TABLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestDataAttributesRulesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + private JsonNullable mapping = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private JsonNullable> metadata = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private JsonNullable query = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REFERENCE_TABLE = "reference_table"; + private JsonNullable referenceTable = + JsonNullable.undefined(); + + public CreateRulesetRequestDataAttributesRulesItems() {} + + @JsonCreator + public CreateRulesetRequestDataAttributesRulesItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.enabled = enabled; + this.name = name; + } + + public CreateRulesetRequestDataAttributesRulesItems enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The items enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public CreateRulesetRequestDataAttributesRulesItems mapping( + CreateRulesetRequestDataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); + return this; + } + + /** + * The definition of CreateRulesetRequestDataAttributesRulesItemsMapping object. + * + * @return mapping + */ + @jakarta.annotation.Nullable + @JsonIgnore + public CreateRulesetRequestDataAttributesRulesItemsMapping getMapping() { + return mapping.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getMapping_JsonNullable() { + return mapping; + } + + @JsonProperty(JSON_PROPERTY_MAPPING) + public void setMapping_JsonNullable( + JsonNullable mapping) { + this.mapping = mapping; + } + + public void setMapping(CreateRulesetRequestDataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); + } + + public CreateRulesetRequestDataAttributesRulesItems metadata(Map metadata) { + this.metadata = JsonNullable.>of(metadata); + return this; + } + + public CreateRulesetRequestDataAttributesRulesItems putMetadataItem( + String key, String metadataItem) { + if (this.metadata == null || !this.metadata.isPresent()) { + this.metadata = JsonNullable.>of(new HashMap<>()); + } + try { + this.metadata.get().put(key, metadataItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items metadata. + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getMetadata() { + return metadata.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getMetadata_JsonNullable() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + public void setMetadata_JsonNullable(JsonNullable> metadata) { + this.metadata = metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = JsonNullable.>of(metadata); + } + + public CreateRulesetRequestDataAttributesRulesItems name(String name) { + this.name = name; + return this; + } + + /** + * The items name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateRulesetRequestDataAttributesRulesItems query( + CreateRulesetRequestDataAttributesRulesItemsQuery query) { + this.query = JsonNullable.of(query); + return this; + } + + /** + * The definition of CreateRulesetRequestDataAttributesRulesItemsQuery object. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonIgnore + public CreateRulesetRequestDataAttributesRulesItemsQuery getQuery() { + return query.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getQuery_JsonNullable() { + return query; + } + + @JsonProperty(JSON_PROPERTY_QUERY) + public void setQuery_JsonNullable( + JsonNullable query) { + this.query = query; + } + + public void setQuery(CreateRulesetRequestDataAttributesRulesItemsQuery query) { + this.query = JsonNullable.of(query); + } + + public CreateRulesetRequestDataAttributesRulesItems referenceTable( + CreateRulesetRequestDataAttributesRulesItemsReferenceTable referenceTable) { + this.referenceTable = + JsonNullable.of(referenceTable); + return this; + } + + /** + * The definition of CreateRulesetRequestDataAttributesRulesItemsReferenceTable + * object. + * + * @return referenceTable + */ + @jakarta.annotation.Nullable + @JsonIgnore + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable getReferenceTable() { + return referenceTable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getReferenceTable_JsonNullable() { + return referenceTable; + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_TABLE) + public void setReferenceTable_JsonNullable( + JsonNullable referenceTable) { + this.referenceTable = referenceTable; + } + + public void setReferenceTable( + CreateRulesetRequestDataAttributesRulesItemsReferenceTable referenceTable) { + this.referenceTable = + JsonNullable.of(referenceTable); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestDataAttributesRulesItems + */ + @JsonAnySetter + public CreateRulesetRequestDataAttributesRulesItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateRulesetRequestDataAttributesRulesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestDataAttributesRulesItems createRulesetRequestDataAttributesRulesItems = + (CreateRulesetRequestDataAttributesRulesItems) o; + return Objects.equals(this.enabled, createRulesetRequestDataAttributesRulesItems.enabled) + && Objects.equals(this.mapping, createRulesetRequestDataAttributesRulesItems.mapping) + && Objects.equals(this.metadata, createRulesetRequestDataAttributesRulesItems.metadata) + && Objects.equals(this.name, createRulesetRequestDataAttributesRulesItems.name) + && Objects.equals(this.query, createRulesetRequestDataAttributesRulesItems.query) + && Objects.equals( + this.referenceTable, createRulesetRequestDataAttributesRulesItems.referenceTable) + && Objects.equals( + this.additionalProperties, + createRulesetRequestDataAttributesRulesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + enabled, mapping, metadata, name, query, referenceTable, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequestDataAttributesRulesItems {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" referenceTable: ").append(toIndentedString(referenceTable)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsMapping.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsMapping.java new file mode 100644 index 00000000000..76763e40189 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsMapping.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateRulesetRequestDataAttributesRulesItemsMapping object. */ +@JsonPropertyOrder({ + CreateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_DESTINATION_KEY, + CreateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_IF_NOT_EXISTS, + CreateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_SOURCE_KEYS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestDataAttributesRulesItemsMapping { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESTINATION_KEY = "destination_key"; + private String destinationKey; + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; + private List sourceKeys = new ArrayList<>(); + + public CreateRulesetRequestDataAttributesRulesItemsMapping() {} + + @JsonCreator + public CreateRulesetRequestDataAttributesRulesItemsMapping( + @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION_KEY) String destinationKey, + @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys) { + this.destinationKey = destinationKey; + this.ifNotExists = ifNotExists; + this.sourceKeys = sourceKeys; + } + + public CreateRulesetRequestDataAttributesRulesItemsMapping destinationKey(String destinationKey) { + this.destinationKey = destinationKey; + return this; + } + + /** + * The mapping destination_key. + * + * @return destinationKey + */ + @JsonProperty(JSON_PROPERTY_DESTINATION_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDestinationKey() { + return destinationKey; + } + + public void setDestinationKey(String destinationKey) { + this.destinationKey = destinationKey; + } + + public CreateRulesetRequestDataAttributesRulesItemsMapping ifNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The mapping if_not_exists. + * + * @return ifNotExists + */ + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public CreateRulesetRequestDataAttributesRulesItemsMapping sourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + return this; + } + + public CreateRulesetRequestDataAttributesRulesItemsMapping addSourceKeysItem( + String sourceKeysItem) { + this.sourceKeys.add(sourceKeysItem); + return this; + } + + /** + * The mapping source_keys. + * + * @return sourceKeys + */ + @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSourceKeys() { + return sourceKeys; + } + + public void setSourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestDataAttributesRulesItemsMapping + */ + @JsonAnySetter + public CreateRulesetRequestDataAttributesRulesItemsMapping putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this CreateRulesetRequestDataAttributesRulesItemsMapping object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestDataAttributesRulesItemsMapping + createRulesetRequestDataAttributesRulesItemsMapping = + (CreateRulesetRequestDataAttributesRulesItemsMapping) o; + return Objects.equals( + this.destinationKey, createRulesetRequestDataAttributesRulesItemsMapping.destinationKey) + && Objects.equals( + this.ifNotExists, createRulesetRequestDataAttributesRulesItemsMapping.ifNotExists) + && Objects.equals( + this.sourceKeys, createRulesetRequestDataAttributesRulesItemsMapping.sourceKeys) + && Objects.equals( + this.additionalProperties, + createRulesetRequestDataAttributesRulesItemsMapping.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(destinationKey, ifNotExists, sourceKeys, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequestDataAttributesRulesItemsMapping {\n"); + sb.append(" destinationKey: ").append(toIndentedString(destinationKey)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQuery.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQuery.java new file mode 100644 index 00000000000..eb10696fb86 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQuery.java @@ -0,0 +1,247 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of CreateRulesetRequestDataAttributesRulesItemsQuery object. */ +@JsonPropertyOrder({ + CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_ADDITION, + CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_CASE_INSENSITIVITY, + CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_NOT_EXISTS, + CreateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestDataAttributesRulesItemsQuery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADDITION = "addition"; + private CreateRulesetRequestDataAttributesRulesItemsQueryAddition addition; + + public static final String JSON_PROPERTY_CASE_INSENSITIVITY = "case_insensitivity"; + private Boolean caseInsensitivity; + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public CreateRulesetRequestDataAttributesRulesItemsQuery() {} + + @JsonCreator + public CreateRulesetRequestDataAttributesRulesItemsQuery( + @JsonProperty(required = true, value = JSON_PROPERTY_ADDITION) + CreateRulesetRequestDataAttributesRulesItemsQueryAddition addition, + @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.addition = addition; + if (addition != null) { + this.unparsed |= addition.unparsed; + } + this.ifNotExists = ifNotExists; + this.query = query; + } + + public CreateRulesetRequestDataAttributesRulesItemsQuery addition( + CreateRulesetRequestDataAttributesRulesItemsQueryAddition addition) { + this.addition = addition; + if (addition != null) { + this.unparsed |= addition.unparsed; + } + return this; + } + + /** + * The definition of CreateRulesetRequestDataAttributesRulesItemsQueryAddition + * object. + * + * @return addition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateRulesetRequestDataAttributesRulesItemsQueryAddition getAddition() { + return addition; + } + + public void setAddition(CreateRulesetRequestDataAttributesRulesItemsQueryAddition addition) { + this.addition = addition; + } + + public CreateRulesetRequestDataAttributesRulesItemsQuery caseInsensitivity( + Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + return this; + } + + /** + * The query case_insensitivity. + * + * @return caseInsensitivity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_INSENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCaseInsensitivity() { + return caseInsensitivity; + } + + public void setCaseInsensitivity(Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + } + + public CreateRulesetRequestDataAttributesRulesItemsQuery ifNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The query if_not_exists. + * + * @return ifNotExists + */ + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public CreateRulesetRequestDataAttributesRulesItemsQuery query(String query) { + this.query = query; + return this; + } + + /** + * The query query. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestDataAttributesRulesItemsQuery + */ + @JsonAnySetter + public CreateRulesetRequestDataAttributesRulesItemsQuery putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateRulesetRequestDataAttributesRulesItemsQuery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestDataAttributesRulesItemsQuery + createRulesetRequestDataAttributesRulesItemsQuery = + (CreateRulesetRequestDataAttributesRulesItemsQuery) o; + return Objects.equals(this.addition, createRulesetRequestDataAttributesRulesItemsQuery.addition) + && Objects.equals( + this.caseInsensitivity, + createRulesetRequestDataAttributesRulesItemsQuery.caseInsensitivity) + && Objects.equals( + this.ifNotExists, createRulesetRequestDataAttributesRulesItemsQuery.ifNotExists) + && Objects.equals(this.query, createRulesetRequestDataAttributesRulesItemsQuery.query) + && Objects.equals( + this.additionalProperties, + createRulesetRequestDataAttributesRulesItemsQuery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(addition, caseInsensitivity, ifNotExists, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequestDataAttributesRulesItemsQuery {\n"); + sb.append(" addition: ").append(toIndentedString(addition)).append("\n"); + sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQueryAddition.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQueryAddition.java new file mode 100644 index 00000000000..37692192930 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsQueryAddition.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of CreateRulesetRequestDataAttributesRulesItemsQueryAddition object. + */ +@JsonPropertyOrder({ + CreateRulesetRequestDataAttributesRulesItemsQueryAddition.JSON_PROPERTY_KEY, + CreateRulesetRequestDataAttributesRulesItemsQueryAddition.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestDataAttributesRulesItemsQueryAddition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public CreateRulesetRequestDataAttributesRulesItemsQueryAddition() {} + + @JsonCreator + public CreateRulesetRequestDataAttributesRulesItemsQueryAddition( + @JsonProperty(required = true, value = JSON_PROPERTY_KEY) String key, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.key = key; + this.value = value; + } + + public CreateRulesetRequestDataAttributesRulesItemsQueryAddition key(String key) { + this.key = key; + return this; + } + + /** + * The addition key. + * + * @return key + */ + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public CreateRulesetRequestDataAttributesRulesItemsQueryAddition value(String value) { + this.value = value; + return this; + } + + /** + * The addition value. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestDataAttributesRulesItemsQueryAddition + */ + @JsonAnySetter + public CreateRulesetRequestDataAttributesRulesItemsQueryAddition putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this CreateRulesetRequestDataAttributesRulesItemsQueryAddition object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestDataAttributesRulesItemsQueryAddition + createRulesetRequestDataAttributesRulesItemsQueryAddition = + (CreateRulesetRequestDataAttributesRulesItemsQueryAddition) o; + return Objects.equals(this.key, createRulesetRequestDataAttributesRulesItemsQueryAddition.key) + && Objects.equals( + this.value, createRulesetRequestDataAttributesRulesItemsQueryAddition.value) + && Objects.equals( + this.additionalProperties, + createRulesetRequestDataAttributesRulesItemsQueryAddition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequestDataAttributesRulesItemsQueryAddition {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTable.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTable.java new file mode 100644 index 00000000000..7a015154f4d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTable.java @@ -0,0 +1,301 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of CreateRulesetRequestDataAttributesRulesItemsReferenceTable object. + */ +@JsonPropertyOrder({ + CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_CASE_INSENSITIVITY, + CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_FIELD_PAIRS, + CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_NOT_EXISTS, + CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_SOURCE_KEYS, + CreateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_TABLE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestDataAttributesRulesItemsReferenceTable { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CASE_INSENSITIVITY = "case_insensitivity"; + private Boolean caseInsensitivity; + + public static final String JSON_PROPERTY_FIELD_PAIRS = "field_pairs"; + private List + fieldPairs = new ArrayList<>(); + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; + private List sourceKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE_NAME = "table_name"; + private String tableName; + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable() {} + + @JsonCreator + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable( + @JsonProperty(required = true, value = JSON_PROPERTY_FIELD_PAIRS) + List + fieldPairs, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys, + @JsonProperty(required = true, value = JSON_PROPERTY_TABLE_NAME) String tableName) { + this.fieldPairs = fieldPairs; + this.sourceKeys = sourceKeys; + this.tableName = tableName; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable caseInsensitivity( + Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + return this; + } + + /** + * The reference_table case_insensitivity. + * + * @return caseInsensitivity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_INSENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCaseInsensitivity() { + return caseInsensitivity; + } + + public void setCaseInsensitivity(Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable fieldPairs( + List fieldPairs) { + this.fieldPairs = fieldPairs; + for (CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems item : + fieldPairs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable addFieldPairsItem( + CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems fieldPairsItem) { + this.fieldPairs.add(fieldPairsItem); + this.unparsed |= fieldPairsItem.unparsed; + return this; + } + + /** + * The reference_table field_pairs. + * + * @return fieldPairs + */ + @JsonProperty(JSON_PROPERTY_FIELD_PAIRS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List + getFieldPairs() { + return fieldPairs; + } + + public void setFieldPairs( + List fieldPairs) { + this.fieldPairs = fieldPairs; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable ifNotExists( + Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The reference_table if_not_exists. + * + * @return ifNotExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable sourceKeys( + List sourceKeys) { + this.sourceKeys = sourceKeys; + return this; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable addSourceKeysItem( + String sourceKeysItem) { + this.sourceKeys.add(sourceKeysItem); + return this; + } + + /** + * The reference_table source_keys. + * + * @return sourceKeys + */ + @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSourceKeys() { + return sourceKeys; + } + + public void setSourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable tableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * The reference_table table_name. + * + * @return tableName + */ + @JsonProperty(JSON_PROPERTY_TABLE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestDataAttributesRulesItemsReferenceTable + */ + @JsonAnySetter + public CreateRulesetRequestDataAttributesRulesItemsReferenceTable putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this CreateRulesetRequestDataAttributesRulesItemsReferenceTable object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestDataAttributesRulesItemsReferenceTable + createRulesetRequestDataAttributesRulesItemsReferenceTable = + (CreateRulesetRequestDataAttributesRulesItemsReferenceTable) o; + return Objects.equals( + this.caseInsensitivity, + createRulesetRequestDataAttributesRulesItemsReferenceTable.caseInsensitivity) + && Objects.equals( + this.fieldPairs, createRulesetRequestDataAttributesRulesItemsReferenceTable.fieldPairs) + && Objects.equals( + this.ifNotExists, + createRulesetRequestDataAttributesRulesItemsReferenceTable.ifNotExists) + && Objects.equals( + this.sourceKeys, createRulesetRequestDataAttributesRulesItemsReferenceTable.sourceKeys) + && Objects.equals( + this.tableName, createRulesetRequestDataAttributesRulesItemsReferenceTable.tableName) + && Objects.equals( + this.additionalProperties, + createRulesetRequestDataAttributesRulesItemsReferenceTable.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + caseInsensitivity, fieldPairs, ifNotExists, sourceKeys, tableName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateRulesetRequestDataAttributesRulesItemsReferenceTable {\n"); + sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); + sb.append(" fieldPairs: ").append(toIndentedString(fieldPairs)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); + sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.java new file mode 100644 index 00000000000..0b3eac8fb91 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.java @@ -0,0 +1,193 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + * object. + */ +@JsonPropertyOrder({ + CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + .JSON_PROPERTY_INPUT_COLUMN, + CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.JSON_PROPERTY_OUTPUT_KEY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INPUT_COLUMN = "input_column"; + private String inputColumn; + + public static final String JSON_PROPERTY_OUTPUT_KEY = "output_key"; + private String outputKey; + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems() {} + + @JsonCreator + public CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT_COLUMN) String inputColumn, + @JsonProperty(required = true, value = JSON_PROPERTY_OUTPUT_KEY) String outputKey) { + this.inputColumn = inputColumn; + this.outputKey = outputKey; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems inputColumn( + String inputColumn) { + this.inputColumn = inputColumn; + return this; + } + + /** + * The items input_column. + * + * @return inputColumn + */ + @JsonProperty(JSON_PROPERTY_INPUT_COLUMN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInputColumn() { + return inputColumn; + } + + public void setInputColumn(String inputColumn) { + this.inputColumn = inputColumn; + } + + public CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems outputKey( + String outputKey) { + this.outputKey = outputKey; + return this; + } + + /** + * The items output_key. + * + * @return outputKey + */ + @JsonProperty(JSON_PROPERTY_OUTPUT_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutputKey() { + return outputKey; + } + + public void setOutputKey(String outputKey) { + this.outputKey = outputKey; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + */ + @JsonAnySetter + public CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + createRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems = + (CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems) o; + return Objects.equals( + this.inputColumn, + createRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.inputColumn) + && Objects.equals( + this.outputKey, + createRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.outputKey) + && Objects.equals( + this.additionalProperties, + createRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(inputColumn, outputKey, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class CreateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems {\n"); + sb.append(" inputColumn: ").append(toIndentedString(inputColumn)).append("\n"); + sb.append(" outputKey: ").append(toIndentedString(outputKey)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataType.java new file mode 100644 index 00000000000..c2fb6461245 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateRulesetRequestDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Create ruleset resource type. */ +@JsonSerialize(using = CreateRulesetRequestDataType.CreateRulesetRequestDataTypeSerializer.class) +public class CreateRulesetRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("create_ruleset")); + + public static final CreateRulesetRequestDataType CREATE_RULESET = + new CreateRulesetRequestDataType("create_ruleset"); + + CreateRulesetRequestDataType(String value) { + super(value, allowedValues); + } + + public static class CreateRulesetRequestDataTypeSerializer + extends StdSerializer { + public CreateRulesetRequestDataTypeSerializer(Class t) { + super(t); + } + + public CreateRulesetRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CreateRulesetRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CreateRulesetRequestDataType fromValue(String value) { + return new CreateRulesetRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfig.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfig.java index d3917cbeb0b..1c5ceba94c0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfig.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** GCP Usage Cost config. */ +/** Google Cloud Usage Cost config. */ @JsonPropertyOrder({ GCPUsageCostConfig.JSON_PROPERTY_ATTRIBUTES, GCPUsageCostConfig.JSON_PROPERTY_ID, @@ -56,7 +56,7 @@ public GCPUsageCostConfig attributes(GCPUsageCostConfigAttributes attributes) { } /** - * Attributes for a GCP Usage Cost config. + * Attributes for a Google Cloud Usage Cost config. * * @return attributes */ @@ -76,7 +76,7 @@ public GCPUsageCostConfig id(String id) { } /** - * The ID of the GCP Usage Cost config. + * The ID of the Google Cloud Usage Cost config. * * @return id */ @@ -98,7 +98,7 @@ public GCPUsageCostConfig type(GCPUsageCostConfigType type) { } /** - * Type of GCP Usage Cost config. + * Type of Google Cloud Usage Cost config. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigAttributes.java index 3b151526f01..6494f226438 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigAttributes.java @@ -20,7 +20,7 @@ import java.util.Objects; import org.openapitools.jackson.nullable.JsonNullable; -/** Attributes for a GCP Usage Cost config. */ +/** Attributes for a Google Cloud Usage Cost config. */ @JsonPropertyOrder({ GCPUsageCostConfigAttributes.JSON_PROPERTY_ACCOUNT_ID, GCPUsageCostConfigAttributes.JSON_PROPERTY_BUCKET_NAME, @@ -106,7 +106,7 @@ public GCPUsageCostConfigAttributes accountId(String accountId) { } /** - * The GCP account ID. + * The Google Cloud account ID. * * @return accountId */ @@ -126,7 +126,7 @@ public GCPUsageCostConfigAttributes bucketName(String bucketName) { } /** - * The GCP bucket name used to store the Usage Cost export. + * The Google Cloud bucket name used to store the Usage Cost export. * * @return bucketName */ @@ -146,7 +146,7 @@ public GCPUsageCostConfigAttributes createdAt(String createdAt) { } /** - * The timestamp when the GCP Usage Cost config was created. + * The timestamp when the Google Cloud Usage Cost config was created. * * @return createdAt */ @@ -167,7 +167,7 @@ public GCPUsageCostConfigAttributes dataset(String dataset) { } /** - * The export dataset name used for the GCP Usage Cost Report. + * The export dataset name used for the Google Cloud Usage Cost Report. * * @return dataset */ @@ -199,7 +199,7 @@ public GCPUsageCostConfigAttributes addErrorMessagesItem(String errorMessagesIte } /** - * The error messages for the GCP Usage Cost config. + * The error messages for the Google Cloud Usage Cost config. * * @return errorMessages */ @@ -230,7 +230,7 @@ public GCPUsageCostConfigAttributes exportPrefix(String exportPrefix) { } /** - * The export prefix used for the GCP Usage Cost Report. + * The export prefix used for the Google Cloud Usage Cost Report. * * @return exportPrefix */ @@ -250,7 +250,7 @@ public GCPUsageCostConfigAttributes exportProjectName(String exportProjectName) } /** - * The name of the GCP Usage Cost Report. + * The name of the Google Cloud Usage Cost Report. * * @return exportProjectName */ @@ -294,7 +294,7 @@ public GCPUsageCostConfigAttributes projectId(String projectId) { } /** - * The project_id of the GCP Usage Cost report. + * The project_id of the Google Cloud Usage Cost report. * * @return projectId */ @@ -315,7 +315,7 @@ public GCPUsageCostConfigAttributes serviceAccount(String serviceAccount) { } /** - * The unique GCP service account email. + * The unique Google Cloud service account email. * * @return serviceAccount */ @@ -335,7 +335,7 @@ public GCPUsageCostConfigAttributes status(String status) { } /** - * The status of the GCP Usage Cost config. + * The status of the Google Cloud Usage Cost config. * * @return status */ @@ -355,7 +355,7 @@ public GCPUsageCostConfigAttributes statusUpdatedAt(String statusUpdatedAt) { } /** - * The timestamp when the GCP Usage Cost config status was updated. + * The timestamp when the Google Cloud Usage Cost config status was updated. * * @return statusUpdatedAt */ @@ -376,7 +376,7 @@ public GCPUsageCostConfigAttributes updatedAt(String updatedAt) { } /** - * The timestamp when the GCP Usage Cost config status was updated. + * The timestamp when the Google Cloud Usage Cost config status was updated. * * @return updatedAt */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchData.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchData.java index 6a944787d1d..736bb4a491c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchData.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchData.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** GCP Usage Cost config patch data. */ +/** Google Cloud Usage Cost config patch data. */ @JsonPropertyOrder({ GCPUsageCostConfigPatchData.JSON_PROPERTY_ATTRIBUTES, GCPUsageCostConfigPatchData.JSON_PROPERTY_TYPE @@ -55,7 +55,7 @@ public GCPUsageCostConfigPatchData attributes( } /** - * Attributes for GCP Usage Cost config patch request. + * Attributes for Google Cloud Usage Cost config patch request. * * @return attributes */ @@ -76,7 +76,7 @@ public GCPUsageCostConfigPatchData type(GCPUsageCostConfigPatchRequestType type) } /** - * Type of GCP Usage Cost config patch request. + * Type of Google Cloud Usage Cost config patch request. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequest.java index 134f248ef13..43bcb4b451d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequest.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** GCP Usage Cost config patch request. */ +/** Google Cloud Usage Cost config patch request. */ @JsonPropertyOrder({GCPUsageCostConfigPatchRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -42,7 +42,7 @@ public GCPUsageCostConfigPatchRequest data(GCPUsageCostConfigPatchData data) { } /** - * GCP Usage Cost config patch data. + * Google Cloud Usage Cost config patch data. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestAttributes.java index b3d04d1d4f2..ede7f3ac47a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestAttributes.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** Attributes for GCP Usage Cost config patch request. */ +/** Attributes for Google Cloud Usage Cost config patch request. */ @JsonPropertyOrder({GCPUsageCostConfigPatchRequestAttributes.JSON_PROPERTY_IS_ENABLED}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestType.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestType.java index f3cf041029c..1899d5f2484 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestType.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPatchRequestType.java @@ -18,7 +18,7 @@ import java.util.HashSet; import java.util.Set; -/** Type of GCP Usage Cost config patch request. */ +/** Type of Google Cloud Usage Cost config patch request. */ @JsonSerialize( using = GCPUsageCostConfigPatchRequestType.GCPUsageCostConfigPatchRequestTypeSerializer.class) public class GCPUsageCostConfigPatchRequestType extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostData.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostData.java index 5176971947b..f549f50ceb3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostData.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostData.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** GCP Usage Cost config post data. */ +/** Google Cloud Usage Cost config post data. */ @JsonPropertyOrder({ GCPUsageCostConfigPostData.JSON_PROPERTY_ATTRIBUTES, GCPUsageCostConfigPostData.JSON_PROPERTY_TYPE @@ -37,12 +37,8 @@ public GCPUsageCostConfigPostData() {} @JsonCreator public GCPUsageCostConfigPostData( - @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - GCPUsageCostConfigPostRequestAttributes attributes, @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) GCPUsageCostConfigPostRequestType type) { - this.attributes = attributes; - this.unparsed |= attributes.unparsed; this.type = type; this.unparsed |= !type.isValid(); } @@ -54,12 +50,13 @@ public GCPUsageCostConfigPostData attributes(GCPUsageCostConfigPostRequestAttrib } /** - * Attributes for GCP Usage Cost config post request. + * Attributes for Google Cloud Usage Cost config post request. * * @return attributes */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public GCPUsageCostConfigPostRequestAttributes getAttributes() { return attributes; } @@ -75,7 +72,7 @@ public GCPUsageCostConfigPostData type(GCPUsageCostConfigPostRequestType type) { } /** - * Type of GCP Usage Cost config post request. + * Type of Google Cloud Usage Cost config post request. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequest.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequest.java index 742233ba223..f71cec95e29 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequest.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** GCP Usage Cost config post request. */ +/** Google Cloud Usage Cost config post request. */ @JsonPropertyOrder({GCPUsageCostConfigPostRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -42,7 +42,7 @@ public GCPUsageCostConfigPostRequest data(GCPUsageCostConfigPostData data) { } /** - * GCP Usage Cost config post data. + * Google Cloud Usage Cost config post data. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestAttributes.java index 3c41eb9b954..8a304c59a97 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestAttributes.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** Attributes for GCP Usage Cost config post request. */ +/** Attributes for Google Cloud Usage Cost config post request. */ @JsonPropertyOrder({ GCPUsageCostConfigPostRequestAttributes.JSON_PROPERTY_BILLING_ACCOUNT_ID, GCPUsageCostConfigPostRequestAttributes.JSON_PROPERTY_BUCKET_NAME, @@ -73,7 +73,7 @@ public GCPUsageCostConfigPostRequestAttributes billingAccountId(String billingAc } /** - * The GCP account ID. + * The Google Cloud account ID. * * @return billingAccountId */ @@ -93,7 +93,7 @@ public GCPUsageCostConfigPostRequestAttributes bucketName(String bucketName) { } /** - * The GCP bucket name used to store the Usage Cost export. + * The Google Cloud bucket name used to store the Usage Cost export. * * @return bucketName */ @@ -113,7 +113,7 @@ public GCPUsageCostConfigPostRequestAttributes exportDatasetName(String exportDa } /** - * The export dataset name used for the GCP Usage Cost report. + * The export dataset name used for the Google Cloud Usage Cost report. * * @return exportDatasetName */ @@ -133,7 +133,7 @@ public GCPUsageCostConfigPostRequestAttributes exportPrefix(String exportPrefix) } /** - * The export prefix used for the GCP Usage Cost report. + * The export prefix used for the Google Cloud Usage Cost report. * * @return exportPrefix */ @@ -154,7 +154,7 @@ public GCPUsageCostConfigPostRequestAttributes exportProjectName(String exportPr } /** - * The name of the GCP Usage Cost report. + * The name of the Google Cloud Usage Cost report. * * @return exportProjectName */ @@ -174,7 +174,7 @@ public GCPUsageCostConfigPostRequestAttributes serviceAccount(String serviceAcco } /** - * The unique GCP service account email. + * The unique Google Cloud service account email. * * @return serviceAccount */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestType.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestType.java index a5095088959..d48fc3ad7ea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestType.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigPostRequestType.java @@ -18,7 +18,7 @@ import java.util.HashSet; import java.util.Set; -/** Type of GCP Usage Cost config post request. */ +/** Type of Google Cloud Usage Cost config post request. */ @JsonSerialize( using = GCPUsageCostConfigPostRequestType.GCPUsageCostConfigPostRequestTypeSerializer.class) public class GCPUsageCostConfigPostRequestType extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigResponse.java index 00d05535918..69383d2eb0f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigResponse.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** Response of GCP Usage Cost config. */ +/** Response of Google Cloud Usage Cost config. */ @JsonPropertyOrder({GCPUsageCostConfigResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -32,7 +32,7 @@ public GCPUsageCostConfigResponse data(GCPUsageCostConfig data) { } /** - * GCP Usage Cost config. + * Google Cloud Usage Cost config. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigType.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigType.java index 4a89f0ee56a..ec82422ec97 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigType.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigType.java @@ -18,7 +18,7 @@ import java.util.HashSet; import java.util.Set; -/** Type of GCP Usage Cost config. */ +/** Type of Google Cloud Usage Cost config. */ @JsonSerialize(using = GCPUsageCostConfigType.GCPUsageCostConfigTypeSerializer.class) public class GCPUsageCostConfigType extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigsResponse.java b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigsResponse.java index 1e5f3a9587a..636184e8cd6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/GCPUsageCostConfigsResponse.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,14 +19,22 @@ import java.util.Map; import java.util.Objects; -/** List of GCP Usage Cost configs. */ +/** List of Google Cloud Usage Cost configs. */ @JsonPropertyOrder({GCPUsageCostConfigsResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class GCPUsageCostConfigsResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = new ArrayList<>(); + + public GCPUsageCostConfigsResponse() {} + + @JsonCreator + public GCPUsageCostConfigsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } public GCPUsageCostConfigsResponse data(List data) { this.data = data; @@ -36,22 +45,18 @@ public GCPUsageCostConfigsResponse data(List data) { } public GCPUsageCostConfigsResponse addDataItem(GCPUsageCostConfig dataItem) { - if (this.data == null) { - this.data = new ArrayList<>(); - } this.data.add(dataItem); this.unparsed |= dataItem.unparsed; return this; } /** - * A GCP Usage Cost config. + * A Google Cloud Usage Cost config. * * @return data */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public List getData() { return data; } diff --git a/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponse.java new file mode 100644 index 00000000000..d2672b37032 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponse.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of GcpUcConfigResponse object. */ +@JsonPropertyOrder({GcpUcConfigResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GcpUcConfigResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GcpUcConfigResponseData data; + + public GcpUcConfigResponse data(GcpUcConfigResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of GcpUcConfigResponseData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GcpUcConfigResponseData getData() { + return data; + } + + public void setData(GcpUcConfigResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GcpUcConfigResponse + */ + @JsonAnySetter + public GcpUcConfigResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GcpUcConfigResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GcpUcConfigResponse gcpUcConfigResponse = (GcpUcConfigResponse) o; + return Objects.equals(this.data, gcpUcConfigResponse.data) + && Objects.equals(this.additionalProperties, gcpUcConfigResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GcpUcConfigResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseData.java b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseData.java new file mode 100644 index 00000000000..6dfde191982 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseData.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of GcpUcConfigResponseData object. */ +@JsonPropertyOrder({ + GcpUcConfigResponseData.JSON_PROPERTY_ATTRIBUTES, + GcpUcConfigResponseData.JSON_PROPERTY_ID, + GcpUcConfigResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GcpUcConfigResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GcpUcConfigResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GcpUcConfigResponseDataType type = GcpUcConfigResponseDataType.GCP_UC_CONFIG; + + public GcpUcConfigResponseData() {} + + @JsonCreator + public GcpUcConfigResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) GcpUcConfigResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GcpUcConfigResponseData attributes(GcpUcConfigResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of GcpUcConfigResponseDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GcpUcConfigResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GcpUcConfigResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public GcpUcConfigResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The GcpUcConfigResponseData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public GcpUcConfigResponseData type(GcpUcConfigResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Cloud Usage Cost config resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GcpUcConfigResponseDataType getType() { + return type; + } + + public void setType(GcpUcConfigResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GcpUcConfigResponseData + */ + @JsonAnySetter + public GcpUcConfigResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GcpUcConfigResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GcpUcConfigResponseData gcpUcConfigResponseData = (GcpUcConfigResponseData) o; + return Objects.equals(this.attributes, gcpUcConfigResponseData.attributes) + && Objects.equals(this.id, gcpUcConfigResponseData.id) + && Objects.equals(this.type, gcpUcConfigResponseData.type) + && Objects.equals(this.additionalProperties, gcpUcConfigResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GcpUcConfigResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseDataAttributes.java new file mode 100644 index 00000000000..99e3c12817a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseDataAttributes.java @@ -0,0 +1,503 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of GcpUcConfigResponseDataAttributes object. */ +@JsonPropertyOrder({ + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_ACCOUNT_ID, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_BUCKET_NAME, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_CREATED_AT, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_DATASET, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_ERROR_MESSAGES, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_EXPORT_PREFIX, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_EXPORT_PROJECT_NAME, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_MONTHS, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_PROJECT_ID, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_SERVICE_ACCOUNT, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_STATUS, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_STATUS_UPDATED_AT, + GcpUcConfigResponseDataAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GcpUcConfigResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_BUCKET_NAME = "bucket_name"; + private String bucketName; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_DATASET = "dataset"; + private String dataset; + + public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; + private JsonNullable> errorMessages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXPORT_PREFIX = "export_prefix"; + private String exportPrefix; + + public static final String JSON_PROPERTY_EXPORT_PROJECT_NAME = "export_project_name"; + private String exportProjectName; + + public static final String JSON_PROPERTY_MONTHS = "months"; + private Long months; + + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + private String projectId; + + public static final String JSON_PROPERTY_SERVICE_ACCOUNT = "service_account"; + private String serviceAccount; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_STATUS_UPDATED_AT = "status_updated_at"; + private String statusUpdatedAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public GcpUcConfigResponseDataAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The attributes account_id. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public GcpUcConfigResponseDataAttributes bucketName(String bucketName) { + this.bucketName = bucketName; + return this; + } + + /** + * The attributes bucket_name. + * + * @return bucketName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUCKET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBucketName() { + return bucketName; + } + + public void setBucketName(String bucketName) { + this.bucketName = bucketName; + } + + public GcpUcConfigResponseDataAttributes createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The attributes created_at. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public GcpUcConfigResponseDataAttributes dataset(String dataset) { + this.dataset = dataset; + return this; + } + + /** + * The attributes dataset. + * + * @return dataset + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDataset() { + return dataset; + } + + public void setDataset(String dataset) { + this.dataset = dataset; + } + + public GcpUcConfigResponseDataAttributes errorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + return this; + } + + public GcpUcConfigResponseDataAttributes addErrorMessagesItem(String errorMessagesItem) { + if (this.errorMessages == null || !this.errorMessages.isPresent()) { + this.errorMessages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.errorMessages.get().add(errorMessagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The attributes error_messages. + * + * @return errorMessages + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getErrorMessages() { + return errorMessages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getErrorMessages_JsonNullable() { + return errorMessages; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + public void setErrorMessages_JsonNullable(JsonNullable> errorMessages) { + this.errorMessages = errorMessages; + } + + public void setErrorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + } + + public GcpUcConfigResponseDataAttributes exportPrefix(String exportPrefix) { + this.exportPrefix = exportPrefix; + return this; + } + + /** + * The attributes export_prefix. + * + * @return exportPrefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPORT_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExportPrefix() { + return exportPrefix; + } + + public void setExportPrefix(String exportPrefix) { + this.exportPrefix = exportPrefix; + } + + public GcpUcConfigResponseDataAttributes exportProjectName(String exportProjectName) { + this.exportProjectName = exportProjectName; + return this; + } + + /** + * The attributes export_project_name. + * + * @return exportProjectName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPORT_PROJECT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExportProjectName() { + return exportProjectName; + } + + public void setExportProjectName(String exportProjectName) { + this.exportProjectName = exportProjectName; + } + + public GcpUcConfigResponseDataAttributes months(Long months) { + this.months = months; + return this; + } + + /** + * The attributes months. + * + * @return months + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTHS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonths() { + return months; + } + + public void setMonths(Long months) { + this.months = months; + } + + public GcpUcConfigResponseDataAttributes projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * The attributes project_id. + * + * @return projectId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROJECT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public GcpUcConfigResponseDataAttributes serviceAccount(String serviceAccount) { + this.serviceAccount = serviceAccount; + return this; + } + + /** + * The attributes service_account. + * + * @return serviceAccount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceAccount() { + return serviceAccount; + } + + public void setServiceAccount(String serviceAccount) { + this.serviceAccount = serviceAccount; + } + + public GcpUcConfigResponseDataAttributes status(String status) { + this.status = status; + return this; + } + + /** + * The attributes status. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public GcpUcConfigResponseDataAttributes statusUpdatedAt(String statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + return this; + } + + /** + * The attributes status_updated_at. + * + * @return statusUpdatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusUpdatedAt() { + return statusUpdatedAt; + } + + public void setStatusUpdatedAt(String statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + } + + public GcpUcConfigResponseDataAttributes updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The attributes updated_at. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GcpUcConfigResponseDataAttributes + */ + @JsonAnySetter + public GcpUcConfigResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GcpUcConfigResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GcpUcConfigResponseDataAttributes gcpUcConfigResponseDataAttributes = + (GcpUcConfigResponseDataAttributes) o; + return Objects.equals(this.accountId, gcpUcConfigResponseDataAttributes.accountId) + && Objects.equals(this.bucketName, gcpUcConfigResponseDataAttributes.bucketName) + && Objects.equals(this.createdAt, gcpUcConfigResponseDataAttributes.createdAt) + && Objects.equals(this.dataset, gcpUcConfigResponseDataAttributes.dataset) + && Objects.equals(this.errorMessages, gcpUcConfigResponseDataAttributes.errorMessages) + && Objects.equals(this.exportPrefix, gcpUcConfigResponseDataAttributes.exportPrefix) + && Objects.equals( + this.exportProjectName, gcpUcConfigResponseDataAttributes.exportProjectName) + && Objects.equals(this.months, gcpUcConfigResponseDataAttributes.months) + && Objects.equals(this.projectId, gcpUcConfigResponseDataAttributes.projectId) + && Objects.equals(this.serviceAccount, gcpUcConfigResponseDataAttributes.serviceAccount) + && Objects.equals(this.status, gcpUcConfigResponseDataAttributes.status) + && Objects.equals(this.statusUpdatedAt, gcpUcConfigResponseDataAttributes.statusUpdatedAt) + && Objects.equals(this.updatedAt, gcpUcConfigResponseDataAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, gcpUcConfigResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + bucketName, + createdAt, + dataset, + errorMessages, + exportPrefix, + exportProjectName, + months, + projectId, + serviceAccount, + status, + statusUpdatedAt, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GcpUcConfigResponseDataAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" dataset: ").append(toIndentedString(dataset)).append("\n"); + sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); + sb.append(" exportPrefix: ").append(toIndentedString(exportPrefix)).append("\n"); + sb.append(" exportProjectName: ").append(toIndentedString(exportProjectName)).append("\n"); + sb.append(" months: ").append(toIndentedString(months)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" serviceAccount: ").append(toIndentedString(serviceAccount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusUpdatedAt: ").append(toIndentedString(statusUpdatedAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseDataType.java new file mode 100644 index 00000000000..6a42ba0bda0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GcpUcConfigResponseDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Google Cloud Usage Cost config resource type. */ +@JsonSerialize(using = GcpUcConfigResponseDataType.GcpUcConfigResponseDataTypeSerializer.class) +public class GcpUcConfigResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("gcp_uc_config")); + + public static final GcpUcConfigResponseDataType GCP_UC_CONFIG = + new GcpUcConfigResponseDataType("gcp_uc_config"); + + GcpUcConfigResponseDataType(String value) { + super(value, allowedValues); + } + + public static class GcpUcConfigResponseDataTypeSerializer + extends StdSerializer { + public GcpUcConfigResponseDataTypeSerializer(Class t) { + super(t); + } + + public GcpUcConfigResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GcpUcConfigResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GcpUcConfigResponseDataType fromValue(String value) { + return new GcpUcConfigResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceArray.java b/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceArray.java new file mode 100644 index 00000000000..4e75431540a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceArray.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ReorderRuleResourceArray object. */ +@JsonPropertyOrder({ReorderRuleResourceArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReorderRuleResourceArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public ReorderRuleResourceArray() {} + + @JsonCreator + public ReorderRuleResourceArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public ReorderRuleResourceArray data(List data) { + this.data = data; + for (ReorderRuleResourceData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReorderRuleResourceArray addDataItem(ReorderRuleResourceData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The ReorderRuleResourceArray data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReorderRuleResourceArray + */ + @JsonAnySetter + public ReorderRuleResourceArray putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReorderRuleResourceArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReorderRuleResourceArray reorderRuleResourceArray = (ReorderRuleResourceArray) o; + return Objects.equals(this.data, reorderRuleResourceArray.data) + && Objects.equals(this.additionalProperties, reorderRuleResourceArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReorderRuleResourceArray {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceData.java b/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceData.java new file mode 100644 index 00000000000..56f7eb6bcd8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceData.java @@ -0,0 +1,177 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of ReorderRuleResourceData object. */ +@JsonPropertyOrder({ + ReorderRuleResourceData.JSON_PROPERTY_ID, + ReorderRuleResourceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReorderRuleResourceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReorderRuleResourceDataType type = ReorderRuleResourceDataType.ARBITRARY_RULE; + + public ReorderRuleResourceData() {} + + @JsonCreator + public ReorderRuleResourceData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReorderRuleResourceDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReorderRuleResourceData id(String id) { + this.id = id; + return this; + } + + /** + * The ReorderRuleResourceData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ReorderRuleResourceData type(ReorderRuleResourceDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Arbitrary rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReorderRuleResourceDataType getType() { + return type; + } + + public void setType(ReorderRuleResourceDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReorderRuleResourceData + */ + @JsonAnySetter + public ReorderRuleResourceData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReorderRuleResourceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReorderRuleResourceData reorderRuleResourceData = (ReorderRuleResourceData) o; + return Objects.equals(this.id, reorderRuleResourceData.id) + && Objects.equals(this.type, reorderRuleResourceData.type) + && Objects.equals(this.additionalProperties, reorderRuleResourceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReorderRuleResourceData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceDataType.java b/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceDataType.java new file mode 100644 index 00000000000..344f1feb432 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReorderRuleResourceDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Arbitrary rule resource type. */ +@JsonSerialize(using = ReorderRuleResourceDataType.ReorderRuleResourceDataTypeSerializer.class) +public class ReorderRuleResourceDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("arbitrary_rule")); + + public static final ReorderRuleResourceDataType ARBITRARY_RULE = + new ReorderRuleResourceDataType("arbitrary_rule"); + + ReorderRuleResourceDataType(String value) { + super(value, allowedValues); + } + + public static class ReorderRuleResourceDataTypeSerializer + extends StdSerializer { + public ReorderRuleResourceDataTypeSerializer(Class t) { + super(t); + } + + public ReorderRuleResourceDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReorderRuleResourceDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReorderRuleResourceDataType fromValue(String value) { + return new ReorderRuleResourceDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceArray.java b/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceArray.java new file mode 100644 index 00000000000..889fe3382cd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceArray.java @@ -0,0 +1,156 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of ReorderRulesetResourceArray object. */ +@JsonPropertyOrder({ReorderRulesetResourceArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReorderRulesetResourceArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public ReorderRulesetResourceArray() {} + + @JsonCreator + public ReorderRulesetResourceArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public ReorderRulesetResourceArray data(List data) { + this.data = data; + for (ReorderRulesetResourceData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReorderRulesetResourceArray addDataItem(ReorderRulesetResourceData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The ReorderRulesetResourceArray data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReorderRulesetResourceArray + */ + @JsonAnySetter + public ReorderRulesetResourceArray putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReorderRulesetResourceArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReorderRulesetResourceArray reorderRulesetResourceArray = (ReorderRulesetResourceArray) o; + return Objects.equals(this.data, reorderRulesetResourceArray.data) + && Objects.equals( + this.additionalProperties, reorderRulesetResourceArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReorderRulesetResourceArray {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceData.java b/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceData.java new file mode 100644 index 00000000000..982ac3b7466 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceData.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of ReorderRulesetResourceData object. */ +@JsonPropertyOrder({ + ReorderRulesetResourceData.JSON_PROPERTY_ID, + ReorderRulesetResourceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReorderRulesetResourceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReorderRulesetResourceDataType type = ReorderRulesetResourceDataType.RULESET; + + public ReorderRulesetResourceData() {} + + @JsonCreator + public ReorderRulesetResourceData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ReorderRulesetResourceDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReorderRulesetResourceData id(String id) { + this.id = id; + return this; + } + + /** + * The ReorderRulesetResourceData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ReorderRulesetResourceData type(ReorderRulesetResourceDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Ruleset resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReorderRulesetResourceDataType getType() { + return type; + } + + public void setType(ReorderRulesetResourceDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReorderRulesetResourceData + */ + @JsonAnySetter + public ReorderRulesetResourceData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReorderRulesetResourceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReorderRulesetResourceData reorderRulesetResourceData = (ReorderRulesetResourceData) o; + return Objects.equals(this.id, reorderRulesetResourceData.id) + && Objects.equals(this.type, reorderRulesetResourceData.type) + && Objects.equals( + this.additionalProperties, reorderRulesetResourceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReorderRulesetResourceData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceDataType.java b/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceDataType.java new file mode 100644 index 00000000000..cc1d9d88eb3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReorderRulesetResourceDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Ruleset resource type. */ +@JsonSerialize( + using = ReorderRulesetResourceDataType.ReorderRulesetResourceDataTypeSerializer.class) +public class ReorderRulesetResourceDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("ruleset")); + + public static final ReorderRulesetResourceDataType RULESET = + new ReorderRulesetResourceDataType("ruleset"); + + ReorderRulesetResourceDataType(String value) { + super(value, allowedValues); + } + + public static class ReorderRulesetResourceDataTypeSerializer + extends StdSerializer { + public ReorderRulesetResourceDataTypeSerializer(Class t) { + super(t); + } + + public ReorderRulesetResourceDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReorderRulesetResourceDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReorderRulesetResourceDataType fromValue(String value) { + return new ReorderRulesetResourceDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequest.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequest.java new file mode 100644 index 00000000000..b315c596b18 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequest.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesValidateQueryRequest object. */ +@JsonPropertyOrder({RulesValidateQueryRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesValidateQueryRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RulesValidateQueryRequestData data; + + public RulesValidateQueryRequest data(RulesValidateQueryRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of RulesValidateQueryRequestData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RulesValidateQueryRequestData getData() { + return data; + } + + public void setData(RulesValidateQueryRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesValidateQueryRequest + */ + @JsonAnySetter + public RulesValidateQueryRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesValidateQueryRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesValidateQueryRequest rulesValidateQueryRequest = (RulesValidateQueryRequest) o; + return Objects.equals(this.data, rulesValidateQueryRequest.data) + && Objects.equals( + this.additionalProperties, rulesValidateQueryRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesValidateQueryRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestData.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestData.java new file mode 100644 index 00000000000..c65990c7550 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestData.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesValidateQueryRequestData object. */ +@JsonPropertyOrder({ + RulesValidateQueryRequestData.JSON_PROPERTY_ATTRIBUTES, + RulesValidateQueryRequestData.JSON_PROPERTY_ID, + RulesValidateQueryRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesValidateQueryRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RulesValidateQueryRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RulesValidateQueryRequestDataType type = RulesValidateQueryRequestDataType.VALIDATE_QUERY; + + public RulesValidateQueryRequestData() {} + + @JsonCreator + public RulesValidateQueryRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + RulesValidateQueryRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RulesValidateQueryRequestData attributes( + RulesValidateQueryRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of RulesValidateQueryRequestDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RulesValidateQueryRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RulesValidateQueryRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public RulesValidateQueryRequestData id(String id) { + this.id = id; + return this; + } + + /** + * The RulesValidateQueryRequestData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RulesValidateQueryRequestData type(RulesValidateQueryRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Validate query resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesValidateQueryRequestDataType getType() { + return type; + } + + public void setType(RulesValidateQueryRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesValidateQueryRequestData + */ + @JsonAnySetter + public RulesValidateQueryRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesValidateQueryRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesValidateQueryRequestData rulesValidateQueryRequestData = (RulesValidateQueryRequestData) o; + return Objects.equals(this.attributes, rulesValidateQueryRequestData.attributes) + && Objects.equals(this.id, rulesValidateQueryRequestData.id) + && Objects.equals(this.type, rulesValidateQueryRequestData.type) + && Objects.equals( + this.additionalProperties, rulesValidateQueryRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesValidateQueryRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestDataAttributes.java new file mode 100644 index 00000000000..9c187062628 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestDataAttributes.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesValidateQueryRequestDataAttributes object. */ +@JsonPropertyOrder({RulesValidateQueryRequestDataAttributes.JSON_PROPERTY_QUERY}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesValidateQueryRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_QUERY = "Query"; + private String query; + + public RulesValidateQueryRequestDataAttributes() {} + + @JsonCreator + public RulesValidateQueryRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.query = query; + } + + public RulesValidateQueryRequestDataAttributes query(String query) { + this.query = query; + return this; + } + + /** + * The attributes Query. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesValidateQueryRequestDataAttributes + */ + @JsonAnySetter + public RulesValidateQueryRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesValidateQueryRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesValidateQueryRequestDataAttributes rulesValidateQueryRequestDataAttributes = + (RulesValidateQueryRequestDataAttributes) o; + return Objects.equals(this.query, rulesValidateQueryRequestDataAttributes.query) + && Objects.equals( + this.additionalProperties, + rulesValidateQueryRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesValidateQueryRequestDataAttributes {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestDataType.java new file mode 100644 index 00000000000..bfb2978ca95 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryRequestDataType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Validate query resource type. */ +@JsonSerialize( + using = RulesValidateQueryRequestDataType.RulesValidateQueryRequestDataTypeSerializer.class) +public class RulesValidateQueryRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("validate_query")); + + public static final RulesValidateQueryRequestDataType VALIDATE_QUERY = + new RulesValidateQueryRequestDataType("validate_query"); + + RulesValidateQueryRequestDataType(String value) { + super(value, allowedValues); + } + + public static class RulesValidateQueryRequestDataTypeSerializer + extends StdSerializer { + public RulesValidateQueryRequestDataTypeSerializer(Class t) { + super(t); + } + + public RulesValidateQueryRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RulesValidateQueryRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RulesValidateQueryRequestDataType fromValue(String value) { + return new RulesValidateQueryRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponse.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponse.java new file mode 100644 index 00000000000..df0e9fcad2e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponse.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesValidateQueryResponse object. */ +@JsonPropertyOrder({RulesValidateQueryResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesValidateQueryResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RulesValidateQueryResponseData data; + + public RulesValidateQueryResponse data(RulesValidateQueryResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of RulesValidateQueryResponseData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RulesValidateQueryResponseData getData() { + return data; + } + + public void setData(RulesValidateQueryResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesValidateQueryResponse + */ + @JsonAnySetter + public RulesValidateQueryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesValidateQueryResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesValidateQueryResponse rulesValidateQueryResponse = (RulesValidateQueryResponse) o; + return Objects.equals(this.data, rulesValidateQueryResponse.data) + && Objects.equals( + this.additionalProperties, rulesValidateQueryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesValidateQueryResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseData.java new file mode 100644 index 00000000000..23c53fe3d22 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesValidateQueryResponseData object. */ +@JsonPropertyOrder({ + RulesValidateQueryResponseData.JSON_PROPERTY_ATTRIBUTES, + RulesValidateQueryResponseData.JSON_PROPERTY_ID, + RulesValidateQueryResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesValidateQueryResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RulesValidateQueryResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RulesValidateQueryResponseDataType type = + RulesValidateQueryResponseDataType.VALIDATE_RESPONSE; + + public RulesValidateQueryResponseData() {} + + @JsonCreator + public RulesValidateQueryResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + RulesValidateQueryResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RulesValidateQueryResponseData attributes( + RulesValidateQueryResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of RulesValidateQueryResponseDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RulesValidateQueryResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RulesValidateQueryResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public RulesValidateQueryResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The RulesValidateQueryResponseData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RulesValidateQueryResponseData type(RulesValidateQueryResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Validate response resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesValidateQueryResponseDataType getType() { + return type; + } + + public void setType(RulesValidateQueryResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesValidateQueryResponseData + */ + @JsonAnySetter + public RulesValidateQueryResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesValidateQueryResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesValidateQueryResponseData rulesValidateQueryResponseData = + (RulesValidateQueryResponseData) o; + return Objects.equals(this.attributes, rulesValidateQueryResponseData.attributes) + && Objects.equals(this.id, rulesValidateQueryResponseData.id) + && Objects.equals(this.type, rulesValidateQueryResponseData.type) + && Objects.equals( + this.additionalProperties, rulesValidateQueryResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesValidateQueryResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseDataAttributes.java new file mode 100644 index 00000000000..d1768bb52f9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseDataAttributes.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesValidateQueryResponseDataAttributes object. */ +@JsonPropertyOrder({RulesValidateQueryResponseDataAttributes.JSON_PROPERTY_CANONICAL}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesValidateQueryResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CANONICAL = "Canonical"; + private String canonical; + + public RulesValidateQueryResponseDataAttributes() {} + + @JsonCreator + public RulesValidateQueryResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CANONICAL) String canonical) { + this.canonical = canonical; + } + + public RulesValidateQueryResponseDataAttributes canonical(String canonical) { + this.canonical = canonical; + return this; + } + + /** + * The attributes Canonical. + * + * @return canonical + */ + @JsonProperty(JSON_PROPERTY_CANONICAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCanonical() { + return canonical; + } + + public void setCanonical(String canonical) { + this.canonical = canonical; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesValidateQueryResponseDataAttributes + */ + @JsonAnySetter + public RulesValidateQueryResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesValidateQueryResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesValidateQueryResponseDataAttributes rulesValidateQueryResponseDataAttributes = + (RulesValidateQueryResponseDataAttributes) o; + return Objects.equals(this.canonical, rulesValidateQueryResponseDataAttributes.canonical) + && Objects.equals( + this.additionalProperties, + rulesValidateQueryResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(canonical, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesValidateQueryResponseDataAttributes {\n"); + sb.append(" canonical: ").append(toIndentedString(canonical)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseDataType.java new file mode 100644 index 00000000000..3a7064baca9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesValidateQueryResponseDataType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Validate response resource type. */ +@JsonSerialize( + using = RulesValidateQueryResponseDataType.RulesValidateQueryResponseDataTypeSerializer.class) +public class RulesValidateQueryResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("validate_response")); + + public static final RulesValidateQueryResponseDataType VALIDATE_RESPONSE = + new RulesValidateQueryResponseDataType("validate_response"); + + RulesValidateQueryResponseDataType(String value) { + super(value, allowedValues); + } + + public static class RulesValidateQueryResponseDataTypeSerializer + extends StdSerializer { + public RulesValidateQueryResponseDataTypeSerializer( + Class t) { + super(t); + } + + public RulesValidateQueryResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RulesValidateQueryResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RulesValidateQueryResponseDataType fromValue(String value) { + return new RulesValidateQueryResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetResp.java b/src/main/java/com/datadog/api/client/v2/model/RulesetResp.java new file mode 100644 index 00000000000..07e370da580 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetResp.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetResp object. */ +@JsonPropertyOrder({RulesetResp.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetResp { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RulesetRespData data; + + public RulesetResp data(RulesetRespData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of RulesetRespData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RulesetRespData getData() { + return data; + } + + public void setData(RulesetRespData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetResp + */ + @JsonAnySetter + public RulesetResp putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetResp object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetResp rulesetResp = (RulesetResp) o; + return Objects.equals(this.data, rulesetResp.data) + && Objects.equals(this.additionalProperties, rulesetResp.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetResp {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespArray.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespArray.java new file mode 100644 index 00000000000..e9db5697259 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespArray.java @@ -0,0 +1,154 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespArray object. */ +@JsonPropertyOrder({RulesetRespArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public RulesetRespArray() {} + + @JsonCreator + public RulesetRespArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public RulesetRespArray data(List data) { + this.data = data; + for (RulesetRespData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RulesetRespArray addDataItem(RulesetRespData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The RulesetRespArray data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespArray + */ + @JsonAnySetter + public RulesetRespArray putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespArray rulesetRespArray = (RulesetRespArray) o; + return Objects.equals(this.data, rulesetRespArray.data) + && Objects.equals(this.additionalProperties, rulesetRespArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespArray {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespData.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespData.java new file mode 100644 index 00000000000..f0dad34208b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespData.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespData object. */ +@JsonPropertyOrder({ + RulesetRespData.JSON_PROPERTY_ATTRIBUTES, + RulesetRespData.JSON_PROPERTY_ID, + RulesetRespData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RulesetRespDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RulesetRespDataType type = RulesetRespDataType.RULESET; + + public RulesetRespData() {} + + @JsonCreator + public RulesetRespData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RulesetRespDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RulesetRespData attributes(RulesetRespDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of RulesetRespDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RulesetRespDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RulesetRespDataAttributes attributes) { + this.attributes = attributes; + } + + public RulesetRespData id(String id) { + this.id = id; + return this; + } + + /** + * The RulesetRespData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RulesetRespData type(RulesetRespDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Ruleset resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesetRespDataType getType() { + return type; + } + + public void setType(RulesetRespDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespData + */ + @JsonAnySetter + public RulesetRespData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespData rulesetRespData = (RulesetRespData) o; + return Objects.equals(this.attributes, rulesetRespData.attributes) + && Objects.equals(this.id, rulesetRespData.id) + && Objects.equals(this.type, rulesetRespData.type) + && Objects.equals(this.additionalProperties, rulesetRespData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributes.java new file mode 100644 index 00000000000..5c512b412d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributes.java @@ -0,0 +1,372 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespDataAttributes object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributes.JSON_PROPERTY_CREATED, + RulesetRespDataAttributes.JSON_PROPERTY_ENABLED, + RulesetRespDataAttributes.JSON_PROPERTY_LAST_MODIFIED_USER_UUID, + RulesetRespDataAttributes.JSON_PROPERTY_MODIFIED, + RulesetRespDataAttributes.JSON_PROPERTY_NAME, + RulesetRespDataAttributes.JSON_PROPERTY_POSITION, + RulesetRespDataAttributes.JSON_PROPERTY_RULES, + RulesetRespDataAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED = "created"; + private RulesetRespDataAttributesCreated created; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_LAST_MODIFIED_USER_UUID = "last_modified_user_uuid"; + private String lastModifiedUserUuid; + + public static final String JSON_PROPERTY_MODIFIED = "modified"; + private RulesetRespDataAttributesModified modified; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_POSITION = "position"; + private Integer position; + + public static final String JSON_PROPERTY_RULES = "rules"; + private List rules = new ArrayList<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public RulesetRespDataAttributes() {} + + @JsonCreator + public RulesetRespDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED) + RulesetRespDataAttributesCreated created, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_MODIFIED_USER_UUID) + String lastModifiedUserUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED) + RulesetRespDataAttributesModified modified, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_POSITION) Integer position, + @JsonProperty(required = true, value = JSON_PROPERTY_RULES) + List rules, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.created = created; + this.unparsed |= created.unparsed; + this.enabled = enabled; + this.lastModifiedUserUuid = lastModifiedUserUuid; + this.modified = modified; + this.unparsed |= modified.unparsed; + this.name = name; + this.position = position; + this.rules = rules; + this.version = version; + } + + public RulesetRespDataAttributes created(RulesetRespDataAttributesCreated created) { + this.created = created; + this.unparsed |= created.unparsed; + return this; + } + + /** + * The definition of RulesetRespDataAttributesCreated object. + * + * @return created + */ + @JsonProperty(JSON_PROPERTY_CREATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesetRespDataAttributesCreated getCreated() { + return created; + } + + public void setCreated(RulesetRespDataAttributesCreated created) { + this.created = created; + } + + public RulesetRespDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The attributes enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public RulesetRespDataAttributes lastModifiedUserUuid(String lastModifiedUserUuid) { + this.lastModifiedUserUuid = lastModifiedUserUuid; + return this; + } + + /** + * The attributes last_modified_user_uuid. + * + * @return lastModifiedUserUuid + */ + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_USER_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLastModifiedUserUuid() { + return lastModifiedUserUuid; + } + + public void setLastModifiedUserUuid(String lastModifiedUserUuid) { + this.lastModifiedUserUuid = lastModifiedUserUuid; + } + + public RulesetRespDataAttributes modified(RulesetRespDataAttributesModified modified) { + this.modified = modified; + this.unparsed |= modified.unparsed; + return this; + } + + /** + * The definition of RulesetRespDataAttributesModified object. + * + * @return modified + */ + @JsonProperty(JSON_PROPERTY_MODIFIED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesetRespDataAttributesModified getModified() { + return modified; + } + + public void setModified(RulesetRespDataAttributesModified modified) { + this.modified = modified; + } + + public RulesetRespDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The attributes name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RulesetRespDataAttributes position(Integer position) { + this.position = position; + return this; + } + + /** + * The attributes position. maximum: 2147483647 + * + * @return position + */ + @JsonProperty(JSON_PROPERTY_POSITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getPosition() { + return position; + } + + public void setPosition(Integer position) { + this.position = position; + } + + public RulesetRespDataAttributes rules(List rules) { + this.rules = rules; + for (RulesetRespDataAttributesRulesItems item : rules) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RulesetRespDataAttributes addRulesItem(RulesetRespDataAttributesRulesItems rulesItem) { + this.rules.add(rulesItem); + this.unparsed |= rulesItem.unparsed; + return this; + } + + /** + * The attributes rules. + * + * @return rules + */ + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + public RulesetRespDataAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * The attributes version. + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributes + */ + @JsonAnySetter + public RulesetRespDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributes rulesetRespDataAttributes = (RulesetRespDataAttributes) o; + return Objects.equals(this.created, rulesetRespDataAttributes.created) + && Objects.equals(this.enabled, rulesetRespDataAttributes.enabled) + && Objects.equals(this.lastModifiedUserUuid, rulesetRespDataAttributes.lastModifiedUserUuid) + && Objects.equals(this.modified, rulesetRespDataAttributes.modified) + && Objects.equals(this.name, rulesetRespDataAttributes.name) + && Objects.equals(this.position, rulesetRespDataAttributes.position) + && Objects.equals(this.rules, rulesetRespDataAttributes.rules) + && Objects.equals(this.version, rulesetRespDataAttributes.version) + && Objects.equals( + this.additionalProperties, rulesetRespDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + created, + enabled, + lastModifiedUserUuid, + modified, + name, + position, + rules, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributes {\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" lastModifiedUserUuid: ") + .append(toIndentedString(lastModifiedUserUuid)) + .append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesCreated.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesCreated.java new file mode 100644 index 00000000000..c7a95d63f7f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesCreated.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespDataAttributesCreated object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributesCreated.JSON_PROPERTY_NANOS, + RulesetRespDataAttributesCreated.JSON_PROPERTY_SECONDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesCreated { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NANOS = "nanos"; + private Integer nanos; + + public static final String JSON_PROPERTY_SECONDS = "seconds"; + private Long seconds; + + public RulesetRespDataAttributesCreated nanos(Integer nanos) { + this.nanos = nanos; + return this; + } + + /** + * The created nanos. maximum: 2147483647 + * + * @return nanos + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NANOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNanos() { + return nanos; + } + + public void setNanos(Integer nanos) { + this.nanos = nanos; + } + + public RulesetRespDataAttributesCreated seconds(Long seconds) { + this.seconds = seconds; + return this; + } + + /** + * The created seconds. + * + * @return seconds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSeconds() { + return seconds; + } + + public void setSeconds(Long seconds) { + this.seconds = seconds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesCreated + */ + @JsonAnySetter + public RulesetRespDataAttributesCreated putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributesCreated object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesCreated rulesetRespDataAttributesCreated = + (RulesetRespDataAttributesCreated) o; + return Objects.equals(this.nanos, rulesetRespDataAttributesCreated.nanos) + && Objects.equals(this.seconds, rulesetRespDataAttributesCreated.seconds) + && Objects.equals( + this.additionalProperties, rulesetRespDataAttributesCreated.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nanos, seconds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesCreated {\n"); + sb.append(" nanos: ").append(toIndentedString(nanos)).append("\n"); + sb.append(" seconds: ").append(toIndentedString(seconds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesModified.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesModified.java new file mode 100644 index 00000000000..31dab6061e4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesModified.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespDataAttributesModified object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributesModified.JSON_PROPERTY_NANOS, + RulesetRespDataAttributesModified.JSON_PROPERTY_SECONDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesModified { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NANOS = "nanos"; + private Integer nanos; + + public static final String JSON_PROPERTY_SECONDS = "seconds"; + private Long seconds; + + public RulesetRespDataAttributesModified nanos(Integer nanos) { + this.nanos = nanos; + return this; + } + + /** + * The modified nanos. maximum: 2147483647 + * + * @return nanos + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NANOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNanos() { + return nanos; + } + + public void setNanos(Integer nanos) { + this.nanos = nanos; + } + + public RulesetRespDataAttributesModified seconds(Long seconds) { + this.seconds = seconds; + return this; + } + + /** + * The modified seconds. + * + * @return seconds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSeconds() { + return seconds; + } + + public void setSeconds(Long seconds) { + this.seconds = seconds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesModified + */ + @JsonAnySetter + public RulesetRespDataAttributesModified putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributesModified object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesModified rulesetRespDataAttributesModified = + (RulesetRespDataAttributesModified) o; + return Objects.equals(this.nanos, rulesetRespDataAttributesModified.nanos) + && Objects.equals(this.seconds, rulesetRespDataAttributesModified.seconds) + && Objects.equals( + this.additionalProperties, rulesetRespDataAttributesModified.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nanos, seconds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesModified {\n"); + sb.append(" nanos: ").append(toIndentedString(nanos)).append("\n"); + sb.append(" seconds: ").append(toIndentedString(seconds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItems.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItems.java new file mode 100644 index 00000000000..ef8eb0ebcf2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItems.java @@ -0,0 +1,348 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of RulesetRespDataAttributesRulesItems object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributesRulesItems.JSON_PROPERTY_ENABLED, + RulesetRespDataAttributesRulesItems.JSON_PROPERTY_MAPPING, + RulesetRespDataAttributesRulesItems.JSON_PROPERTY_METADATA, + RulesetRespDataAttributesRulesItems.JSON_PROPERTY_NAME, + RulesetRespDataAttributesRulesItems.JSON_PROPERTY_QUERY, + RulesetRespDataAttributesRulesItems.JSON_PROPERTY_REFERENCE_TABLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesRulesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + private JsonNullable mapping = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private JsonNullable> metadata = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private JsonNullable query = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REFERENCE_TABLE = "reference_table"; + private JsonNullable referenceTable = + JsonNullable.undefined(); + + public RulesetRespDataAttributesRulesItems() {} + + @JsonCreator + public RulesetRespDataAttributesRulesItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.enabled = enabled; + this.name = name; + } + + public RulesetRespDataAttributesRulesItems enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The items enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public RulesetRespDataAttributesRulesItems mapping( + RulesetRespDataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); + return this; + } + + /** + * The definition of RulesetRespDataAttributesRulesItemsMapping object. + * + * @return mapping + */ + @jakarta.annotation.Nullable + @JsonIgnore + public RulesetRespDataAttributesRulesItemsMapping getMapping() { + return mapping.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getMapping_JsonNullable() { + return mapping; + } + + @JsonProperty(JSON_PROPERTY_MAPPING) + public void setMapping_JsonNullable( + JsonNullable mapping) { + this.mapping = mapping; + } + + public void setMapping(RulesetRespDataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); + } + + public RulesetRespDataAttributesRulesItems metadata(Map metadata) { + this.metadata = JsonNullable.>of(metadata); + return this; + } + + public RulesetRespDataAttributesRulesItems putMetadataItem(String key, String metadataItem) { + if (this.metadata == null || !this.metadata.isPresent()) { + this.metadata = JsonNullable.>of(new HashMap<>()); + } + try { + this.metadata.get().put(key, metadataItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items metadata. + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getMetadata() { + return metadata.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getMetadata_JsonNullable() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + public void setMetadata_JsonNullable(JsonNullable> metadata) { + this.metadata = metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = JsonNullable.>of(metadata); + } + + public RulesetRespDataAttributesRulesItems name(String name) { + this.name = name; + return this; + } + + /** + * The items name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RulesetRespDataAttributesRulesItems query(RulesetRespDataAttributesRulesItemsQuery query) { + this.query = JsonNullable.of(query); + return this; + } + + /** + * The definition of RulesetRespDataAttributesRulesItemsQuery object. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonIgnore + public RulesetRespDataAttributesRulesItemsQuery getQuery() { + return query.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getQuery_JsonNullable() { + return query; + } + + @JsonProperty(JSON_PROPERTY_QUERY) + public void setQuery_JsonNullable(JsonNullable query) { + this.query = query; + } + + public void setQuery(RulesetRespDataAttributesRulesItemsQuery query) { + this.query = JsonNullable.of(query); + } + + public RulesetRespDataAttributesRulesItems referenceTable( + RulesetRespDataAttributesRulesItemsReferenceTable referenceTable) { + this.referenceTable = + JsonNullable.of(referenceTable); + return this; + } + + /** + * The definition of RulesetRespDataAttributesRulesItemsReferenceTable object. + * + * @return referenceTable + */ + @jakarta.annotation.Nullable + @JsonIgnore + public RulesetRespDataAttributesRulesItemsReferenceTable getReferenceTable() { + return referenceTable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getReferenceTable_JsonNullable() { + return referenceTable; + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_TABLE) + public void setReferenceTable_JsonNullable( + JsonNullable referenceTable) { + this.referenceTable = referenceTable; + } + + public void setReferenceTable(RulesetRespDataAttributesRulesItemsReferenceTable referenceTable) { + this.referenceTable = + JsonNullable.of(referenceTable); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesRulesItems + */ + @JsonAnySetter + public RulesetRespDataAttributesRulesItems putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributesRulesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesRulesItems rulesetRespDataAttributesRulesItems = + (RulesetRespDataAttributesRulesItems) o; + return Objects.equals(this.enabled, rulesetRespDataAttributesRulesItems.enabled) + && Objects.equals(this.mapping, rulesetRespDataAttributesRulesItems.mapping) + && Objects.equals(this.metadata, rulesetRespDataAttributesRulesItems.metadata) + && Objects.equals(this.name, rulesetRespDataAttributesRulesItems.name) + && Objects.equals(this.query, rulesetRespDataAttributesRulesItems.query) + && Objects.equals(this.referenceTable, rulesetRespDataAttributesRulesItems.referenceTable) + && Objects.equals( + this.additionalProperties, rulesetRespDataAttributesRulesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + enabled, mapping, metadata, name, query, referenceTable, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesRulesItems {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" referenceTable: ").append(toIndentedString(referenceTable)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsMapping.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsMapping.java new file mode 100644 index 00000000000..69faa3ecdc1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsMapping.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespDataAttributesRulesItemsMapping object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributesRulesItemsMapping.JSON_PROPERTY_DESTINATION_KEY, + RulesetRespDataAttributesRulesItemsMapping.JSON_PROPERTY_IF_NOT_EXISTS, + RulesetRespDataAttributesRulesItemsMapping.JSON_PROPERTY_SOURCE_KEYS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesRulesItemsMapping { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESTINATION_KEY = "destination_key"; + private String destinationKey; + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; + private List sourceKeys = new ArrayList<>(); + + public RulesetRespDataAttributesRulesItemsMapping() {} + + @JsonCreator + public RulesetRespDataAttributesRulesItemsMapping( + @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION_KEY) String destinationKey, + @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys) { + this.destinationKey = destinationKey; + this.ifNotExists = ifNotExists; + this.sourceKeys = sourceKeys; + } + + public RulesetRespDataAttributesRulesItemsMapping destinationKey(String destinationKey) { + this.destinationKey = destinationKey; + return this; + } + + /** + * The mapping destination_key. + * + * @return destinationKey + */ + @JsonProperty(JSON_PROPERTY_DESTINATION_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDestinationKey() { + return destinationKey; + } + + public void setDestinationKey(String destinationKey) { + this.destinationKey = destinationKey; + } + + public RulesetRespDataAttributesRulesItemsMapping ifNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The mapping if_not_exists. + * + * @return ifNotExists + */ + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public RulesetRespDataAttributesRulesItemsMapping sourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + return this; + } + + public RulesetRespDataAttributesRulesItemsMapping addSourceKeysItem(String sourceKeysItem) { + this.sourceKeys.add(sourceKeysItem); + return this; + } + + /** + * The mapping source_keys. + * + * @return sourceKeys + */ + @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSourceKeys() { + return sourceKeys; + } + + public void setSourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesRulesItemsMapping + */ + @JsonAnySetter + public RulesetRespDataAttributesRulesItemsMapping putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributesRulesItemsMapping object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesRulesItemsMapping rulesetRespDataAttributesRulesItemsMapping = + (RulesetRespDataAttributesRulesItemsMapping) o; + return Objects.equals( + this.destinationKey, rulesetRespDataAttributesRulesItemsMapping.destinationKey) + && Objects.equals(this.ifNotExists, rulesetRespDataAttributesRulesItemsMapping.ifNotExists) + && Objects.equals(this.sourceKeys, rulesetRespDataAttributesRulesItemsMapping.sourceKeys) + && Objects.equals( + this.additionalProperties, + rulesetRespDataAttributesRulesItemsMapping.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(destinationKey, ifNotExists, sourceKeys, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesRulesItemsMapping {\n"); + sb.append(" destinationKey: ").append(toIndentedString(destinationKey)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQuery.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQuery.java new file mode 100644 index 00000000000..cefb089d159 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQuery.java @@ -0,0 +1,241 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespDataAttributesRulesItemsQuery object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_ADDITION, + RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_CASE_INSENSITIVITY, + RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_NOT_EXISTS, + RulesetRespDataAttributesRulesItemsQuery.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesRulesItemsQuery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADDITION = "addition"; + private RulesetRespDataAttributesRulesItemsQueryAddition addition; + + public static final String JSON_PROPERTY_CASE_INSENSITIVITY = "case_insensitivity"; + private Boolean caseInsensitivity; + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public RulesetRespDataAttributesRulesItemsQuery() {} + + @JsonCreator + public RulesetRespDataAttributesRulesItemsQuery( + @JsonProperty(required = true, value = JSON_PROPERTY_ADDITION) + RulesetRespDataAttributesRulesItemsQueryAddition addition, + @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.addition = addition; + if (addition != null) { + this.unparsed |= addition.unparsed; + } + this.ifNotExists = ifNotExists; + this.query = query; + } + + public RulesetRespDataAttributesRulesItemsQuery addition( + RulesetRespDataAttributesRulesItemsQueryAddition addition) { + this.addition = addition; + if (addition != null) { + this.unparsed |= addition.unparsed; + } + return this; + } + + /** + * The definition of RulesetRespDataAttributesRulesItemsQueryAddition object. + * + * @return addition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RulesetRespDataAttributesRulesItemsQueryAddition getAddition() { + return addition; + } + + public void setAddition(RulesetRespDataAttributesRulesItemsQueryAddition addition) { + this.addition = addition; + } + + public RulesetRespDataAttributesRulesItemsQuery caseInsensitivity(Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + return this; + } + + /** + * The query case_insensitivity. + * + * @return caseInsensitivity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_INSENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCaseInsensitivity() { + return caseInsensitivity; + } + + public void setCaseInsensitivity(Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + } + + public RulesetRespDataAttributesRulesItemsQuery ifNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The query if_not_exists. + * + * @return ifNotExists + */ + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public RulesetRespDataAttributesRulesItemsQuery query(String query) { + this.query = query; + return this; + } + + /** + * The query query. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesRulesItemsQuery + */ + @JsonAnySetter + public RulesetRespDataAttributesRulesItemsQuery putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributesRulesItemsQuery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesRulesItemsQuery rulesetRespDataAttributesRulesItemsQuery = + (RulesetRespDataAttributesRulesItemsQuery) o; + return Objects.equals(this.addition, rulesetRespDataAttributesRulesItemsQuery.addition) + && Objects.equals( + this.caseInsensitivity, rulesetRespDataAttributesRulesItemsQuery.caseInsensitivity) + && Objects.equals(this.ifNotExists, rulesetRespDataAttributesRulesItemsQuery.ifNotExists) + && Objects.equals(this.query, rulesetRespDataAttributesRulesItemsQuery.query) + && Objects.equals( + this.additionalProperties, + rulesetRespDataAttributesRulesItemsQuery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(addition, caseInsensitivity, ifNotExists, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesRulesItemsQuery {\n"); + sb.append(" addition: ").append(toIndentedString(addition)).append("\n"); + sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQueryAddition.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQueryAddition.java new file mode 100644 index 00000000000..0008c934cac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsQueryAddition.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespDataAttributesRulesItemsQueryAddition object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributesRulesItemsQueryAddition.JSON_PROPERTY_KEY, + RulesetRespDataAttributesRulesItemsQueryAddition.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesRulesItemsQueryAddition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public RulesetRespDataAttributesRulesItemsQueryAddition() {} + + @JsonCreator + public RulesetRespDataAttributesRulesItemsQueryAddition( + @JsonProperty(required = true, value = JSON_PROPERTY_KEY) String key, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.key = key; + this.value = value; + } + + public RulesetRespDataAttributesRulesItemsQueryAddition key(String key) { + this.key = key; + return this; + } + + /** + * The addition key. + * + * @return key + */ + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public RulesetRespDataAttributesRulesItemsQueryAddition value(String value) { + this.value = value; + return this; + } + + /** + * The addition value. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesRulesItemsQueryAddition + */ + @JsonAnySetter + public RulesetRespDataAttributesRulesItemsQueryAddition putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributesRulesItemsQueryAddition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesRulesItemsQueryAddition + rulesetRespDataAttributesRulesItemsQueryAddition = + (RulesetRespDataAttributesRulesItemsQueryAddition) o; + return Objects.equals(this.key, rulesetRespDataAttributesRulesItemsQueryAddition.key) + && Objects.equals(this.value, rulesetRespDataAttributesRulesItemsQueryAddition.value) + && Objects.equals( + this.additionalProperties, + rulesetRespDataAttributesRulesItemsQueryAddition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesRulesItemsQueryAddition {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTable.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTable.java new file mode 100644 index 00000000000..92ec35fd453 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTable.java @@ -0,0 +1,290 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of RulesetRespDataAttributesRulesItemsReferenceTable object. */ +@JsonPropertyOrder({ + RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_CASE_INSENSITIVITY, + RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_FIELD_PAIRS, + RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_NOT_EXISTS, + RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_SOURCE_KEYS, + RulesetRespDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_TABLE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesRulesItemsReferenceTable { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CASE_INSENSITIVITY = "case_insensitivity"; + private Boolean caseInsensitivity; + + public static final String JSON_PROPERTY_FIELD_PAIRS = "field_pairs"; + private List fieldPairs = + new ArrayList<>(); + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; + private List sourceKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE_NAME = "table_name"; + private String tableName; + + public RulesetRespDataAttributesRulesItemsReferenceTable() {} + + @JsonCreator + public RulesetRespDataAttributesRulesItemsReferenceTable( + @JsonProperty(required = true, value = JSON_PROPERTY_FIELD_PAIRS) + List fieldPairs, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys, + @JsonProperty(required = true, value = JSON_PROPERTY_TABLE_NAME) String tableName) { + this.fieldPairs = fieldPairs; + this.sourceKeys = sourceKeys; + this.tableName = tableName; + } + + public RulesetRespDataAttributesRulesItemsReferenceTable caseInsensitivity( + Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + return this; + } + + /** + * The reference_table case_insensitivity. + * + * @return caseInsensitivity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_INSENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCaseInsensitivity() { + return caseInsensitivity; + } + + public void setCaseInsensitivity(Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + } + + public RulesetRespDataAttributesRulesItemsReferenceTable fieldPairs( + List fieldPairs) { + this.fieldPairs = fieldPairs; + for (RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems item : fieldPairs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RulesetRespDataAttributesRulesItemsReferenceTable addFieldPairsItem( + RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems fieldPairsItem) { + this.fieldPairs.add(fieldPairsItem); + this.unparsed |= fieldPairsItem.unparsed; + return this; + } + + /** + * The reference_table field_pairs. + * + * @return fieldPairs + */ + @JsonProperty(JSON_PROPERTY_FIELD_PAIRS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getFieldPairs() { + return fieldPairs; + } + + public void setFieldPairs( + List fieldPairs) { + this.fieldPairs = fieldPairs; + } + + public RulesetRespDataAttributesRulesItemsReferenceTable ifNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The reference_table if_not_exists. + * + * @return ifNotExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public RulesetRespDataAttributesRulesItemsReferenceTable sourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + return this; + } + + public RulesetRespDataAttributesRulesItemsReferenceTable addSourceKeysItem( + String sourceKeysItem) { + this.sourceKeys.add(sourceKeysItem); + return this; + } + + /** + * The reference_table source_keys. + * + * @return sourceKeys + */ + @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSourceKeys() { + return sourceKeys; + } + + public void setSourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + } + + public RulesetRespDataAttributesRulesItemsReferenceTable tableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * The reference_table table_name. + * + * @return tableName + */ + @JsonProperty(JSON_PROPERTY_TABLE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesRulesItemsReferenceTable + */ + @JsonAnySetter + public RulesetRespDataAttributesRulesItemsReferenceTable putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RulesetRespDataAttributesRulesItemsReferenceTable object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesRulesItemsReferenceTable + rulesetRespDataAttributesRulesItemsReferenceTable = + (RulesetRespDataAttributesRulesItemsReferenceTable) o; + return Objects.equals( + this.caseInsensitivity, + rulesetRespDataAttributesRulesItemsReferenceTable.caseInsensitivity) + && Objects.equals( + this.fieldPairs, rulesetRespDataAttributesRulesItemsReferenceTable.fieldPairs) + && Objects.equals( + this.ifNotExists, rulesetRespDataAttributesRulesItemsReferenceTable.ifNotExists) + && Objects.equals( + this.sourceKeys, rulesetRespDataAttributesRulesItemsReferenceTable.sourceKeys) + && Objects.equals( + this.tableName, rulesetRespDataAttributesRulesItemsReferenceTable.tableName) + && Objects.equals( + this.additionalProperties, + rulesetRespDataAttributesRulesItemsReferenceTable.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + caseInsensitivity, fieldPairs, ifNotExists, sourceKeys, tableName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesRulesItemsReferenceTable {\n"); + sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); + sb.append(" fieldPairs: ").append(toIndentedString(fieldPairs)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); + sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.java new file mode 100644 index 00000000000..43401aa6e47 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.java @@ -0,0 +1,190 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems + * object. + */ +@JsonPropertyOrder({ + RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.JSON_PROPERTY_INPUT_COLUMN, + RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.JSON_PROPERTY_OUTPUT_KEY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INPUT_COLUMN = "input_column"; + private String inputColumn; + + public static final String JSON_PROPERTY_OUTPUT_KEY = "output_key"; + private String outputKey; + + public RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems() {} + + @JsonCreator + public RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT_COLUMN) String inputColumn, + @JsonProperty(required = true, value = JSON_PROPERTY_OUTPUT_KEY) String outputKey) { + this.inputColumn = inputColumn; + this.outputKey = outputKey; + } + + public RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems inputColumn( + String inputColumn) { + this.inputColumn = inputColumn; + return this; + } + + /** + * The items input_column. + * + * @return inputColumn + */ + @JsonProperty(JSON_PROPERTY_INPUT_COLUMN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInputColumn() { + return inputColumn; + } + + public void setInputColumn(String inputColumn) { + this.inputColumn = inputColumn; + } + + public RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems outputKey( + String outputKey) { + this.outputKey = outputKey; + return this; + } + + /** + * The items output_key. + * + * @return outputKey + */ + @JsonProperty(JSON_PROPERTY_OUTPUT_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutputKey() { + return outputKey; + } + + public void setOutputKey(String outputKey) { + this.outputKey = outputKey; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems + */ + @JsonAnySetter + public RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems + rulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems = + (RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems) o; + return Objects.equals( + this.inputColumn, + rulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.inputColumn) + && Objects.equals( + this.outputKey, + rulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.outputKey) + && Objects.equals( + this.additionalProperties, + rulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(inputColumn, outputKey, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems {\n"); + sb.append(" inputColumn: ").append(toIndentedString(inputColumn)).append("\n"); + sb.append(" outputKey: ").append(toIndentedString(outputKey)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataType.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataType.java new file mode 100644 index 00000000000..098f0c43bf3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Ruleset resource type. */ +@JsonSerialize(using = RulesetRespDataType.RulesetRespDataTypeSerializer.class) +public class RulesetRespDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("ruleset")); + + public static final RulesetRespDataType RULESET = new RulesetRespDataType("ruleset"); + + RulesetRespDataType(String value) { + super(value, allowedValues); + } + + public static class RulesetRespDataTypeSerializer extends StdSerializer { + public RulesetRespDataTypeSerializer(Class t) { + super(t); + } + + public RulesetRespDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RulesetRespDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RulesetRespDataType fromValue(String value) { + return new RulesetRespDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UCConfigPair.java b/src/main/java/com/datadog/api/client/v2/model/UCConfigPair.java new file mode 100644 index 00000000000..10f490b2c5d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UCConfigPair.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of UCConfigPair object. */ +@JsonPropertyOrder({UCConfigPair.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UCConfigPair { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UCConfigPairData data; + + public UCConfigPair data(UCConfigPairData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of UCConfigPairData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UCConfigPairData getData() { + return data; + } + + public void setData(UCConfigPairData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UCConfigPair + */ + @JsonAnySetter + public UCConfigPair putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UCConfigPair object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UCConfigPair ucConfigPair = (UCConfigPair) o; + return Objects.equals(this.data, ucConfigPair.data) + && Objects.equals(this.additionalProperties, ucConfigPair.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UCConfigPair {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UCConfigPairData.java b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairData.java new file mode 100644 index 00000000000..4df320dd880 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairData.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of UCConfigPairData object. */ +@JsonPropertyOrder({ + UCConfigPairData.JSON_PROPERTY_ATTRIBUTES, + UCConfigPairData.JSON_PROPERTY_ID, + UCConfigPairData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UCConfigPairData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UCConfigPairDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private UCConfigPairDataType type = UCConfigPairDataType.AZURE_UC_CONFIGS; + + public UCConfigPairData() {} + + @JsonCreator + public UCConfigPairData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UCConfigPairDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public UCConfigPairData attributes(UCConfigPairDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of UCConfigPairDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UCConfigPairDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(UCConfigPairDataAttributes attributes) { + this.attributes = attributes; + } + + public UCConfigPairData id(String id) { + this.id = id; + return this; + } + + /** + * The UCConfigPairData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public UCConfigPairData type(UCConfigPairDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Azure UC configs resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UCConfigPairDataType getType() { + return type; + } + + public void setType(UCConfigPairDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UCConfigPairData + */ + @JsonAnySetter + public UCConfigPairData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UCConfigPairData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UCConfigPairData ucConfigPairData = (UCConfigPairData) o; + return Objects.equals(this.attributes, ucConfigPairData.attributes) + && Objects.equals(this.id, ucConfigPairData.id) + && Objects.equals(this.type, ucConfigPairData.type) + && Objects.equals(this.additionalProperties, ucConfigPairData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UCConfigPairData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataAttributes.java new file mode 100644 index 00000000000..1b42889ed7d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataAttributes.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of UCConfigPairDataAttributes object. */ +@JsonPropertyOrder({UCConfigPairDataAttributes.JSON_PROPERTY_CONFIGS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UCConfigPairDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIGS = "configs"; + private List configs = null; + + public UCConfigPairDataAttributes configs(List configs) { + this.configs = configs; + for (UCConfigPairDataAttributesConfigsItems item : configs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public UCConfigPairDataAttributes addConfigsItem( + UCConfigPairDataAttributesConfigsItems configsItem) { + if (this.configs == null) { + this.configs = new ArrayList<>(); + } + this.configs.add(configsItem); + this.unparsed |= configsItem.unparsed; + return this; + } + + /** + * The attributes configs. + * + * @return configs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConfigs() { + return configs; + } + + public void setConfigs(List configs) { + this.configs = configs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UCConfigPairDataAttributes + */ + @JsonAnySetter + public UCConfigPairDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UCConfigPairDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UCConfigPairDataAttributes ucConfigPairDataAttributes = (UCConfigPairDataAttributes) o; + return Objects.equals(this.configs, ucConfigPairDataAttributes.configs) + && Objects.equals( + this.additionalProperties, ucConfigPairDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(configs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UCConfigPairDataAttributes {\n"); + sb.append(" configs: ").append(toIndentedString(configs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataAttributesConfigsItems.java b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataAttributesConfigsItems.java new file mode 100644 index 00000000000..ee482d58de0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataAttributesConfigsItems.java @@ -0,0 +1,561 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of UCConfigPairDataAttributesConfigsItems object. */ +@JsonPropertyOrder({ + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_ACCOUNT_ID, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_CLIENT_ID, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_CREATED_AT, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_DATASET_TYPE, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_ERROR_MESSAGES, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_EXPORT_NAME, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_EXPORT_PATH, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_ID, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_MONTHS, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_SCOPE, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_STATUS, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_STATUS_UPDATED_AT, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_STORAGE_ACCOUNT, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_STORAGE_CONTAINER, + UCConfigPairDataAttributesConfigsItems.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UCConfigPairDataAttributesConfigsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private String clientId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private String createdAt; + + public static final String JSON_PROPERTY_DATASET_TYPE = "dataset_type"; + private String datasetType; + + public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; + private JsonNullable> errorMessages = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_EXPORT_NAME = "export_name"; + private String exportName; + + public static final String JSON_PROPERTY_EXPORT_PATH = "export_path"; + private String exportPath; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_MONTHS = "months"; + private Long months; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_STATUS_UPDATED_AT = "status_updated_at"; + private String statusUpdatedAt; + + public static final String JSON_PROPERTY_STORAGE_ACCOUNT = "storage_account"; + private String storageAccount; + + public static final String JSON_PROPERTY_STORAGE_CONTAINER = "storage_container"; + private String storageContainer; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public UCConfigPairDataAttributesConfigsItems accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The items account_id. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public UCConfigPairDataAttributesConfigsItems clientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * The items client_id. + * + * @return clientId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public UCConfigPairDataAttributesConfigsItems createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The items created_at. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public UCConfigPairDataAttributesConfigsItems datasetType(String datasetType) { + this.datasetType = datasetType; + return this; + } + + /** + * The items dataset_type. + * + * @return datasetType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetType() { + return datasetType; + } + + public void setDatasetType(String datasetType) { + this.datasetType = datasetType; + } + + public UCConfigPairDataAttributesConfigsItems errorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + return this; + } + + public UCConfigPairDataAttributesConfigsItems addErrorMessagesItem(String errorMessagesItem) { + if (this.errorMessages == null || !this.errorMessages.isPresent()) { + this.errorMessages = JsonNullable.>of(new ArrayList<>()); + } + try { + this.errorMessages.get().add(errorMessagesItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items error_messages. + * + * @return errorMessages + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getErrorMessages() { + return errorMessages.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getErrorMessages_JsonNullable() { + return errorMessages; + } + + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + public void setErrorMessages_JsonNullable(JsonNullable> errorMessages) { + this.errorMessages = errorMessages; + } + + public void setErrorMessages(List errorMessages) { + this.errorMessages = JsonNullable.>of(errorMessages); + } + + public UCConfigPairDataAttributesConfigsItems exportName(String exportName) { + this.exportName = exportName; + return this; + } + + /** + * The items export_name. + * + * @return exportName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPORT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExportName() { + return exportName; + } + + public void setExportName(String exportName) { + this.exportName = exportName; + } + + public UCConfigPairDataAttributesConfigsItems exportPath(String exportPath) { + this.exportPath = exportPath; + return this; + } + + /** + * The items export_path. + * + * @return exportPath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPORT_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExportPath() { + return exportPath; + } + + public void setExportPath(String exportPath) { + this.exportPath = exportPath; + } + + public UCConfigPairDataAttributesConfigsItems id(String id) { + this.id = id; + return this; + } + + /** + * The items id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public UCConfigPairDataAttributesConfigsItems months(Long months) { + this.months = months; + return this; + } + + /** + * The items months. + * + * @return months + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MONTHS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMonths() { + return months; + } + + public void setMonths(Long months) { + this.months = months; + } + + public UCConfigPairDataAttributesConfigsItems scope(String scope) { + this.scope = scope; + return this; + } + + /** + * The items scope. + * + * @return scope + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public UCConfigPairDataAttributesConfigsItems status(String status) { + this.status = status; + return this; + } + + /** + * The items status. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public UCConfigPairDataAttributesConfigsItems statusUpdatedAt(String statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + return this; + } + + /** + * The items status_updated_at. + * + * @return statusUpdatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatusUpdatedAt() { + return statusUpdatedAt; + } + + public void setStatusUpdatedAt(String statusUpdatedAt) { + this.statusUpdatedAt = statusUpdatedAt; + } + + public UCConfigPairDataAttributesConfigsItems storageAccount(String storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * The items storage_account. + * + * @return storageAccount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STORAGE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStorageAccount() { + return storageAccount; + } + + public void setStorageAccount(String storageAccount) { + this.storageAccount = storageAccount; + } + + public UCConfigPairDataAttributesConfigsItems storageContainer(String storageContainer) { + this.storageContainer = storageContainer; + return this; + } + + /** + * The items storage_container. + * + * @return storageContainer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STORAGE_CONTAINER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStorageContainer() { + return storageContainer; + } + + public void setStorageContainer(String storageContainer) { + this.storageContainer = storageContainer; + } + + public UCConfigPairDataAttributesConfigsItems updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The items updated_at. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UCConfigPairDataAttributesConfigsItems + */ + @JsonAnySetter + public UCConfigPairDataAttributesConfigsItems putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UCConfigPairDataAttributesConfigsItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UCConfigPairDataAttributesConfigsItems ucConfigPairDataAttributesConfigsItems = + (UCConfigPairDataAttributesConfigsItems) o; + return Objects.equals(this.accountId, ucConfigPairDataAttributesConfigsItems.accountId) + && Objects.equals(this.clientId, ucConfigPairDataAttributesConfigsItems.clientId) + && Objects.equals(this.createdAt, ucConfigPairDataAttributesConfigsItems.createdAt) + && Objects.equals(this.datasetType, ucConfigPairDataAttributesConfigsItems.datasetType) + && Objects.equals(this.errorMessages, ucConfigPairDataAttributesConfigsItems.errorMessages) + && Objects.equals(this.exportName, ucConfigPairDataAttributesConfigsItems.exportName) + && Objects.equals(this.exportPath, ucConfigPairDataAttributesConfigsItems.exportPath) + && Objects.equals(this.id, ucConfigPairDataAttributesConfigsItems.id) + && Objects.equals(this.months, ucConfigPairDataAttributesConfigsItems.months) + && Objects.equals(this.scope, ucConfigPairDataAttributesConfigsItems.scope) + && Objects.equals(this.status, ucConfigPairDataAttributesConfigsItems.status) + && Objects.equals( + this.statusUpdatedAt, ucConfigPairDataAttributesConfigsItems.statusUpdatedAt) + && Objects.equals( + this.storageAccount, ucConfigPairDataAttributesConfigsItems.storageAccount) + && Objects.equals( + this.storageContainer, ucConfigPairDataAttributesConfigsItems.storageContainer) + && Objects.equals(this.updatedAt, ucConfigPairDataAttributesConfigsItems.updatedAt) + && Objects.equals( + this.additionalProperties, ucConfigPairDataAttributesConfigsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + clientId, + createdAt, + datasetType, + errorMessages, + exportName, + exportPath, + id, + months, + scope, + status, + statusUpdatedAt, + storageAccount, + storageContainer, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UCConfigPairDataAttributesConfigsItems {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" datasetType: ").append(toIndentedString(datasetType)).append("\n"); + sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); + sb.append(" exportName: ").append(toIndentedString(exportName)).append("\n"); + sb.append(" exportPath: ").append(toIndentedString(exportPath)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" months: ").append(toIndentedString(months)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" statusUpdatedAt: ").append(toIndentedString(statusUpdatedAt)).append("\n"); + sb.append(" storageAccount: ").append(toIndentedString(storageAccount)).append("\n"); + sb.append(" storageContainer: ").append(toIndentedString(storageContainer)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataType.java b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataType.java new file mode 100644 index 00000000000..f6801292db2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UCConfigPairDataType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Azure UC configs resource type. */ +@JsonSerialize(using = UCConfigPairDataType.UCConfigPairDataTypeSerializer.class) +public class UCConfigPairDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("azure_uc_configs")); + + public static final UCConfigPairDataType AZURE_UC_CONFIGS = + new UCConfigPairDataType("azure_uc_configs"); + + UCConfigPairDataType(String value) { + super(value, allowedValues); + } + + public static class UCConfigPairDataTypeSerializer extends StdSerializer { + public UCConfigPairDataTypeSerializer(Class t) { + super(t); + } + + public UCConfigPairDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + UCConfigPairDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static UCConfigPairDataType fromValue(String value) { + return new UCConfigPairDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequest.java new file mode 100644 index 00000000000..72319330d1b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequest.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of UpdateRulesetRequest object. */ +@JsonPropertyOrder({UpdateRulesetRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateRulesetRequestData data; + + public UpdateRulesetRequest data(UpdateRulesetRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The definition of UpdateRulesetRequestData object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UpdateRulesetRequestData getData() { + return data; + } + + public void setData(UpdateRulesetRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequest + */ + @JsonAnySetter + public UpdateRulesetRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateRulesetRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequest updateRulesetRequest = (UpdateRulesetRequest) o; + return Objects.equals(this.data, updateRulesetRequest.data) + && Objects.equals(this.additionalProperties, updateRulesetRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestData.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestData.java new file mode 100644 index 00000000000..63c0a172317 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestData.java @@ -0,0 +1,206 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of UpdateRulesetRequestData object. */ +@JsonPropertyOrder({ + UpdateRulesetRequestData.JSON_PROPERTY_ATTRIBUTES, + UpdateRulesetRequestData.JSON_PROPERTY_ID, + UpdateRulesetRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateRulesetRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private UpdateRulesetRequestDataType type = UpdateRulesetRequestDataType.UPDATE_RULESET; + + public UpdateRulesetRequestData() {} + + @JsonCreator + public UpdateRulesetRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + UpdateRulesetRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public UpdateRulesetRequestData attributes(UpdateRulesetRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The definition of UpdateRulesetRequestDataAttributes object. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UpdateRulesetRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(UpdateRulesetRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public UpdateRulesetRequestData id(String id) { + this.id = id; + return this; + } + + /** + * The UpdateRulesetRequestData id. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public UpdateRulesetRequestData type(UpdateRulesetRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Update ruleset resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpdateRulesetRequestDataType getType() { + return type; + } + + public void setType(UpdateRulesetRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestData + */ + @JsonAnySetter + public UpdateRulesetRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateRulesetRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestData updateRulesetRequestData = (UpdateRulesetRequestData) o; + return Objects.equals(this.attributes, updateRulesetRequestData.attributes) + && Objects.equals(this.id, updateRulesetRequestData.id) + && Objects.equals(this.type, updateRulesetRequestData.type) + && Objects.equals(this.additionalProperties, updateRulesetRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributes.java new file mode 100644 index 00000000000..1fc5ea13188 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributes.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of UpdateRulesetRequestDataAttributes object. */ +@JsonPropertyOrder({ + UpdateRulesetRequestDataAttributes.JSON_PROPERTY_ENABLED, + UpdateRulesetRequestDataAttributes.JSON_PROPERTY_LAST_VERSION, + UpdateRulesetRequestDataAttributes.JSON_PROPERTY_RULES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_LAST_VERSION = "last_version"; + private Long lastVersion; + + public static final String JSON_PROPERTY_RULES = "rules"; + private List rules = new ArrayList<>(); + + public UpdateRulesetRequestDataAttributes() {} + + @JsonCreator + public UpdateRulesetRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_RULES) + List rules) { + this.enabled = enabled; + this.rules = rules; + } + + public UpdateRulesetRequestDataAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The attributes enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public UpdateRulesetRequestDataAttributes lastVersion(Long lastVersion) { + this.lastVersion = lastVersion; + return this; + } + + /** + * The attributes last_version. + * + * @return lastVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastVersion() { + return lastVersion; + } + + public void setLastVersion(Long lastVersion) { + this.lastVersion = lastVersion; + } + + public UpdateRulesetRequestDataAttributes rules( + List rules) { + this.rules = rules; + for (UpdateRulesetRequestDataAttributesRulesItems item : rules) { + this.unparsed |= item.unparsed; + } + return this; + } + + public UpdateRulesetRequestDataAttributes addRulesItem( + UpdateRulesetRequestDataAttributesRulesItems rulesItem) { + this.rules.add(rulesItem); + this.unparsed |= rulesItem.unparsed; + return this; + } + + /** + * The attributes rules. + * + * @return rules + */ + @JsonProperty(JSON_PROPERTY_RULES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRules() { + return rules; + } + + public void setRules(List rules) { + this.rules = rules; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestDataAttributes + */ + @JsonAnySetter + public UpdateRulesetRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateRulesetRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestDataAttributes updateRulesetRequestDataAttributes = + (UpdateRulesetRequestDataAttributes) o; + return Objects.equals(this.enabled, updateRulesetRequestDataAttributes.enabled) + && Objects.equals(this.lastVersion, updateRulesetRequestDataAttributes.lastVersion) + && Objects.equals(this.rules, updateRulesetRequestDataAttributes.rules) + && Objects.equals( + this.additionalProperties, updateRulesetRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, lastVersion, rules, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequestDataAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" lastVersion: ").append(toIndentedString(lastVersion)).append("\n"); + sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItems.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItems.java new file mode 100644 index 00000000000..a7d70440dd5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItems.java @@ -0,0 +1,357 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The definition of UpdateRulesetRequestDataAttributesRulesItems object. */ +@JsonPropertyOrder({ + UpdateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_ENABLED, + UpdateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_MAPPING, + UpdateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_METADATA, + UpdateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_NAME, + UpdateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_QUERY, + UpdateRulesetRequestDataAttributesRulesItems.JSON_PROPERTY_REFERENCE_TABLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestDataAttributesRulesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_MAPPING = "mapping"; + private JsonNullable mapping = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private JsonNullable> metadata = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private JsonNullable query = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_REFERENCE_TABLE = "reference_table"; + private JsonNullable referenceTable = + JsonNullable.undefined(); + + public UpdateRulesetRequestDataAttributesRulesItems() {} + + @JsonCreator + public UpdateRulesetRequestDataAttributesRulesItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.enabled = enabled; + this.name = name; + } + + public UpdateRulesetRequestDataAttributesRulesItems enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * The items enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public UpdateRulesetRequestDataAttributesRulesItems mapping( + UpdateRulesetRequestDataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); + return this; + } + + /** + * The definition of UpdateRulesetRequestDataAttributesRulesItemsMapping object. + * + * @return mapping + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UpdateRulesetRequestDataAttributesRulesItemsMapping getMapping() { + return mapping.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MAPPING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getMapping_JsonNullable() { + return mapping; + } + + @JsonProperty(JSON_PROPERTY_MAPPING) + public void setMapping_JsonNullable( + JsonNullable mapping) { + this.mapping = mapping; + } + + public void setMapping(UpdateRulesetRequestDataAttributesRulesItemsMapping mapping) { + this.mapping = JsonNullable.of(mapping); + } + + public UpdateRulesetRequestDataAttributesRulesItems metadata(Map metadata) { + this.metadata = JsonNullable.>of(metadata); + return this; + } + + public UpdateRulesetRequestDataAttributesRulesItems putMetadataItem( + String key, String metadataItem) { + if (this.metadata == null || !this.metadata.isPresent()) { + this.metadata = JsonNullable.>of(new HashMap<>()); + } + try { + this.metadata.get().put(key, metadataItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The items metadata. + * + * @return metadata + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getMetadata() { + return metadata.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getMetadata_JsonNullable() { + return metadata; + } + + @JsonProperty(JSON_PROPERTY_METADATA) + public void setMetadata_JsonNullable(JsonNullable> metadata) { + this.metadata = metadata; + } + + public void setMetadata(Map metadata) { + this.metadata = JsonNullable.>of(metadata); + } + + public UpdateRulesetRequestDataAttributesRulesItems name(String name) { + this.name = name; + return this; + } + + /** + * The items name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public UpdateRulesetRequestDataAttributesRulesItems query( + UpdateRulesetRequestDataAttributesRulesItemsQuery query) { + this.query = JsonNullable.of(query); + return this; + } + + /** + * The definition of UpdateRulesetRequestDataAttributesRulesItemsQuery object. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UpdateRulesetRequestDataAttributesRulesItemsQuery getQuery() { + return query.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getQuery_JsonNullable() { + return query; + } + + @JsonProperty(JSON_PROPERTY_QUERY) + public void setQuery_JsonNullable( + JsonNullable query) { + this.query = query; + } + + public void setQuery(UpdateRulesetRequestDataAttributesRulesItemsQuery query) { + this.query = JsonNullable.of(query); + } + + public UpdateRulesetRequestDataAttributesRulesItems referenceTable( + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable referenceTable) { + this.referenceTable = + JsonNullable.of(referenceTable); + return this; + } + + /** + * The definition of UpdateRulesetRequestDataAttributesRulesItemsReferenceTable + * object. + * + * @return referenceTable + */ + @jakarta.annotation.Nullable + @JsonIgnore + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable getReferenceTable() { + return referenceTable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_TABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getReferenceTable_JsonNullable() { + return referenceTable; + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_TABLE) + public void setReferenceTable_JsonNullable( + JsonNullable referenceTable) { + this.referenceTable = referenceTable; + } + + public void setReferenceTable( + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable referenceTable) { + this.referenceTable = + JsonNullable.of(referenceTable); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestDataAttributesRulesItems + */ + @JsonAnySetter + public UpdateRulesetRequestDataAttributesRulesItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateRulesetRequestDataAttributesRulesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestDataAttributesRulesItems updateRulesetRequestDataAttributesRulesItems = + (UpdateRulesetRequestDataAttributesRulesItems) o; + return Objects.equals(this.enabled, updateRulesetRequestDataAttributesRulesItems.enabled) + && Objects.equals(this.mapping, updateRulesetRequestDataAttributesRulesItems.mapping) + && Objects.equals(this.metadata, updateRulesetRequestDataAttributesRulesItems.metadata) + && Objects.equals(this.name, updateRulesetRequestDataAttributesRulesItems.name) + && Objects.equals(this.query, updateRulesetRequestDataAttributesRulesItems.query) + && Objects.equals( + this.referenceTable, updateRulesetRequestDataAttributesRulesItems.referenceTable) + && Objects.equals( + this.additionalProperties, + updateRulesetRequestDataAttributesRulesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + enabled, mapping, metadata, name, query, referenceTable, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequestDataAttributesRulesItems {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" mapping: ").append(toIndentedString(mapping)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" referenceTable: ").append(toIndentedString(referenceTable)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsMapping.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsMapping.java new file mode 100644 index 00000000000..a8fd9da86b3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsMapping.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The definition of UpdateRulesetRequestDataAttributesRulesItemsMapping object. */ +@JsonPropertyOrder({ + UpdateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_DESTINATION_KEY, + UpdateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_IF_NOT_EXISTS, + UpdateRulesetRequestDataAttributesRulesItemsMapping.JSON_PROPERTY_SOURCE_KEYS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestDataAttributesRulesItemsMapping { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESTINATION_KEY = "destination_key"; + private String destinationKey; + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; + private List sourceKeys = new ArrayList<>(); + + public UpdateRulesetRequestDataAttributesRulesItemsMapping() {} + + @JsonCreator + public UpdateRulesetRequestDataAttributesRulesItemsMapping( + @JsonProperty(required = true, value = JSON_PROPERTY_DESTINATION_KEY) String destinationKey, + @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys) { + this.destinationKey = destinationKey; + this.ifNotExists = ifNotExists; + this.sourceKeys = sourceKeys; + } + + public UpdateRulesetRequestDataAttributesRulesItemsMapping destinationKey(String destinationKey) { + this.destinationKey = destinationKey; + return this; + } + + /** + * The mapping destination_key. + * + * @return destinationKey + */ + @JsonProperty(JSON_PROPERTY_DESTINATION_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDestinationKey() { + return destinationKey; + } + + public void setDestinationKey(String destinationKey) { + this.destinationKey = destinationKey; + } + + public UpdateRulesetRequestDataAttributesRulesItemsMapping ifNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The mapping if_not_exists. + * + * @return ifNotExists + */ + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public UpdateRulesetRequestDataAttributesRulesItemsMapping sourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + return this; + } + + public UpdateRulesetRequestDataAttributesRulesItemsMapping addSourceKeysItem( + String sourceKeysItem) { + this.sourceKeys.add(sourceKeysItem); + return this; + } + + /** + * The mapping source_keys. + * + * @return sourceKeys + */ + @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSourceKeys() { + return sourceKeys; + } + + public void setSourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestDataAttributesRulesItemsMapping + */ + @JsonAnySetter + public UpdateRulesetRequestDataAttributesRulesItemsMapping putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this UpdateRulesetRequestDataAttributesRulesItemsMapping object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestDataAttributesRulesItemsMapping + updateRulesetRequestDataAttributesRulesItemsMapping = + (UpdateRulesetRequestDataAttributesRulesItemsMapping) o; + return Objects.equals( + this.destinationKey, updateRulesetRequestDataAttributesRulesItemsMapping.destinationKey) + && Objects.equals( + this.ifNotExists, updateRulesetRequestDataAttributesRulesItemsMapping.ifNotExists) + && Objects.equals( + this.sourceKeys, updateRulesetRequestDataAttributesRulesItemsMapping.sourceKeys) + && Objects.equals( + this.additionalProperties, + updateRulesetRequestDataAttributesRulesItemsMapping.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(destinationKey, ifNotExists, sourceKeys, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequestDataAttributesRulesItemsMapping {\n"); + sb.append(" destinationKey: ").append(toIndentedString(destinationKey)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQuery.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQuery.java new file mode 100644 index 00000000000..bf8dfefb238 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQuery.java @@ -0,0 +1,247 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The definition of UpdateRulesetRequestDataAttributesRulesItemsQuery object. */ +@JsonPropertyOrder({ + UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_ADDITION, + UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_CASE_INSENSITIVITY, + UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_IF_NOT_EXISTS, + UpdateRulesetRequestDataAttributesRulesItemsQuery.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestDataAttributesRulesItemsQuery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADDITION = "addition"; + private UpdateRulesetRequestDataAttributesRulesItemsQueryAddition addition; + + public static final String JSON_PROPERTY_CASE_INSENSITIVITY = "case_insensitivity"; + private Boolean caseInsensitivity; + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public UpdateRulesetRequestDataAttributesRulesItemsQuery() {} + + @JsonCreator + public UpdateRulesetRequestDataAttributesRulesItemsQuery( + @JsonProperty(required = true, value = JSON_PROPERTY_ADDITION) + UpdateRulesetRequestDataAttributesRulesItemsQueryAddition addition, + @JsonProperty(required = true, value = JSON_PROPERTY_IF_NOT_EXISTS) Boolean ifNotExists, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.addition = addition; + if (addition != null) { + this.unparsed |= addition.unparsed; + } + this.ifNotExists = ifNotExists; + this.query = query; + } + + public UpdateRulesetRequestDataAttributesRulesItemsQuery addition( + UpdateRulesetRequestDataAttributesRulesItemsQueryAddition addition) { + this.addition = addition; + if (addition != null) { + this.unparsed |= addition.unparsed; + } + return this; + } + + /** + * The definition of UpdateRulesetRequestDataAttributesRulesItemsQueryAddition + * object. + * + * @return addition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpdateRulesetRequestDataAttributesRulesItemsQueryAddition getAddition() { + return addition; + } + + public void setAddition(UpdateRulesetRequestDataAttributesRulesItemsQueryAddition addition) { + this.addition = addition; + } + + public UpdateRulesetRequestDataAttributesRulesItemsQuery caseInsensitivity( + Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + return this; + } + + /** + * The query case_insensitivity. + * + * @return caseInsensitivity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_INSENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCaseInsensitivity() { + return caseInsensitivity; + } + + public void setCaseInsensitivity(Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + } + + public UpdateRulesetRequestDataAttributesRulesItemsQuery ifNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The query if_not_exists. + * + * @return ifNotExists + */ + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public UpdateRulesetRequestDataAttributesRulesItemsQuery query(String query) { + this.query = query; + return this; + } + + /** + * The query query. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestDataAttributesRulesItemsQuery + */ + @JsonAnySetter + public UpdateRulesetRequestDataAttributesRulesItemsQuery putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateRulesetRequestDataAttributesRulesItemsQuery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestDataAttributesRulesItemsQuery + updateRulesetRequestDataAttributesRulesItemsQuery = + (UpdateRulesetRequestDataAttributesRulesItemsQuery) o; + return Objects.equals(this.addition, updateRulesetRequestDataAttributesRulesItemsQuery.addition) + && Objects.equals( + this.caseInsensitivity, + updateRulesetRequestDataAttributesRulesItemsQuery.caseInsensitivity) + && Objects.equals( + this.ifNotExists, updateRulesetRequestDataAttributesRulesItemsQuery.ifNotExists) + && Objects.equals(this.query, updateRulesetRequestDataAttributesRulesItemsQuery.query) + && Objects.equals( + this.additionalProperties, + updateRulesetRequestDataAttributesRulesItemsQuery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(addition, caseInsensitivity, ifNotExists, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequestDataAttributesRulesItemsQuery {\n"); + sb.append(" addition: ").append(toIndentedString(addition)).append("\n"); + sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQueryAddition.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQueryAddition.java new file mode 100644 index 00000000000..66d56d4fdeb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsQueryAddition.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of UpdateRulesetRequestDataAttributesRulesItemsQueryAddition object. + */ +@JsonPropertyOrder({ + UpdateRulesetRequestDataAttributesRulesItemsQueryAddition.JSON_PROPERTY_KEY, + UpdateRulesetRequestDataAttributesRulesItemsQueryAddition.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestDataAttributesRulesItemsQueryAddition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public UpdateRulesetRequestDataAttributesRulesItemsQueryAddition() {} + + @JsonCreator + public UpdateRulesetRequestDataAttributesRulesItemsQueryAddition( + @JsonProperty(required = true, value = JSON_PROPERTY_KEY) String key, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.key = key; + this.value = value; + } + + public UpdateRulesetRequestDataAttributesRulesItemsQueryAddition key(String key) { + this.key = key; + return this; + } + + /** + * The addition key. + * + * @return key + */ + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public UpdateRulesetRequestDataAttributesRulesItemsQueryAddition value(String value) { + this.value = value; + return this; + } + + /** + * The addition value. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestDataAttributesRulesItemsQueryAddition + */ + @JsonAnySetter + public UpdateRulesetRequestDataAttributesRulesItemsQueryAddition putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this UpdateRulesetRequestDataAttributesRulesItemsQueryAddition object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestDataAttributesRulesItemsQueryAddition + updateRulesetRequestDataAttributesRulesItemsQueryAddition = + (UpdateRulesetRequestDataAttributesRulesItemsQueryAddition) o; + return Objects.equals(this.key, updateRulesetRequestDataAttributesRulesItemsQueryAddition.key) + && Objects.equals( + this.value, updateRulesetRequestDataAttributesRulesItemsQueryAddition.value) + && Objects.equals( + this.additionalProperties, + updateRulesetRequestDataAttributesRulesItemsQueryAddition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequestDataAttributesRulesItemsQueryAddition {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.java new file mode 100644 index 00000000000..bfe4bcb2daa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.java @@ -0,0 +1,301 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of UpdateRulesetRequestDataAttributesRulesItemsReferenceTable object. + */ +@JsonPropertyOrder({ + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_CASE_INSENSITIVITY, + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_FIELD_PAIRS, + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_IF_NOT_EXISTS, + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_SOURCE_KEYS, + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable.JSON_PROPERTY_TABLE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestDataAttributesRulesItemsReferenceTable { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CASE_INSENSITIVITY = "case_insensitivity"; + private Boolean caseInsensitivity; + + public static final String JSON_PROPERTY_FIELD_PAIRS = "field_pairs"; + private List + fieldPairs = new ArrayList<>(); + + public static final String JSON_PROPERTY_IF_NOT_EXISTS = "if_not_exists"; + private Boolean ifNotExists; + + public static final String JSON_PROPERTY_SOURCE_KEYS = "source_keys"; + private List sourceKeys = new ArrayList<>(); + + public static final String JSON_PROPERTY_TABLE_NAME = "table_name"; + private String tableName; + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable() {} + + @JsonCreator + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable( + @JsonProperty(required = true, value = JSON_PROPERTY_FIELD_PAIRS) + List + fieldPairs, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_KEYS) List sourceKeys, + @JsonProperty(required = true, value = JSON_PROPERTY_TABLE_NAME) String tableName) { + this.fieldPairs = fieldPairs; + this.sourceKeys = sourceKeys; + this.tableName = tableName; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable caseInsensitivity( + Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + return this; + } + + /** + * The reference_table case_insensitivity. + * + * @return caseInsensitivity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_INSENSITIVITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCaseInsensitivity() { + return caseInsensitivity; + } + + public void setCaseInsensitivity(Boolean caseInsensitivity) { + this.caseInsensitivity = caseInsensitivity; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable fieldPairs( + List fieldPairs) { + this.fieldPairs = fieldPairs; + for (UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems item : + fieldPairs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable addFieldPairsItem( + UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems fieldPairsItem) { + this.fieldPairs.add(fieldPairsItem); + this.unparsed |= fieldPairsItem.unparsed; + return this; + } + + /** + * The reference_table field_pairs. + * + * @return fieldPairs + */ + @JsonProperty(JSON_PROPERTY_FIELD_PAIRS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List + getFieldPairs() { + return fieldPairs; + } + + public void setFieldPairs( + List fieldPairs) { + this.fieldPairs = fieldPairs; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable ifNotExists( + Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + return this; + } + + /** + * The reference_table if_not_exists. + * + * @return ifNotExists + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IF_NOT_EXISTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIfNotExists() { + return ifNotExists; + } + + public void setIfNotExists(Boolean ifNotExists) { + this.ifNotExists = ifNotExists; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable sourceKeys( + List sourceKeys) { + this.sourceKeys = sourceKeys; + return this; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable addSourceKeysItem( + String sourceKeysItem) { + this.sourceKeys.add(sourceKeysItem); + return this; + } + + /** + * The reference_table source_keys. + * + * @return sourceKeys + */ + @JsonProperty(JSON_PROPERTY_SOURCE_KEYS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSourceKeys() { + return sourceKeys; + } + + public void setSourceKeys(List sourceKeys) { + this.sourceKeys = sourceKeys; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable tableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * The reference_table table_name. + * + * @return tableName + */ + @JsonProperty(JSON_PROPERTY_TABLE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestDataAttributesRulesItemsReferenceTable + */ + @JsonAnySetter + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTable putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this UpdateRulesetRequestDataAttributesRulesItemsReferenceTable object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestDataAttributesRulesItemsReferenceTable + updateRulesetRequestDataAttributesRulesItemsReferenceTable = + (UpdateRulesetRequestDataAttributesRulesItemsReferenceTable) o; + return Objects.equals( + this.caseInsensitivity, + updateRulesetRequestDataAttributesRulesItemsReferenceTable.caseInsensitivity) + && Objects.equals( + this.fieldPairs, updateRulesetRequestDataAttributesRulesItemsReferenceTable.fieldPairs) + && Objects.equals( + this.ifNotExists, + updateRulesetRequestDataAttributesRulesItemsReferenceTable.ifNotExists) + && Objects.equals( + this.sourceKeys, updateRulesetRequestDataAttributesRulesItemsReferenceTable.sourceKeys) + && Objects.equals( + this.tableName, updateRulesetRequestDataAttributesRulesItemsReferenceTable.tableName) + && Objects.equals( + this.additionalProperties, + updateRulesetRequestDataAttributesRulesItemsReferenceTable.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + caseInsensitivity, fieldPairs, ifNotExists, sourceKeys, tableName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRulesetRequestDataAttributesRulesItemsReferenceTable {\n"); + sb.append(" caseInsensitivity: ").append(toIndentedString(caseInsensitivity)).append("\n"); + sb.append(" fieldPairs: ").append(toIndentedString(fieldPairs)).append("\n"); + sb.append(" ifNotExists: ").append(toIndentedString(ifNotExists)).append("\n"); + sb.append(" sourceKeys: ").append(toIndentedString(sourceKeys)).append("\n"); + sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.java new file mode 100644 index 00000000000..f7afbf2c327 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.java @@ -0,0 +1,193 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The definition of UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + * object. + */ +@JsonPropertyOrder({ + UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + .JSON_PROPERTY_INPUT_COLUMN, + UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.JSON_PROPERTY_OUTPUT_KEY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INPUT_COLUMN = "input_column"; + private String inputColumn; + + public static final String JSON_PROPERTY_OUTPUT_KEY = "output_key"; + private String outputKey; + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems() {} + + @JsonCreator + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems( + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT_COLUMN) String inputColumn, + @JsonProperty(required = true, value = JSON_PROPERTY_OUTPUT_KEY) String outputKey) { + this.inputColumn = inputColumn; + this.outputKey = outputKey; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems inputColumn( + String inputColumn) { + this.inputColumn = inputColumn; + return this; + } + + /** + * The items input_column. + * + * @return inputColumn + */ + @JsonProperty(JSON_PROPERTY_INPUT_COLUMN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInputColumn() { + return inputColumn; + } + + public void setInputColumn(String inputColumn) { + this.inputColumn = inputColumn; + } + + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems outputKey( + String outputKey) { + this.outputKey = outputKey; + return this; + } + + /** + * The items output_key. + * + * @return outputKey + */ + @JsonProperty(JSON_PROPERTY_OUTPUT_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getOutputKey() { + return outputKey; + } + + public void setOutputKey(String outputKey) { + this.outputKey = outputKey; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + */ + @JsonAnySetter + public UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + updateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems = + (UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems) o; + return Objects.equals( + this.inputColumn, + updateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.inputColumn) + && Objects.equals( + this.outputKey, + updateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems.outputKey) + && Objects.equals( + this.additionalProperties, + updateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(inputColumn, outputKey, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class UpdateRulesetRequestDataAttributesRulesItemsReferenceTableFieldPairsItems {\n"); + sb.append(" inputColumn: ").append(toIndentedString(inputColumn)).append("\n"); + sb.append(" outputKey: ").append(toIndentedString(outputKey)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataType.java new file mode 100644 index 00000000000..0f4ab21a471 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateRulesetRequestDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Update ruleset resource type. */ +@JsonSerialize(using = UpdateRulesetRequestDataType.UpdateRulesetRequestDataTypeSerializer.class) +public class UpdateRulesetRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("update_ruleset")); + + public static final UpdateRulesetRequestDataType UPDATE_RULESET = + new UpdateRulesetRequestDataType("update_ruleset"); + + UpdateRulesetRequestDataType(String value) { + super(value, allowedValues); + } + + public static class UpdateRulesetRequestDataTypeSerializer + extends StdSerializer { + public UpdateRulesetRequestDataTypeSerializer(Class t) { + super(t); + } + + public UpdateRulesetRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + UpdateRulesetRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static UpdateRulesetRequestDataType fromValue(String value) { + return new UpdateRulesetRequestDataType(value); + } +} diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json index e8f4319e2f6..772506c20f2 100644 --- a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\": {\"attributes\": {\"account_id\": \"1234abcd-1234-abcd-1234-1234abcd1234\", \"actual_bill_config\": {\"export_name\": \"dd-actual-export\", \"export_path\": \"dd-export-path\", \"storage_account\": \"dd-storage-account\", \"storage_container\": \"dd-storage-container\"}, \"amortized_bill_config\": {\"export_name\": \"dd-actual-export\", \"export_path\": \"dd-export-path\", \"storage_account\": \"dd-storage-account\", \"storage_container\": \"dd-storage-container\"}, \"client_id\": \"1234abcd-1234-abcd-1234-1234abcd1234\", \"is_enabled\": true, \"scope\": \"subscriptions/1234abcd-1234-abcd-1234-1234abcd1234\"}, \"type\": \"azure_uc_config_post_request\"}}" + "json": "{\"data\":{\"attributes\":{\"account_id\":\"1234abcd-1234-abcd-1234-1234abcd1234\",\"actual_bill_config\":{\"export_name\":\"dd-actual-export\",\"export_path\":\"dd-export-path\",\"storage_account\":\"dd-storage-account\",\"storage_container\":\"dd-storage-container\"},\"amortized_bill_config\":{\"export_name\":\"dd-actual-export\",\"export_path\":\"dd-export-path\",\"storage_account\":\"dd-storage-account\",\"storage_container\":\"dd-storage-container\"},\"client_id\":\"1234abcd-1234-abcd-1234-1234abcd1234\",\"scope\":\"subscriptions/1234abcd-1234-abcd-1234-1234abcd1234\"},\"type\":\"azure_uc_config_post_request\"}}" }, "headers": {}, "method": "POST", @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ffbfdd2f-6258-16f5-b1da-35a9d620c031" + "id": "86b1980a-e0a4-1e3c-519c-5c80312afbb3" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_Bad_Request_response.freeze similarity index 100% rename from src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.freeze rename to src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_Bad_Request_response.freeze diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_Bad_Request_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.json rename to src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_Bad_Request_response.json diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_OK_response.freeze similarity index 100% rename from src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.freeze rename to src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_OK_response.freeze diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_OK_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Create_Google_Cloud_Usage_Cost_config_returns_OK_response.json diff --git a/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..694e0deed84 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-15T20:24:10.628Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.json new file mode 100644 index 00000000000..dc97db70f22 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"costs_to_allocate\":[{\"condition\":\"is\",\"tag\":\"account_id\",\"value\":\"123456789\",\"values\":[]},{\"condition\":\"in\",\"tag\":\"environment\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"enabled\":true,\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"allocated_by_tag_keys\":[\"team\",\"environment\"],\"based_on_costs\":[{\"condition\":\"is\",\"tag\":\"service\",\"value\":\"web-api\",\"values\":[]},{\"condition\":\"not in\",\"tag\":\"team\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"granularity\":\"daily\",\"method\":\"proportional\"},\"type\":\"shared\"},\"type\":\"upsert_arbitrary_rule\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cost/arbitrary_rule", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"435\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-15T20:23:11.705977625Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-15T20:23:11.705977625Z\",\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "bb520c0c-d608-1a10-34c1-5ed0b3d5d0c3" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.freeze new file mode 100644 index 00000000000..8be30f84af4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-16T16:51:02.186Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.json new file mode 100644 index 00000000000..89d1fe4d4c0 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"rules\":[{\"enabled\":true,\"mapping\":null,\"name\":\"Add Cost Center Tag\",\"query\":{\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"case_insensitivity\":false,\"if_not_exists\":true,\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\"},\"reference_table\":null}]},\"id\":\"New Ruleset\",\"type\":\"create_ruleset\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/tags/enrichment", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"1b680ec0-8e29-4b79-bb01-45f0c645a789\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1758041403,\"nanos\":117388000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1758041403,\"nanos\":117388000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3603412}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "96d71858-d435-a678-5fe5-dfc8309baca1" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.freeze deleted file mode 100644 index b32e1196f0d..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-06-23T12:26:40.200Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.json deleted file mode 100644 index 7c56f218745..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Bad_Request_response.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/cost/gcp_uc_config/Invalid", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"invalid parameter \\\"cloudAccountId\\\" in \\\"path\\\"; expected type \\\"int64\\\"\"}]}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 400, - "reasonPhrase": "Bad Request" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "656feb53-4e0d-b0d3-0b3e-0a84fbf8ff9f" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_No_Content_response.freeze similarity index 100% rename from src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_No_Content_response.freeze rename to src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_No_Content_response.freeze diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_No_Content_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_No_Content_response.json rename to src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_No_Content_response.json diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.freeze similarity index 100% rename from src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.freeze rename to src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.freeze diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Delete_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.json diff --git a/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.freeze new file mode 100644 index 00000000000..5bba6c73e72 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2025-09-11T21:01:36.419Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.json new file mode 100644 index 00000000000..c91d97d6ce3 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.json @@ -0,0 +1,23 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cost/arbitrary_rule/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fe566107-8455-0285-b637-2c39e2b6b8f5" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.freeze new file mode 100644 index 00000000000..9ddc2f58a49 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2025-09-11T20:43:38.898Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.json new file mode 100644 index 00000000000..e601dbdf406 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.json @@ -0,0 +1,23 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/tags/enrichment/1c5dae14-237d-4b9a-a515-aa55b3939142", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "761b458d-79fe-c4fa-b299-56d33c5a4353" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_Google_Cloud_Usage_Cost_config_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_Google_Cloud_Usage_Cost_config_returns_OK_response.freeze new file mode 100644 index 00000000000..80d0a8884f8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_Google_Cloud_Usage_Cost_config_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T20:19:23.847Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_Google_Cloud_Usage_Cost_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_Google_Cloud_Usage_Cost_config_returns_OK_response.json new file mode 100644 index 00000000000..1847cc0ba1d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_Google_Cloud_Usage_Cost_config_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/gcp_uc_config/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"123456\",\"type\":\"gcp_uc_config\",\"attributes\":{\"account_id\":\"123456_ABCDEF_123ABC\",\"bucket_name\":\"test-bucket-name\",\"created_at\":\"2024-04-29T13:10:37.516579\",\"dataset\":\"test-dataset\",\"error_messages\":null,\"export_prefix\":\"datadog_cloud_cost_detailed_usage_export\",\"export_project_name\":\"test-export-project-name\",\"months\":15,\"project_id\":\"\",\"service_account\":\"dd-ccm-gcp-test-integration@some-test-project.iam.gserviceaccount.com\",\"status\":\"active\",\"status_updated_at\":\"2025-08-02T14:23:19.542138\",\"updated_at\":\"2024-04-29T13:10:37.516579\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fab34dd8-e867-d50d-2d06-5c346b29d250" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..19ddeadc142 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T18:25:21.818Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.json new file mode 100644 index 00000000000..487048a9672 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/arbitrary_rule/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"123456\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-11T18:23:20.518112Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-11T18:23:20.518112Z\",\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "067887c5-0a54-547f-c713-e41ccebe186b" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_cost_AWS_CUR_config_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_cost_AWS_CUR_config_returns_OK_response.freeze new file mode 100644 index 00000000000..238742d7904 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_cost_AWS_CUR_config_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T19:58:54.699Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_cost_AWS_CUR_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_cost_AWS_CUR_config_returns_OK_response.json new file mode 100644 index 00000000000..97d4635e172 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_cost_AWS_CUR_config_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/aws_cur_config/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"123456\",\"type\":\"aws_cur_config\",\"attributes\":{\"account_filters\":{\"include_new_accounts\":null},\"account_id\":\"123456123456\",\"bucket_name\":\"dd-bucket-name\",\"bucket_region\":\"us-east-1\",\"created_at\":\"2023-05-01T20:05:41.849823\",\"error_messages\":null,\"months\":15,\"report_name\":\"report-name-test\",\"report_prefix\":\"report-prefix-test\",\"status\":\"active\",\"status_updated_at\":\"2025-01-15T14:57:27.799558\",\"updated_at\":\"2023-05-01T20:05:41.849823\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "62a6b8f1-28ca-d83e-64fb-7044f8bd5f64" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_cost_Azure_UC_config_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_cost_Azure_UC_config_returns_OK_response.freeze new file mode 100644 index 00000000000..d291ba04f47 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_cost_Azure_UC_config_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T20:06:45.013Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_cost_Azure_UC_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_cost_Azure_UC_config_returns_OK_response.json new file mode 100644 index 00000000000..7ca5dbfd03a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_cost_Azure_UC_config_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/azure_uc_config/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"123456\",\"type\":\"azure_uc_configs\",\"attributes\":{\"configs\":[{\"account_id\":\"1234abcd-1234-abcd-1234-abcd1234abcd\",\"client_id\":\"12345678-1234-5678-1234-567812345678\",\"status\":\"active\",\"status_updated_at\":\"2024-09-06T11:49:10.544706\",\"error_messages\":null,\"id\":\"123\",\"dataset_type\":\"amortized\",\"storage_account\":\"teststorageaccount\",\"storage_container\":\"teststoragecontainer\",\"export_name\":\"test-export-name\",\"export_path\":\"/test-export-path-amortized\",\"scope\":\"/subscriptions/abcdefgh-abcd-efgh-abcd-efghabcdefgh\",\"months\":15,\"created_at\":\"2023-06-14T20:42:08.792050\",\"updated_at\":\"2023-06-14T20:42:08.792050\"},{\"account_id\":\"87654321-8765-4321-8765-432187654321\",\"client_id\":\"aaaabbbb-cccc-dddd-eeee-ffffgggghhhh\",\"status\":\"active\",\"status_updated_at\":\"2024-09-06T11:49:10.544706\",\"error_messages\":null,\"id\":\"456\",\"dataset_type\":\"actual\",\"storage_account\":\"teststorageaccount\",\"storage_container\":\"teststoragecontainer\",\"export_name\":\"test-export-name\",\"export_path\":\"/test-export-path-actual\",\"scope\":\"/subscriptions/abcdefgh-abcd-efgh-abcd-efghabcdefgh\",\"months\":15,\"created_at\":\"2023-06-14T20:42:08.792050\",\"updated_at\":\"2023-06-14T20:42:08.792050\"}]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a852a804-90bb-f38b-16f4-05fe628619dc" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.freeze new file mode 100644 index 00000000000..bd05b8d6aa1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T18:54:36.821Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.json new file mode 100644 index 00000000000..9270a4a08a2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/tags/enrichment/da0e30e2-615d-4dae-9a22-38cf86a87dde", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"da0e30e2-615d-4dae-9a22-38cf86a87dde\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1757616255,\"nanos\":64603000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1757616255,\"nanos\":64603000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3601897}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0231df81-f41f-2201-958d-0ae49fd6ffab" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_GCP_Usage_Cost_configs_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_Google_Cloud_Usage_Cost_configs_returns_OK_response.freeze similarity index 100% rename from src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_GCP_Usage_Cost_configs_returns_OK_response.freeze rename to src/test/resources/cassettes/features/v2/List_Google_Cloud_Usage_Cost_configs_returns_OK_response.freeze diff --git a/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_GCP_Usage_Cost_configs_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_Google_Cloud_Usage_Cost_configs_returns_OK_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_GCP_Usage_Cost_configs_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/List_Google_Cloud_Usage_Cost_configs_returns_OK_response.json diff --git a/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.freeze new file mode 100644 index 00000000000..ee4c66fe2ff --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T18:24:00.228Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.json new file mode 100644 index 00000000000..f2b9adaf40a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/arbitrary_rule", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"123456\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-11T18:23:20.518112Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-11T18:23:20.518112Z\",\"version\":1}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0d76ade9-5e6f-d157-c7da-baba79388791" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.freeze new file mode 100644 index 00000000000..8bf4b1854aa --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T20:35:14.784Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.json new file mode 100644 index 00000000000..5a643ea1e66 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/tags/enrichment", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"1c5dae14-237d-4b9a-a515-aa55b3939142\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1757622359,\"nanos\":552132000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1757622359,\"nanos\":552132000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3601919}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3006d123-616e-cf71-5de6-71c1753690c2" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json index 50fbd25513d..3bda4d02393 100644 --- a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json @@ -7,12 +7,12 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/cost/aws_cur_config/12345678", + "path": "/api/v2/cost/aws_cur_config/123456", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Cloud account not found\",\"detail\":\"Cloud account with ID 12345678 was not found\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Cloud account not found\",\"detail\":\"Cloud account with ID 123456 was not found\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "8c65e0d7-a670-e21d-106e-88f4d15c774b" + "id": "4486dad6-8272-ae86-5f98-9ed368f5d916" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json index 01544e0d510..16f23dad220 100644 --- a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json @@ -7,12 +7,12 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/cost/azure_uc_config/12345678", + "path": "/api/v2/cost/azure_uc_config/123456", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Cloud account not found\",\"detail\":\"Cloud account with ID 12345678 was not found\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Cloud account not found\",\"detail\":\"Cloud account with ID 123456 was not found\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "123c815b-d1ef-26bd-ca56-223c458cd322" + "id": "51fca206-1370-8253-de38-77c78ca34f2f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.freeze similarity index 100% rename from src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.freeze rename to src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.freeze diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.json similarity index 87% rename from src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.json index 9fcbe8a4ea4..a7a912897db 100644 --- a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_Not_Found_response.json @@ -7,7 +7,7 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/cost/gcp_uc_config/12345678", + "path": "/api/v2/cost/gcp_uc_config/123456", "keepAlive": false, "secure": true }, @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "cc4c02b9-729a-6fdb-16b1-91ab02851fb7" + "id": "a30cbb00-f615-5499-5b0d-588c3aca794d" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_OK_response.freeze similarity index 100% rename from src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.freeze rename to src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_OK_response.freeze diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_OK_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_GCP_Usage_Cost_config_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Update_Google_Cloud_Usage_Cost_config_returns_OK_response.json diff --git a/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..ecb5b7648d8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T21:00:21.176Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.json new file mode 100644 index 00000000000..5dd68fe3d38 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"costs_to_allocate\":[{\"condition\":\"is\",\"tag\":\"account_id\",\"value\":\"123456789\",\"values\":[]},{\"condition\":\"in\",\"tag\":\"environment\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"enabled\":true,\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"allocated_by_tag_keys\":[\"team\",\"environment\"],\"based_on_costs\":[{\"condition\":\"is\",\"tag\":\"service\",\"value\":\"web-api\",\"values\":[]},{\"condition\":\"not in\",\"tag\":\"team\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"granularity\":\"daily\",\"method\":\"proportional\"},\"type\":\"shared\"},\"type\":\"upsert_arbitrary_rule\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/cost/arbitrary_rule/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"123456\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-11T20:59:19.952563Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-11T21:00:21.353162Z\",\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a8cb74f5-a061-90da-8201-9079a314b320" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.freeze new file mode 100644 index 00000000000..1d97407de7a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T20:42:36.765Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.json new file mode 100644 index 00000000000..ba68d9dcb80 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"last_version\":3601919,\"rules\":[{\"enabled\":true,\"mapping\":{\"destination_key\":\"team_owner\",\"if_not_exists\":true,\"source_keys\":[\"account_name\",\"account_id\"]},\"name\":\"Account Name Mapping\",\"query\":null,\"reference_table\":null}]},\"type\":\"update_ruleset\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/tags/enrichment/1c5dae14-237d-4b9a-a515-aa55b3939142", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"1c5dae14-237d-4b9a-a515-aa55b3939142\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1757623356,\"nanos\":940863000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1757623356,\"nanos\":940863000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Account Name Mapping\",\"enabled\":true,\"query\":null,\"mapping\":{\"source_keys\":[\"account_name\",\"account_id\"],\"destination_key\":\"team_owner\",\"if_not_exists\":true},\"reference_table\":null,\"metadata\":null}],\"version\":3601923}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "25bc7203-6375-074a-5dfe-6e27a86f9f1d" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Validate_query_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Validate_query_returns_OK_response.freeze new file mode 100644 index 00000000000..2d8bb5e63fb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Validate_query_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-09-11T19:06:38.613Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Validate_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Validate_query_returns_OK_response.json new file mode 100644 index 00000000000..6ad45dc0172 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Validate_query_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"Query\":\"example:query AND test:true\"},\"type\":\"validate_query\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/tags/enrichment/validate-query", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"6a2cddcf-8498-469f-8da1-7b8fb597868d\",\"type\":\"validate_response\",\"attributes\":{\"Canonical\":\"example:query AND test:true\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "311a4e4f-8d21-3b90-8e67-fa7d2b0e2d7c" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature index eed19e63a9b..78309ae90bc 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature @@ -1,8 +1,8 @@ @endpoint(cloud-cost-management) @endpoint(cloud-cost-management-v2) Feature: Cloud Cost Management The Cloud Cost Management API allows you to set up, edit, and delete Cloud - Cost Management accounts for AWS, Azure, and GCP. You can query your cost - data by using the [Metrics + Cost Management accounts for AWS, Azure, and Google Cloud. You can query + your cost data by using the [Metrics endpoint](https://docs.datadoghq.com/api/latest/metrics/#query-timeseries- data-across-multiple-products) and the `cloud_cost` data source. For more information, see the [Cloud Cost Management @@ -38,26 +38,35 @@ Feature: Cloud Cost Management @replay-only @team:Datadog/cloud-cost-management Scenario: Create Cloud Cost Management Azure configs returns "OK" response Given new "CreateCostAzureUCConfigs" request - And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "is_enabled": true, "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} + And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} When the request is sent Then the response status is 200 OK And the response "data.attributes.configs[0].account_id" is equal to "1234abcd-1234-abcd-1234-1234abcd1234" @team:Datadog/cloud-cost-management - Scenario: Create Cloud Cost Management GCP Usage Cost config returns "Bad Request" response + Scenario: Create Google Cloud Usage Cost config returns "Bad Request" response Given new "CreateCostGCPUsageCostConfig" request And body with value {"data": {"attributes": {"billing_account_id": "123456_A123BC_12AB34", "bucket_name": "dd-cost-bucket", "export_dataset_name": "billing", "export_prefix": "datadog_cloud_cost_usage_export", "export_project_name": "dd-cloud-cost-report", "service_account": "InvalidServiceAccount"}, "type": "gcp_uc_config_post_request"}} When the request is sent Then the response status is 400 Bad Request @replay-only @team:Datadog/cloud-cost-management - Scenario: Create Cloud Cost Management GCP Usage Cost config returns "OK" response + Scenario: Create Google Cloud Usage Cost config returns "OK" response Given new "CreateCostGCPUsageCostConfig" request And body with value {"data": {"attributes": {"billing_account_id": "123456_A123BC_12AB34", "bucket_name": "dd-cost-bucket", "export_dataset_name": "billing", "export_prefix": "datadog_cloud_cost_usage_export", "export_project_name": "dd-cloud-cost-report", "service_account": "dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com"}, "type": "gcp_uc_config_post_request"}} When the request is sent Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456_A123BC_12AB34" + @replay-only @team:Datadog/cloud-cost-management + Scenario: Create arbitrary cost rule returns "OK" response + Given new "CreateArbitraryCostRule" request + And body with value {"data": {"attributes": {"costs_to_allocate": [{"condition": "is", "tag": "account_id", "value": "123456789", "values":[]}, {"condition": "in", "tag": "environment", "value": "", "values": ["production", "staging"]}], "enabled": true, "order_id": 1, "provider": ["aws", "gcp"], "rule_name": "example-arbitrary-cost-rule", "strategy": {"allocated_by_tag_keys": ["team", "environment"], "based_on_costs": [{"condition": "is", "tag": "service", "value": "web-api", "values":[]}, {"condition": "not in", "tag": "team", "value": "", "values": ["legacy", "deprecated"]}], "granularity": "daily", "method": "proportional"}, "type": "shared"}, "type": "upsert_arbitrary_rule"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "arbitrary_rule" + And the response "data.attributes.rule_name" is equal to "example-arbitrary-cost-rule" + @generated @skip @team:Datadog/cloud-cost-management Scenario: Create or update a budget returns "Bad Request" response Given new "UpsertBudget" request @@ -79,6 +88,15 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management + Scenario: Create ruleset returns "OK" response + Given new "CreateRuleset" request + And body with value {"data": {"attributes": {"enabled": true, "rules": [{"enabled": true, "mapping": null, "name": "Add Cost Center Tag", "query": {"addition": {"key": "cost_center", "value": "engineering"}, "case_insensitivity": false, "if_not_exists": true, "query": "account_id:\"123456789\" AND service:\"web-api\""}, "reference_table": null}]}, "id": "New Ruleset", "type": "create_ruleset"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "ruleset" + And the response "data.attributes.name" is equal to "New Ruleset" + @generated @skip @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management AWS CUR config returns "Bad Request" response Given new "DeleteCostAWSCURConfig" request @@ -121,27 +139,6 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/cloud-cost-management - Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "Bad Request" response - Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @replay-only @team:Datadog/cloud-cost-management - Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "No Content" response - Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value 100 - When the request is sent - Then the response status is 204 No Content - - @team:Datadog/cloud-cost-management - Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "Not Found" response - Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value 123456 - When the request is sent - Then the response status is 404 Not Found - @replay-only @team:Datadog/cloud-cost-management Scenario: Delete Custom Costs File returns "No Content" response Given new "DeleteCustomCostsFile" request @@ -163,6 +160,27 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found + @generated @skip @team:Datadog/cloud-cost-management + Scenario: Delete Google Cloud Usage Cost config returns "Bad Request" response + Given new "DeleteCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Delete Google Cloud Usage Cost config returns "No Content" response + Given new "DeleteCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter with value 100 + When the request is sent + Then the response status is 204 No Content + + @team:Datadog/cloud-cost-management + Scenario: Delete Google Cloud Usage Cost config returns "Not Found" response + Given new "DeleteCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 404 Not Found + @team:Datadog/cloud-cost-management Scenario: Delete a budget returns "Bad Request" response Given new "DeleteBudget" request @@ -177,6 +195,20 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 204 No Content + @replay-only @team:Datadog/cloud-cost-management + Scenario: Delete arbitrary cost rule returns "No Content" response + Given new "DeleteArbitraryCostRule" request + And request contains "rule_id" parameter with value 123456 + When the request is sent + Then the response status is 204 No Content + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Delete ruleset returns "No Content" response + Given new "DeleteRuleset" request + And request contains "ruleset_id" parameter with value "1c5dae14-237d-4b9a-a515-aa55b3939142" + When the request is sent + Then the response status is 204 No Content + @replay-only @team:Datadog/cloud-cost-management Scenario: Get Custom Costs File returns "OK" response Given new "GetCustomCostsFile" request @@ -200,6 +232,15 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get Google Cloud Usage Cost config returns "OK" response + Given new "GetCostGCPUsageCostConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "gcp_uc_config" + And the response "data.attributes.account_id" is equal to "123456_ABCDEF_123ABC" + @generated @skip @team:Datadog/cloud-cost-management Scenario: Get a budget returns "Bad Request" response Given new "GetBudget" request @@ -221,6 +262,41 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get arbitrary cost rule returns "OK" response + Given new "GetArbitraryCostRule" request + And request contains "rule_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get cost AWS CUR config returns "OK" response + Given new "GetCostAWSCURConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "aws_cur_config" + And the response "data.attributes.account_id" is equal to "123456123456" + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get cost Azure UC config returns "OK" response + Given new "GetCostAzureUCConfig" request + And request contains "cloud_account_id" parameter with value 123456 + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "azure_uc_configs" + And the response "data.attributes.configs[0].dataset_type" is equal to "amortized" + And the response "data.attributes.configs[1].dataset_type" is equal to "actual" + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Get ruleset returns "OK" response + Given new "GetRuleset" request + And request contains "ruleset_id" parameter with value "da0e30e2-615d-4dae-9a22-38cf86a87dde" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "ruleset" + And the response "data.attributes.name" is equal to "New Ruleset" + @replay-only @team:Datadog/cloud-cost-management Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response Given new "ListCostAWSCURConfigs" request @@ -235,12 +311,6 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.configs[0].export_name" is equal to "test_export_name" - @team:Datadog/cloud-cost-management - Scenario: List Cloud Cost Management GCP Usage Cost configs returns "OK" response - Given new "ListCostGCPUsageCostConfigs" request - When the request is sent - Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management Scenario: List Custom Costs Files returns "OK" response Given new "ListCustomCostsFiles" request @@ -261,16 +331,50 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @team:Datadog/cloud-cost-management + Scenario: List Google Cloud Usage Cost configs returns "OK" response + Given new "ListCostGCPUsageCostConfigs" request + When the request is sent + Then the response status is 200 OK + + @replay-only @team:Datadog/cloud-cost-management + Scenario: List arbitrary cost rules returns "OK" response + Given new "ListArbitraryCostRules" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule" + @team:Datadog/cloud-cost-management Scenario: List budgets returns "OK" response Given new "ListBudgets" request When the request is sent Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management + Scenario: List rulesets returns "OK" response + Given new "ListRulesets" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].attributes.name" is equal to "New Ruleset" + + @generated @skip @team:Datadog/cloud-cost-management + Scenario: Reorder arbitrary cost rules returns "Successfully reordered rules" response + Given new "ReorderArbitraryCostRules" request + And body with value {"data": [{"id": "456", "type": "arbitrary_rule"}, {"id": "123", "type": "arbitrary_rule"}, {"id": "789", "type": "arbitrary_rule"}]} + When the request is sent + Then the response status is 204 Successfully reordered rules + + @generated @skip @team:Datadog/cloud-cost-management + Scenario: Reorder rulesets returns "Successfully reordered rulesets" response + Given new "ReorderRulesets" request + And body with value {"data": [{"type": "ruleset"}]} + When the request is sent + Then the response status is 204 Successfully reordered rulesets + @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response Given new "UpdateCostAWSCURConfig" request - And request contains "cloud_account_id" parameter with value 12345678 + And request contains "cloud_account_id" parameter with value 123456 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}} When the request is sent Then the response status is 404 Not Found @@ -295,7 +399,7 @@ Feature: Cloud Cost Management @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "Not Found" response Given new "UpdateCostAzureUCConfigs" request - And request contains "cloud_account_id" parameter with value 12345678 + And request contains "cloud_account_id" parameter with value 123456 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}} When the request is sent Then the response status is 404 Not Found @@ -310,7 +414,7 @@ Feature: Cloud Cost Management And the response "data.type" is equal to "azure_uc_configs" @generated @skip @team:Datadog/cloud-cost-management - Scenario: Update Cloud Cost Management GCP Usage Cost config returns "Bad Request" response + Scenario: Update Google Cloud Usage Cost config returns "Bad Request" response Given new "UpdateCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} @@ -318,15 +422,15 @@ Feature: Cloud Cost Management Then the response status is 400 Bad Request @team:Datadog/cloud-cost-management - Scenario: Update Cloud Cost Management GCP Usage Cost config returns "Not Found" response + Scenario: Update Google Cloud Usage Cost config returns "Not Found" response Given new "UpdateCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value 12345678 + And request contains "cloud_account_id" parameter with value 123456 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} When the request is sent Then the response status is 404 Not Found @replay-only @team:Datadog/cloud-cost-management - Scenario: Update Cloud Cost Management GCP Usage Cost config returns "OK" response + Scenario: Update Google Cloud Usage Cost config returns "OK" response Given new "UpdateCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter with value 100 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} @@ -334,6 +438,22 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456_A123BC_12AB34" + @replay-only @team:Datadog/cloud-cost-management + Scenario: Update arbitrary cost rule returns "OK" response + Given new "UpdateArbitraryCostRule" request + And request contains "rule_id" parameter with value 123456 + And body with value {"data": {"attributes": {"costs_to_allocate": [{"condition": "is", "tag": "account_id", "value": "123456789", "values":[]}, {"condition": "in", "tag": "environment", "value": "", "values": ["production", "staging"]}], "enabled": true, "order_id": 1, "provider": ["aws", "gcp"], "rule_name": "example-arbitrary-cost-rule", "strategy": {"allocated_by_tag_keys": ["team", "environment"], "based_on_costs": [{"condition": "is", "tag": "service", "value": "web-api", "values":[]}, {"condition": "not in", "tag": "team", "value": "", "values": ["legacy", "deprecated"]}], "granularity": "daily", "method": "proportional"}, "type": "shared"}, "type": "upsert_arbitrary_rule"}} + When the request is sent + Then the response status is 200 OK + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Update ruleset returns "OK" response + Given new "UpdateRuleset" request + And request contains "ruleset_id" parameter with value "1c5dae14-237d-4b9a-a515-aa55b3939142" + And body with value {"data": {"attributes": {"enabled": true, "last_version": 3601919, "rules": [{"enabled": true, "mapping": {"destination_key": "team_owner", "if_not_exists": true, "source_keys": ["account_name", "account_id"]}, "name": "Account Name Mapping", "query": null, "reference_table": null}]}, "type": "update_ruleset"}} + When the request is sent + Then the response status is 200 OK + @replay-only @team:Datadog/cloud-cost-management Scenario: Upload Custom Costs File returns "Accepted" response Given new "UploadCustomCostsFile" request @@ -355,3 +475,10 @@ Feature: Cloud Cost Management And body with value [{"BilledCost": 100.5, "BillingCurrency": "USD", "ChargeDescription": "Monthly usage charge for my service", "ChargePeriodEnd": "2023-02-28", "ChargePeriodStart": "2023-02-01"}] When the request is sent Then the response status is 400 Bad Request + + @replay-only @team:Datadog/cloud-cost-management + Scenario: Validate query returns "OK" response + Given new "ValidateQuery" request + And body with value {"data": {"attributes": {"Query": "example:query AND test:true"}, "type": "validate_query"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index b2fe236d004..7f8336d494c 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -700,6 +700,42 @@ "type": "safe" } }, + "ListArbitraryCostRules": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "CreateArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ReorderArbitraryCostRules": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "DeleteArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GetArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "UpdateArbitraryCostRule": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, "ListCostAWSCURConfigs": { "tag": "Cloud Cost Management", "undo": { @@ -718,6 +754,12 @@ "type": "idempotent" } }, + "GetCostAWSCURConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "UpdateCostAWSCURConfig": { "tag": "Cloud Cost Management", "undo": { @@ -742,6 +784,12 @@ "type": "idempotent" } }, + "GetCostAzureUCConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "UpdateCostAzureUCConfigs": { "tag": "Cloud Cost Management", "undo": { @@ -821,6 +869,12 @@ "type": "idempotent" } }, + "GetCostGCPUsageCostConfig": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, "UpdateCostGCPUsageCostConfig": { "tag": "Cloud Cost Management", "undo": { @@ -3671,6 +3725,48 @@ "type": "safe" } }, + "ListRulesets": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "CreateRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ReorderRulesets": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ValidateQuery": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "DeleteRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GetRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "UpdateRuleset": { + "tag": "Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, "ListTeams": { "tag": "Teams", "undo": {