podsmetricstatus.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 v2beta1
  15. import (
  16. resource "k8s.io/apimachinery/pkg/api/resource"
  17. v1 "k8s.io/client-go/applyconfigurations/meta/v1"
  18. )
  19. // PodsMetricStatusApplyConfiguration represents an declarative configuration of the PodsMetricStatus type for use
  20. // with apply.
  21. type PodsMetricStatusApplyConfiguration struct {
  22. MetricName *string `json:"metricName,omitempty"`
  23. CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"`
  24. Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
  25. }
  26. // PodsMetricStatusApplyConfiguration constructs an declarative configuration of the PodsMetricStatus type for use with
  27. // apply.
  28. func PodsMetricStatus() *PodsMetricStatusApplyConfiguration {
  29. return &PodsMetricStatusApplyConfiguration{}
  30. }
  31. // WithMetricName sets the MetricName field in the declarative configuration to the given value
  32. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  33. // If called multiple times, the MetricName field is set to the value of the last call.
  34. func (b *PodsMetricStatusApplyConfiguration) WithMetricName(value string) *PodsMetricStatusApplyConfiguration {
  35. b.MetricName = &value
  36. return b
  37. }
  38. // WithCurrentAverageValue sets the CurrentAverageValue field in the declarative configuration to the given value
  39. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  40. // If called multiple times, the CurrentAverageValue field is set to the value of the last call.
  41. func (b *PodsMetricStatusApplyConfiguration) WithCurrentAverageValue(value resource.Quantity) *PodsMetricStatusApplyConfiguration {
  42. b.CurrentAverageValue = &value
  43. return b
  44. }
  45. // WithSelector sets the Selector field in the declarative configuration to the given value
  46. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  47. // If called multiple times, the Selector field is set to the value of the last call.
  48. func (b *PodsMetricStatusApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *PodsMetricStatusApplyConfiguration {
  49. b.Selector = value
  50. return b
  51. }