// SPDX-License-Identifier: AGPL-3.0-only // Code generated by applyconfiguration-gen. DO NOT EDIT. package v0alpha1 // IntervalApplyConfiguration represents an declarative configuration of the Interval type for use // with apply. type IntervalApplyConfiguration struct { DaysOfMonth []string `json:"days_of_month,omitempty"` Location *string `json:"location,omitempty"` Months []string `json:"months,omitempty"` Times []TimeRangeApplyConfiguration `json:"times,omitempty"` Weekdays []string `json:"weekdays,omitempty"` Years []string `json:"years,omitempty"` } // IntervalApplyConfiguration constructs an declarative configuration of the Interval type for use with // apply. func Interval() *IntervalApplyConfiguration { return &IntervalApplyConfiguration{} } // WithDaysOfMonth adds the given value to the DaysOfMonth field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the DaysOfMonth field. func (b *IntervalApplyConfiguration) WithDaysOfMonth(values ...string) *IntervalApplyConfiguration { for i := range values { b.DaysOfMonth = append(b.DaysOfMonth, values[i]) } return b } // WithLocation sets the Location field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Location field is set to the value of the last call. func (b *IntervalApplyConfiguration) WithLocation(value string) *IntervalApplyConfiguration { b.Location = &value return b } // WithMonths adds the given value to the Months field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Months field. func (b *IntervalApplyConfiguration) WithMonths(values ...string) *IntervalApplyConfiguration { for i := range values { b.Months = append(b.Months, values[i]) } return b } // WithTimes adds the given value to the Times field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Times field. func (b *IntervalApplyConfiguration) WithTimes(values ...*TimeRangeApplyConfiguration) *IntervalApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithTimes") } b.Times = append(b.Times, *values[i]) } return b } // WithWeekdays adds the given value to the Weekdays field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Weekdays field. func (b *IntervalApplyConfiguration) WithWeekdays(values ...string) *IntervalApplyConfiguration { for i := range values { b.Weekdays = append(b.Weekdays, values[i]) } return b } // WithYears adds the given value to the Years field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Years field. func (b *IntervalApplyConfiguration) WithYears(values ...string) *IntervalApplyConfiguration { for i := range values { b.Years = append(b.Years, values[i]) } return b }