// SPDX-License-Identifier: AGPL-3.0-only // Code generated by applyconfiguration-gen. DO NOT EDIT. package v0alpha1 import ( aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1" ) // DataPlaneServiceSpecApplyConfiguration represents a declarative configuration of the DataPlaneServiceSpec type for use // with apply. type DataPlaneServiceSpecApplyConfiguration struct { PluginID *string `json:"pluginID,omitempty"` PluginType *aggregationv0alpha1.PluginType `json:"pluginType,omitempty"` Group *string `json:"group,omitempty"` Version *string `json:"version,omitempty"` Services []ServiceApplyConfiguration `json:"services,omitempty"` } // DataPlaneServiceSpecApplyConfiguration constructs a declarative configuration of the DataPlaneServiceSpec type for use with // apply. func DataPlaneServiceSpec() *DataPlaneServiceSpecApplyConfiguration { return &DataPlaneServiceSpecApplyConfiguration{} } // WithPluginID sets the PluginID 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 PluginID field is set to the value of the last call. func (b *DataPlaneServiceSpecApplyConfiguration) WithPluginID(value string) *DataPlaneServiceSpecApplyConfiguration { b.PluginID = &value return b } // WithPluginType sets the PluginType 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 PluginType field is set to the value of the last call. func (b *DataPlaneServiceSpecApplyConfiguration) WithPluginType(value aggregationv0alpha1.PluginType) *DataPlaneServiceSpecApplyConfiguration { b.PluginType = &value return b } // WithGroup sets the Group 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 Group field is set to the value of the last call. func (b *DataPlaneServiceSpecApplyConfiguration) WithGroup(value string) *DataPlaneServiceSpecApplyConfiguration { b.Group = &value return b } // WithVersion sets the Version 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 Version field is set to the value of the last call. func (b *DataPlaneServiceSpecApplyConfiguration) WithVersion(value string) *DataPlaneServiceSpecApplyConfiguration { b.Version = &value return b } // WithServices adds the given value to the Services 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 Services field. func (b *DataPlaneServiceSpecApplyConfiguration) WithServices(values ...*ServiceApplyConfiguration) *DataPlaneServiceSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithServices") } b.Services = append(b.Services, *values[i]) } return b }