// SPDX-License-Identifier: AGPL-3.0-only

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

package v0alpha1

// PullRequestJobOptionsApplyConfiguration represents a declarative configuration of the PullRequestJobOptions type for use
// with apply.
type PullRequestJobOptionsApplyConfiguration struct {
	// The branch of commit hash
	Ref *string `json:"ref,omitempty"`
	// Pull request number (when appropriate)
	PR *int `json:"pr,omitempty"`
	// The specific commit hash that triggered this notice
	Hash *string `json:"hash,omitempty"`
	// URL to the originator (eg, PR URL)
	URL *string `json:"url,omitempty"`
}

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

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

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

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

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