1 /* 2 Copyright The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 // Code generated by applyconfiguration-gen. DO NOT EDIT. 18 19 package v1 20 21 import ( 22 types "k8s.io/apimachinery/pkg/types" 23 ) 24 25 // ObjectReferenceApplyConfiguration represents an declarative configuration of the ObjectReference type for use 26 // with apply. 27 type ObjectReferenceApplyConfiguration struct { 28 Kind *string `json:"kind,omitempty"` 29 Namespace *string `json:"namespace,omitempty"` 30 Name *string `json:"name,omitempty"` 31 UID *types.UID `json:"uid,omitempty"` 32 APIVersion *string `json:"apiVersion,omitempty"` 33 ResourceVersion *string `json:"resourceVersion,omitempty"` 34 FieldPath *string `json:"fieldPath,omitempty"` 35 } 36 37 // ObjectReferenceApplyConfiguration constructs an declarative configuration of the ObjectReference type for use with 38 // apply. 39 func ObjectReference() *ObjectReferenceApplyConfiguration { 40 return &ObjectReferenceApplyConfiguration{} 41 } 42 43 // WithKind sets the Kind field in the declarative configuration to the given value 44 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 45 // If called multiple times, the Kind field is set to the value of the last call. 46 func (b *ObjectReferenceApplyConfiguration) WithKind(value string) *ObjectReferenceApplyConfiguration { 47 b.Kind = &value 48 return b 49 } 50 51 // WithNamespace sets the Namespace field in the declarative configuration to the given value 52 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 53 // If called multiple times, the Namespace field is set to the value of the last call. 54 func (b *ObjectReferenceApplyConfiguration) WithNamespace(value string) *ObjectReferenceApplyConfiguration { 55 b.Namespace = &value 56 return b 57 } 58 59 // WithName sets the Name field in the declarative configuration to the given value 60 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 61 // If called multiple times, the Name field is set to the value of the last call. 62 func (b *ObjectReferenceApplyConfiguration) WithName(value string) *ObjectReferenceApplyConfiguration { 63 b.Name = &value 64 return b 65 } 66 67 // WithUID sets the UID field in the declarative configuration to the given value 68 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 69 // If called multiple times, the UID field is set to the value of the last call. 70 func (b *ObjectReferenceApplyConfiguration) WithUID(value types.UID) *ObjectReferenceApplyConfiguration { 71 b.UID = &value 72 return b 73 } 74 75 // WithAPIVersion sets the APIVersion field in the declarative configuration to the given value 76 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 77 // If called multiple times, the APIVersion field is set to the value of the last call. 78 func (b *ObjectReferenceApplyConfiguration) WithAPIVersion(value string) *ObjectReferenceApplyConfiguration { 79 b.APIVersion = &value 80 return b 81 } 82 83 // WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value 84 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 85 // If called multiple times, the ResourceVersion field is set to the value of the last call. 86 func (b *ObjectReferenceApplyConfiguration) WithResourceVersion(value string) *ObjectReferenceApplyConfiguration { 87 b.ResourceVersion = &value 88 return b 89 } 90 91 // WithFieldPath sets the FieldPath field in the declarative configuration to the given value 92 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 93 // If called multiple times, the FieldPath field is set to the value of the last call. 94 func (b *ObjectReferenceApplyConfiguration) WithFieldPath(value string) *ObjectReferenceApplyConfiguration { 95 b.FieldPath = &value 96 return b 97 } 98