114 lines
5.6 KiB
Go
114 lines
5.6 KiB
Go
/*
|
|
Copyright The Fission Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
|
|
package v1
|
|
|
|
// 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
|
|
}
|