...

Source file src/k8s.io/client-go/applyconfigurations/meta/v1/condition.go

Documentation: k8s.io/client-go/applyconfigurations/meta/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/apimachinery/pkg/apis/meta/v1"
    23  )
    24  
    25  // ConditionApplyConfiguration represents an declarative configuration of the Condition type for use
    26  // with apply.
    27  type ConditionApplyConfiguration struct {
    28  	Type               *string             `json:"type,omitempty"`
    29  	Status             *v1.ConditionStatus `json:"status,omitempty"`
    30  	ObservedGeneration *int64              `json:"observedGeneration,omitempty"`
    31  	LastTransitionTime *v1.Time            `json:"lastTransitionTime,omitempty"`
    32  	Reason             *string             `json:"reason,omitempty"`
    33  	Message            *string             `json:"message,omitempty"`
    34  }
    35  
    36  // ConditionApplyConfiguration constructs an declarative configuration of the Condition type for use with
    37  // apply.
    38  func Condition() *ConditionApplyConfiguration {
    39  	return &ConditionApplyConfiguration{}
    40  }
    41  
    42  // WithType sets the Type 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 Type field is set to the value of the last call.
    45  func (b *ConditionApplyConfiguration) WithType(value string) *ConditionApplyConfiguration {
    46  	b.Type = &value
    47  	return b
    48  }
    49  
    50  // WithStatus sets the Status 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 Status field is set to the value of the last call.
    53  func (b *ConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ConditionApplyConfiguration {
    54  	b.Status = &value
    55  	return b
    56  }
    57  
    58  // WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
    59  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    60  // If called multiple times, the ObservedGeneration field is set to the value of the last call.
    61  func (b *ConditionApplyConfiguration) WithObservedGeneration(value int64) *ConditionApplyConfiguration {
    62  	b.ObservedGeneration = &value
    63  	return b
    64  }
    65  
    66  // WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value
    67  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    68  // If called multiple times, the LastTransitionTime field is set to the value of the last call.
    69  func (b *ConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *ConditionApplyConfiguration {
    70  	b.LastTransitionTime = &value
    71  	return b
    72  }
    73  
    74  // WithReason sets the Reason field in the declarative configuration to the given value
    75  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    76  // If called multiple times, the Reason field is set to the value of the last call.
    77  func (b *ConditionApplyConfiguration) WithReason(value string) *ConditionApplyConfiguration {
    78  	b.Reason = &value
    79  	return b
    80  }
    81  
    82  // WithMessage sets the Message field in the declarative configuration to the given value
    83  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    84  // If called multiple times, the Message field is set to the value of the last call.
    85  func (b *ConditionApplyConfiguration) WithMessage(value string) *ConditionApplyConfiguration {
    86  	b.Message = &value
    87  	return b
    88  }
    89  

View as plain text