horizontalpodautoscalerstatus.go 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. import (
  16. v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  17. )
  18. // HorizontalPodAutoscalerStatusApplyConfiguration represents an declarative configuration of the HorizontalPodAutoscalerStatus type for use
  19. // with apply.
  20. type HorizontalPodAutoscalerStatusApplyConfiguration struct {
  21. ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
  22. LastScaleTime *v1.Time `json:"lastScaleTime,omitempty"`
  23. CurrentReplicas *int32 `json:"currentReplicas,omitempty"`
  24. DesiredReplicas *int32 `json:"desiredReplicas,omitempty"`
  25. CurrentCPUUtilizationPercentage *int32 `json:"currentCPUUtilizationPercentage,omitempty"`
  26. }
  27. // HorizontalPodAutoscalerStatusApplyConfiguration constructs an declarative configuration of the HorizontalPodAutoscalerStatus type for use with
  28. // apply.
  29. func HorizontalPodAutoscalerStatus() *HorizontalPodAutoscalerStatusApplyConfiguration {
  30. return &HorizontalPodAutoscalerStatusApplyConfiguration{}
  31. }
  32. // WithObservedGeneration sets the ObservedGeneration 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 ObservedGeneration field is set to the value of the last call.
  35. func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithObservedGeneration(value int64) *HorizontalPodAutoscalerStatusApplyConfiguration {
  36. b.ObservedGeneration = &value
  37. return b
  38. }
  39. // WithLastScaleTime sets the LastScaleTime 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 LastScaleTime field is set to the value of the last call.
  42. func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithLastScaleTime(value v1.Time) *HorizontalPodAutoscalerStatusApplyConfiguration {
  43. b.LastScaleTime = &value
  44. return b
  45. }
  46. // WithCurrentReplicas sets the CurrentReplicas 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 CurrentReplicas field is set to the value of the last call.
  49. func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration {
  50. b.CurrentReplicas = &value
  51. return b
  52. }
  53. // WithDesiredReplicas sets the DesiredReplicas 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 DesiredReplicas field is set to the value of the last call.
  56. func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithDesiredReplicas(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration {
  57. b.DesiredReplicas = &value
  58. return b
  59. }
  60. // WithCurrentCPUUtilizationPercentage sets the CurrentCPUUtilizationPercentage field in the declarative configuration to the given value
  61. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  62. // If called multiple times, the CurrentCPUUtilizationPercentage field is set to the value of the last call.
  63. func (b *HorizontalPodAutoscalerStatusApplyConfiguration) WithCurrentCPUUtilizationPercentage(value int32) *HorizontalPodAutoscalerStatusApplyConfiguration {
  64. b.CurrentCPUUtilizationPercentage = &value
  65. return b
  66. }