1/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Code generated by applyconfiguration-gen. DO NOT EDIT.
18
19package v1
20
21import (
22	v1 "k8s.io/api/batch/v1"
23)
24
25// CronJobSpecApplyConfiguration represents an declarative configuration of the CronJobSpec type for use
26// with apply.
27type CronJobSpecApplyConfiguration struct {
28	Schedule                   *string                            `json:"schedule,omitempty"`
29	StartingDeadlineSeconds    *int64                             `json:"startingDeadlineSeconds,omitempty"`
30	ConcurrencyPolicy          *v1.ConcurrencyPolicy              `json:"concurrencyPolicy,omitempty"`
31	Suspend                    *bool                              `json:"suspend,omitempty"`
32	JobTemplate                *JobTemplateSpecApplyConfiguration `json:"jobTemplate,omitempty"`
33	SuccessfulJobsHistoryLimit *int32                             `json:"successfulJobsHistoryLimit,omitempty"`
34	FailedJobsHistoryLimit     *int32                             `json:"failedJobsHistoryLimit,omitempty"`
35}
36
37// CronJobSpecApplyConfiguration constructs an declarative configuration of the CronJobSpec type for use with
38// apply.
39func CronJobSpec() *CronJobSpecApplyConfiguration {
40	return &CronJobSpecApplyConfiguration{}
41}
42
43// WithSchedule sets the Schedule 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 Schedule field is set to the value of the last call.
46func (b *CronJobSpecApplyConfiguration) WithSchedule(value string) *CronJobSpecApplyConfiguration {
47	b.Schedule = &value
48	return b
49}
50
51// WithStartingDeadlineSeconds sets the StartingDeadlineSeconds field in the declarative configuration to the given value
52// and returns the receiver, so that objects can be built by chaining "With" function invocations.
53// If called multiple times, the StartingDeadlineSeconds field is set to the value of the last call.
54func (b *CronJobSpecApplyConfiguration) WithStartingDeadlineSeconds(value int64) *CronJobSpecApplyConfiguration {
55	b.StartingDeadlineSeconds = &value
56	return b
57}
58
59// WithConcurrencyPolicy sets the ConcurrencyPolicy field in the declarative configuration to the given value
60// and returns the receiver, so that objects can be built by chaining "With" function invocations.
61// If called multiple times, the ConcurrencyPolicy field is set to the value of the last call.
62func (b *CronJobSpecApplyConfiguration) WithConcurrencyPolicy(value v1.ConcurrencyPolicy) *CronJobSpecApplyConfiguration {
63	b.ConcurrencyPolicy = &value
64	return b
65}
66
67// WithSuspend sets the Suspend field in the declarative configuration to the given value
68// and returns the receiver, so that objects can be built by chaining "With" function invocations.
69// If called multiple times, the Suspend field is set to the value of the last call.
70func (b *CronJobSpecApplyConfiguration) WithSuspend(value bool) *CronJobSpecApplyConfiguration {
71	b.Suspend = &value
72	return b
73}
74
75// WithJobTemplate sets the JobTemplate field in the declarative configuration to the given value
76// and returns the receiver, so that objects can be built by chaining "With" function invocations.
77// If called multiple times, the JobTemplate field is set to the value of the last call.
78func (b *CronJobSpecApplyConfiguration) WithJobTemplate(value *JobTemplateSpecApplyConfiguration) *CronJobSpecApplyConfiguration {
79	b.JobTemplate = value
80	return b
81}
82
83// WithSuccessfulJobsHistoryLimit sets the SuccessfulJobsHistoryLimit 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 SuccessfulJobsHistoryLimit field is set to the value of the last call.
86func (b *CronJobSpecApplyConfiguration) WithSuccessfulJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration {
87	b.SuccessfulJobsHistoryLimit = &value
88	return b
89}
90
91// WithFailedJobsHistoryLimit sets the FailedJobsHistoryLimit field in the declarative configuration to the given value
92// and returns the receiver, so that objects can be built by chaining "With" function invocations.
93// If called multiple times, the FailedJobsHistoryLimit field is set to the value of the last call.
94func (b *CronJobSpecApplyConfiguration) WithFailedJobsHistoryLimit(value int32) *CronJobSpecApplyConfiguration {
95	b.FailedJobsHistoryLimit = &value
96	return b
97}
98