jobstatus.go 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. Terminating *int32 `json:"terminating,omitempty"`
  28. CompletedIndexes *string `json:"completedIndexes,omitempty"`
  29. FailedIndexes *string `json:"failedIndexes,omitempty"`
  30. UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"`
  31. Ready *int32 `json:"ready,omitempty"`
  32. }
  33. // JobStatusApplyConfiguration constructs an declarative configuration of the JobStatus type for use with
  34. // apply.
  35. func JobStatus() *JobStatusApplyConfiguration {
  36. return &JobStatusApplyConfiguration{}
  37. }
  38. // WithConditions adds the given value to the Conditions field in the declarative configuration
  39. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  40. // If called multiple times, values provided by each call will be appended to the Conditions field.
  41. func (b *JobStatusApplyConfiguration) WithConditions(values ...*JobConditionApplyConfiguration) *JobStatusApplyConfiguration {
  42. for i := range values {
  43. if values[i] == nil {
  44. panic("nil value passed to WithConditions")
  45. }
  46. b.Conditions = append(b.Conditions, *values[i])
  47. }
  48. return b
  49. }
  50. // WithStartTime sets the StartTime 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 StartTime field is set to the value of the last call.
  53. func (b *JobStatusApplyConfiguration) WithStartTime(value metav1.Time) *JobStatusApplyConfiguration {
  54. b.StartTime = &value
  55. return b
  56. }
  57. // WithCompletionTime sets the CompletionTime 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 CompletionTime field is set to the value of the last call.
  60. func (b *JobStatusApplyConfiguration) WithCompletionTime(value metav1.Time) *JobStatusApplyConfiguration {
  61. b.CompletionTime = &value
  62. return b
  63. }
  64. // WithActive sets the Active 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 Active field is set to the value of the last call.
  67. func (b *JobStatusApplyConfiguration) WithActive(value int32) *JobStatusApplyConfiguration {
  68. b.Active = &value
  69. return b
  70. }
  71. // WithSucceeded sets the Succeeded 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 Succeeded field is set to the value of the last call.
  74. func (b *JobStatusApplyConfiguration) WithSucceeded(value int32) *JobStatusApplyConfiguration {
  75. b.Succeeded = &value
  76. return b
  77. }
  78. // WithFailed sets the Failed 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 Failed field is set to the value of the last call.
  81. func (b *JobStatusApplyConfiguration) WithFailed(value int32) *JobStatusApplyConfiguration {
  82. b.Failed = &value
  83. return b
  84. }
  85. // WithTerminating sets the Terminating field in the declarative configuration to the given value
  86. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  87. // If called multiple times, the Terminating field is set to the value of the last call.
  88. func (b *JobStatusApplyConfiguration) WithTerminating(value int32) *JobStatusApplyConfiguration {
  89. b.Terminating = &value
  90. return b
  91. }
  92. // WithCompletedIndexes sets the CompletedIndexes field in the declarative configuration to the given value
  93. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  94. // If called multiple times, the CompletedIndexes field is set to the value of the last call.
  95. func (b *JobStatusApplyConfiguration) WithCompletedIndexes(value string) *JobStatusApplyConfiguration {
  96. b.CompletedIndexes = &value
  97. return b
  98. }
  99. // WithFailedIndexes sets the FailedIndexes field in the declarative configuration to the given value
  100. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  101. // If called multiple times, the FailedIndexes field is set to the value of the last call.
  102. func (b *JobStatusApplyConfiguration) WithFailedIndexes(value string) *JobStatusApplyConfiguration {
  103. b.FailedIndexes = &value
  104. return b
  105. }
  106. // WithUncountedTerminatedPods sets the UncountedTerminatedPods field in the declarative configuration to the given value
  107. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  108. // If called multiple times, the UncountedTerminatedPods field is set to the value of the last call.
  109. func (b *JobStatusApplyConfiguration) WithUncountedTerminatedPods(value *UncountedTerminatedPodsApplyConfiguration) *JobStatusApplyConfiguration {
  110. b.UncountedTerminatedPods = value
  111. return b
  112. }
  113. // WithReady sets the Ready field in the declarative configuration to the given value
  114. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  115. // If called multiple times, the Ready field is set to the value of the last call.
  116. func (b *JobStatusApplyConfiguration) WithReady(value int32) *JobStatusApplyConfiguration {
  117. b.Ready = &value
  118. return b
  119. }