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

namespace Google\Cloud\Batch\V1;

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

/**
 * LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be
 * preserved.
 *
 * Generated from protobuf message <code>google.cloud.batch.v1.LogsPolicy</code>
 */
class LogsPolicy extends \Google\Protobuf\Internal\Message
{
    /**
     * Where logs should be saved.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;</code>
     */
    private $destination = 0;
    /**
     * The path to which logs are saved when the destination = PATH. This can be a
     * local file path on the VM, or under the mount point of a Persistent Disk or
     * Filestore, or a Cloud Storage path.
     *
     * Generated from protobuf field <code>string logs_path = 2;</code>
     */
    private $logs_path = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $destination
     *           Where logs should be saved.
     *     @type string $logs_path
     *           The path to which logs are saved when the destination = PATH. This can be a
     *           local file path on the VM, or under the mount point of a Persistent Disk or
     *           Filestore, or a Cloud Storage path.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce();
        parent::__construct($data);
    }

    /**
     * Where logs should be saved.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;</code>
     * @return int
     */
    public function getDestination()
    {
        return $this->destination;
    }

    /**
     * Where logs should be saved.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.LogsPolicy.Destination destination = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setDestination($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\LogsPolicy\Destination::class);
        $this->destination = $var;

        return $this;
    }

    /**
     * The path to which logs are saved when the destination = PATH. This can be a
     * local file path on the VM, or under the mount point of a Persistent Disk or
     * Filestore, or a Cloud Storage path.
     *
     * Generated from protobuf field <code>string logs_path = 2;</code>
     * @return string
     */
    public function getLogsPath()
    {
        return $this->logs_path;
    }

    /**
     * The path to which logs are saved when the destination = PATH. This can be a
     * local file path on the VM, or under the mount point of a Persistent Disk or
     * Filestore, or a Cloud Storage path.
     *
     * Generated from protobuf field <code>string logs_path = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setLogsPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->logs_path = $var;

        return $this;
    }

}

