agones.dev/agones@v1.53.0/pkg/client/applyconfiguration/multicluster/v1/clusterconnectioninfo.go (about) 1 // Copyright 2024 Google LLC All Rights Reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // This code was autogenerated. Do not edit directly. 16 17 // Code generated by applyconfiguration-gen. DO NOT EDIT. 18 19 package v1 20 21 // ClusterConnectionInfoApplyConfiguration represents a declarative configuration of the ClusterConnectionInfo type for use 22 // with apply. 23 type ClusterConnectionInfoApplyConfiguration struct { 24 ClusterName *string `json:"clusterName,omitempty"` 25 AllocationEndpoints []string `json:"allocationEndpoints,omitempty"` 26 SecretName *string `json:"secretName,omitempty"` 27 Namespace *string `json:"namespace,omitempty"` 28 ServerCA []byte `json:"serverCa,omitempty"` 29 } 30 31 // ClusterConnectionInfoApplyConfiguration constructs a declarative configuration of the ClusterConnectionInfo type for use with 32 // apply. 33 func ClusterConnectionInfo() *ClusterConnectionInfoApplyConfiguration { 34 return &ClusterConnectionInfoApplyConfiguration{} 35 } 36 37 // WithClusterName sets the ClusterName field in the declarative configuration to the given value 38 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 39 // If called multiple times, the ClusterName field is set to the value of the last call. 40 func (b *ClusterConnectionInfoApplyConfiguration) WithClusterName(value string) *ClusterConnectionInfoApplyConfiguration { 41 b.ClusterName = &value 42 return b 43 } 44 45 // WithAllocationEndpoints adds the given value to the AllocationEndpoints field in the declarative configuration 46 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 47 // If called multiple times, values provided by each call will be appended to the AllocationEndpoints field. 48 func (b *ClusterConnectionInfoApplyConfiguration) WithAllocationEndpoints(values ...string) *ClusterConnectionInfoApplyConfiguration { 49 for i := range values { 50 b.AllocationEndpoints = append(b.AllocationEndpoints, values[i]) 51 } 52 return b 53 } 54 55 // WithSecretName sets the SecretName 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 SecretName field is set to the value of the last call. 58 func (b *ClusterConnectionInfoApplyConfiguration) WithSecretName(value string) *ClusterConnectionInfoApplyConfiguration { 59 b.SecretName = &value 60 return b 61 } 62 63 // WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. 66 func (b *ClusterConnectionInfoApplyConfiguration) WithNamespace(value string) *ClusterConnectionInfoApplyConfiguration { 67 b.Namespace = &value 68 return b 69 } 70 71 // WithServerCA adds the given value to the ServerCA field in the declarative configuration 72 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 73 // If called multiple times, values provided by each call will be appended to the ServerCA field. 74 func (b *ClusterConnectionInfoApplyConfiguration) WithServerCA(values ...byte) *ClusterConnectionInfoApplyConfiguration { 75 for i := range values { 76 b.ServerCA = append(b.ServerCA, values[i]) 77 } 78 return b 79 }