jobcondition.go 4.0 KB

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