@@ -13,7 +13,7 @@ type AccountFilteringConfig struct {
1313 // The AWS account IDs to be excluded from your billing dataset. This field is used when `include_new_accounts` is `true`.
1414 ExcludedAccounts []string `json:"excluded_accounts,omitempty"`
1515 // Whether or not to automatically include new member accounts by default in your billing dataset.
16- IncludeNewAccounts * bool `json:"include_new_accounts,omitempty"`
16+ IncludeNewAccounts datadog. NullableBool `json:"include_new_accounts,omitempty"`
1717 // The AWS account IDs to be included in your billing dataset. This field is used when `include_new_accounts` is `false`.
1818 IncludedAccounts []string `json:"included_accounts,omitempty"`
1919 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -66,32 +66,43 @@ func (o *AccountFilteringConfig) SetExcludedAccounts(v []string) {
6666 o .ExcludedAccounts = v
6767}
6868
69- // GetIncludeNewAccounts returns the IncludeNewAccounts field value if set, zero value otherwise.
69+ // GetIncludeNewAccounts returns the IncludeNewAccounts field value if set, zero value otherwise (both if not set or set to explicit null) .
7070func (o * AccountFilteringConfig ) GetIncludeNewAccounts () bool {
71- if o == nil || o .IncludeNewAccounts == nil {
71+ if o == nil || o .IncludeNewAccounts . Get () == nil {
7272 var ret bool
7373 return ret
7474 }
75- return * o .IncludeNewAccounts
75+ return * o .IncludeNewAccounts . Get ()
7676}
7777
7878// GetIncludeNewAccountsOk returns a tuple with the IncludeNewAccounts field value if set, nil otherwise
7979// and a boolean to check if the value has been set.
80+ // NOTE: If the value is an explicit nil, `nil, true` will be returned.
8081func (o * AccountFilteringConfig ) GetIncludeNewAccountsOk () (* bool , bool ) {
81- if o == nil || o . IncludeNewAccounts == nil {
82+ if o == nil {
8283 return nil , false
8384 }
84- return o .IncludeNewAccounts , true
85+ return o .IncludeNewAccounts . Get (), o . IncludeNewAccounts . IsSet ()
8586}
8687
8788// HasIncludeNewAccounts returns a boolean if a field has been set.
8889func (o * AccountFilteringConfig ) HasIncludeNewAccounts () bool {
89- return o != nil && o .IncludeNewAccounts != nil
90+ return o != nil && o .IncludeNewAccounts . IsSet ()
9091}
9192
92- // SetIncludeNewAccounts gets a reference to the given bool and assigns it to the IncludeNewAccounts field.
93+ // SetIncludeNewAccounts gets a reference to the given datadog.NullableBool and assigns it to the IncludeNewAccounts field.
9394func (o * AccountFilteringConfig ) SetIncludeNewAccounts (v bool ) {
94- o .IncludeNewAccounts = & v
95+ o .IncludeNewAccounts .Set (& v )
96+ }
97+
98+ // SetIncludeNewAccountsNil sets the value for IncludeNewAccounts to be an explicit nil.
99+ func (o * AccountFilteringConfig ) SetIncludeNewAccountsNil () {
100+ o .IncludeNewAccounts .Set (nil )
101+ }
102+
103+ // UnsetIncludeNewAccounts ensures that no value is present for IncludeNewAccounts, not even an explicit nil.
104+ func (o * AccountFilteringConfig ) UnsetIncludeNewAccounts () {
105+ o .IncludeNewAccounts .Unset ()
95106}
96107
97108// GetIncludedAccounts returns the IncludedAccounts field value if set, zero value otherwise.
@@ -131,8 +142,8 @@ func (o AccountFilteringConfig) MarshalJSON() ([]byte, error) {
131142 if o .ExcludedAccounts != nil {
132143 toSerialize ["excluded_accounts" ] = o .ExcludedAccounts
133144 }
134- if o .IncludeNewAccounts != nil {
135- toSerialize ["include_new_accounts" ] = o .IncludeNewAccounts
145+ if o .IncludeNewAccounts . IsSet () {
146+ toSerialize ["include_new_accounts" ] = o .IncludeNewAccounts . Get ()
136147 }
137148 if o .IncludedAccounts != nil {
138149 toSerialize ["included_accounts" ] = o .IncludedAccounts
@@ -147,9 +158,9 @@ func (o AccountFilteringConfig) MarshalJSON() ([]byte, error) {
147158// UnmarshalJSON deserializes the given payload.
148159func (o * AccountFilteringConfig ) UnmarshalJSON (bytes []byte ) (err error ) {
149160 all := struct {
150- ExcludedAccounts []string `json:"excluded_accounts,omitempty"`
151- IncludeNewAccounts * bool `json:"include_new_accounts,omitempty"`
152- IncludedAccounts []string `json:"included_accounts,omitempty"`
161+ ExcludedAccounts []string `json:"excluded_accounts,omitempty"`
162+ IncludeNewAccounts datadog. NullableBool `json:"include_new_accounts,omitempty"`
163+ IncludedAccounts []string `json:"included_accounts,omitempty"`
153164 }{}
154165 if err = datadog .Unmarshal (bytes , & all ); err != nil {
155166 return datadog .Unmarshal (bytes , & o .UnparsedObject )
0 commit comments