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

package v1

import (
	operatorv1 "github.com/openshift/api/operator/v1"
)

// UpstreamApplyConfiguration represents a declarative configuration of the Upstream type for use
// with apply.
type UpstreamApplyConfiguration struct {
	Type    *operatorv1.UpstreamType `json:"type,omitempty"`
	Address *string                  `json:"address,omitempty"`
	Port    *uint32                  `json:"port,omitempty"`
}

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

// 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 *UpstreamApplyConfiguration) WithType(value operatorv1.UpstreamType) *UpstreamApplyConfiguration {
	b.Type = &value
	return b
}

// WithAddress sets the Address 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 Address field is set to the value of the last call.
func (b *UpstreamApplyConfiguration) WithAddress(value string) *UpstreamApplyConfiguration {
	b.Address = &value
	return b
}

// WithPort sets the Port 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 Port field is set to the value of the last call.
func (b *UpstreamApplyConfiguration) WithPort(value uint32) *UpstreamApplyConfiguration {
	b.Port = &value
	return b
}
