// *** 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.gcp.compute.inputs;

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


public final class BackendServiceLocalityLbPolicyCustomPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final BackendServiceLocalityLbPolicyCustomPolicyArgs Empty = new BackendServiceLocalityLbPolicyCustomPolicyArgs();

    /**
     * An optional, arbitrary JSON object with configuration data, understood
     * by a locally installed custom policy implementation.
     * 
     */
    @Import(name="data")
    private @Nullable Output<String> data;

    /**
     * @return An optional, arbitrary JSON object with configuration data, understood
     * by a locally installed custom policy implementation.
     * 
     */
    public Optional<Output<String>> data() {
        return Optional.ofNullable(this.data);
    }

    /**
     * Identifies the custom policy.
     * The value should match the type the custom implementation is registered
     * with on the gRPC clients. It should follow protocol buffer
     * message naming conventions and include the full path (e.g.
     * myorg.CustomLbPolicy). The maximum length is 256 characters.
     * Note that specifying the same custom policy more than once for a
     * backend is not a valid configuration and will be rejected.
     * 
     */
    @Import(name="name", required=true)
    private Output<String> name;

    /**
     * @return Identifies the custom policy.
     * The value should match the type the custom implementation is registered
     * with on the gRPC clients. It should follow protocol buffer
     * message naming conventions and include the full path (e.g.
     * myorg.CustomLbPolicy). The maximum length is 256 characters.
     * Note that specifying the same custom policy more than once for a
     * backend is not a valid configuration and will be rejected.
     * 
     */
    public Output<String> name() {
        return this.name;
    }

    private BackendServiceLocalityLbPolicyCustomPolicyArgs() {}

    private BackendServiceLocalityLbPolicyCustomPolicyArgs(BackendServiceLocalityLbPolicyCustomPolicyArgs $) {
        this.data = $.data;
        this.name = $.name;
    }

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

    public static final class Builder {
        private BackendServiceLocalityLbPolicyCustomPolicyArgs $;

        public Builder() {
            $ = new BackendServiceLocalityLbPolicyCustomPolicyArgs();
        }

        public Builder(BackendServiceLocalityLbPolicyCustomPolicyArgs defaults) {
            $ = new BackendServiceLocalityLbPolicyCustomPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param data An optional, arbitrary JSON object with configuration data, understood
         * by a locally installed custom policy implementation.
         * 
         * @return builder
         * 
         */
        public Builder data(@Nullable Output<String> data) {
            $.data = data;
            return this;
        }

        /**
         * @param data An optional, arbitrary JSON object with configuration data, understood
         * by a locally installed custom policy implementation.
         * 
         * @return builder
         * 
         */
        public Builder data(String data) {
            return data(Output.of(data));
        }

        /**
         * @param name Identifies the custom policy.
         * The value should match the type the custom implementation is registered
         * with on the gRPC clients. It should follow protocol buffer
         * message naming conventions and include the full path (e.g.
         * myorg.CustomLbPolicy). The maximum length is 256 characters.
         * Note that specifying the same custom policy more than once for a
         * backend is not a valid configuration and will be rejected.
         * 
         * @return builder
         * 
         */
        public Builder name(Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Identifies the custom policy.
         * The value should match the type the custom implementation is registered
         * with on the gRPC clients. It should follow protocol buffer
         * message naming conventions and include the full path (e.g.
         * myorg.CustomLbPolicy). The maximum length is 256 characters.
         * Note that specifying the same custom policy more than once for a
         * backend is not a valid configuration and will be rejected.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        public BackendServiceLocalityLbPolicyCustomPolicyArgs build() {
            $.name = Objects.requireNonNull($.name, "expected parameter 'name' to be non-null");
            return $;
        }
    }

}
