containerresourcemetricstatus.go 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. v1 "k8s.io/api/core/v1"
  17. resource "k8s.io/apimachinery/pkg/api/resource"
  18. )
  19. // ContainerResourceMetricStatusApplyConfiguration represents an declarative configuration of the ContainerResourceMetricStatus type for use
  20. // with apply.
  21. type ContainerResourceMetricStatusApplyConfiguration struct {
  22. Name *v1.ResourceName `json:"name,omitempty"`
  23. CurrentAverageUtilization *int32 `json:"currentAverageUtilization,omitempty"`
  24. CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty"`
  25. Container *string `json:"container,omitempty"`
  26. }
  27. // ContainerResourceMetricStatusApplyConfiguration constructs an declarative configuration of the ContainerResourceMetricStatus type for use with
  28. // apply.
  29. func ContainerResourceMetricStatus() *ContainerResourceMetricStatusApplyConfiguration {
  30. return &ContainerResourceMetricStatusApplyConfiguration{}
  31. }
  32. // WithName sets the Name field in the declarative configuration to the given value
  33. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  34. // If called multiple times, the Name field is set to the value of the last call.
  35. func (b *ContainerResourceMetricStatusApplyConfiguration) WithName(value v1.ResourceName) *ContainerResourceMetricStatusApplyConfiguration {
  36. b.Name = &value
  37. return b
  38. }
  39. // WithCurrentAverageUtilization sets the CurrentAverageUtilization field in the declarative configuration to the given value
  40. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  41. // If called multiple times, the CurrentAverageUtilization field is set to the value of the last call.
  42. func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrentAverageUtilization(value int32) *ContainerResourceMetricStatusApplyConfiguration {
  43. b.CurrentAverageUtilization = &value
  44. return b
  45. }
  46. // WithCurrentAverageValue sets the CurrentAverageValue field in the declarative configuration to the given value
  47. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  48. // If called multiple times, the CurrentAverageValue field is set to the value of the last call.
  49. func (b *ContainerResourceMetricStatusApplyConfiguration) WithCurrentAverageValue(value resource.Quantity) *ContainerResourceMetricStatusApplyConfiguration {
  50. b.CurrentAverageValue = &value
  51. return b
  52. }
  53. // WithContainer sets the Container field in the declarative configuration to the given value
  54. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  55. // If called multiple times, the Container field is set to the value of the last call.
  56. func (b *ContainerResourceMetricStatusApplyConfiguration) WithContainer(value string) *ContainerResourceMetricStatusApplyConfiguration {
  57. b.Container = &value
  58. return b
  59. }