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

namespace Google\Cloud\Build\V1\Artifacts;

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

/**
 * Files in the workspace to upload to Cloud Storage upon successful
 * completion of all build steps.
 *
 * Generated from protobuf message <code>google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects</code>
 */
class ArtifactObjects extends \Google\Protobuf\Internal\Message
{
    /**
     * Cloud Storage bucket and optional object path, in the form
     * "gs://bucket/path/to/somewhere/". (see [Bucket Name
     * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
     * Files in the workspace matching any path pattern will be uploaded to
     * Cloud Storage with this location as a prefix.
     *
     * Generated from protobuf field <code>string location = 1;</code>
     */
    private $location = '';
    /**
     * Path globs used to match files in the build's workspace.
     *
     * Generated from protobuf field <code>repeated string paths = 2;</code>
     */
    private $paths;
    /**
     * Output only. Stores timing information for pushing all artifact objects.
     *
     * Generated from protobuf field <code>.google.devtools.cloudbuild.v1.TimeSpan timing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $timing = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $location
     *           Cloud Storage bucket and optional object path, in the form
     *           "gs://bucket/path/to/somewhere/". (see [Bucket Name
     *           Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
     *           Files in the workspace matching any path pattern will be uploaded to
     *           Cloud Storage with this location as a prefix.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $paths
     *           Path globs used to match files in the build's workspace.
     *     @type \Google\Cloud\Build\V1\TimeSpan $timing
     *           Output only. Stores timing information for pushing all artifact objects.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Devtools\Cloudbuild\V1\Cloudbuild::initOnce();
        parent::__construct($data);
    }

    /**
     * Cloud Storage bucket and optional object path, in the form
     * "gs://bucket/path/to/somewhere/". (see [Bucket Name
     * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
     * Files in the workspace matching any path pattern will be uploaded to
     * Cloud Storage with this location as a prefix.
     *
     * Generated from protobuf field <code>string location = 1;</code>
     * @return string
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Cloud Storage bucket and optional object path, in the form
     * "gs://bucket/path/to/somewhere/". (see [Bucket Name
     * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).
     * Files in the workspace matching any path pattern will be uploaded to
     * Cloud Storage with this location as a prefix.
     *
     * Generated from protobuf field <code>string location = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkString($var, True);
        $this->location = $var;

        return $this;
    }

    /**
     * Path globs used to match files in the build's workspace.
     *
     * Generated from protobuf field <code>repeated string paths = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPaths()
    {
        return $this->paths;
    }

    /**
     * Path globs used to match files in the build's workspace.
     *
     * Generated from protobuf field <code>repeated string paths = 2;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPaths($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->paths = $arr;

        return $this;
    }

    /**
     * Output only. Stores timing information for pushing all artifact objects.
     *
     * Generated from protobuf field <code>.google.devtools.cloudbuild.v1.TimeSpan timing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Build\V1\TimeSpan|null
     */
    public function getTiming()
    {
        return isset($this->timing) ? $this->timing : null;
    }

    public function hasTiming()
    {
        return isset($this->timing);
    }

    public function clearTiming()
    {
        unset($this->timing);
    }

    /**
     * Output only. Stores timing information for pushing all artifact objects.
     *
     * Generated from protobuf field <code>.google.devtools.cloudbuild.v1.TimeSpan timing = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Build\V1\TimeSpan $var
     * @return $this
     */
    public function setTiming($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Build\V1\TimeSpan::class);
        $this->timing = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ArtifactObjects::class, \Google\Cloud\Build\V1\Artifacts_ArtifactObjects::class);

