@@ -12,6 +12,10 @@ import (
1212
1313// HourlyUsageAttributes Attributes of hourly usage for a product family for an org for a time period.
1414type HourlyUsageAttributes struct {
15+ // The account name.
16+ AccountName * string `json:"account_name,omitempty"`
17+ // The account public ID.
18+ AccountPublicId * string `json:"account_public_id,omitempty"`
1519 // List of the measured usage values for the product family for the org for the time period.
1620 Measurements []HourlyUsageMeasurement `json:"measurements,omitempty"`
1721 // The organization name.
@@ -46,6 +50,62 @@ func NewHourlyUsageAttributesWithDefaults() *HourlyUsageAttributes {
4650 return & this
4751}
4852
53+ // GetAccountName returns the AccountName field value if set, zero value otherwise.
54+ func (o * HourlyUsageAttributes ) GetAccountName () string {
55+ if o == nil || o .AccountName == nil {
56+ var ret string
57+ return ret
58+ }
59+ return * o .AccountName
60+ }
61+
62+ // GetAccountNameOk returns a tuple with the AccountName field value if set, nil otherwise
63+ // and a boolean to check if the value has been set.
64+ func (o * HourlyUsageAttributes ) GetAccountNameOk () (* string , bool ) {
65+ if o == nil || o .AccountName == nil {
66+ return nil , false
67+ }
68+ return o .AccountName , true
69+ }
70+
71+ // HasAccountName returns a boolean if a field has been set.
72+ func (o * HourlyUsageAttributes ) HasAccountName () bool {
73+ return o != nil && o .AccountName != nil
74+ }
75+
76+ // SetAccountName gets a reference to the given string and assigns it to the AccountName field.
77+ func (o * HourlyUsageAttributes ) SetAccountName (v string ) {
78+ o .AccountName = & v
79+ }
80+
81+ // GetAccountPublicId returns the AccountPublicId field value if set, zero value otherwise.
82+ func (o * HourlyUsageAttributes ) GetAccountPublicId () string {
83+ if o == nil || o .AccountPublicId == nil {
84+ var ret string
85+ return ret
86+ }
87+ return * o .AccountPublicId
88+ }
89+
90+ // GetAccountPublicIdOk returns a tuple with the AccountPublicId field value if set, nil otherwise
91+ // and a boolean to check if the value has been set.
92+ func (o * HourlyUsageAttributes ) GetAccountPublicIdOk () (* string , bool ) {
93+ if o == nil || o .AccountPublicId == nil {
94+ return nil , false
95+ }
96+ return o .AccountPublicId , true
97+ }
98+
99+ // HasAccountPublicId returns a boolean if a field has been set.
100+ func (o * HourlyUsageAttributes ) HasAccountPublicId () bool {
101+ return o != nil && o .AccountPublicId != nil
102+ }
103+
104+ // SetAccountPublicId gets a reference to the given string and assigns it to the AccountPublicId field.
105+ func (o * HourlyUsageAttributes ) SetAccountPublicId (v string ) {
106+ o .AccountPublicId = & v
107+ }
108+
49109// GetMeasurements returns the Measurements field value if set, zero value otherwise.
50110func (o * HourlyUsageAttributes ) GetMeasurements () []HourlyUsageMeasurement {
51111 if o == nil || o .Measurements == nil {
@@ -220,6 +280,12 @@ func (o HourlyUsageAttributes) MarshalJSON() ([]byte, error) {
220280 if o .UnparsedObject != nil {
221281 return datadog .Marshal (o .UnparsedObject )
222282 }
283+ if o .AccountName != nil {
284+ toSerialize ["account_name" ] = o .AccountName
285+ }
286+ if o .AccountPublicId != nil {
287+ toSerialize ["account_public_id" ] = o .AccountPublicId
288+ }
223289 if o .Measurements != nil {
224290 toSerialize ["measurements" ] = o .Measurements
225291 }
@@ -252,22 +318,26 @@ func (o HourlyUsageAttributes) MarshalJSON() ([]byte, error) {
252318// UnmarshalJSON deserializes the given payload.
253319func (o * HourlyUsageAttributes ) UnmarshalJSON (bytes []byte ) (err error ) {
254320 all := struct {
255- Measurements []HourlyUsageMeasurement `json:"measurements,omitempty"`
256- OrgName * string `json:"org_name,omitempty"`
257- ProductFamily * string `json:"product_family,omitempty"`
258- PublicId * string `json:"public_id,omitempty"`
259- Region * string `json:"region,omitempty"`
260- Timestamp * time.Time `json:"timestamp,omitempty"`
321+ AccountName * string `json:"account_name,omitempty"`
322+ AccountPublicId * string `json:"account_public_id,omitempty"`
323+ Measurements []HourlyUsageMeasurement `json:"measurements,omitempty"`
324+ OrgName * string `json:"org_name,omitempty"`
325+ ProductFamily * string `json:"product_family,omitempty"`
326+ PublicId * string `json:"public_id,omitempty"`
327+ Region * string `json:"region,omitempty"`
328+ Timestamp * time.Time `json:"timestamp,omitempty"`
261329 }{}
262330 if err = datadog .Unmarshal (bytes , & all ); err != nil {
263331 return datadog .Unmarshal (bytes , & o .UnparsedObject )
264332 }
265333 additionalProperties := make (map [string ]interface {})
266334 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
267- datadog .DeleteKeys (additionalProperties , & []string {"measurements" , "org_name" , "product_family" , "public_id" , "region" , "timestamp" })
335+ datadog .DeleteKeys (additionalProperties , & []string {"account_name" , "account_public_id" , " measurements" , "org_name" , "product_family" , "public_id" , "region" , "timestamp" })
268336 } else {
269337 return err
270338 }
339+ o .AccountName = all .AccountName
340+ o .AccountPublicId = all .AccountPublicId
271341 o .Measurements = all .Measurements
272342 o .OrgName = all .OrgName
273343 o .ProductFamily = all .ProductFamily
0 commit comments