ingressloadbalanceringress.go 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. Copyright The Kubernetes Authors.
  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. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by applyconfiguration-gen. DO NOT EDIT.
  14. package v1
  15. // IngressLoadBalancerIngressApplyConfiguration represents an declarative configuration of the IngressLoadBalancerIngress type for use
  16. // with apply.
  17. type IngressLoadBalancerIngressApplyConfiguration struct {
  18. IP *string `json:"ip,omitempty"`
  19. Hostname *string `json:"hostname,omitempty"`
  20. Ports []IngressPortStatusApplyConfiguration `json:"ports,omitempty"`
  21. }
  22. // IngressLoadBalancerIngressApplyConfiguration constructs an declarative configuration of the IngressLoadBalancerIngress type for use with
  23. // apply.
  24. func IngressLoadBalancerIngress() *IngressLoadBalancerIngressApplyConfiguration {
  25. return &IngressLoadBalancerIngressApplyConfiguration{}
  26. }
  27. // WithIP sets the IP field in the declarative configuration to the given value
  28. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  29. // If called multiple times, the IP field is set to the value of the last call.
  30. func (b *IngressLoadBalancerIngressApplyConfiguration) WithIP(value string) *IngressLoadBalancerIngressApplyConfiguration {
  31. b.IP = &value
  32. return b
  33. }
  34. // WithHostname sets the Hostname field in the declarative configuration to the given value
  35. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  36. // If called multiple times, the Hostname field is set to the value of the last call.
  37. func (b *IngressLoadBalancerIngressApplyConfiguration) WithHostname(value string) *IngressLoadBalancerIngressApplyConfiguration {
  38. b.Hostname = &value
  39. return b
  40. }
  41. // WithPorts adds the given value to the Ports field in the declarative configuration
  42. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  43. // If called multiple times, values provided by each call will be appended to the Ports field.
  44. func (b *IngressLoadBalancerIngressApplyConfiguration) WithPorts(values ...*IngressPortStatusApplyConfiguration) *IngressLoadBalancerIngressApplyConfiguration {
  45. for i := range values {
  46. if values[i] == nil {
  47. panic("nil value passed to WithPorts")
  48. }
  49. b.Ports = append(b.Ports, *values[i])
  50. }
  51. return b
  52. }