condition.go 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. // ConditionApplyConfiguration represents an declarative configuration of the Condition type for use
  19. // with apply.
  20. type ConditionApplyConfiguration struct {
  21. Type *string `json:"type,omitempty"`
  22. Status *v1.ConditionStatus `json:"status,omitempty"`
  23. ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
  24. LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
  25. Reason *string `json:"reason,omitempty"`
  26. Message *string `json:"message,omitempty"`
  27. }
  28. // ConditionApplyConfiguration constructs an declarative configuration of the Condition type for use with
  29. // apply.
  30. func Condition() *ConditionApplyConfiguration {
  31. return &ConditionApplyConfiguration{}
  32. }
  33. // WithType sets the Type field in the declarative configuration to the given value
  34. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  35. // If called multiple times, the Type field is set to the value of the last call.
  36. func (b *ConditionApplyConfiguration) WithType(value string) *ConditionApplyConfiguration {
  37. b.Type = &value
  38. return b
  39. }
  40. // WithStatus sets the Status field in the declarative configuration to the given value
  41. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  42. // If called multiple times, the Status field is set to the value of the last call.
  43. func (b *ConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ConditionApplyConfiguration {
  44. b.Status = &value
  45. return b
  46. }
  47. // WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
  48. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  49. // If called multiple times, the ObservedGeneration field is set to the value of the last call.
  50. func (b *ConditionApplyConfiguration) WithObservedGeneration(value int64) *ConditionApplyConfiguration {
  51. b.ObservedGeneration = &value
  52. return b
  53. }
  54. // WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
  55. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  56. // If called multiple times, the LastTransitionTime field is set to the value of the last call.
  57. func (b *ConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *ConditionApplyConfiguration {
  58. b.LastTransitionTime = &value
  59. return b
  60. }
  61. // WithReason sets the Reason field in the declarative configuration to the given value
  62. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  63. // If called multiple times, the Reason field is set to the value of the last call.
  64. func (b *ConditionApplyConfiguration) WithReason(value string) *ConditionApplyConfiguration {
  65. b.Reason = &value
  66. return b
  67. }
  68. // WithMessage sets the Message field in the declarative configuration to the given value
  69. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  70. // If called multiple times, the Message field is set to the value of the last call.
  71. func (b *ConditionApplyConfiguration) WithMessage(value string) *ConditionApplyConfiguration {
  72. b.Message = &value
  73. return b
  74. }