@@ -19,11 +19,11 @@ type FormulaAndFunctionApmResourceStatsQueryDefinition struct {
1919 // APM environment.
2020 Env string `json:"env"`
2121 // Array of fields to group results by.
22- GroupBy []string `json:"group_by,omitempty "`
22+ GroupBy []string `json:"group_by"`
2323 // Name of this query to use in formulas.
2424 Name string `json:"name"`
2525 // Name of operation on service.
26- OperationName * string `json:"operation_name,omitempty "`
26+ OperationName string `json:"operation_name"`
2727 // 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
2828 PrimaryTagName * string `json:"primary_tag_name,omitempty"`
2929 // Value of the second primary tag by which to filter APM data. `primary_tag_name` must also be specified.
@@ -43,11 +43,13 @@ type FormulaAndFunctionApmResourceStatsQueryDefinition struct {
4343// This constructor will assign default values to properties that have it defined,
4444// and makes sure properties required by API are set, but the set of arguments
4545// will change when the set of required properties is changed.
46- func NewFormulaAndFunctionApmResourceStatsQueryDefinition (dataSource FormulaAndFunctionApmResourceStatsDataSource , env string , name string , service string , stat FormulaAndFunctionApmResourceStatName ) * FormulaAndFunctionApmResourceStatsQueryDefinition {
46+ func NewFormulaAndFunctionApmResourceStatsQueryDefinition (dataSource FormulaAndFunctionApmResourceStatsDataSource , env string , groupBy [] string , name string , operationName string , service string , stat FormulaAndFunctionApmResourceStatName ) * FormulaAndFunctionApmResourceStatsQueryDefinition {
4747 this := FormulaAndFunctionApmResourceStatsQueryDefinition {}
4848 this .DataSource = dataSource
4949 this .Env = env
50+ this .GroupBy = groupBy
5051 this .Name = name
52+ this .OperationName = operationName
5153 this .Service = service
5254 this .Stat = stat
5355 return & this
@@ -135,30 +137,25 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) SetEnv(v string) {
135137 o .Env = v
136138}
137139
138- // GetGroupBy returns the GroupBy field value if set, zero value otherwise .
140+ // GetGroupBy returns the GroupBy field value.
139141func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) GetGroupBy () []string {
140- if o == nil || o . GroupBy == nil {
142+ if o == nil {
141143 var ret []string
142144 return ret
143145 }
144146 return o .GroupBy
145147}
146148
147- // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise
149+ // GetGroupByOk returns a tuple with the GroupBy field value
148150// and a boolean to check if the value has been set.
149151func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) GetGroupByOk () (* []string , bool ) {
150- if o == nil || o . GroupBy == nil {
152+ if o == nil {
151153 return nil , false
152154 }
153155 return & o .GroupBy , true
154156}
155157
156- // HasGroupBy returns a boolean if a field has been set.
157- func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) HasGroupBy () bool {
158- return o != nil && o .GroupBy != nil
159- }
160-
161- // SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field.
158+ // SetGroupBy sets field value.
162159func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) SetGroupBy (v []string ) {
163160 o .GroupBy = v
164161}
@@ -186,32 +183,27 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) SetName(v string) {
186183 o .Name = v
187184}
188185
189- // GetOperationName returns the OperationName field value if set, zero value otherwise .
186+ // GetOperationName returns the OperationName field value.
190187func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) GetOperationName () string {
191- if o == nil || o . OperationName == nil {
188+ if o == nil {
192189 var ret string
193190 return ret
194191 }
195- return * o .OperationName
192+ return o .OperationName
196193}
197194
198- // GetOperationNameOk returns a tuple with the OperationName field value if set, nil otherwise
195+ // GetOperationNameOk returns a tuple with the OperationName field value
199196// and a boolean to check if the value has been set.
200197func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) GetOperationNameOk () (* string , bool ) {
201- if o == nil || o . OperationName == nil {
198+ if o == nil {
202199 return nil , false
203200 }
204- return o .OperationName , true
201+ return & o .OperationName , true
205202}
206203
207- // HasOperationName returns a boolean if a field has been set.
208- func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) HasOperationName () bool {
209- return o != nil && o .OperationName != nil
210- }
211-
212- // SetOperationName gets a reference to the given string and assigns it to the OperationName field.
204+ // SetOperationName sets field value.
213205func (o * FormulaAndFunctionApmResourceStatsQueryDefinition ) SetOperationName (v string ) {
214- o .OperationName = & v
206+ o .OperationName = v
215207}
216208
217209// GetPrimaryTagName returns the PrimaryTagName field value if set, zero value otherwise.
@@ -355,13 +347,9 @@ func (o FormulaAndFunctionApmResourceStatsQueryDefinition) MarshalJSON() ([]byte
355347 }
356348 toSerialize ["data_source" ] = o .DataSource
357349 toSerialize ["env" ] = o .Env
358- if o .GroupBy != nil {
359- toSerialize ["group_by" ] = o .GroupBy
360- }
350+ toSerialize ["group_by" ] = o .GroupBy
361351 toSerialize ["name" ] = o .Name
362- if o .OperationName != nil {
363- toSerialize ["operation_name" ] = o .OperationName
364- }
352+ toSerialize ["operation_name" ] = o .OperationName
365353 if o .PrimaryTagName != nil {
366354 toSerialize ["primary_tag_name" ] = o .PrimaryTagName
367355 }
@@ -386,9 +374,9 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes
386374 CrossOrgUuids []string `json:"cross_org_uuids,omitempty"`
387375 DataSource * FormulaAndFunctionApmResourceStatsDataSource `json:"data_source"`
388376 Env * string `json:"env"`
389- GroupBy []string `json:"group_by,omitempty "`
377+ GroupBy * []string `json:"group_by"`
390378 Name * string `json:"name"`
391- OperationName * string `json:"operation_name,omitempty "`
379+ OperationName * string `json:"operation_name"`
392380 PrimaryTagName * string `json:"primary_tag_name,omitempty"`
393381 PrimaryTagValue * string `json:"primary_tag_value,omitempty"`
394382 ResourceName * string `json:"resource_name,omitempty"`
@@ -404,9 +392,15 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes
404392 if all .Env == nil {
405393 return fmt .Errorf ("required field env missing" )
406394 }
395+ if all .GroupBy == nil {
396+ return fmt .Errorf ("required field group_by missing" )
397+ }
407398 if all .Name == nil {
408399 return fmt .Errorf ("required field name missing" )
409400 }
401+ if all .OperationName == nil {
402+ return fmt .Errorf ("required field operation_name missing" )
403+ }
410404 if all .Service == nil {
411405 return fmt .Errorf ("required field service missing" )
412406 }
@@ -428,9 +422,9 @@ func (o *FormulaAndFunctionApmResourceStatsQueryDefinition) UnmarshalJSON(bytes
428422 o .DataSource = * all .DataSource
429423 }
430424 o .Env = * all .Env
431- o .GroupBy = all .GroupBy
425+ o .GroupBy = * all .GroupBy
432426 o .Name = * all .Name
433- o .OperationName = all .OperationName
427+ o .OperationName = * all .OperationName
434428 o .PrimaryTagName = all .PrimaryTagName
435429 o .PrimaryTagValue = all .PrimaryTagValue
436430 o .ResourceName = all .ResourceName
0 commit comments