Files
fission-src/pkg/generated/applyconfiguration/core/v1/functionspec.go
T
Sanket SudakeandGitHub 15857b02d9 Use typed rate limiting queue (#3028)
* Use typed rate limiting queue
* update skaffold version
* Update code-generator to 1.31

---------

Signed-off-by: Sanket <sanketsudake@gmail.com>
2024-10-01 12:05:55 +05:30

162 lines
8.0 KiB
Go

/*
Copyright The Fission Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
import (
corev1 "k8s.io/api/core/v1"
)
// FunctionSpecApplyConfiguration represents a declarative configuration of the FunctionSpec type for use
// with apply.
type FunctionSpecApplyConfiguration struct {
Environment *EnvironmentReferenceApplyConfiguration `json:"environment,omitempty"`
Package *FunctionPackageRefApplyConfiguration `json:"package,omitempty"`
Secrets []SecretReferenceApplyConfiguration `json:"secrets,omitempty"`
ConfigMaps []ConfigMapReferenceApplyConfiguration `json:"configmaps,omitempty"`
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
InvokeStrategy *InvokeStrategyApplyConfiguration `json:"InvokeStrategy,omitempty"`
FunctionTimeout *int `json:"functionTimeout,omitempty"`
IdleTimeout *int `json:"idletimeout,omitempty"`
Concurrency *int `json:"concurrency,omitempty"`
RequestsPerPod *int `json:"requestsPerPod,omitempty"`
OnceOnly *bool `json:"onceOnly,omitempty"`
RetainPods *int `json:"retainPods,omitempty"`
PodSpec *corev1.PodSpec `json:"podspec,omitempty"`
}
// FunctionSpecApplyConfiguration constructs a declarative configuration of the FunctionSpec type for use with
// apply.
func FunctionSpec() *FunctionSpecApplyConfiguration {
return &FunctionSpecApplyConfiguration{}
}
// WithEnvironment sets the Environment field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Environment field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithEnvironment(value *EnvironmentReferenceApplyConfiguration) *FunctionSpecApplyConfiguration {
b.Environment = value
return b
}
// WithPackage sets the Package field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Package field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithPackage(value *FunctionPackageRefApplyConfiguration) *FunctionSpecApplyConfiguration {
b.Package = value
return b
}
// WithSecrets adds the given value to the Secrets field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Secrets field.
func (b *FunctionSpecApplyConfiguration) WithSecrets(values ...*SecretReferenceApplyConfiguration) *FunctionSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithSecrets")
}
b.Secrets = append(b.Secrets, *values[i])
}
return b
}
// WithConfigMaps adds the given value to the ConfigMaps field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ConfigMaps field.
func (b *FunctionSpecApplyConfiguration) WithConfigMaps(values ...*ConfigMapReferenceApplyConfiguration) *FunctionSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConfigMaps")
}
b.ConfigMaps = append(b.ConfigMaps, *values[i])
}
return b
}
// WithResources sets the Resources field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Resources field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithResources(value corev1.ResourceRequirements) *FunctionSpecApplyConfiguration {
b.Resources = &value
return b
}
// WithInvokeStrategy sets the InvokeStrategy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the InvokeStrategy field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithInvokeStrategy(value *InvokeStrategyApplyConfiguration) *FunctionSpecApplyConfiguration {
b.InvokeStrategy = value
return b
}
// WithFunctionTimeout sets the FunctionTimeout field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the FunctionTimeout field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithFunctionTimeout(value int) *FunctionSpecApplyConfiguration {
b.FunctionTimeout = &value
return b
}
// WithIdleTimeout sets the IdleTimeout field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the IdleTimeout field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithIdleTimeout(value int) *FunctionSpecApplyConfiguration {
b.IdleTimeout = &value
return b
}
// WithConcurrency sets the Concurrency field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Concurrency field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithConcurrency(value int) *FunctionSpecApplyConfiguration {
b.Concurrency = &value
return b
}
// WithRequestsPerPod sets the RequestsPerPod field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the RequestsPerPod field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithRequestsPerPod(value int) *FunctionSpecApplyConfiguration {
b.RequestsPerPod = &value
return b
}
// WithOnceOnly sets the OnceOnly field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the OnceOnly field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithOnceOnly(value bool) *FunctionSpecApplyConfiguration {
b.OnceOnly = &value
return b
}
// WithRetainPods sets the RetainPods field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the RetainPods field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithRetainPods(value int) *FunctionSpecApplyConfiguration {
b.RetainPods = &value
return b
}
// WithPodSpec sets the PodSpec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PodSpec field is set to the value of the last call.
func (b *FunctionSpecApplyConfiguration) WithPodSpec(value corev1.PodSpec) *FunctionSpecApplyConfiguration {
b.PodSpec = &value
return b
}