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

namespace Google\Cloud\Compute\V1;

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

/**
 * The parameters of the raw disk image.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.RawDisk</code>
 */
class RawDisk extends \Google\Protobuf\Internal\Message
{
    /**
     * The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
     * Check the ContainerType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string container_type = 318809144;</code>
     */
    private $container_type = null;
    /**
     * [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
     *
     * Generated from protobuf field <code>optional string sha1_checksum = 314444349;</code>
     */
    private $sha1_checksum = null;
    /**
     * The full Google Cloud Storage URL where the raw disk image archive is stored. The following are valid formats for the URL: - https://storage.googleapis.com/bucket_name/image_archive_name - https://storage.googleapis.com/bucket_name/folder_name/ image_archive_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL 
     *
     * Generated from protobuf field <code>optional string source = 177235995;</code>
     */
    private $source = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $container_type
     *           The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
     *           Check the ContainerType enum for the list of possible values.
     *     @type string $sha1_checksum
     *           [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
     *     @type string $source
     *           The full Google Cloud Storage URL where the raw disk image archive is stored. The following are valid formats for the URL: - https://storage.googleapis.com/bucket_name/image_archive_name - https://storage.googleapis.com/bucket_name/folder_name/ image_archive_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL 
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
     * Check the ContainerType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string container_type = 318809144;</code>
     * @return string
     */
    public function getContainerType()
    {
        return isset($this->container_type) ? $this->container_type : '';
    }

    public function hasContainerType()
    {
        return isset($this->container_type);
    }

    public function clearContainerType()
    {
        unset($this->container_type);
    }

    /**
     * The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.
     * Check the ContainerType enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string container_type = 318809144;</code>
     * @param string $var
     * @return $this
     */
    public function setContainerType($var)
    {
        GPBUtil::checkString($var, True);
        $this->container_type = $var;

        return $this;
    }

    /**
     * [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
     *
     * Generated from protobuf field <code>optional string sha1_checksum = 314444349;</code>
     * @return string
     */
    public function getSha1Checksum()
    {
        return isset($this->sha1_checksum) ? $this->sha1_checksum : '';
    }

    public function hasSha1Checksum()
    {
        return isset($this->sha1_checksum);
    }

    public function clearSha1Checksum()
    {
        unset($this->sha1_checksum);
    }

    /**
     * [Deprecated] This field is deprecated. An optional SHA1 checksum of the disk image before unpackaging provided by the client when the disk image is created.
     *
     * Generated from protobuf field <code>optional string sha1_checksum = 314444349;</code>
     * @param string $var
     * @return $this
     */
    public function setSha1Checksum($var)
    {
        GPBUtil::checkString($var, True);
        $this->sha1_checksum = $var;

        return $this;
    }

    /**
     * The full Google Cloud Storage URL where the raw disk image archive is stored. The following are valid formats for the URL: - https://storage.googleapis.com/bucket_name/image_archive_name - https://storage.googleapis.com/bucket_name/folder_name/ image_archive_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL 
     *
     * Generated from protobuf field <code>optional string source = 177235995;</code>
     * @return string
     */
    public function getSource()
    {
        return isset($this->source) ? $this->source : '';
    }

    public function hasSource()
    {
        return isset($this->source);
    }

    public function clearSource()
    {
        unset($this->source);
    }

    /**
     * The full Google Cloud Storage URL where the raw disk image archive is stored. The following are valid formats for the URL: - https://storage.googleapis.com/bucket_name/image_archive_name - https://storage.googleapis.com/bucket_name/folder_name/ image_archive_name In order to create an image, you must provide the full or partial URL of one of the following: - The rawDisk.source URL - The sourceDisk URL - The sourceImage URL - The sourceSnapshot URL 
     *
     * Generated from protobuf field <code>optional string source = 177235995;</code>
     * @param string $var
     * @return $this
     */
    public function setSource($var)
    {
        GPBUtil::checkString($var, True);
        $this->source = $var;

        return $this;
    }

}

