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

package v1

import (
	corev1 "k8s.io/api/core/v1"
)

// JenkinsPipelineBuildStrategyApplyConfiguration represents a declarative configuration of the JenkinsPipelineBuildStrategy type for use
// with apply.
//
// JenkinsPipelineBuildStrategy holds parameters specific to a Jenkins Pipeline build.
// Deprecated: use OpenShift Pipelines
type JenkinsPipelineBuildStrategyApplyConfiguration struct {
	// jenkinsfilePath is the optional path of the Jenkinsfile that will be used to configure the pipeline
	// relative to the root of the context (contextDir). If both JenkinsfilePath & Jenkinsfile are
	// both not specified, this defaults to Jenkinsfile in the root of the specified contextDir.
	JenkinsfilePath *string `json:"jenkinsfilePath,omitempty"`
	// jenkinsfile defines the optional raw contents of a Jenkinsfile which defines a Jenkins pipeline build.
	Jenkinsfile *string `json:"jenkinsfile,omitempty"`
	// env contains additional environment variables you want to pass into a build pipeline.
	Env []corev1.EnvVar `json:"env,omitempty"`
}

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

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

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

// WithEnv adds the given value to the Env field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Env field.
func (b *JenkinsPipelineBuildStrategyApplyConfiguration) WithEnv(values ...corev1.EnvVar) *JenkinsPipelineBuildStrategyApplyConfiguration {
	for i := range values {
		b.Env = append(b.Env, values[i])
	}
	return b
}
