// SPDX-License-Identifier: AGPL-3.0-only // Code generated by applyconfiguration-gen. DO NOT EDIT. package v0alpha1 // TimeIntervalSpecApplyConfiguration represents an declarative configuration of the TimeIntervalSpec type for use // with apply. type TimeIntervalSpecApplyConfiguration struct { Name *string `json:"name,omitempty"` TimeIntervals []IntervalApplyConfiguration `json:"time_intervals,omitempty"` } // TimeIntervalSpecApplyConfiguration constructs an declarative configuration of the TimeIntervalSpec type for use with // apply. func TimeIntervalSpec() *TimeIntervalSpecApplyConfiguration { return &TimeIntervalSpecApplyConfiguration{} } // WithName sets the Name 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 Name field is set to the value of the last call. func (b *TimeIntervalSpecApplyConfiguration) WithName(value string) *TimeIntervalSpecApplyConfiguration { b.Name = &value return b } // WithTimeIntervals adds the given value to the TimeIntervals 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 TimeIntervals field. func (b *TimeIntervalSpecApplyConfiguration) WithTimeIntervals(values ...*IntervalApplyConfiguration) *TimeIntervalSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithTimeIntervals") } b.TimeIntervals = append(b.TimeIntervals, *values[i]) } return b }