...

Source file src/k8s.io/client-go/applyconfigurations/discovery/v1/endpointport.go

Documentation: k8s.io/client-go/applyconfigurations/discovery/v1

     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  	v1 "k8s.io/api/core/v1"
    23  )
    24  
    25  // EndpointPortApplyConfiguration represents an declarative configuration of the EndpointPort type for use
    26  // with apply.
    27  type EndpointPortApplyConfiguration struct {
    28  	Name        *string      `json:"name,omitempty"`
    29  	Protocol    *v1.Protocol `json:"protocol,omitempty"`
    30  	Port        *int32       `json:"port,omitempty"`
    31  	AppProtocol *string      `json:"appProtocol,omitempty"`
    32  }
    33  
    34  // EndpointPortApplyConfiguration constructs an declarative configuration of the EndpointPort type for use with
    35  // apply.
    36  func EndpointPort() *EndpointPortApplyConfiguration {
    37  	return &EndpointPortApplyConfiguration{}
    38  }
    39  
    40  // WithName sets the Name field in the declarative configuration to the given value
    41  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    42  // If called multiple times, the Name field is set to the value of the last call.
    43  func (b *EndpointPortApplyConfiguration) WithName(value string) *EndpointPortApplyConfiguration {
    44  	b.Name = &value
    45  	return b
    46  }
    47  
    48  // WithProtocol sets the Protocol field in the declarative configuration to the given value
    49  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    50  // If called multiple times, the Protocol field is set to the value of the last call.
    51  func (b *EndpointPortApplyConfiguration) WithProtocol(value v1.Protocol) *EndpointPortApplyConfiguration {
    52  	b.Protocol = &value
    53  	return b
    54  }
    55  
    56  // WithPort sets the Port field in the declarative configuration to the given value
    57  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    58  // If called multiple times, the Port field is set to the value of the last call.
    59  func (b *EndpointPortApplyConfiguration) WithPort(value int32) *EndpointPortApplyConfiguration {
    60  	b.Port = &value
    61  	return b
    62  }
    63  
    64  // WithAppProtocol sets the AppProtocol field in the declarative configuration to the given value
    65  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    66  // If called multiple times, the AppProtocol field is set to the value of the last call.
    67  func (b *EndpointPortApplyConfiguration) WithAppProtocol(value string) *EndpointPortApplyConfiguration {
    68  	b.AppProtocol = &value
    69  	return b
    70  }
    71  

View as plain text