<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/optimization/v1/fleet_routing.proto

namespace Google\Cloud\Optimization\V1\BatchOptimizeToursRequest;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Information for solving one optimization model asynchronously.
 *
 * Generated from protobuf message <code>google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig</code>
 */
class AsyncModelConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * User defined model name, can be used as alias by users to keep track of
     * models.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     */
    private $display_name = '';
    /**
     * Required. Information about the input model.
     *
     * Generated from protobuf field <code>.google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $input_config = null;
    /**
     * Required. The desired output location information.
     *
     * Generated from protobuf field <code>.google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $output_config = null;
    /**
     * If this is set, the model will be solved in the checkpoint mode. In this
     * mode, the input model can have a deadline longer than 30 mins without the
     * risk of interruption. The model will be solved in multiple short-running
     * stages. Each stage generates an intermediate checkpoint
     * and stores it in the user's Cloud Storage buckets. The checkpoint
     * mode should be preferred over
     * allow_large_deadline_despite_interruption_risk since it prevents the risk
     * of interruption.
     *
     * Generated from protobuf field <code>bool enable_checkpoints = 4;</code>
     */
    private $enable_checkpoints = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $display_name
     *           User defined model name, can be used as alias by users to keep track of
     *           models.
     *     @type \Google\Cloud\Optimization\V1\InputConfig $input_config
     *           Required. Information about the input model.
     *     @type \Google\Cloud\Optimization\V1\OutputConfig $output_config
     *           Required. The desired output location information.
     *     @type bool $enable_checkpoints
     *           If this is set, the model will be solved in the checkpoint mode. In this
     *           mode, the input model can have a deadline longer than 30 mins without the
     *           risk of interruption. The model will be solved in multiple short-running
     *           stages. Each stage generates an intermediate checkpoint
     *           and stores it in the user's Cloud Storage buckets. The checkpoint
     *           mode should be preferred over
     *           allow_large_deadline_despite_interruption_risk since it prevents the risk
     *           of interruption.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce();
        parent::__construct($data);
    }

    /**
     * User defined model name, can be used as alias by users to keep track of
     * models.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * User defined model name, can be used as alias by users to keep track of
     * models.
     *
     * Generated from protobuf field <code>string display_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Required. Information about the input model.
     *
     * Generated from protobuf field <code>.google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Optimization\V1\InputConfig|null
     */
    public function getInputConfig()
    {
        return $this->input_config;
    }

    public function hasInputConfig()
    {
        return isset($this->input_config);
    }

    public function clearInputConfig()
    {
        unset($this->input_config);
    }

    /**
     * Required. Information about the input model.
     *
     * Generated from protobuf field <code>.google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Optimization\V1\InputConfig $var
     * @return $this
     */
    public function setInputConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\InputConfig::class);
        $this->input_config = $var;

        return $this;
    }

    /**
     * Required. The desired output location information.
     *
     * Generated from protobuf field <code>.google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Optimization\V1\OutputConfig|null
     */
    public function getOutputConfig()
    {
        return $this->output_config;
    }

    public function hasOutputConfig()
    {
        return isset($this->output_config);
    }

    public function clearOutputConfig()
    {
        unset($this->output_config);
    }

    /**
     * Required. The desired output location information.
     *
     * Generated from protobuf field <code>.google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Optimization\V1\OutputConfig $var
     * @return $this
     */
    public function setOutputConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\OutputConfig::class);
        $this->output_config = $var;

        return $this;
    }

    /**
     * If this is set, the model will be solved in the checkpoint mode. In this
     * mode, the input model can have a deadline longer than 30 mins without the
     * risk of interruption. The model will be solved in multiple short-running
     * stages. Each stage generates an intermediate checkpoint
     * and stores it in the user's Cloud Storage buckets. The checkpoint
     * mode should be preferred over
     * allow_large_deadline_despite_interruption_risk since it prevents the risk
     * of interruption.
     *
     * Generated from protobuf field <code>bool enable_checkpoints = 4;</code>
     * @return bool
     */
    public function getEnableCheckpoints()
    {
        return $this->enable_checkpoints;
    }

    /**
     * If this is set, the model will be solved in the checkpoint mode. In this
     * mode, the input model can have a deadline longer than 30 mins without the
     * risk of interruption. The model will be solved in multiple short-running
     * stages. Each stage generates an intermediate checkpoint
     * and stores it in the user's Cloud Storage buckets. The checkpoint
     * mode should be preferred over
     * allow_large_deadline_despite_interruption_risk since it prevents the risk
     * of interruption.
     *
     * Generated from protobuf field <code>bool enable_checkpoints = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnableCheckpoints($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_checkpoints = $var;

        return $this;
    }

}


