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

com.pulumi.azurenative.machinelearningservices.outputs.TrialComponentResponse Maven / Gradle / Ivy

There is a newer version: 2.82.0
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.azurenative.machinelearningservices.outputs;

import com.pulumi.azurenative.machinelearningservices.outputs.JobResourceConfigurationResponse;
import com.pulumi.azurenative.machinelearningservices.outputs.MpiResponse;
import com.pulumi.azurenative.machinelearningservices.outputs.PyTorchResponse;
import com.pulumi.azurenative.machinelearningservices.outputs.TensorFlowResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class TrialComponentResponse {
    /**
     * @return ARM resource ID of the code asset.
     * 
     */
    private @Nullable String codeId;
    /**
     * @return [Required] The command to execute on startup of the job. eg. "python train.py"
     * 
     */
    private String command;
    /**
     * @return Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.
     * 
     */
    private @Nullable Object distribution;
    /**
     * @return [Required] The ARM resource ID of the Environment specification for the job.
     * 
     */
    private String environmentId;
    /**
     * @return Environment variables included in the job.
     * 
     */
    private @Nullable Map environmentVariables;
    /**
     * @return Compute Resource configuration for the job.
     * 
     */
    private @Nullable JobResourceConfigurationResponse resources;

    private TrialComponentResponse() {}
    /**
     * @return ARM resource ID of the code asset.
     * 
     */
    public Optional codeId() {
        return Optional.ofNullable(this.codeId);
    }
    /**
     * @return [Required] The command to execute on startup of the job. eg. "python train.py"
     * 
     */
    public String command() {
        return this.command;
    }
    /**
     * @return Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.
     * 
     */
    public Optional distribution() {
        return Optional.ofNullable(this.distribution);
    }
    /**
     * @return [Required] The ARM resource ID of the Environment specification for the job.
     * 
     */
    public String environmentId() {
        return this.environmentId;
    }
    /**
     * @return Environment variables included in the job.
     * 
     */
    public Map environmentVariables() {
        return this.environmentVariables == null ? Map.of() : this.environmentVariables;
    }
    /**
     * @return Compute Resource configuration for the job.
     * 
     */
    public Optional resources() {
        return Optional.ofNullable(this.resources);
    }

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

    public static Builder builder(TrialComponentResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String codeId;
        private String command;
        private @Nullable Object distribution;
        private String environmentId;
        private @Nullable Map environmentVariables;
        private @Nullable JobResourceConfigurationResponse resources;
        public Builder() {}
        public Builder(TrialComponentResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.codeId = defaults.codeId;
    	      this.command = defaults.command;
    	      this.distribution = defaults.distribution;
    	      this.environmentId = defaults.environmentId;
    	      this.environmentVariables = defaults.environmentVariables;
    	      this.resources = defaults.resources;
        }

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

            this.codeId = codeId;
            return this;
        }
        @CustomType.Setter
        public Builder command(String command) {
            if (command == null) {
              throw new MissingRequiredPropertyException("TrialComponentResponse", "command");
            }
            this.command = command;
            return this;
        }
        @CustomType.Setter
        public Builder distribution(@Nullable Object distribution) {

            this.distribution = distribution;
            return this;
        }
        @CustomType.Setter
        public Builder environmentId(String environmentId) {
            if (environmentId == null) {
              throw new MissingRequiredPropertyException("TrialComponentResponse", "environmentId");
            }
            this.environmentId = environmentId;
            return this;
        }
        @CustomType.Setter
        public Builder environmentVariables(@Nullable Map environmentVariables) {

            this.environmentVariables = environmentVariables;
            return this;
        }
        @CustomType.Setter
        public Builder resources(@Nullable JobResourceConfigurationResponse resources) {

            this.resources = resources;
            return this;
        }
        public TrialComponentResponse build() {
            final var _resultValue = new TrialComponentResponse();
            _resultValue.codeId = codeId;
            _resultValue.command = command;
            _resultValue.distribution = distribution;
            _resultValue.environmentId = environmentId;
            _resultValue.environmentVariables = environmentVariables;
            _resultValue.resources = resources;
            return _resultValue;
        }
    }
}