...

Source file src/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go

Documentation: k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1

     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  import (
    22  	apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
    23  )
    24  
    25  // CustomResourceDefinitionSpecApplyConfiguration represents an declarative configuration of the CustomResourceDefinitionSpec type for use
    26  // with apply.
    27  type CustomResourceDefinitionSpecApplyConfiguration struct {
    28  	Group                    *string                                             `json:"group,omitempty"`
    29  	Version                  *string                                             `json:"version,omitempty"`
    30  	Names                    *CustomResourceDefinitionNamesApplyConfiguration    `json:"names,omitempty"`
    31  	Scope                    *apiextensionsv1beta1.ResourceScope                 `json:"scope,omitempty"`
    32  	Validation               *CustomResourceValidationApplyConfiguration         `json:"validation,omitempty"`
    33  	Subresources             *CustomResourceSubresourcesApplyConfiguration       `json:"subresources,omitempty"`
    34  	Versions                 []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"`
    35  	AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration  `json:"additionalPrinterColumns,omitempty"`
    36  	SelectableFields         []SelectableFieldApplyConfiguration                 `json:"selectableFields,omitempty"`
    37  	Conversion               *CustomResourceConversionApplyConfiguration         `json:"conversion,omitempty"`
    38  	PreserveUnknownFields    *bool                                               `json:"preserveUnknownFields,omitempty"`
    39  }
    40  
    41  // CustomResourceDefinitionSpecApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionSpec type for use with
    42  // apply.
    43  func CustomResourceDefinitionSpec() *CustomResourceDefinitionSpecApplyConfiguration {
    44  	return &CustomResourceDefinitionSpecApplyConfiguration{}
    45  }
    46  
    47  // WithGroup sets the Group field in the declarative configuration to the given value
    48  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    49  // If called multiple times, the Group field is set to the value of the last call.
    50  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithGroup(value string) *CustomResourceDefinitionSpecApplyConfiguration {
    51  	b.Group = &value
    52  	return b
    53  }
    54  
    55  // WithVersion sets the Version field in the declarative configuration to the given value
    56  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    57  // If called multiple times, the Version field is set to the value of the last call.
    58  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersion(value string) *CustomResourceDefinitionSpecApplyConfiguration {
    59  	b.Version = &value
    60  	return b
    61  }
    62  
    63  // WithNames sets the Names field in the declarative configuration to the given value
    64  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    65  // If called multiple times, the Names field is set to the value of the last call.
    66  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration {
    67  	b.Names = value
    68  	return b
    69  }
    70  
    71  // WithScope sets the Scope field in the declarative configuration to the given value
    72  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    73  // If called multiple times, the Scope field is set to the value of the last call.
    74  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithScope(value apiextensionsv1beta1.ResourceScope) *CustomResourceDefinitionSpecApplyConfiguration {
    75  	b.Scope = &value
    76  	return b
    77  }
    78  
    79  // WithValidation sets the Validation field in the declarative configuration to the given value
    80  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    81  // If called multiple times, the Validation field is set to the value of the last call.
    82  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithValidation(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration {
    83  	b.Validation = value
    84  	return b
    85  }
    86  
    87  // WithSubresources sets the Subresources field in the declarative configuration to the given value
    88  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    89  // If called multiple times, the Subresources field is set to the value of the last call.
    90  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration {
    91  	b.Subresources = value
    92  	return b
    93  }
    94  
    95  // WithVersions adds the given value to the Versions field in the declarative configuration
    96  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    97  // If called multiple times, values provided by each call will be appended to the Versions field.
    98  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersions(values ...*CustomResourceDefinitionVersionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration {
    99  	for i := range values {
   100  		if values[i] == nil {
   101  			panic("nil value passed to WithVersions")
   102  		}
   103  		b.Versions = append(b.Versions, *values[i])
   104  	}
   105  	return b
   106  }
   107  
   108  // WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration
   109  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   110  // If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field.
   111  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration {
   112  	for i := range values {
   113  		if values[i] == nil {
   114  			panic("nil value passed to WithAdditionalPrinterColumns")
   115  		}
   116  		b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i])
   117  	}
   118  	return b
   119  }
   120  
   121  // WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration
   122  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   123  // If called multiple times, values provided by each call will be appended to the SelectableFields field.
   124  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration {
   125  	for i := range values {
   126  		if values[i] == nil {
   127  			panic("nil value passed to WithSelectableFields")
   128  		}
   129  		b.SelectableFields = append(b.SelectableFields, *values[i])
   130  	}
   131  	return b
   132  }
   133  
   134  // WithConversion sets the Conversion field in the declarative configuration to the given value
   135  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   136  // If called multiple times, the Conversion field is set to the value of the last call.
   137  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration {
   138  	b.Conversion = value
   139  	return b
   140  }
   141  
   142  // WithPreserveUnknownFields sets the PreserveUnknownFields field in the declarative configuration to the given value
   143  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   144  // If called multiple times, the PreserveUnknownFields field is set to the value of the last call.
   145  func (b *CustomResourceDefinitionSpecApplyConfiguration) WithPreserveUnknownFields(value bool) *CustomResourceDefinitionSpecApplyConfiguration {
   146  	b.PreserveUnknownFields = &value
   147  	return b
   148  }
   149  

View as plain text