diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 5f6006a6baaf..c6a476fdfb3e 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2875,6 +2875,8 @@ components: type: string group_by: description: Array of fields to group results by. + example: + - "resource_name" items: description: Field to group results by. example: "resource_name" @@ -2912,6 +2914,8 @@ components: - name - service - stat + - operation_name + - group_by type: object FormulaAndFunctionCloudCostDataSource: description: Data source for Cloud Cost queries. diff --git a/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb b/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb index e69aafdfb6fe..fa6f76cacbf8 100644 --- a/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb +++ b/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb @@ -31,13 +31,13 @@ class FormulaAndFunctionApmResourceStatsQueryDefinition attr_reader :env # Array of fields to group results by. - attr_accessor :group_by + attr_reader :group_by # Name of this query to use in formulas. attr_reader :name # Name of operation on service. - attr_accessor :operation_name + attr_reader :operation_name # Name of the second primary tag used within APM. Required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog attr_accessor :primary_tag_name @@ -166,7 +166,9 @@ def valid? return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1 return false if @data_source.nil? return false if @env.nil? + return false if @group_by.nil? return false if @name.nil? + return false if @operation_name.nil? return false if @service.nil? return false if @stat.nil? true @@ -202,6 +204,16 @@ def env=(env) @env = env end + # Custom attribute writer method with validation + # @param group_by [Object] Object to be assigned + # @!visibility private + def group_by=(group_by) + if group_by.nil? + fail ArgumentError, 'invalid value for "group_by", group_by cannot be nil.' + end + @group_by = group_by + end + # Custom attribute writer method with validation # @param name [Object] Object to be assigned # @!visibility private @@ -212,6 +224,16 @@ def name=(name) @name = name end + # Custom attribute writer method with validation + # @param operation_name [Object] Object to be assigned + # @!visibility private + def operation_name=(operation_name) + if operation_name.nil? + fail ArgumentError, 'invalid value for "operation_name", operation_name cannot be nil.' + end + @operation_name = operation_name + end + # Custom attribute writer method with validation # @param service [Object] Object to be assigned # @!visibility private