mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
56 lines
2.6 KiB
Go
56 lines
2.6 KiB
Go
// Code generated by controller-gen. DO NOT EDIT.
|
|||
|
|
|
||
|
|
package v1alpha1
|
||
|
|
|
||
|
|
import (
|
||
|
|
v1 "k8s.io/api/core/v1"
|
||
|
|
)
|
||
|
|
|
||
|
|
// NetworkResourceSpecApplyConfiguration represents a declarative configuration of the NetworkResourceSpec type for use
|
||
|
|
// with apply.
|
||
|
|
//
|
||
|
|
// NetworkResourceSpec defines the desired state of NetworkResource.
|
||
|
|
type NetworkResourceSpecApplyConfiguration struct {
|
||
|
|
// NetworkRouterRef is a reference to the network and router where the resource will be created.
|
||
|
|
NetworkRouterRef *CrossNamespaceReferenceApplyConfiguration `json:"networkRouterRef,omitempty"`
|
||
|
|
// ServiceRef is a reference to the service to expose in the Network.
|
||
|
|
ServiceRef *v1.LocalObjectReference `json:"serviceRef,omitempty"`
|
||
|
|
// Groups are references to groups that the resource will be a part of.
|
||
|
|
Groups []ResourceReferenceApplyConfiguration `json:"groups,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// NetworkResourceSpecApplyConfiguration constructs a declarative configuration of the NetworkResourceSpec type for use with
|
||
|
|
// apply.
|
||
|
|
func NetworkResourceSpec() *NetworkResourceSpecApplyConfiguration {
|
||
|
|
return &NetworkResourceSpecApplyConfiguration{}
|
||
|
|
}
|
||
|
|
|
||
|
|
// WithNetworkRouterRef sets the NetworkRouterRef 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 NetworkRouterRef field is set to the value of the last call.
|
||
|
|
func (b *NetworkResourceSpecApplyConfiguration) WithNetworkRouterRef(value *CrossNamespaceReferenceApplyConfiguration) *NetworkResourceSpecApplyConfiguration {
|
||
|
|
b.NetworkRouterRef = value
|
||
|
|
return b
|
||
|
|
}
|
||
|
|
|
||
|
|
// WithServiceRef sets the ServiceRef 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 ServiceRef field is set to the value of the last call.
|
||
|
|
func (b *NetworkResourceSpecApplyConfiguration) WithServiceRef(value v1.LocalObjectReference) *NetworkResourceSpecApplyConfiguration {
|
||
|
|
b.ServiceRef = &value
|
||
|
|
return b
|
||
|
|
}
|
||
|
|
|
||
|
|
// WithGroups adds the given value to the Groups 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 Groups field.
|
||
|
|
func (b *NetworkResourceSpecApplyConfiguration) WithGroups(values ...*ResourceReferenceApplyConfiguration) *NetworkResourceSpecApplyConfiguration {
|
||
|
|
for i := range values {
|
||
|
|
if values[i] == nil {
|
||
|
|
panic("nil value passed to WithGroups")
|
||
|
|
}
|
||
|
|
b.Groups = append(b.Groups, *values[i])
|
||
|
|
}
|
||
|
|
return b
|
||
|
|
}
|