cronjobspec.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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 v1beta1
  15. import (
  16. v1beta1 "k8s.io/api/batch/v1beta1"
  17. )
  18. // CronJobSpecApplyConfiguration represents an declarative configuration of the CronJobSpec type for use
  19. // with apply.
  20. type CronJobSpecApplyConfiguration struct {
  21. Schedule *string `json:"schedule,omitempty"`
  22. TimeZone *string `json:"timeZone,omitempty"`
  23. StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"`
  24. ConcurrencyPolicy *v1beta1.ConcurrencyPolicy `json:"concurrencyPolicy,omitempty"`
  25. Suspend *bool `json:"suspend,omitempty"`
  26. JobTemplate *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"`
  27. SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"`
  28. FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"`
  29. }
  30. // CronJobSpecApplyConfiguration constructs an declarative configuration of the CronJobSpec type for use with
  31. // apply.
  32. func CronJobSpec() *CronJobSpecApplyConfiguration {
  33. return &CronJobSpecApplyConfiguration{}
  34. }
  35. // WithSchedule sets the Schedule 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 Schedule field is set to the value of the last call.
  38. func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecApplyConfiguration {
  39. b.Schedule = &value
  40. return b
  41. }
  42. // WithTimeZone sets the TimeZone 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 TimeZone field is set to the value of the last call.
  45. func (b *CronJobSpecApplyConfiguration) WithTimeZone(value string) *CronJobSpecApplyConfiguration {
  46. b.TimeZone = &value
  47. return b
  48. }
  49. // WithStartingDeadlineSeconds sets the StartingDeadlineSeconds 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 StartingDeadlineSeconds field is set to the value of the last call.
  52. func (b *CronJobSpecApplyConfiguration) WithStartingDeadlineSeconds(value int64) *CronJobSpecApplyConfiguration {
  53. b.StartingDeadlineSeconds = &value
  54. return b
  55. }
  56. // WithConcurrencyPolicy sets the ConcurrencyPolicy 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 ConcurrencyPolicy field is set to the value of the last call.
  59. func (b *CronJobSpecApplyConfiguration) WithConcurrencyPolicy(value v1beta1.ConcurrencyPolicy) *CronJobSpecApplyConfiguration {
  60. b.ConcurrencyPolicy = &value
  61. return b
  62. }
  63. // WithSuspend sets the Suspend 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 Suspend field is set to the value of the last call.
  66. func (b *CronJobSpecApplyConfiguration) WithSuspend(value bool) *CronJobSpecApplyConfiguration {
  67. b.Suspend = &value
  68. return b
  69. }
  70. // WithJobTemplate sets the JobTemplate 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 JobTemplate field is set to the value of the last call.
  73. func (b *CronJobSpecApplyConfiguration) WithJobTemplate(value *JobTemplateSpecApplyConfiguration) *CronJobSpecApplyConfiguration {
  74. b.JobTemplate = value
  75. return b
  76. }
  77. // WithSuccessfulJobsHistoryLimit sets the SuccessfulJobsHistoryLimit field in the declarative configuration to the given value
  78. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  79. // If called multiple times, the SuccessfulJobsHistoryLimit field is set to the value of the last call.
  80. func (b *CronJobSpecApplyConfiguration) WithSuccessfulJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration {
  81. b.SuccessfulJobsHistoryLimit = &value
  82. return b
  83. }
  84. // WithFailedJobsHistoryLimit sets the FailedJobsHistoryLimit field in the declarative configuration to the given value
  85. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  86. // If called multiple times, the FailedJobsHistoryLimit field is set to the value of the last call.
  87. func (b *CronJobSpecApplyConfiguration) WithFailedJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration {
  88. b.FailedJobsHistoryLimit = &value
  89. return b
  90. }