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

package v1

// ClusterConditionApplyConfiguration represents a declarative configuration of the ClusterCondition type for use
// with apply.
//
// ClusterCondition is a union of typed cluster conditions.  The 'type'
// property determines which of the type-specific properties are relevant.
// When evaluated on a cluster, the condition may match, not match, or
// fail to evaluate.
type ClusterConditionApplyConfiguration struct {
	// type represents the cluster-condition type. This defines
	// the members and semantics of any additional properties.
	Type *string `json:"type,omitempty"`
	// promql represents a cluster condition based on PromQL.
	PromQL *PromQLClusterConditionApplyConfiguration `json:"promql,omitempty"`
}

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

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

// WithPromQL sets the PromQL 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 PromQL field is set to the value of the last call.
func (b *ClusterConditionApplyConfiguration) WithPromQL(value *PromQLClusterConditionApplyConfiguration) *ClusterConditionApplyConfiguration {
	b.PromQL = value
	return b
}
