deploymentcondition.go 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 v1beta2
  15. import (
  16. appsv1beta2 "k8s.io/api/apps/v1beta2"
  17. v1 "k8s.io/api/core/v1"
  18. metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  19. )
  20. // DeploymentConditionApplyConfiguration represents a declarative configuration of the DeploymentCondition type for use
  21. // with apply.
  22. //
  23. // DeploymentCondition describes the state of a deployment at a certain point.
  24. type DeploymentConditionApplyConfiguration struct {
  25. // Type of deployment condition.
  26. Type *appsv1beta2.DeploymentConditionType `json:"type,omitempty"`
  27. // Status of the condition, one of True, False, Unknown.
  28. Status *v1.ConditionStatus `json:"status,omitempty"`
  29. // The last time this condition was updated.
  30. LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
  31. // Last time the condition transitioned from one status to another.
  32. LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
  33. // The reason for the condition's last transition.
  34. Reason *string `json:"reason,omitempty"`
  35. // A human readable message indicating details about the transition.
  36. Message *string `json:"message,omitempty"`
  37. }
  38. // DeploymentConditionApplyConfiguration constructs a declarative configuration of the DeploymentCondition type for use with
  39. // apply.
  40. func DeploymentCondition() *DeploymentConditionApplyConfiguration {
  41. return &DeploymentConditionApplyConfiguration{}
  42. }
  43. // WithType sets the Type field in the declarative configuration to the given value
  44. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  45. // If called multiple times, the Type field is set to the value of the last call.
  46. func (b *DeploymentConditionApplyConfiguration) WithType(value appsv1beta2.DeploymentConditionType) *DeploymentConditionApplyConfiguration {
  47. b.Type = &value
  48. return b
  49. }
  50. // WithStatus sets the Status field in the declarative configuration to the given value
  51. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  52. // If called multiple times, the Status field is set to the value of the last call.
  53. func (b *DeploymentConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *DeploymentConditionApplyConfiguration {
  54. b.Status = &value
  55. return b
  56. }
  57. // WithLastUpdateTime sets the LastUpdateTime field in the declarative configuration to the given value
  58. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  59. // If called multiple times, the LastUpdateTime field is set to the value of the last call.
  60. func (b *DeploymentConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *DeploymentConditionApplyConfiguration {
  61. b.LastUpdateTime = &value
  62. return b
  63. }
  64. // WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
  65. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  66. // If called multiple times, the LastTransitionTime field is set to the value of the last call.
  67. func (b *DeploymentConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *DeploymentConditionApplyConfiguration {
  68. b.LastTransitionTime = &value
  69. return b
  70. }
  71. // WithReason sets the Reason field in the declarative configuration to the given value
  72. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  73. // If called multiple times, the Reason field is set to the value of the last call.
  74. func (b *DeploymentConditionApplyConfiguration) WithReason(value string) *DeploymentConditionApplyConfiguration {
  75. b.Reason = &value
  76. return b
  77. }
  78. // WithMessage sets the Message field in the declarative configuration to the given value
  79. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  80. // If called multiple times, the Message field is set to the value of the last call.
  81. func (b *DeploymentConditionApplyConfiguration) WithMessage(value string) *DeploymentConditionApplyConfiguration {
  82. b.Message = &value
  83. return b
  84. }