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

package v1

// CommonWebHookCauseApplyConfiguration represents a declarative configuration of the CommonWebHookCause type for use
// with apply.
//
// CommonWebHookCause factors out the identical format of these webhook
// causes into struct so we can share it in the specific causes;  it is too late for
// GitHub and Generic but we can leverage this pattern with GitLab and Bitbucket.
type CommonWebHookCauseApplyConfiguration struct {
	// revision is the git source revision information of the trigger.
	Revision *SourceRevisionApplyConfiguration `json:"revision,omitempty"`
	// secret is the obfuscated webhook secret that triggered a build.
	Secret *string `json:"secret,omitempty"`
}

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

// WithRevision sets the Revision 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 Revision field is set to the value of the last call.
func (b *CommonWebHookCauseApplyConfiguration) WithRevision(value *SourceRevisionApplyConfiguration) *CommonWebHookCauseApplyConfiguration {
	b.Revision = value
	return b
}

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