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

package v1

// MaxAgePolicyApplyConfiguration represents a declarative configuration of the MaxAgePolicy type for use
// with apply.
//
// MaxAgePolicy contains a numeric range for specifying a compliant HSTS max-age for the enclosing RequiredHSTSPolicy
type MaxAgePolicyApplyConfiguration struct {
	// The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age
	// This value can be left unspecified, in which case no upper limit is enforced.
	LargestMaxAge *int32 `json:"largestMaxAge,omitempty"`
	// The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age
	// Setting max-age=0 allows the deletion of an existing HSTS header from a host.  This is a necessary
	// tool for administrators to quickly correct mistakes.
	// This value can be left unspecified, in which case no lower limit is enforced.
	SmallestMaxAge *int32 `json:"smallestMaxAge,omitempty"`
}

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

// WithLargestMaxAge sets the LargestMaxAge 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 LargestMaxAge field is set to the value of the last call.
func (b *MaxAgePolicyApplyConfiguration) WithLargestMaxAge(value int32) *MaxAgePolicyApplyConfiguration {
	b.LargestMaxAge = &value
	return b
}

// WithSmallestMaxAge sets the SmallestMaxAge 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 SmallestMaxAge field is set to the value of the last call.
func (b *MaxAgePolicyApplyConfiguration) WithSmallestMaxAge(value int32) *MaxAgePolicyApplyConfiguration {
	b.SmallestMaxAge = &value
	return b
}
