/*
Copyright The Akash Network 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 v2beta1

// ManifestServiceExposeApplyConfiguration represents a declarative configuration of the ManifestServiceExpose type for use
// with apply.
type ManifestServiceExposeApplyConfiguration struct {
	Port                   *uint16                                             `json:"port,omitempty"`
	ExternalPort           *uint16                                             `json:"external_port,omitempty"`
	Proto                  *string                                             `json:"proto,omitempty"`
	Service                *string                                             `json:"service,omitempty"`
	Global                 *bool                                               `json:"global,omitempty"`
	Hosts                  []string                                            `json:"hosts,omitempty"`
	HTTPOptions            *ManifestServiceExposeHTTPOptionsApplyConfiguration `json:"http_options,omitempty"`
	IP                     *string                                             `json:"ip,omitempty"`
	EndpointSequenceNumber *uint32                                             `json:"endpoint_sequence_number,omitempty"`
}

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

// 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 *ManifestServiceExposeApplyConfiguration) WithPort(value uint16) *ManifestServiceExposeApplyConfiguration {
	b.Port = &value
	return b
}

// WithExternalPort sets the ExternalPort 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 ExternalPort field is set to the value of the last call.
func (b *ManifestServiceExposeApplyConfiguration) WithExternalPort(value uint16) *ManifestServiceExposeApplyConfiguration {
	b.ExternalPort = &value
	return b
}

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

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

// WithGlobal sets the Global 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 Global field is set to the value of the last call.
func (b *ManifestServiceExposeApplyConfiguration) WithGlobal(value bool) *ManifestServiceExposeApplyConfiguration {
	b.Global = &value
	return b
}

// WithHosts adds the given value to the Hosts 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 Hosts field.
func (b *ManifestServiceExposeApplyConfiguration) WithHosts(values ...string) *ManifestServiceExposeApplyConfiguration {
	for i := range values {
		b.Hosts = append(b.Hosts, values[i])
	}
	return b
}

// WithHTTPOptions sets the HTTPOptions 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 HTTPOptions field is set to the value of the last call.
func (b *ManifestServiceExposeApplyConfiguration) WithHTTPOptions(value *ManifestServiceExposeHTTPOptionsApplyConfiguration) *ManifestServiceExposeApplyConfiguration {
	b.HTTPOptions = value
	return b
}

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

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