cronjobstatus.go 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. v1 "k8s.io/client-go/applyconfigurations/core/v1"
  18. )
  19. // CronJobStatusApplyConfiguration represents an declarative configuration of the CronJobStatus type for use
  20. // with apply.
  21. type CronJobStatusApplyConfiguration struct {
  22. Active []v1.ObjectReferenceApplyConfiguration `json:"active,omitempty"`
  23. LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"`
  24. LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"`
  25. }
  26. // CronJobStatusApplyConfiguration constructs an declarative configuration of the CronJobStatus type for use with
  27. // apply.
  28. func CronJobStatus() *CronJobStatusApplyConfiguration {
  29. return &CronJobStatusApplyConfiguration{}
  30. }
  31. // WithActive adds the given value to the Active field in the declarative configuration
  32. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  33. // If called multiple times, values provided by each call will be appended to the Active field.
  34. func (b *CronJobStatusApplyConfiguration) WithActive(values ...*v1.ObjectReferenceApplyConfiguration) *CronJobStatusApplyConfiguration {
  35. for i := range values {
  36. if values[i] == nil {
  37. panic("nil value passed to WithActive")
  38. }
  39. b.Active = append(b.Active, *values[i])
  40. }
  41. return b
  42. }
  43. // WithLastScheduleTime sets the LastScheduleTime 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 LastScheduleTime field is set to the value of the last call.
  46. func (b *CronJobStatusApplyConfiguration) WithLastScheduleTime(value metav1.Time) *CronJobStatusApplyConfiguration {
  47. b.LastScheduleTime = &value
  48. return b
  49. }
  50. // WithLastSuccessfulTime sets the LastSuccessfulTime 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 LastSuccessfulTime field is set to the value of the last call.
  53. func (b *CronJobStatusApplyConfiguration) WithLastSuccessfulTime(value metav1.Time) *CronJobStatusApplyConfiguration {
  54. b.LastSuccessfulTime = &value
  55. return b
  56. }