/*
The MIT License (MIT)

Copyright (c) 2016-2020 Containous SAS; 2020-2026 Traefik Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1alpha1

// TraefikServiceSpecApplyConfiguration represents a declarative configuration of the TraefikServiceSpec type for use
// with apply.
//
// TraefikServiceSpec defines the desired state of a TraefikService.
type TraefikServiceSpecApplyConfiguration struct {
	// Weighted defines the Weighted Round Robin configuration.
	Weighted *WeightedRoundRobinApplyConfiguration `json:"weighted,omitempty"`
	// Mirroring defines the Mirroring service configuration.
	Mirroring *MirroringApplyConfiguration `json:"mirroring,omitempty"`
	// HighestRandomWeight defines the highest random weight service configuration.
	HighestRandomWeight *HighestRandomWeightApplyConfiguration `json:"highestRandomWeight,omitempty"`
	// Failover defines the Failover service configuration.
	Failover *FailoverApplyConfiguration `json:"failover,omitempty"`
}

// TraefikServiceSpecApplyConfiguration constructs a declarative configuration of the TraefikServiceSpec type for use with
// apply.
func TraefikServiceSpec() *TraefikServiceSpecApplyConfiguration {
	return &TraefikServiceSpecApplyConfiguration{}
}

// WithWeighted sets the Weighted 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 Weighted field is set to the value of the last call.
func (b *TraefikServiceSpecApplyConfiguration) WithWeighted(value *WeightedRoundRobinApplyConfiguration) *TraefikServiceSpecApplyConfiguration {
	b.Weighted = value
	return b
}

// WithMirroring sets the Mirroring 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 Mirroring field is set to the value of the last call.
func (b *TraefikServiceSpecApplyConfiguration) WithMirroring(value *MirroringApplyConfiguration) *TraefikServiceSpecApplyConfiguration {
	b.Mirroring = value
	return b
}

// WithHighestRandomWeight sets the HighestRandomWeight 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 HighestRandomWeight field is set to the value of the last call.
func (b *TraefikServiceSpecApplyConfiguration) WithHighestRandomWeight(value *HighestRandomWeightApplyConfiguration) *TraefikServiceSpecApplyConfiguration {
	b.HighestRandomWeight = value
	return b
}

// WithFailover sets the Failover 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 Failover field is set to the value of the last call.
func (b *TraefikServiceSpecApplyConfiguration) WithFailover(value *FailoverApplyConfiguration) *TraefikServiceSpecApplyConfiguration {
	b.Failover = value
	return b
}
