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 v1beta1 20 21 // CustomResourceDefinitionVersionApplyConfiguration represents an declarative configuration of the CustomResourceDefinitionVersion type for use 22 // with apply. 23 type CustomResourceDefinitionVersionApplyConfiguration struct { 24 Name *string `json:"name,omitempty"` 25 Served *bool `json:"served,omitempty"` 26 Storage *bool `json:"storage,omitempty"` 27 Deprecated *bool `json:"deprecated,omitempty"` 28 DeprecationWarning *string `json:"deprecationWarning,omitempty"` 29 Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` 30 Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` 31 AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` 32 SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` 33 } 34 35 // CustomResourceDefinitionVersionApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionVersion type for use with 36 // apply. 37 func CustomResourceDefinitionVersion() *CustomResourceDefinitionVersionApplyConfiguration { 38 return &CustomResourceDefinitionVersionApplyConfiguration{} 39 } 40 41 // WithName sets the Name field in the declarative configuration to the given value 42 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 43 // If called multiple times, the Name field is set to the value of the last call. 44 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithName(value string) *CustomResourceDefinitionVersionApplyConfiguration { 45 b.Name = &value 46 return b 47 } 48 49 // WithServed sets the Served field in the declarative configuration to the given value 50 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 51 // If called multiple times, the Served field is set to the value of the last call. 52 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithServed(value bool) *CustomResourceDefinitionVersionApplyConfiguration { 53 b.Served = &value 54 return b 55 } 56 57 // WithStorage sets the Storage field in the declarative configuration to the given value 58 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 59 // If called multiple times, the Storage field is set to the value of the last call. 60 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithStorage(value bool) *CustomResourceDefinitionVersionApplyConfiguration { 61 b.Storage = &value 62 return b 63 } 64 65 // WithDeprecated sets the Deprecated field in the declarative configuration to the given value 66 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 67 // If called multiple times, the Deprecated field is set to the value of the last call. 68 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecated(value bool) *CustomResourceDefinitionVersionApplyConfiguration { 69 b.Deprecated = &value 70 return b 71 } 72 73 // WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value 74 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 75 // If called multiple times, the DeprecationWarning field is set to the value of the last call. 76 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecationWarning(value string) *CustomResourceDefinitionVersionApplyConfiguration { 77 b.DeprecationWarning = &value 78 return b 79 } 80 81 // WithSchema sets the Schema field in the declarative configuration to the given value 82 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 83 // If called multiple times, the Schema field is set to the value of the last call. 84 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSchema(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { 85 b.Schema = value 86 return b 87 } 88 89 // WithSubresources sets the Subresources field in the declarative configuration to the given value 90 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 91 // If called multiple times, the Subresources field is set to the value of the last call. 92 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { 93 b.Subresources = value 94 return b 95 } 96 97 // WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration 98 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 99 // If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. 100 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { 101 for i := range values { 102 if values[i] == nil { 103 panic("nil value passed to WithAdditionalPrinterColumns") 104 } 105 b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) 106 } 107 return b 108 } 109 110 // WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration 111 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 112 // If called multiple times, values provided by each call will be appended to the SelectableFields field. 113 func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { 114 for i := range values { 115 if values[i] == nil { 116 panic("nil value passed to WithSelectableFields") 117 } 118 b.SelectableFields = append(b.SelectableFields, *values[i]) 119 } 120 return b 121 } 122