@@ -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 * DashboardDefaultTimeframe `json:"default_timeframe,omitempty"`
2325 // Description of the dashboard.
2426 Description datadog.NullableString `json:"description,omitempty"`
2527 // ID of the dashboard.
@@ -175,6 +177,34 @@ 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.
181+ func (o * Dashboard ) GetDefaultTimeframe () DashboardDefaultTimeframe {
182+ if o == nil || o .DefaultTimeframe == nil {
183+ var ret DashboardDefaultTimeframe
184+ return ret
185+ }
186+ return * o .DefaultTimeframe
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+ func (o * Dashboard ) GetDefaultTimeframeOk () (* DashboardDefaultTimeframe , bool ) {
192+ if o == nil || o .DefaultTimeframe == nil {
193+ return nil , false
194+ }
195+ return o .DefaultTimeframe , true
196+ }
197+
198+ // HasDefaultTimeframe returns a boolean if a field has been set.
199+ func (o * Dashboard ) HasDefaultTimeframe () bool {
200+ return o != nil && o .DefaultTimeframe != nil
201+ }
202+
203+ // SetDefaultTimeframe gets a reference to the given DashboardDefaultTimeframe and assigns it to the DefaultTimeframe field.
204+ func (o * Dashboard ) SetDefaultTimeframe (v DashboardDefaultTimeframe ) {
205+ o .DefaultTimeframe = & v
206+ }
207+
178208// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null).
179209func (o * Dashboard ) GetDescription () string {
180210 if o == nil || o .Description .Get () == nil {
@@ -638,6 +668,9 @@ func (o Dashboard) MarshalJSON() ([]byte, error) {
638668 toSerialize ["created_at" ] = o .CreatedAt .Format ("2006-01-02T15:04:05.000Z07:00" )
639669 }
640670 }
671+ if o .DefaultTimeframe != nil {
672+ toSerialize ["default_timeframe" ] = o .DefaultTimeframe
673+ }
641674 if o .Description .IsSet () {
642675 toSerialize ["description" ] = o .Description .Get ()
643676 }
@@ -694,6 +727,7 @@ func (o *Dashboard) UnmarshalJSON(bytes []byte) (err error) {
694727 AuthorHandle * string `json:"author_handle,omitempty"`
695728 AuthorName datadog.NullableString `json:"author_name,omitempty"`
696729 CreatedAt * time.Time `json:"created_at,omitempty"`
730+ DefaultTimeframe * DashboardDefaultTimeframe `json:"default_timeframe,omitempty"`
697731 Description datadog.NullableString `json:"description,omitempty"`
698732 Id * string `json:"id,omitempty"`
699733 IsReadOnly * bool `json:"is_read_only,omitempty"`
@@ -724,7 +758,7 @@ func (o *Dashboard) UnmarshalJSON(bytes []byte) (err error) {
724758 }
725759 additionalProperties := make (map [string ]interface {})
726760 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" })
761+ 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" })
728762 } else {
729763 return err
730764 }
@@ -733,6 +767,10 @@ func (o *Dashboard) UnmarshalJSON(bytes []byte) (err error) {
733767 o .AuthorHandle = all .AuthorHandle
734768 o .AuthorName = all .AuthorName
735769 o .CreatedAt = all .CreatedAt
770+ if all .DefaultTimeframe != nil && all .DefaultTimeframe .UnparsedObject != nil && o .UnparsedObject == nil {
771+ hasInvalidField = true
772+ }
773+ o .DefaultTimeframe = all .DefaultTimeframe
736774 o .Description = all .Description
737775 o .Id = all .Id
738776 o .IsReadOnly = all .IsReadOnly
0 commit comments