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

namespace Google\Cloud\OsConfig\V1;

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

/**
 * Cloud Storage object representation.
 *
 * Generated from protobuf message <code>google.cloud.osconfig.v1.GcsObject</code>
 */
class GcsObject extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Bucket of the Cloud Storage object.
     *
     * Generated from protobuf field <code>string bucket = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $bucket = '';
    /**
     * Required. Name of the Cloud Storage object.
     *
     * Generated from protobuf field <code>string object = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $object = '';
    /**
     * Required. Generation number of the Cloud Storage object. This is used to
     * ensure that the ExecStep specified by this PatchJob does not change.
     *
     * Generated from protobuf field <code>int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $generation_number = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $bucket
     *           Required. Bucket of the Cloud Storage object.
     *     @type string $object
     *           Required. Name of the Cloud Storage object.
     *     @type int|string $generation_number
     *           Required. Generation number of the Cloud Storage object. This is used to
     *           ensure that the ExecStep specified by this PatchJob does not change.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Bucket of the Cloud Storage object.
     *
     * Generated from protobuf field <code>string bucket = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getBucket()
    {
        return $this->bucket;
    }

    /**
     * Required. Bucket of the Cloud Storage object.
     *
     * Generated from protobuf field <code>string bucket = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setBucket($var)
    {
        GPBUtil::checkString($var, True);
        $this->bucket = $var;

        return $this;
    }

    /**
     * Required. Name of the Cloud Storage object.
     *
     * Generated from protobuf field <code>string object = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getObject()
    {
        return $this->object;
    }

    /**
     * Required. Name of the Cloud Storage object.
     *
     * Generated from protobuf field <code>string object = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setObject($var)
    {
        GPBUtil::checkString($var, True);
        $this->object = $var;

        return $this;
    }

    /**
     * Required. Generation number of the Cloud Storage object. This is used to
     * ensure that the ExecStep specified by this PatchJob does not change.
     *
     * Generated from protobuf field <code>int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int|string
     */
    public function getGenerationNumber()
    {
        return $this->generation_number;
    }

    /**
     * Required. Generation number of the Cloud Storage object. This is used to
     * ensure that the ExecStep specified by this PatchJob does not change.
     *
     * Generated from protobuf field <code>int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int|string $var
     * @return $this
     */
    public function setGenerationNumber($var)
    {
        GPBUtil::checkInt64($var);
        $this->generation_number = $var;

        return $this;
    }

}

