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/core/v1"
23)
24
25// LimitRangeItemApplyConfiguration represents an declarative configuration of the LimitRangeItem type for use
26// with apply.
27type LimitRangeItemApplyConfiguration struct {
28	Type                 *v1.LimitType    `json:"type,omitempty"`
29	Max                  *v1.ResourceList `json:"max,omitempty"`
30	Min                  *v1.ResourceList `json:"min,omitempty"`
31	Default              *v1.ResourceList `json:"default,omitempty"`
32	DefaultRequest       *v1.ResourceList `json:"defaultRequest,omitempty"`
33	MaxLimitRequestRatio *v1.ResourceList `json:"maxLimitRequestRatio,omitempty"`
34}
35
36// LimitRangeItemApplyConfiguration constructs an declarative configuration of the LimitRangeItem type for use with
37// apply.
38func LimitRangeItem() *LimitRangeItemApplyConfiguration {
39	return &LimitRangeItemApplyConfiguration{}
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.
45func (b *LimitRangeItemApplyConfiguration) WithType(value v1.LimitType) *LimitRangeItemApplyConfiguration {
46	b.Type = &value
47	return b
48}
49
50// WithMax sets the Max 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 Max field is set to the value of the last call.
53func (b *LimitRangeItemApplyConfiguration) WithMax(value v1.ResourceList) *LimitRangeItemApplyConfiguration {
54	b.Max = &value
55	return b
56}
57
58// WithMin sets the Min 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 Min field is set to the value of the last call.
61func (b *LimitRangeItemApplyConfiguration) WithMin(value v1.ResourceList) *LimitRangeItemApplyConfiguration {
62	b.Min = &value
63	return b
64}
65
66// WithDefault sets the Default 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 Default field is set to the value of the last call.
69func (b *LimitRangeItemApplyConfiguration) WithDefault(value v1.ResourceList) *LimitRangeItemApplyConfiguration {
70	b.Default = &value
71	return b
72}
73
74// WithDefaultRequest sets the DefaultRequest 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 DefaultRequest field is set to the value of the last call.
77func (b *LimitRangeItemApplyConfiguration) WithDefaultRequest(value v1.ResourceList) *LimitRangeItemApplyConfiguration {
78	b.DefaultRequest = &value
79	return b
80}
81
82// WithMaxLimitRequestRatio sets the MaxLimitRequestRatio 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 MaxLimitRequestRatio field is set to the value of the last call.
85func (b *LimitRangeItemApplyConfiguration) WithMaxLimitRequestRatio(value v1.ResourceList) *LimitRangeItemApplyConfiguration {
86	b.MaxLimitRequestRatio = &value
87	return b
88}
89