...

Source file src/k8s.io/client-go/applyconfigurations/batch/v1/cronjobspec.go

Documentation: k8s.io/client-go/applyconfigurations/batch/v1

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

View as plain text