horizontalpodautoscalercondition.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 v2beta2
  15. import (
  16. v2beta2 "k8s.io/api/autoscaling/v2beta2"
  17. v1 "k8s.io/api/core/v1"
  18. metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  19. )
  20. // HorizontalPodAutoscalerConditionApplyConfiguration represents an declarative configuration of the HorizontalPodAutoscalerCondition type for use
  21. // with apply.
  22. type HorizontalPodAutoscalerConditionApplyConfiguration struct {
  23. Type *v2beta2.HorizontalPodAutoscalerConditionType `json:"type,omitempty"`
  24. Status *v1.ConditionStatus `json:"status,omitempty"`
  25. LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
  26. Reason *string `json:"reason,omitempty"`
  27. Message *string `json:"message,omitempty"`
  28. }
  29. // HorizontalPodAutoscalerConditionApplyConfiguration constructs an declarative configuration of the HorizontalPodAutoscalerCondition type for use with
  30. // apply.
  31. func HorizontalPodAutoscalerCondition() *HorizontalPodAutoscalerConditionApplyConfiguration {
  32. return &HorizontalPodAutoscalerConditionApplyConfiguration{}
  33. }
  34. // WithType sets the Type 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 Type field is set to the value of the last call.
  37. func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithType(value v2beta2.HorizontalPodAutoscalerConditionType) *HorizontalPodAutoscalerConditionApplyConfiguration {
  38. b.Type = &value
  39. return b
  40. }
  41. // WithStatus sets the Status field in the declarative configuration to the given value
  42. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  43. // If called multiple times, the Status field is set to the value of the last call.
  44. func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *HorizontalPodAutoscalerConditionApplyConfiguration {
  45. b.Status = &value
  46. return b
  47. }
  48. // WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
  49. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  50. // If called multiple times, the LastTransitionTime field is set to the value of the last call.
  51. func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *HorizontalPodAutoscalerConditionApplyConfiguration {
  52. b.LastTransitionTime = &value
  53. return b
  54. }
  55. // WithReason sets the Reason field in the declarative configuration to the given value
  56. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  57. // If called multiple times, the Reason field is set to the value of the last call.
  58. func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithReason(value string) *HorizontalPodAutoscalerConditionApplyConfiguration {
  59. b.Reason = &value
  60. return b
  61. }
  62. // WithMessage sets the Message field in the declarative configuration to the given value
  63. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  64. // If called multiple times, the Message field is set to the value of the last call.
  65. func (b *HorizontalPodAutoscalerConditionApplyConfiguration) WithMessage(value string) *HorizontalPodAutoscalerConditionApplyConfiguration {
  66. b.Message = &value
  67. return b
  68. }