// *** 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.core.v1.outputs;

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

@CustomType
public final class ObjectFieldSelector {
    /**
     * @return Version of the schema the FieldPath is written in terms of, defaults to &#34;v1&#34;.
     * 
     */
    private @Nullable String apiVersion;
    /**
     * @return Path of the field to select in the specified API version.
     * 
     */
    private String fieldPath;

    private ObjectFieldSelector() {}
    /**
     * @return Version of the schema the FieldPath is written in terms of, defaults to &#34;v1&#34;.
     * 
     */
    public Optional<String> apiVersion() {
        return Optional.ofNullable(this.apiVersion);
    }
    /**
     * @return Path of the field to select in the specified API version.
     * 
     */
    public String fieldPath() {
        return this.fieldPath;
    }

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

    public static Builder builder(ObjectFieldSelector defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String apiVersion;
        private String fieldPath;
        public Builder() {}
        public Builder(ObjectFieldSelector defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.apiVersion = defaults.apiVersion;
    	      this.fieldPath = defaults.fieldPath;
        }

        @CustomType.Setter
        public Builder apiVersion(@Nullable String apiVersion) {
            this.apiVersion = apiVersion;
            return this;
        }
        @CustomType.Setter
        public Builder fieldPath(String fieldPath) {
            this.fieldPath = Objects.requireNonNull(fieldPath);
            return this;
        }
        public ObjectFieldSelector build() {
            final var o = new ObjectFieldSelector();
            o.apiVersion = apiVersion;
            o.fieldPath = fieldPath;
            return o;
        }
    }
}
