Use code-generator v1.29.1 for code-generation (#2908)

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2024-02-06 14:00:16 +05:30
committed by GitHub
parent dcecb10e6c
commit 579d46cc1b
57 changed files with 4991 additions and 253 deletions
@@ -0,0 +1,72 @@
/*
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 (
v1 "github.com/fission/fission/pkg/apis/core/v1"
)
// ArchiveApplyConfiguration represents an declarative configuration of the Archive type for use
// with apply.
type ArchiveApplyConfiguration struct {
Type *v1.ArchiveType `json:"type,omitempty"`
Literal []byte `json:"literal,omitempty"`
URL *string `json:"url,omitempty"`
Checksum *ChecksumApplyConfiguration `json:"checksum,omitempty"`
}
// ArchiveApplyConfiguration constructs an declarative configuration of the Archive type for use with
// apply.
func Archive() *ArchiveApplyConfiguration {
return &ArchiveApplyConfiguration{}
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *ArchiveApplyConfiguration) WithType(value v1.ArchiveType) *ArchiveApplyConfiguration {
b.Type = &value
return b
}
// WithLiteral adds the given value to the Literal 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 Literal field.
func (b *ArchiveApplyConfiguration) WithLiteral(values ...byte) *ArchiveApplyConfiguration {
for i := range values {
b.Literal = append(b.Literal, values[i])
}
return b
}
// WithURL sets the URL 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 URL field is set to the value of the last call.
func (b *ArchiveApplyConfiguration) WithURL(value string) *ArchiveApplyConfiguration {
b.URL = &value
return b
}
// WithChecksum sets the Checksum 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 Checksum field is set to the value of the last call.
func (b *ArchiveApplyConfiguration) WithChecksum(value *ChecksumApplyConfiguration) *ArchiveApplyConfiguration {
b.Checksum = value
return b
}
@@ -0,0 +1,70 @@
/*
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 (
v1 "k8s.io/api/core/v1"
)
// BuilderApplyConfiguration represents an declarative configuration of the Builder type for use
// with apply.
type BuilderApplyConfiguration struct {
Image *string `json:"image,omitempty"`
Command *string `json:"command,omitempty"`
Container *v1.Container `json:"container,omitempty"`
PodSpec *v1.PodSpec `json:"podspec,omitempty"`
}
// BuilderApplyConfiguration constructs an declarative configuration of the Builder type for use with
// apply.
func Builder() *BuilderApplyConfiguration {
return &BuilderApplyConfiguration{}
}
// WithImage sets the Image 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 Image field is set to the value of the last call.
func (b *BuilderApplyConfiguration) WithImage(value string) *BuilderApplyConfiguration {
b.Image = &value
return b
}
// WithCommand sets the Command 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 Command field is set to the value of the last call.
func (b *BuilderApplyConfiguration) WithCommand(value string) *BuilderApplyConfiguration {
b.Command = &value
return b
}
// WithContainer sets the Container 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 Container field is set to the value of the last call.
func (b *BuilderApplyConfiguration) WithContainer(value v1.Container) *BuilderApplyConfiguration {
b.Container = &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 *BuilderApplyConfiguration) WithPodSpec(value v1.PodSpec) *BuilderApplyConfiguration {
b.PodSpec = &value
return b
}
@@ -0,0 +1,219 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// CanaryConfigApplyConfiguration represents an declarative configuration of the CanaryConfig type for use
// with apply.
type CanaryConfigApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *CanaryConfigSpecApplyConfiguration `json:"spec,omitempty"`
Status *CanaryConfigStatusApplyConfiguration `json:"status,omitempty"`
}
// CanaryConfig constructs an declarative configuration of the CanaryConfig type for use with
// apply.
func CanaryConfig(name, namespace string) *CanaryConfigApplyConfiguration {
b := &CanaryConfigApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("CanaryConfig")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithKind(value string) *CanaryConfigApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithAPIVersion(value string) *CanaryConfigApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithName(value string) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithGenerateName(value string) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithNamespace(value string) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithUID(value types.UID) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithResourceVersion(value string) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithGeneration(value int64) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *CanaryConfigApplyConfiguration) WithLabels(entries map[string]string) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *CanaryConfigApplyConfiguration) WithAnnotations(entries map[string]string) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *CanaryConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *CanaryConfigApplyConfiguration) WithFinalizers(values ...string) *CanaryConfigApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *CanaryConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithSpec(value *CanaryConfigSpecApplyConfiguration) *CanaryConfigApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status 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 Status field is set to the value of the last call.
func (b *CanaryConfigApplyConfiguration) WithStatus(value *CanaryConfigStatusApplyConfiguration) *CanaryConfigApplyConfiguration {
b.Status = value
return b
}
@@ -0,0 +1,97 @@
/*
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 (
v1 "github.com/fission/fission/pkg/apis/core/v1"
)
// CanaryConfigSpecApplyConfiguration represents an declarative configuration of the CanaryConfigSpec type for use
// with apply.
type CanaryConfigSpecApplyConfiguration struct {
Trigger *string `json:"trigger,omitempty"`
NewFunction *string `json:"newfunction,omitempty"`
OldFunction *string `json:"oldfunction,omitempty"`
WeightIncrement *int `json:"weightincrement,omitempty"`
WeightIncrementDuration *string `json:"duration,omitempty"`
FailureThreshold *int `json:"failurethreshold,omitempty"`
FailureType *v1.FailureType `json:"failureType,omitempty"`
}
// CanaryConfigSpecApplyConfiguration constructs an declarative configuration of the CanaryConfigSpec type for use with
// apply.
func CanaryConfigSpec() *CanaryConfigSpecApplyConfiguration {
return &CanaryConfigSpecApplyConfiguration{}
}
// WithTrigger sets the Trigger 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 Trigger field is set to the value of the last call.
func (b *CanaryConfigSpecApplyConfiguration) WithTrigger(value string) *CanaryConfigSpecApplyConfiguration {
b.Trigger = &value
return b
}
// WithNewFunction sets the NewFunction 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 NewFunction field is set to the value of the last call.
func (b *CanaryConfigSpecApplyConfiguration) WithNewFunction(value string) *CanaryConfigSpecApplyConfiguration {
b.NewFunction = &value
return b
}
// WithOldFunction sets the OldFunction 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 OldFunction field is set to the value of the last call.
func (b *CanaryConfigSpecApplyConfiguration) WithOldFunction(value string) *CanaryConfigSpecApplyConfiguration {
b.OldFunction = &value
return b
}
// WithWeightIncrement sets the WeightIncrement 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 WeightIncrement field is set to the value of the last call.
func (b *CanaryConfigSpecApplyConfiguration) WithWeightIncrement(value int) *CanaryConfigSpecApplyConfiguration {
b.WeightIncrement = &value
return b
}
// WithWeightIncrementDuration sets the WeightIncrementDuration 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 WeightIncrementDuration field is set to the value of the last call.
func (b *CanaryConfigSpecApplyConfiguration) WithWeightIncrementDuration(value string) *CanaryConfigSpecApplyConfiguration {
b.WeightIncrementDuration = &value
return b
}
// WithFailureThreshold sets the FailureThreshold 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 FailureThreshold field is set to the value of the last call.
func (b *CanaryConfigSpecApplyConfiguration) WithFailureThreshold(value int) *CanaryConfigSpecApplyConfiguration {
b.FailureThreshold = &value
return b
}
// WithFailureType sets the FailureType 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 FailureType field is set to the value of the last call.
func (b *CanaryConfigSpecApplyConfiguration) WithFailureType(value v1.FailureType) *CanaryConfigSpecApplyConfiguration {
b.FailureType = &value
return b
}
@@ -0,0 +1,39 @@
/*
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
// CanaryConfigStatusApplyConfiguration represents an declarative configuration of the CanaryConfigStatus type for use
// with apply.
type CanaryConfigStatusApplyConfiguration struct {
Status *string `json:"status,omitempty"`
}
// CanaryConfigStatusApplyConfiguration constructs an declarative configuration of the CanaryConfigStatus type for use with
// apply.
func CanaryConfigStatus() *CanaryConfigStatusApplyConfiguration {
return &CanaryConfigStatusApplyConfiguration{}
}
// WithStatus sets the Status 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 Status field is set to the value of the last call.
func (b *CanaryConfigStatusApplyConfiguration) WithStatus(value string) *CanaryConfigStatusApplyConfiguration {
b.Status = &value
return b
}
@@ -0,0 +1,52 @@
/*
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 (
v1 "github.com/fission/fission/pkg/apis/core/v1"
)
// ChecksumApplyConfiguration represents an declarative configuration of the Checksum type for use
// with apply.
type ChecksumApplyConfiguration struct {
Type *v1.ChecksumType `json:"type,omitempty"`
Sum *string `json:"sum,omitempty"`
}
// ChecksumApplyConfiguration constructs an declarative configuration of the Checksum type for use with
// apply.
func Checksum() *ChecksumApplyConfiguration {
return &ChecksumApplyConfiguration{}
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *ChecksumApplyConfiguration) WithType(value v1.ChecksumType) *ChecksumApplyConfiguration {
b.Type = &value
return b
}
// WithSum sets the Sum 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 Sum field is set to the value of the last call.
func (b *ChecksumApplyConfiguration) WithSum(value string) *ChecksumApplyConfiguration {
b.Sum = &value
return b
}
@@ -0,0 +1,48 @@
/*
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
// ConfigMapReferenceApplyConfiguration represents an declarative configuration of the ConfigMapReference type for use
// with apply.
type ConfigMapReferenceApplyConfiguration struct {
Namespace *string `json:"namespace,omitempty"`
Name *string `json:"name,omitempty"`
}
// ConfigMapReferenceApplyConfiguration constructs an declarative configuration of the ConfigMapReference type for use with
// apply.
func ConfigMapReference() *ConfigMapReferenceApplyConfiguration {
return &ConfigMapReferenceApplyConfiguration{}
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *ConfigMapReferenceApplyConfiguration) WithNamespace(value string) *ConfigMapReferenceApplyConfiguration {
b.Namespace = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ConfigMapReferenceApplyConfiguration) WithName(value string) *ConfigMapReferenceApplyConfiguration {
b.Name = &value
return b
}
@@ -0,0 +1,210 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// EnvironmentApplyConfiguration represents an declarative configuration of the Environment type for use
// with apply.
type EnvironmentApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *EnvironmentSpecApplyConfiguration `json:"spec,omitempty"`
}
// Environment constructs an declarative configuration of the Environment type for use with
// apply.
func Environment(name, namespace string) *EnvironmentApplyConfiguration {
b := &EnvironmentApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("Environment")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithKind(value string) *EnvironmentApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithAPIVersion(value string) *EnvironmentApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithName(value string) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithGenerateName(value string) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithNamespace(value string) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithUID(value types.UID) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithResourceVersion(value string) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithGeneration(value int64) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithCreationTimestamp(value metav1.Time) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *EnvironmentApplyConfiguration) WithLabels(entries map[string]string) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *EnvironmentApplyConfiguration) WithAnnotations(entries map[string]string) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *EnvironmentApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *EnvironmentApplyConfiguration) WithFinalizers(values ...string) *EnvironmentApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *EnvironmentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *EnvironmentApplyConfiguration) WithSpec(value *EnvironmentSpecApplyConfiguration) *EnvironmentApplyConfiguration {
b.Spec = value
return b
}
@@ -0,0 +1,48 @@
/*
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
// EnvironmentReferenceApplyConfiguration represents an declarative configuration of the EnvironmentReference type for use
// with apply.
type EnvironmentReferenceApplyConfiguration struct {
Namespace *string `json:"namespace,omitempty"`
Name *string `json:"name,omitempty"`
}
// EnvironmentReferenceApplyConfiguration constructs an declarative configuration of the EnvironmentReference type for use with
// apply.
func EnvironmentReference() *EnvironmentReferenceApplyConfiguration {
return &EnvironmentReferenceApplyConfiguration{}
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *EnvironmentReferenceApplyConfiguration) WithNamespace(value string) *EnvironmentReferenceApplyConfiguration {
b.Namespace = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *EnvironmentReferenceApplyConfiguration) WithName(value string) *EnvironmentReferenceApplyConfiguration {
b.Name = &value
return b
}
@@ -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
}
@@ -0,0 +1,100 @@
/*
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 (
v1 "github.com/fission/fission/pkg/apis/core/v1"
v2 "k8s.io/api/autoscaling/v2"
)
// ExecutionStrategyApplyConfiguration represents an declarative configuration of the ExecutionStrategy type for use
// with apply.
type ExecutionStrategyApplyConfiguration struct {
ExecutorType *v1.ExecutorType `json:"ExecutorType,omitempty"`
MinScale *int `json:"MinScale,omitempty"`
MaxScale *int `json:"MaxScale,omitempty"`
TargetCPUPercent *int `json:"TargetCPUPercent,omitempty"`
SpecializationTimeout *int `json:"SpecializationTimeout,omitempty"`
Metrics []v2.MetricSpec `json:"hpaMetrics,omitempty"`
Behavior *v2.HorizontalPodAutoscalerBehavior `json:"hpaBehavior,omitempty"`
}
// ExecutionStrategyApplyConfiguration constructs an declarative configuration of the ExecutionStrategy type for use with
// apply.
func ExecutionStrategy() *ExecutionStrategyApplyConfiguration {
return &ExecutionStrategyApplyConfiguration{}
}
// WithExecutorType sets the ExecutorType 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 ExecutorType field is set to the value of the last call.
func (b *ExecutionStrategyApplyConfiguration) WithExecutorType(value v1.ExecutorType) *ExecutionStrategyApplyConfiguration {
b.ExecutorType = &value
return b
}
// WithMinScale sets the MinScale 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 MinScale field is set to the value of the last call.
func (b *ExecutionStrategyApplyConfiguration) WithMinScale(value int) *ExecutionStrategyApplyConfiguration {
b.MinScale = &value
return b
}
// WithMaxScale sets the MaxScale 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 MaxScale field is set to the value of the last call.
func (b *ExecutionStrategyApplyConfiguration) WithMaxScale(value int) *ExecutionStrategyApplyConfiguration {
b.MaxScale = &value
return b
}
// WithTargetCPUPercent sets the TargetCPUPercent 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 TargetCPUPercent field is set to the value of the last call.
func (b *ExecutionStrategyApplyConfiguration) WithTargetCPUPercent(value int) *ExecutionStrategyApplyConfiguration {
b.TargetCPUPercent = &value
return b
}
// WithSpecializationTimeout sets the SpecializationTimeout 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 SpecializationTimeout field is set to the value of the last call.
func (b *ExecutionStrategyApplyConfiguration) WithSpecializationTimeout(value int) *ExecutionStrategyApplyConfiguration {
b.SpecializationTimeout = &value
return b
}
// WithMetrics adds the given value to the Metrics 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 Metrics field.
func (b *ExecutionStrategyApplyConfiguration) WithMetrics(values ...v2.MetricSpec) *ExecutionStrategyApplyConfiguration {
for i := range values {
b.Metrics = append(b.Metrics, values[i])
}
return b
}
// WithBehavior sets the Behavior 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 Behavior field is set to the value of the last call.
func (b *ExecutionStrategyApplyConfiguration) WithBehavior(value v2.HorizontalPodAutoscalerBehavior) *ExecutionStrategyApplyConfiguration {
b.Behavior = &value
return b
}
@@ -0,0 +1,210 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// FunctionApplyConfiguration represents an declarative configuration of the Function type for use
// with apply.
type FunctionApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *FunctionSpecApplyConfiguration `json:"spec,omitempty"`
}
// Function constructs an declarative configuration of the Function type for use with
// apply.
func Function(name, namespace string) *FunctionApplyConfiguration {
b := &FunctionApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("Function")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithKind(value string) *FunctionApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithAPIVersion(value string) *FunctionApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithName(value string) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithGenerateName(value string) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithNamespace(value string) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithUID(value types.UID) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithResourceVersion(value string) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithGeneration(value int64) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *FunctionApplyConfiguration) WithLabels(entries map[string]string) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *FunctionApplyConfiguration) WithAnnotations(entries map[string]string) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *FunctionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *FunctionApplyConfiguration) WithFinalizers(values ...string) *FunctionApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *FunctionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *FunctionApplyConfiguration) WithSpec(value *FunctionSpecApplyConfiguration) *FunctionApplyConfiguration {
b.Spec = value
return b
}
@@ -0,0 +1,48 @@
/*
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
// FunctionPackageRefApplyConfiguration represents an declarative configuration of the FunctionPackageRef type for use
// with apply.
type FunctionPackageRefApplyConfiguration struct {
PackageRef *PackageRefApplyConfiguration `json:"packageref,omitempty"`
FunctionName *string `json:"functionName,omitempty"`
}
// FunctionPackageRefApplyConfiguration constructs an declarative configuration of the FunctionPackageRef type for use with
// apply.
func FunctionPackageRef() *FunctionPackageRefApplyConfiguration {
return &FunctionPackageRefApplyConfiguration{}
}
// WithPackageRef sets the PackageRef 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 PackageRef field is set to the value of the last call.
func (b *FunctionPackageRefApplyConfiguration) WithPackageRef(value *PackageRefApplyConfiguration) *FunctionPackageRefApplyConfiguration {
b.PackageRef = value
return b
}
// WithFunctionName sets the FunctionName 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 FunctionName field is set to the value of the last call.
func (b *FunctionPackageRefApplyConfiguration) WithFunctionName(value string) *FunctionPackageRefApplyConfiguration {
b.FunctionName = &value
return b
}
@@ -0,0 +1,67 @@
/*
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 (
v1 "github.com/fission/fission/pkg/apis/core/v1"
)
// FunctionReferenceApplyConfiguration represents an declarative configuration of the FunctionReference type for use
// with apply.
type FunctionReferenceApplyConfiguration struct {
Type *v1.FunctionReferenceType `json:"type,omitempty"`
Name *string `json:"name,omitempty"`
FunctionWeights map[string]int `json:"functionweights,omitempty"`
}
// FunctionReferenceApplyConfiguration constructs an declarative configuration of the FunctionReference type for use with
// apply.
func FunctionReference() *FunctionReferenceApplyConfiguration {
return &FunctionReferenceApplyConfiguration{}
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *FunctionReferenceApplyConfiguration) WithType(value v1.FunctionReferenceType) *FunctionReferenceApplyConfiguration {
b.Type = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *FunctionReferenceApplyConfiguration) WithName(value string) *FunctionReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithFunctionWeights puts the entries into the FunctionWeights field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the FunctionWeights field,
// overwriting an existing map entries in FunctionWeights field with the same key.
func (b *FunctionReferenceApplyConfiguration) WithFunctionWeights(entries map[string]int) *FunctionReferenceApplyConfiguration {
if b.FunctionWeights == nil && len(entries) > 0 {
b.FunctionWeights = make(map[string]int, len(entries))
}
for k, v := range entries {
b.FunctionWeights[k] = v
}
return b
}
@@ -0,0 +1,161 @@
/*
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 an 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 an 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
}
@@ -0,0 +1,210 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// HTTPTriggerApplyConfiguration represents an declarative configuration of the HTTPTrigger type for use
// with apply.
type HTTPTriggerApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *HTTPTriggerSpecApplyConfiguration `json:"spec,omitempty"`
}
// HTTPTrigger constructs an declarative configuration of the HTTPTrigger type for use with
// apply.
func HTTPTrigger(name, namespace string) *HTTPTriggerApplyConfiguration {
b := &HTTPTriggerApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("HTTPTrigger")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithKind(value string) *HTTPTriggerApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithAPIVersion(value string) *HTTPTriggerApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithName(value string) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithGenerateName(value string) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithNamespace(value string) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithUID(value types.UID) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithResourceVersion(value string) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithGeneration(value int64) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *HTTPTriggerApplyConfiguration) WithLabels(entries map[string]string) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *HTTPTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *HTTPTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *HTTPTriggerApplyConfiguration) WithFinalizers(values ...string) *HTTPTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *HTTPTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *HTTPTriggerApplyConfiguration) WithSpec(value *HTTPTriggerSpecApplyConfiguration) *HTTPTriggerApplyConfiguration {
b.Spec = value
return b
}
@@ -0,0 +1,113 @@
/*
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
// HTTPTriggerSpecApplyConfiguration represents an declarative configuration of the HTTPTriggerSpec type for use
// with apply.
type HTTPTriggerSpecApplyConfiguration struct {
Host *string `json:"host,omitempty"`
RelativeURL *string `json:"relativeurl,omitempty"`
Prefix *string `json:"prefix,omitempty"`
KeepPrefix *bool `json:"keepPrefix,omitempty"`
Method *string `json:"method,omitempty"`
Methods []string `json:"methods,omitempty"`
FunctionReference *FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
CreateIngress *bool `json:"createingress,omitempty"`
IngressConfig *IngressConfigApplyConfiguration `json:"ingressconfig,omitempty"`
}
// HTTPTriggerSpecApplyConfiguration constructs an declarative configuration of the HTTPTriggerSpec type for use with
// apply.
func HTTPTriggerSpec() *HTTPTriggerSpecApplyConfiguration {
return &HTTPTriggerSpecApplyConfiguration{}
}
// WithHost sets the Host 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 Host field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithHost(value string) *HTTPTriggerSpecApplyConfiguration {
b.Host = &value
return b
}
// WithRelativeURL sets the RelativeURL 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 RelativeURL field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithRelativeURL(value string) *HTTPTriggerSpecApplyConfiguration {
b.RelativeURL = &value
return b
}
// WithPrefix sets the Prefix 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 Prefix field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithPrefix(value string) *HTTPTriggerSpecApplyConfiguration {
b.Prefix = &value
return b
}
// WithKeepPrefix sets the KeepPrefix 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 KeepPrefix field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithKeepPrefix(value bool) *HTTPTriggerSpecApplyConfiguration {
b.KeepPrefix = &value
return b
}
// WithMethod sets the Method 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 Method field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithMethod(value string) *HTTPTriggerSpecApplyConfiguration {
b.Method = &value
return b
}
// WithMethods adds the given value to the Methods 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 Methods field.
func (b *HTTPTriggerSpecApplyConfiguration) WithMethods(values ...string) *HTTPTriggerSpecApplyConfiguration {
for i := range values {
b.Methods = append(b.Methods, values[i])
}
return b
}
// WithFunctionReference sets the FunctionReference 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 FunctionReference field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithFunctionReference(value *FunctionReferenceApplyConfiguration) *HTTPTriggerSpecApplyConfiguration {
b.FunctionReference = value
return b
}
// WithCreateIngress sets the CreateIngress 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 CreateIngress field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithCreateIngress(value bool) *HTTPTriggerSpecApplyConfiguration {
b.CreateIngress = &value
return b
}
// WithIngressConfig sets the IngressConfig 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 IngressConfig field is set to the value of the last call.
func (b *HTTPTriggerSpecApplyConfiguration) WithIngressConfig(value *IngressConfigApplyConfiguration) *HTTPTriggerSpecApplyConfiguration {
b.IngressConfig = value
return b
}
@@ -0,0 +1,72 @@
/*
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
// IngressConfigApplyConfiguration represents an declarative configuration of the IngressConfig type for use
// with apply.
type IngressConfigApplyConfiguration struct {
Annotations map[string]string `json:"annotations,omitempty"`
Path *string `json:"path,omitempty"`
Host *string `json:"host,omitempty"`
TLS *string `json:"tls,omitempty"`
}
// IngressConfigApplyConfiguration constructs an declarative configuration of the IngressConfig type for use with
// apply.
func IngressConfig() *IngressConfigApplyConfiguration {
return &IngressConfigApplyConfiguration{}
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *IngressConfigApplyConfiguration) WithAnnotations(entries map[string]string) *IngressConfigApplyConfiguration {
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithPath sets the Path 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 Path field is set to the value of the last call.
func (b *IngressConfigApplyConfiguration) WithPath(value string) *IngressConfigApplyConfiguration {
b.Path = &value
return b
}
// WithHost sets the Host 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 Host field is set to the value of the last call.
func (b *IngressConfigApplyConfiguration) WithHost(value string) *IngressConfigApplyConfiguration {
b.Host = &value
return b
}
// WithTLS sets the TLS 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 TLS field is set to the value of the last call.
func (b *IngressConfigApplyConfiguration) WithTLS(value string) *IngressConfigApplyConfiguration {
b.TLS = &value
return b
}
@@ -0,0 +1,52 @@
/*
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"
)
// InvokeStrategyApplyConfiguration represents an declarative configuration of the InvokeStrategy type for use
// with apply.
type InvokeStrategyApplyConfiguration struct {
ExecutionStrategy *ExecutionStrategyApplyConfiguration `json:"ExecutionStrategy,omitempty"`
StrategyType *corev1.StrategyType `json:"StrategyType,omitempty"`
}
// InvokeStrategyApplyConfiguration constructs an declarative configuration of the InvokeStrategy type for use with
// apply.
func InvokeStrategy() *InvokeStrategyApplyConfiguration {
return &InvokeStrategyApplyConfiguration{}
}
// WithExecutionStrategy sets the ExecutionStrategy 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 ExecutionStrategy field is set to the value of the last call.
func (b *InvokeStrategyApplyConfiguration) WithExecutionStrategy(value *ExecutionStrategyApplyConfiguration) *InvokeStrategyApplyConfiguration {
b.ExecutionStrategy = value
return b
}
// WithStrategyType sets the StrategyType 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 StrategyType field is set to the value of the last call.
func (b *InvokeStrategyApplyConfiguration) WithStrategyType(value corev1.StrategyType) *InvokeStrategyApplyConfiguration {
b.StrategyType = &value
return b
}
@@ -0,0 +1,210 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// KubernetesWatchTriggerApplyConfiguration represents an declarative configuration of the KubernetesWatchTrigger type for use
// with apply.
type KubernetesWatchTriggerApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *KubernetesWatchTriggerSpecApplyConfiguration `json:"spec,omitempty"`
}
// KubernetesWatchTrigger constructs an declarative configuration of the KubernetesWatchTrigger type for use with
// apply.
func KubernetesWatchTrigger(name, namespace string) *KubernetesWatchTriggerApplyConfiguration {
b := &KubernetesWatchTriggerApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("KubernetesWatchTrigger")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithKind(value string) *KubernetesWatchTriggerApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithAPIVersion(value string) *KubernetesWatchTriggerApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithName(value string) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithGenerateName(value string) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithNamespace(value string) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithUID(value types.UID) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithResourceVersion(value string) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithGeneration(value int64) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *KubernetesWatchTriggerApplyConfiguration) WithLabels(entries map[string]string) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *KubernetesWatchTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *KubernetesWatchTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *KubernetesWatchTriggerApplyConfiguration) WithFinalizers(values ...string) *KubernetesWatchTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *KubernetesWatchTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *KubernetesWatchTriggerApplyConfiguration) WithSpec(value *KubernetesWatchTriggerSpecApplyConfiguration) *KubernetesWatchTriggerApplyConfiguration {
b.Spec = value
return b
}
@@ -0,0 +1,72 @@
/*
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
// KubernetesWatchTriggerSpecApplyConfiguration represents an declarative configuration of the KubernetesWatchTriggerSpec type for use
// with apply.
type KubernetesWatchTriggerSpecApplyConfiguration struct {
Namespace *string `json:"namespace,omitempty"`
Type *string `json:"type,omitempty"`
LabelSelector map[string]string `json:"labelselector,omitempty"`
FunctionReference *FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
}
// KubernetesWatchTriggerSpecApplyConfiguration constructs an declarative configuration of the KubernetesWatchTriggerSpec type for use with
// apply.
func KubernetesWatchTriggerSpec() *KubernetesWatchTriggerSpecApplyConfiguration {
return &KubernetesWatchTriggerSpecApplyConfiguration{}
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithNamespace(value string) *KubernetesWatchTriggerSpecApplyConfiguration {
b.Namespace = &value
return b
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithType(value string) *KubernetesWatchTriggerSpecApplyConfiguration {
b.Type = &value
return b
}
// WithLabelSelector puts the entries into the LabelSelector field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the LabelSelector field,
// overwriting an existing map entries in LabelSelector field with the same key.
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithLabelSelector(entries map[string]string) *KubernetesWatchTriggerSpecApplyConfiguration {
if b.LabelSelector == nil && len(entries) > 0 {
b.LabelSelector = make(map[string]string, len(entries))
}
for k, v := range entries {
b.LabelSelector[k] = v
}
return b
}
// WithFunctionReference sets the FunctionReference 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 FunctionReference field is set to the value of the last call.
func (b *KubernetesWatchTriggerSpecApplyConfiguration) WithFunctionReference(value *FunctionReferenceApplyConfiguration) *KubernetesWatchTriggerSpecApplyConfiguration {
b.FunctionReference = value
return b
}
@@ -0,0 +1,210 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// MessageQueueTriggerApplyConfiguration represents an declarative configuration of the MessageQueueTrigger type for use
// with apply.
type MessageQueueTriggerApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *MessageQueueTriggerSpecApplyConfiguration `json:"spec,omitempty"`
}
// MessageQueueTrigger constructs an declarative configuration of the MessageQueueTrigger type for use with
// apply.
func MessageQueueTrigger(name, namespace string) *MessageQueueTriggerApplyConfiguration {
b := &MessageQueueTriggerApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("MessageQueueTrigger")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithKind(value string) *MessageQueueTriggerApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithAPIVersion(value string) *MessageQueueTriggerApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithName(value string) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithGenerateName(value string) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithNamespace(value string) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithUID(value types.UID) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithResourceVersion(value string) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithGeneration(value int64) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *MessageQueueTriggerApplyConfiguration) WithLabels(entries map[string]string) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *MessageQueueTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *MessageQueueTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *MessageQueueTriggerApplyConfiguration) WithFinalizers(values ...string) *MessageQueueTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *MessageQueueTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *MessageQueueTriggerApplyConfiguration) WithSpec(value *MessageQueueTriggerSpecApplyConfiguration) *MessageQueueTriggerApplyConfiguration {
b.Spec = value
return b
}
@@ -0,0 +1,176 @@
/*
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"
)
// MessageQueueTriggerSpecApplyConfiguration represents an declarative configuration of the MessageQueueTriggerSpec type for use
// with apply.
type MessageQueueTriggerSpecApplyConfiguration struct {
FunctionReference *FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
MessageQueueType *corev1.MessageQueueType `json:"messageQueueType,omitempty"`
Topic *string `json:"topic,omitempty"`
ResponseTopic *string `json:"respTopic,omitempty"`
ErrorTopic *string `json:"errorTopic,omitempty"`
MaxRetries *int `json:"maxRetries,omitempty"`
ContentType *string `json:"contentType,omitempty"`
PollingInterval *int32 `json:"pollingInterval,omitempty"`
CooldownPeriod *int32 `json:"cooldownPeriod,omitempty"`
MinReplicaCount *int32 `json:"minReplicaCount,omitempty"`
MaxReplicaCount *int32 `json:"maxReplicaCount,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Secret *string `json:"secret,omitempty"`
MqtKind *string `json:"mqtkind,omitempty"`
PodSpec *apicorev1.PodSpec `json:"podspec,omitempty"`
}
// MessageQueueTriggerSpecApplyConfiguration constructs an declarative configuration of the MessageQueueTriggerSpec type for use with
// apply.
func MessageQueueTriggerSpec() *MessageQueueTriggerSpecApplyConfiguration {
return &MessageQueueTriggerSpecApplyConfiguration{}
}
// WithFunctionReference sets the FunctionReference 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 FunctionReference field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithFunctionReference(value *FunctionReferenceApplyConfiguration) *MessageQueueTriggerSpecApplyConfiguration {
b.FunctionReference = value
return b
}
// WithMessageQueueType sets the MessageQueueType 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 MessageQueueType field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMessageQueueType(value corev1.MessageQueueType) *MessageQueueTriggerSpecApplyConfiguration {
b.MessageQueueType = &value
return b
}
// WithTopic sets the Topic 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 Topic field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithTopic(value string) *MessageQueueTriggerSpecApplyConfiguration {
b.Topic = &value
return b
}
// WithResponseTopic sets the ResponseTopic 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 ResponseTopic field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithResponseTopic(value string) *MessageQueueTriggerSpecApplyConfiguration {
b.ResponseTopic = &value
return b
}
// WithErrorTopic sets the ErrorTopic 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 ErrorTopic field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithErrorTopic(value string) *MessageQueueTriggerSpecApplyConfiguration {
b.ErrorTopic = &value
return b
}
// WithMaxRetries sets the MaxRetries 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 MaxRetries field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMaxRetries(value int) *MessageQueueTriggerSpecApplyConfiguration {
b.MaxRetries = &value
return b
}
// WithContentType sets the ContentType 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 ContentType field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithContentType(value string) *MessageQueueTriggerSpecApplyConfiguration {
b.ContentType = &value
return b
}
// WithPollingInterval sets the PollingInterval 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 PollingInterval field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithPollingInterval(value int32) *MessageQueueTriggerSpecApplyConfiguration {
b.PollingInterval = &value
return b
}
// WithCooldownPeriod sets the CooldownPeriod 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 CooldownPeriod field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithCooldownPeriod(value int32) *MessageQueueTriggerSpecApplyConfiguration {
b.CooldownPeriod = &value
return b
}
// WithMinReplicaCount sets the MinReplicaCount 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 MinReplicaCount field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMinReplicaCount(value int32) *MessageQueueTriggerSpecApplyConfiguration {
b.MinReplicaCount = &value
return b
}
// WithMaxReplicaCount sets the MaxReplicaCount 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 MaxReplicaCount field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMaxReplicaCount(value int32) *MessageQueueTriggerSpecApplyConfiguration {
b.MaxReplicaCount = &value
return b
}
// WithMetadata puts the entries into the Metadata field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Metadata field,
// overwriting an existing map entries in Metadata field with the same key.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMetadata(entries map[string]string) *MessageQueueTriggerSpecApplyConfiguration {
if b.Metadata == nil && len(entries) > 0 {
b.Metadata = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Metadata[k] = v
}
return b
}
// WithSecret sets the Secret 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 Secret field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithSecret(value string) *MessageQueueTriggerSpecApplyConfiguration {
b.Secret = &value
return b
}
// WithMqtKind sets the MqtKind 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 MqtKind field is set to the value of the last call.
func (b *MessageQueueTriggerSpecApplyConfiguration) WithMqtKind(value string) *MessageQueueTriggerSpecApplyConfiguration {
b.MqtKind = &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 *MessageQueueTriggerSpecApplyConfiguration) WithPodSpec(value apicorev1.PodSpec) *MessageQueueTriggerSpecApplyConfiguration {
b.PodSpec = &value
return b
}
@@ -0,0 +1,219 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// PackageApplyConfiguration represents an declarative configuration of the Package type for use
// with apply.
type PackageApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *PackageSpecApplyConfiguration `json:"spec,omitempty"`
Status *PackageStatusApplyConfiguration `json:"status,omitempty"`
}
// Package constructs an declarative configuration of the Package type for use with
// apply.
func Package(name, namespace string) *PackageApplyConfiguration {
b := &PackageApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("Package")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithKind(value string) *PackageApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithAPIVersion(value string) *PackageApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithName(value string) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithGenerateName(value string) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithNamespace(value string) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithUID(value types.UID) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithResourceVersion(value string) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithGeneration(value int64) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *PackageApplyConfiguration) WithLabels(entries map[string]string) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *PackageApplyConfiguration) WithAnnotations(entries map[string]string) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *PackageApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *PackageApplyConfiguration) WithFinalizers(values ...string) *PackageApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *PackageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithSpec(value *PackageSpecApplyConfiguration) *PackageApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status 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 Status field is set to the value of the last call.
func (b *PackageApplyConfiguration) WithStatus(value *PackageStatusApplyConfiguration) *PackageApplyConfiguration {
b.Status = value
return b
}
@@ -0,0 +1,57 @@
/*
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
// PackageRefApplyConfiguration represents an declarative configuration of the PackageRef type for use
// with apply.
type PackageRefApplyConfiguration struct {
Namespace *string `json:"namespace,omitempty"`
Name *string `json:"name,omitempty"`
ResourceVersion *string `json:"resourceversion,omitempty"`
}
// PackageRefApplyConfiguration constructs an declarative configuration of the PackageRef type for use with
// apply.
func PackageRef() *PackageRefApplyConfiguration {
return &PackageRefApplyConfiguration{}
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *PackageRefApplyConfiguration) WithNamespace(value string) *PackageRefApplyConfiguration {
b.Namespace = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *PackageRefApplyConfiguration) WithName(value string) *PackageRefApplyConfiguration {
b.Name = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *PackageRefApplyConfiguration) WithResourceVersion(value string) *PackageRefApplyConfiguration {
b.ResourceVersion = &value
return b
}
@@ -0,0 +1,66 @@
/*
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
// PackageSpecApplyConfiguration represents an declarative configuration of the PackageSpec type for use
// with apply.
type PackageSpecApplyConfiguration struct {
Environment *EnvironmentReferenceApplyConfiguration `json:"environment,omitempty"`
Source *ArchiveApplyConfiguration `json:"source,omitempty"`
Deployment *ArchiveApplyConfiguration `json:"deployment,omitempty"`
BuildCommand *string `json:"buildcmd,omitempty"`
}
// PackageSpecApplyConfiguration constructs an declarative configuration of the PackageSpec type for use with
// apply.
func PackageSpec() *PackageSpecApplyConfiguration {
return &PackageSpecApplyConfiguration{}
}
// 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 *PackageSpecApplyConfiguration) WithEnvironment(value *EnvironmentReferenceApplyConfiguration) *PackageSpecApplyConfiguration {
b.Environment = value
return b
}
// WithSource sets the Source 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 Source field is set to the value of the last call.
func (b *PackageSpecApplyConfiguration) WithSource(value *ArchiveApplyConfiguration) *PackageSpecApplyConfiguration {
b.Source = value
return b
}
// WithDeployment sets the Deployment 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 Deployment field is set to the value of the last call.
func (b *PackageSpecApplyConfiguration) WithDeployment(value *ArchiveApplyConfiguration) *PackageSpecApplyConfiguration {
b.Deployment = value
return b
}
// WithBuildCommand sets the BuildCommand 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 BuildCommand field is set to the value of the last call.
func (b *PackageSpecApplyConfiguration) WithBuildCommand(value string) *PackageSpecApplyConfiguration {
b.BuildCommand = &value
return b
}
@@ -0,0 +1,62 @@
/*
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 (
v1 "github.com/fission/fission/pkg/apis/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// PackageStatusApplyConfiguration represents an declarative configuration of the PackageStatus type for use
// with apply.
type PackageStatusApplyConfiguration struct {
BuildStatus *v1.BuildStatus `json:"buildstatus,omitempty"`
BuildLog *string `json:"buildlog,omitempty"`
LastUpdateTimestamp *metav1.Time `json:"lastUpdateTimestamp,omitempty"`
}
// PackageStatusApplyConfiguration constructs an declarative configuration of the PackageStatus type for use with
// apply.
func PackageStatus() *PackageStatusApplyConfiguration {
return &PackageStatusApplyConfiguration{}
}
// WithBuildStatus sets the BuildStatus 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 BuildStatus field is set to the value of the last call.
func (b *PackageStatusApplyConfiguration) WithBuildStatus(value v1.BuildStatus) *PackageStatusApplyConfiguration {
b.BuildStatus = &value
return b
}
// WithBuildLog sets the BuildLog 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 BuildLog field is set to the value of the last call.
func (b *PackageStatusApplyConfiguration) WithBuildLog(value string) *PackageStatusApplyConfiguration {
b.BuildLog = &value
return b
}
// WithLastUpdateTimestamp sets the LastUpdateTimestamp 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 LastUpdateTimestamp field is set to the value of the last call.
func (b *PackageStatusApplyConfiguration) WithLastUpdateTimestamp(value metav1.Time) *PackageStatusApplyConfiguration {
b.LastUpdateTimestamp = &value
return b
}
@@ -0,0 +1,61 @@
/*
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 (
v1 "k8s.io/api/core/v1"
)
// RuntimeApplyConfiguration represents an declarative configuration of the Runtime type for use
// with apply.
type RuntimeApplyConfiguration struct {
Image *string `json:"image,omitempty"`
Container *v1.Container `json:"container,omitempty"`
PodSpec *v1.PodSpec `json:"podspec,omitempty"`
}
// RuntimeApplyConfiguration constructs an declarative configuration of the Runtime type for use with
// apply.
func Runtime() *RuntimeApplyConfiguration {
return &RuntimeApplyConfiguration{}
}
// WithImage sets the Image 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 Image field is set to the value of the last call.
func (b *RuntimeApplyConfiguration) WithImage(value string) *RuntimeApplyConfiguration {
b.Image = &value
return b
}
// WithContainer sets the Container 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 Container field is set to the value of the last call.
func (b *RuntimeApplyConfiguration) WithContainer(value v1.Container) *RuntimeApplyConfiguration {
b.Container = &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 *RuntimeApplyConfiguration) WithPodSpec(value v1.PodSpec) *RuntimeApplyConfiguration {
b.PodSpec = &value
return b
}
@@ -0,0 +1,48 @@
/*
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
// SecretReferenceApplyConfiguration represents an declarative configuration of the SecretReference type for use
// with apply.
type SecretReferenceApplyConfiguration struct {
Namespace *string `json:"namespace,omitempty"`
Name *string `json:"name,omitempty"`
}
// SecretReferenceApplyConfiguration constructs an declarative configuration of the SecretReference type for use with
// apply.
func SecretReference() *SecretReferenceApplyConfiguration {
return &SecretReferenceApplyConfiguration{}
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *SecretReferenceApplyConfiguration) WithNamespace(value string) *SecretReferenceApplyConfiguration {
b.Namespace = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *SecretReferenceApplyConfiguration) WithName(value string) *SecretReferenceApplyConfiguration {
b.Name = &value
return b
}
@@ -0,0 +1,210 @@
/*
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 (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// TimeTriggerApplyConfiguration represents an declarative configuration of the TimeTrigger type for use
// with apply.
type TimeTriggerApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *TimeTriggerSpecApplyConfiguration `json:"spec,omitempty"`
}
// TimeTrigger constructs an declarative configuration of the TimeTrigger type for use with
// apply.
func TimeTrigger(name, namespace string) *TimeTriggerApplyConfiguration {
b := &TimeTriggerApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("TimeTrigger")
b.WithAPIVersion("fission.io/v1")
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithKind(value string) *TimeTriggerApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithAPIVersion(value string) *TimeTriggerApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithName(value string) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithGenerateName(value string) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithNamespace(value string) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithUID(value types.UID) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithResourceVersion(value string) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithGeneration(value int64) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *TimeTriggerApplyConfiguration) WithLabels(entries map[string]string) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *TimeTriggerApplyConfiguration) WithAnnotations(entries map[string]string) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *TimeTriggerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *TimeTriggerApplyConfiguration) WithFinalizers(values ...string) *TimeTriggerApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *TimeTriggerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *TimeTriggerApplyConfiguration) WithSpec(value *TimeTriggerSpecApplyConfiguration) *TimeTriggerApplyConfiguration {
b.Spec = value
return b
}
@@ -0,0 +1,83 @@
/*
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"
)
// TimeTriggerSpecApplyConfiguration represents an declarative configuration of the TimeTriggerSpec type for use
// with apply.
type TimeTriggerSpecApplyConfiguration struct {
Cron *string `json:"cron,omitempty"`
*FunctionReferenceApplyConfiguration `json:"functionref,omitempty"`
}
// TimeTriggerSpecApplyConfiguration constructs an declarative configuration of the TimeTriggerSpec type for use with
// apply.
func TimeTriggerSpec() *TimeTriggerSpecApplyConfiguration {
return &TimeTriggerSpecApplyConfiguration{}
}
// WithCron sets the Cron 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 Cron field is set to the value of the last call.
func (b *TimeTriggerSpecApplyConfiguration) WithCron(value string) *TimeTriggerSpecApplyConfiguration {
b.Cron = &value
return b
}
// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *TimeTriggerSpecApplyConfiguration) WithType(value corev1.FunctionReferenceType) *TimeTriggerSpecApplyConfiguration {
b.ensureFunctionReferenceApplyConfigurationExists()
b.Type = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *TimeTriggerSpecApplyConfiguration) WithName(value string) *TimeTriggerSpecApplyConfiguration {
b.ensureFunctionReferenceApplyConfigurationExists()
b.Name = &value
return b
}
// WithFunctionWeights puts the entries into the FunctionWeights field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the FunctionWeights field,
// overwriting an existing map entries in FunctionWeights field with the same key.
func (b *TimeTriggerSpecApplyConfiguration) WithFunctionWeights(entries map[string]int) *TimeTriggerSpecApplyConfiguration {
b.ensureFunctionReferenceApplyConfigurationExists()
if b.FunctionWeights == nil && len(entries) > 0 {
b.FunctionWeights = make(map[string]int, len(entries))
}
for k, v := range entries {
b.FunctionWeights[k] = v
}
return b
}
func (b *TimeTriggerSpecApplyConfiguration) ensureFunctionReferenceApplyConfigurationExists() {
if b.FunctionReferenceApplyConfiguration == nil {
b.FunctionReferenceApplyConfiguration = &FunctionReferenceApplyConfiguration{}
}
}