...

Source file src/k8s.io/client-go/applyconfigurations/autoscaling/v2beta1/metricstatus.go

Documentation: k8s.io/client-go/applyconfigurations/autoscaling/v2beta1

     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 v2beta1
    20  
    21  import (
    22  	v2beta1 "k8s.io/api/autoscaling/v2beta1"
    23  )
    24  
    25  // MetricStatusApplyConfiguration represents an declarative configuration of the MetricStatus type for use
    26  // with apply.
    27  type MetricStatusApplyConfiguration struct {
    28  	Type              *v2beta1.MetricSourceType                        `json:"type,omitempty"`
    29  	Object            *ObjectMetricStatusApplyConfiguration            `json:"object,omitempty"`
    30  	Pods              *PodsMetricStatusApplyConfiguration              `json:"pods,omitempty"`
    31  	Resource          *ResourceMetricStatusApplyConfiguration          `json:"resource,omitempty"`
    32  	ContainerResource *ContainerResourceMetricStatusApplyConfiguration `json:"containerResource,omitempty"`
    33  	External          *ExternalMetricStatusApplyConfiguration          `json:"external,omitempty"`
    34  }
    35  
    36  // MetricStatusApplyConfiguration constructs an declarative configuration of the MetricStatus type for use with
    37  // apply.
    38  func MetricStatus() *MetricStatusApplyConfiguration {
    39  	return &MetricStatusApplyConfiguration{}
    40  }
    41  
    42  // WithType sets the Type field in the declarative configuration to the given value
    43  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    44  // If called multiple times, the Type field is set to the value of the last call.
    45  func (b *MetricStatusApplyConfiguration) WithType(value v2beta1.MetricSourceType) *MetricStatusApplyConfiguration {
    46  	b.Type = &value
    47  	return b
    48  }
    49  
    50  // WithObject sets the Object field in the declarative configuration to the given value
    51  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    52  // If called multiple times, the Object field is set to the value of the last call.
    53  func (b *MetricStatusApplyConfiguration) WithObject(value *ObjectMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
    54  	b.Object = value
    55  	return b
    56  }
    57  
    58  // WithPods sets the Pods field in the declarative configuration to the given value
    59  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    60  // If called multiple times, the Pods field is set to the value of the last call.
    61  func (b *MetricStatusApplyConfiguration) WithPods(value *PodsMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
    62  	b.Pods = value
    63  	return b
    64  }
    65  
    66  // WithResource sets the Resource field in the declarative configuration to the given value
    67  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    68  // If called multiple times, the Resource field is set to the value of the last call.
    69  func (b *MetricStatusApplyConfiguration) WithResource(value *ResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
    70  	b.Resource = value
    71  	return b
    72  }
    73  
    74  // WithContainerResource sets the ContainerResource field in the declarative configuration to the given value
    75  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    76  // If called multiple times, the ContainerResource field is set to the value of the last call.
    77  func (b *MetricStatusApplyConfiguration) WithContainerResource(value *ContainerResourceMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
    78  	b.ContainerResource = value
    79  	return b
    80  }
    81  
    82  // WithExternal sets the External field in the declarative configuration to the given value
    83  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    84  // If called multiple times, the External field is set to the value of the last call.
    85  func (b *MetricStatusApplyConfiguration) WithExternal(value *ExternalMetricStatusApplyConfiguration) *MetricStatusApplyConfiguration {
    86  	b.External = value
    87  	return b
    88  }
    89  

View as plain text