sigs.k8s.io/kueue@v0.6.2/client-go/applyconfiguration/kueue/v1beta1/admissioncheckstate.go (about)

     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  // Code generated by applyconfiguration-gen. DO NOT EDIT.
    17  
    18  package v1beta1
    19  
    20  import (
    21  	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    22  	v1beta1 "sigs.k8s.io/kueue/apis/kueue/v1beta1"
    23  )
    24  
    25  // AdmissionCheckStateApplyConfiguration represents an declarative configuration of the AdmissionCheckState type for use
    26  // with apply.
    27  type AdmissionCheckStateApplyConfiguration struct {
    28  	Name               *string                          `json:"name,omitempty"`
    29  	State              *v1beta1.CheckState              `json:"state,omitempty"`
    30  	LastTransitionTime *v1.Time                         `json:"lastTransitionTime,omitempty"`
    31  	Message            *string                          `json:"message,omitempty"`
    32  	PodSetUpdates      []PodSetUpdateApplyConfiguration `json:"podSetUpdates,omitempty"`
    33  }
    34  
    35  // AdmissionCheckStateApplyConfiguration constructs an declarative configuration of the AdmissionCheckState type for use with
    36  // apply.
    37  func AdmissionCheckState() *AdmissionCheckStateApplyConfiguration {
    38  	return &AdmissionCheckStateApplyConfiguration{}
    39  }
    40  
    41  // WithName sets the Name field in the declarative configuration to the given value
    42  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    43  // If called multiple times, the Name field is set to the value of the last call.
    44  func (b *AdmissionCheckStateApplyConfiguration) WithName(value string) *AdmissionCheckStateApplyConfiguration {
    45  	b.Name = &value
    46  	return b
    47  }
    48  
    49  // WithState sets the State 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 State field is set to the value of the last call.
    52  func (b *AdmissionCheckStateApplyConfiguration) WithState(value v1beta1.CheckState) *AdmissionCheckStateApplyConfiguration {
    53  	b.State = &value
    54  	return b
    55  }
    56  
    57  // WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call.
    60  func (b *AdmissionCheckStateApplyConfiguration) WithLastTransitionTime(value v1.Time) *AdmissionCheckStateApplyConfiguration {
    61  	b.LastTransitionTime = &value
    62  	return b
    63  }
    64  
    65  // WithMessage sets the Message field in the declarative configuration to the given value
    66  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    67  // If called multiple times, the Message field is set to the value of the last call.
    68  func (b *AdmissionCheckStateApplyConfiguration) WithMessage(value string) *AdmissionCheckStateApplyConfiguration {
    69  	b.Message = &value
    70  	return b
    71  }
    72  
    73  // WithPodSetUpdates adds the given value to the PodSetUpdates field in the declarative configuration
    74  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    75  // If called multiple times, values provided by each call will be appended to the PodSetUpdates field.
    76  func (b *AdmissionCheckStateApplyConfiguration) WithPodSetUpdates(values ...*PodSetUpdateApplyConfiguration) *AdmissionCheckStateApplyConfiguration {
    77  	for i := range values {
    78  		if values[i] == nil {
    79  			panic("nil value passed to WithPodSetUpdates")
    80  		}
    81  		b.PodSetUpdates = append(b.PodSetUpdates, *values[i])
    82  	}
    83  	return b
    84  }