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

package v1

// IngressControllerCaptureHTTPHeaderApplyConfiguration represents a declarative configuration of the IngressControllerCaptureHTTPHeader type for use
// with apply.
//
// IngressControllerCaptureHTTPHeader describes an HTTP header that should be
// captured.
type IngressControllerCaptureHTTPHeaderApplyConfiguration struct {
	// name specifies a header name.  Its value must be a valid HTTP header
	// name as defined in RFC 2616 section 4.2.
	Name *string `json:"name,omitempty"`
	// maxLength specifies a maximum length for the header value.  If a
	// header value exceeds this length, the value will be truncated in the
	// log message.  Note that the ingress controller may impose a separate
	// bound on the total length of HTTP headers in a request.
	MaxLength *int `json:"maxLength,omitempty"`
}

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

// 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 *IngressControllerCaptureHTTPHeaderApplyConfiguration) WithName(value string) *IngressControllerCaptureHTTPHeaderApplyConfiguration {
	b.Name = &value
	return b
}

// WithMaxLength sets the MaxLength 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 MaxLength field is set to the value of the last call.
func (b *IngressControllerCaptureHTTPHeaderApplyConfiguration) WithMaxLength(value int) *IngressControllerCaptureHTTPHeaderApplyConfiguration {
	b.MaxLength = &value
	return b
}
