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

import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;

@CustomType
public final class ClusterClusterConfigMasterConfigAccelerator {
    /**
     * @return The number of the accelerator cards of this type exposed to this instance. Often restricted to one of `1`, `2`, `4`, or `8`.
     * 
     * &gt; The Cloud Dataproc API can return unintuitive error messages when using accelerators; even when you have defined an accelerator, Auto Zone Placement does not exclusively select
     * zones that have that accelerator available. If you get a 400 error that the accelerator can&#39;t be found, this is a likely cause. Make sure you check [accelerator availability by zone](https://cloud.google.com/compute/docs/reference/rest/v1/acceleratorTypes/list)
     * if you are trying to use accelerators in a given zone.
     * 
     * ***
     * 
     * &gt; The Cloud Dataproc API can return unintuitive error messages when using accelerators; even when you have defined an accelerator, Auto Zone Placement does not exclusively select
     * zones that have that accelerator available. If you get a 400 error that the accelerator can&#39;t be found, this is a likely cause. Make sure you check [accelerator availability by zone](https://cloud.google.com/compute/docs/reference/rest/v1/acceleratorTypes/list)
     * if you are trying to use accelerators in a given zone.
     * 
     * ***
     * 
     */
    private Integer acceleratorCount;
    /**
     * @return The short name of the accelerator type to expose to this instance. For example, `nvidia-tesla-k80`.
     * 
     */
    private String acceleratorType;

    private ClusterClusterConfigMasterConfigAccelerator() {}
    /**
     * @return The number of the accelerator cards of this type exposed to this instance. Often restricted to one of `1`, `2`, `4`, or `8`.
     * 
     * &gt; The Cloud Dataproc API can return unintuitive error messages when using accelerators; even when you have defined an accelerator, Auto Zone Placement does not exclusively select
     * zones that have that accelerator available. If you get a 400 error that the accelerator can&#39;t be found, this is a likely cause. Make sure you check [accelerator availability by zone](https://cloud.google.com/compute/docs/reference/rest/v1/acceleratorTypes/list)
     * if you are trying to use accelerators in a given zone.
     * 
     * ***
     * 
     * &gt; The Cloud Dataproc API can return unintuitive error messages when using accelerators; even when you have defined an accelerator, Auto Zone Placement does not exclusively select
     * zones that have that accelerator available. If you get a 400 error that the accelerator can&#39;t be found, this is a likely cause. Make sure you check [accelerator availability by zone](https://cloud.google.com/compute/docs/reference/rest/v1/acceleratorTypes/list)
     * if you are trying to use accelerators in a given zone.
     * 
     * ***
     * 
     */
    public Integer acceleratorCount() {
        return this.acceleratorCount;
    }
    /**
     * @return The short name of the accelerator type to expose to this instance. For example, `nvidia-tesla-k80`.
     * 
     */
    public String acceleratorType() {
        return this.acceleratorType;
    }

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

    public static Builder builder(ClusterClusterConfigMasterConfigAccelerator defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Integer acceleratorCount;
        private String acceleratorType;
        public Builder() {}
        public Builder(ClusterClusterConfigMasterConfigAccelerator defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.acceleratorCount = defaults.acceleratorCount;
    	      this.acceleratorType = defaults.acceleratorType;
        }

        @CustomType.Setter
        public Builder acceleratorCount(Integer acceleratorCount) {
            this.acceleratorCount = Objects.requireNonNull(acceleratorCount);
            return this;
        }
        @CustomType.Setter
        public Builder acceleratorType(String acceleratorType) {
            this.acceleratorType = Objects.requireNonNull(acceleratorType);
            return this;
        }
        public ClusterClusterConfigMasterConfigAccelerator build() {
            final var o = new ClusterClusterConfigMasterConfigAccelerator();
            o.acceleratorCount = acceleratorCount;
            o.acceleratorType = acceleratorType;
            return o;
        }
    }
}
