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

package v1

// ControlPlaneMachineSetTemplateObjectMetaApplyConfiguration represents a declarative configuration of the ControlPlaneMachineSetTemplateObjectMeta type for use
// with apply.
//
// ControlPlaneMachineSetTemplateObjectMeta is a subset of the metav1.ObjectMeta struct.
// It allows users to specify labels and annotations that will be copied onto Machines
// created from this template.
type ControlPlaneMachineSetTemplateObjectMetaApplyConfiguration struct {
	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: http://kubernetes.io/docs/user-guide/labels.
	// This field must contain both the 'machine.openshift.io/cluster-api-machine-role' and 'machine.openshift.io/cluster-api-machine-type' labels, both with a value of 'master'.
	// It must also contain a label with the key 'machine.openshift.io/cluster-api-cluster'.
	Labels map[string]string `json:"labels,omitempty"`
	// annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
}

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

// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ControlPlaneMachineSetTemplateObjectMetaApplyConfiguration) WithLabels(entries map[string]string) *ControlPlaneMachineSetTemplateObjectMetaApplyConfiguration {
	if b.Labels == nil && len(entries) > 0 {
		b.Labels = make(map[string]string, len(entries))
	}
	for k, v := range entries {
		b.Labels[k] = v
	}
	return b
}

// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ControlPlaneMachineSetTemplateObjectMetaApplyConfiguration) WithAnnotations(entries map[string]string) *ControlPlaneMachineSetTemplateObjectMetaApplyConfiguration {
	if b.Annotations == nil && len(entries) > 0 {
		b.Annotations = make(map[string]string, len(entries))
	}
	for k, v := range entries {
		b.Annotations[k] = v
	}
	return b
}
