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

package v1

// PKICertificateSubjectApplyConfiguration represents a declarative configuration of the PKICertificateSubject type for use
// with apply.
//
// PKICertificateSubject defines the requirements imposed on the subject to which the certificate was issued.
type PKICertificateSubjectApplyConfiguration struct {
	// email specifies the expected email address imposed on the subject to which the certificate was issued, and must match the email address listed in the Subject Alternative Name (SAN) field of the certificate.
	// The email must be a valid email address and at most 320 characters in length.
	Email *string `json:"email,omitempty"`
	// hostname specifies the expected hostname imposed on the subject to which the certificate was issued, and it must match the hostname listed in the Subject Alternative Name (SAN) DNS field of the certificate.
	// The hostname must be a valid dns 1123 subdomain name, optionally prefixed by '*.', and at most 253 characters in length.
	// It must consist only of lowercase alphanumeric characters, hyphens, periods and the optional preceding asterisk.
	Hostname *string `json:"hostname,omitempty"`
}

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

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

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