jobstatus.go 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  17. )
  18. // JobStatusApplyConfiguration represents an declarative configuration of the JobStatus type for use
  19. // with apply.
  20. type JobStatusApplyConfiguration struct {
  21. Conditions []JobConditionApplyConfiguration `json:"conditions,omitempty"`
  22. StartTime *metav1.Time `json:"startTime,omitempty"`
  23. CompletionTime *metav1.Time `json:"completionTime,omitempty"`
  24. Active *int32 `json:"active,omitempty"`
  25. Succeeded *int32 `json:"succeeded,omitempty"`
  26. Failed *int32 `json:"failed,omitempty"`
  27. CompletedIndexes *string `json:"completedIndexes,omitempty"`
  28. UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"`
  29. Ready *int32 `json:"ready,omitempty"`
  30. }
  31. // JobStatusApplyConfiguration constructs an declarative configuration of the JobStatus type for use with
  32. // apply.
  33. func JobStatus() *JobStatusApplyConfiguration {
  34. return &JobStatusApplyConfiguration{}
  35. }
  36. // WithConditions adds the given value to the Conditions field in the declarative configuration
  37. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  38. // If called multiple times, values provided by each call will be appended to the Conditions field.
  39. func (b *JobStatusApplyConfiguration) WithConditions(values ...*JobConditionApplyConfiguration) *JobStatusApplyConfiguration {
  40. for i := range values {
  41. if values[i] == nil {
  42. panic("nil value passed to WithConditions")
  43. }
  44. b.Conditions = append(b.Conditions, *values[i])
  45. }
  46. return b
  47. }
  48. // WithStartTime sets the StartTime 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 StartTime field is set to the value of the last call.
  51. func (b *JobStatusApplyConfiguration) WithStartTime(value metav1.Time) *JobStatusApplyConfiguration {
  52. b.StartTime = &value
  53. return b
  54. }
  55. // WithCompletionTime sets the CompletionTime 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 CompletionTime field is set to the value of the last call.
  58. func (b *JobStatusApplyConfiguration) WithCompletionTime(value metav1.Time) *JobStatusApplyConfiguration {
  59. b.CompletionTime = &value
  60. return b
  61. }
  62. // WithActive sets the Active 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 Active field is set to the value of the last call.
  65. func (b *JobStatusApplyConfiguration) WithActive(value int32) *JobStatusApplyConfiguration {
  66. b.Active = &value
  67. return b
  68. }
  69. // WithSucceeded sets the Succeeded field in the declarative configuration to the given value
  70. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  71. // If called multiple times, the Succeeded field is set to the value of the last call.
  72. func (b *JobStatusApplyConfiguration) WithSucceeded(value int32) *JobStatusApplyConfiguration {
  73. b.Succeeded = &value
  74. return b
  75. }
  76. // WithFailed sets the Failed field in the declarative configuration to the given value
  77. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  78. // If called multiple times, the Failed field is set to the value of the last call.
  79. func (b *JobStatusApplyConfiguration) WithFailed(value int32) *JobStatusApplyConfiguration {
  80. b.Failed = &value
  81. return b
  82. }
  83. // WithCompletedIndexes sets the CompletedIndexes field in the declarative configuration to the given value
  84. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  85. // If called multiple times, the CompletedIndexes field is set to the value of the last call.
  86. func (b *JobStatusApplyConfiguration) WithCompletedIndexes(value string) *JobStatusApplyConfiguration {
  87. b.CompletedIndexes = &value
  88. return b
  89. }
  90. // WithUncountedTerminatedPods sets the UncountedTerminatedPods field in the declarative configuration to the given value
  91. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  92. // If called multiple times, the UncountedTerminatedPods field is set to the value of the last call.
  93. func (b *JobStatusApplyConfiguration) WithUncountedTerminatedPods(value *UncountedTerminatedPodsApplyConfiguration) *JobStatusApplyConfiguration {
  94. b.UncountedTerminatedPods = value
  95. return b
  96. }
  97. // WithReady sets the Ready field in the declarative configuration to the given value
  98. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  99. // If called multiple times, the Ready field is set to the value of the last call.
  100. func (b *JobStatusApplyConfiguration) WithReady(value int32) *JobStatusApplyConfiguration {
  101. b.Ready = &value
  102. return b
  103. }