All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.meta.v1.outputs.LabelSelectorRequirementPatch Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes.meta.v1.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class LabelSelectorRequirementPatch {
    /**
     * @return key is the label key that the selector applies to.
     * 
     */
    private @Nullable String key;
    /**
     * @return operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
     * 
     */
    private @Nullable String operator;
    /**
     * @return values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
     * 
     */
    private @Nullable List values;

    private LabelSelectorRequirementPatch() {}
    /**
     * @return key is the label key that the selector applies to.
     * 
     */
    public Optional key() {
        return Optional.ofNullable(this.key);
    }
    /**
     * @return operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
     * 
     */
    public Optional operator() {
        return Optional.ofNullable(this.operator);
    }
    /**
     * @return values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
     * 
     */
    public List values() {
        return this.values == null ? List.of() : this.values;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(LabelSelectorRequirementPatch defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String key;
        private @Nullable String operator;
        private @Nullable List values;
        public Builder() {}
        public Builder(LabelSelectorRequirementPatch defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.key = defaults.key;
    	      this.operator = defaults.operator;
    	      this.values = defaults.values;
        }

        @CustomType.Setter
        public Builder key(@Nullable String key) {

            this.key = key;
            return this;
        }
        @CustomType.Setter
        public Builder operator(@Nullable String operator) {

            this.operator = operator;
            return this;
        }
        @CustomType.Setter
        public Builder values(@Nullable List values) {

            this.values = values;
            return this;
        }
        public Builder values(String... values) {
            return values(List.of(values));
        }
        public LabelSelectorRequirementPatch build() {
            final var _resultValue = new LabelSelectorRequirementPatch();
            _resultValue.key = key;
            _resultValue.operator = operator;
            _resultValue.values = values;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy