@@ -20,6 +20,8 @@ type Dashboard struct {
2020 AuthorName datadog.NullableString `json:"author_name,omitempty"`
2121 // Creation date of the dashboard.
2222 CreatedAt * time.Time `json:"created_at,omitempty"`
23+ // The default timeframe applied when opening the dashboard. Set to `null` to clear the dashboard's default timeframe.
24+ DefaultTimeframe NullableDashboardDefaultTimeframeSetting `json:"default_timeframe,omitempty"`
2325 // Description of the dashboard.
2426 Description datadog.NullableString `json:"description,omitempty"`
2527 // ID of the dashboard.
@@ -175,6 +177,45 @@ func (o *Dashboard) SetCreatedAt(v time.Time) {
175177 o .CreatedAt = & v
176178}
177179
180+ // GetDefaultTimeframe returns the DefaultTimeframe field value if set, zero value otherwise (both if not set or set to explicit null).
181+ func (o * Dashboard ) GetDefaultTimeframe () DashboardDefaultTimeframeSetting {
182+ if o == nil || o .DefaultTimeframe .Get () == nil {
183+ var ret DashboardDefaultTimeframeSetting
184+ return ret
185+ }
186+ return * o .DefaultTimeframe .Get ()
187+ }
188+
189+ // GetDefaultTimeframeOk returns a tuple with the DefaultTimeframe field value if set, nil otherwise
190+ // and a boolean to check if the value has been set.
191+ // NOTE: If the value is an explicit nil, `nil, true` will be returned.
192+ func (o * Dashboard ) GetDefaultTimeframeOk () (* DashboardDefaultTimeframeSetting , bool ) {
193+ if o == nil {
194+ return nil , false
195+ }
196+ return o .DefaultTimeframe .Get (), o .DefaultTimeframe .IsSet ()
197+ }
198+
199+ // HasDefaultTimeframe returns a boolean if a field has been set.
200+ func (o * Dashboard ) HasDefaultTimeframe () bool {
201+ return o != nil && o .DefaultTimeframe .IsSet ()
202+ }
203+
204+ // SetDefaultTimeframe gets a reference to the given NullableDashboardDefaultTimeframeSetting and assigns it to the DefaultTimeframe field.
205+ func (o * Dashboard ) SetDefaultTimeframe (v DashboardDefaultTimeframeSetting ) {
206+ o .DefaultTimeframe .Set (& v )
207+ }
208+
209+ // SetDefaultTimeframeNil sets the value for DefaultTimeframe to be an explicit nil.
210+ func (o * Dashboard ) SetDefaultTimeframeNil () {
211+ o .DefaultTimeframe .Set (nil )
212+ }
213+
214+ // UnsetDefaultTimeframe ensures that no value is present for DefaultTimeframe, not even an explicit nil.
215+ func (o * Dashboard ) UnsetDefaultTimeframe () {
216+ o .DefaultTimeframe .Unset ()
217+ }
218+
178219// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null).
179220func (o * Dashboard ) GetDescription () string {
180221 if o == nil || o .Description .Get () == nil {
@@ -638,6 +679,9 @@ func (o Dashboard) MarshalJSON() ([]byte, error) {
638679 toSerialize ["created_at" ] = o .CreatedAt .Format ("2006-01-02T15:04:05.000Z07:00" )
639680 }
640681 }
682+ if o .DefaultTimeframe .IsSet () {
683+ toSerialize ["default_timeframe" ] = o .DefaultTimeframe .Get ()
684+ }
641685 if o .Description .IsSet () {
642686 toSerialize ["description" ] = o .Description .Get ()
643687 }
@@ -691,24 +735,25 @@ func (o Dashboard) MarshalJSON() ([]byte, error) {
691735// UnmarshalJSON deserializes the given payload.
692736func (o * Dashboard ) UnmarshalJSON (bytes []byte ) (err error ) {
693737 all := struct {
694- AuthorHandle * string `json:"author_handle,omitempty"`
695- AuthorName datadog.NullableString `json:"author_name,omitempty"`
696- CreatedAt * time.Time `json:"created_at,omitempty"`
697- Description datadog.NullableString `json:"description,omitempty"`
698- Id * string `json:"id,omitempty"`
699- IsReadOnly * bool `json:"is_read_only,omitempty"`
700- LayoutType * DashboardLayoutType `json:"layout_type"`
701- ModifiedAt * time.Time `json:"modified_at,omitempty"`
702- NotifyList datadog.NullableList [string ] `json:"notify_list,omitempty"`
703- ReflowType * DashboardReflowType `json:"reflow_type,omitempty"`
704- RestrictedRoles []string `json:"restricted_roles,omitempty"`
705- Tabs []DashboardTab `json:"tabs,omitempty"`
706- Tags datadog.NullableList [string ] `json:"tags,omitempty"`
707- TemplateVariablePresets []DashboardTemplateVariablePreset `json:"template_variable_presets,omitempty"`
708- TemplateVariables []DashboardTemplateVariable `json:"template_variables,omitempty"`
709- Title * string `json:"title"`
710- Url * string `json:"url,omitempty"`
711- Widgets * []Widget `json:"widgets"`
738+ AuthorHandle * string `json:"author_handle,omitempty"`
739+ AuthorName datadog.NullableString `json:"author_name,omitempty"`
740+ CreatedAt * time.Time `json:"created_at,omitempty"`
741+ DefaultTimeframe NullableDashboardDefaultTimeframeSetting `json:"default_timeframe,omitempty"`
742+ Description datadog.NullableString `json:"description,omitempty"`
743+ Id * string `json:"id,omitempty"`
744+ IsReadOnly * bool `json:"is_read_only,omitempty"`
745+ LayoutType * DashboardLayoutType `json:"layout_type"`
746+ ModifiedAt * time.Time `json:"modified_at,omitempty"`
747+ NotifyList datadog.NullableList [string ] `json:"notify_list,omitempty"`
748+ ReflowType * DashboardReflowType `json:"reflow_type,omitempty"`
749+ RestrictedRoles []string `json:"restricted_roles,omitempty"`
750+ Tabs []DashboardTab `json:"tabs,omitempty"`
751+ Tags datadog.NullableList [string ] `json:"tags,omitempty"`
752+ TemplateVariablePresets []DashboardTemplateVariablePreset `json:"template_variable_presets,omitempty"`
753+ TemplateVariables []DashboardTemplateVariable `json:"template_variables,omitempty"`
754+ Title * string `json:"title"`
755+ Url * string `json:"url,omitempty"`
756+ Widgets * []Widget `json:"widgets"`
712757 }{}
713758 if err = datadog .Unmarshal (bytes , & all ); err != nil {
714759 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -724,7 +769,7 @@ func (o *Dashboard) UnmarshalJSON(bytes []byte) (err error) {
724769 }
725770 additionalProperties := make (map [string ]interface {})
726771 if err = datadog .UnmarshalUseNumber (bytes , & additionalProperties ); err == nil {
727- datadog .DeleteKeys (additionalProperties , & []string {"author_handle" , "author_name" , "created_at" , "description" , "id" , "is_read_only" , "layout_type" , "modified_at" , "notify_list" , "reflow_type" , "restricted_roles" , "tabs" , "tags" , "template_variable_presets" , "template_variables" , "title" , "url" , "widgets" })
772+ datadog .DeleteKeys (additionalProperties , & []string {"author_handle" , "author_name" , "created_at" , "default_timeframe" , " description" , "id" , "is_read_only" , "layout_type" , "modified_at" , "notify_list" , "reflow_type" , "restricted_roles" , "tabs" , "tags" , "template_variable_presets" , "template_variables" , "title" , "url" , "widgets" })
728773 } else {
729774 return err
730775 }
@@ -733,6 +778,7 @@ func (o *Dashboard) UnmarshalJSON(bytes []byte) (err error) {
733778 o .AuthorHandle = all .AuthorHandle
734779 o .AuthorName = all .AuthorName
735780 o .CreatedAt = all .CreatedAt
781+ o .DefaultTimeframe = all .DefaultTimeframe
736782 o .Description = all .Description
737783 o .Id = all .Id
738784 o .IsReadOnly = all .IsReadOnly
0 commit comments