Use code-generator v1.29.1 for code-generation (#2908)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
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 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// EnvironmentSpecApplyConfiguration represents an declarative configuration of the EnvironmentSpec type for use
|
||||
// with apply.
|
||||
type EnvironmentSpecApplyConfiguration struct {
|
||||
Version *int `json:"version,omitempty"`
|
||||
Runtime *RuntimeApplyConfiguration `json:"runtime,omitempty"`
|
||||
Builder *BuilderApplyConfiguration `json:"builder,omitempty"`
|
||||
AllowedFunctionsPerContainer *corev1.AllowedFunctionsPerContainer `json:"allowedFunctionsPerContainer,omitempty"`
|
||||
AllowAccessToExternalNetwork *bool `json:"allowAccessToExternalNetwork,omitempty"`
|
||||
Resources *apicorev1.ResourceRequirements `json:"resources,omitempty"`
|
||||
Poolsize *int `json:"poolsize,omitempty"`
|
||||
TerminationGracePeriod *int64 `json:"terminationGracePeriod,omitempty"`
|
||||
KeepArchive *bool `json:"keeparchive,omitempty"`
|
||||
ImagePullSecret *string `json:"imagepullsecret,omitempty"`
|
||||
}
|
||||
|
||||
// EnvironmentSpecApplyConfiguration constructs an declarative configuration of the EnvironmentSpec type for use with
|
||||
// apply.
|
||||
func EnvironmentSpec() *EnvironmentSpecApplyConfiguration {
|
||||
return &EnvironmentSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithVersion sets the Version 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 Version field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithVersion(value int) *EnvironmentSpecApplyConfiguration {
|
||||
b.Version = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRuntime sets the Runtime 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 Runtime field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithRuntime(value *RuntimeApplyConfiguration) *EnvironmentSpecApplyConfiguration {
|
||||
b.Runtime = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithBuilder sets the Builder 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 Builder field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithBuilder(value *BuilderApplyConfiguration) *EnvironmentSpecApplyConfiguration {
|
||||
b.Builder = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowedFunctionsPerContainer sets the AllowedFunctionsPerContainer 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 AllowedFunctionsPerContainer field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithAllowedFunctionsPerContainer(value corev1.AllowedFunctionsPerContainer) *EnvironmentSpecApplyConfiguration {
|
||||
b.AllowedFunctionsPerContainer = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowAccessToExternalNetwork sets the AllowAccessToExternalNetwork 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 AllowAccessToExternalNetwork field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithAllowAccessToExternalNetwork(value bool) *EnvironmentSpecApplyConfiguration {
|
||||
b.AllowAccessToExternalNetwork = &value
|
||||
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 *EnvironmentSpecApplyConfiguration) WithResources(value apicorev1.ResourceRequirements) *EnvironmentSpecApplyConfiguration {
|
||||
b.Resources = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPoolsize sets the Poolsize 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 Poolsize field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithPoolsize(value int) *EnvironmentSpecApplyConfiguration {
|
||||
b.Poolsize = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTerminationGracePeriod sets the TerminationGracePeriod 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 TerminationGracePeriod field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithTerminationGracePeriod(value int64) *EnvironmentSpecApplyConfiguration {
|
||||
b.TerminationGracePeriod = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithKeepArchive sets the KeepArchive 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 KeepArchive field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithKeepArchive(value bool) *EnvironmentSpecApplyConfiguration {
|
||||
b.KeepArchive = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImagePullSecret sets the ImagePullSecret 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 ImagePullSecret field is set to the value of the last call.
|
||||
func (b *EnvironmentSpecApplyConfiguration) WithImagePullSecret(value string) *EnvironmentSpecApplyConfiguration {
|
||||
b.ImagePullSecret = &value
|
||||
return b
|
||||
}
|
||||
Reference in New Issue
Block a user