<?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;

/**
 * Represents an Image resource.
 * You can use images to create boot disks for your VM instances. For more information, read Images. (== resource_for {$api_version}.images ==)
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.Image</code>
 */
class Image extends \Google\Protobuf\Internal\Message
{
    /**
     * Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
     *
     * Generated from protobuf field <code>string archive_size_bytes = 112657994;</code>
     */
    private $archive_size_bytes = '';
    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>string creation_timestamp = 30525366;</code>
     */
    private $creation_timestamp = '';
    /**
     * The deprecation status associated with this image.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.DeprecationStatus deprecated = 246703539;</code>
     */
    private $deprecated = null;
    /**
     * An optional description of this resource. Provide this property when you create the resource.
     *
     * Generated from protobuf field <code>string description = 154502140;</code>
     */
    private $description = '';
    /**
     * Size of the image when restored onto a persistent disk (in GB).
     *
     * Generated from protobuf field <code>string disk_size_gb = 47828279;</code>
     */
    private $disk_size_gb = '';
    /**
     * The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
     *
     * Generated from protobuf field <code>string family = 60316516;</code>
     */
    private $family = '';
    /**
     * A list of features to enable on the guest operating system. Applicable only for bootable images. Read  Enabling guest operating system features to see a list of available options.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;</code>
     */
    private $guest_os_features;
    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *
     * Generated from protobuf field <code>string id = 3355;</code>
     */
    private $id = '';
    /**
     * Encrypts the image using a customer-supplied encryption key.
     * After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
     * Customer-supplied encryption keys do not protect access to metadata of the disk.
     * If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey image_encryption_key = 111077127;</code>
     */
    private $image_encryption_key = null;
    /**
     * [Output Only] Type of the resource. Always compute#image for images.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     */
    private $kind = '';
    /**
     * A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
     * To see the latest fingerprint, make a get() request to retrieve an image.
     *
     * Generated from protobuf field <code>string label_fingerprint = 178124825;</code>
     */
    private $label_fingerprint = '';
    /**
     * Labels to apply to this image. These can be later modified by the setLabels method.
     *
     * Generated from protobuf field <code>map<string, string> labels = 231759871;</code>
     */
    private $labels;
    /**
     * Integer license codes indicating which licenses are attached to this image.
     *
     * Generated from protobuf field <code>repeated string license_codes = 45482664;</code>
     */
    private $license_codes;
    /**
     * Any applicable license URI.
     *
     * Generated from protobuf field <code>repeated string licenses = 69207122;</code>
     */
    private $licenses;
    /**
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     */
    private $name = '';
    /**
     * The parameters of the raw disk image.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RawDisk raw_disk = 234678100;</code>
     */
    private $raw_disk = null;
    /**
     * [Output Only] Server-defined URL for the resource.
     *
     * Generated from protobuf field <code>string self_link = 187779341;</code>
     */
    private $self_link = '';
    /**
     * Set the secure boot keys of shielded instance.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;</code>
     */
    private $shielded_instance_initial_state = null;
    /**
     * URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
     * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
     * - projects/project/zones/zone/disks/disk
     * - zones/zone/disks/disk
     *
     * Generated from protobuf field <code>string source_disk = 183318337;</code>
     */
    private $source_disk = '';
    /**
     * The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 263065697;</code>
     */
    private $source_disk_encryption_key = null;
    /**
     * [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
     *
     * Generated from protobuf field <code>string source_disk_id = 185755353;</code>
     */
    private $source_disk_id = '';
    /**
     * URL of the source image used to create this image.
     * In order to create an image, you must provide the full or partial URL of one of the following:
     * - The selfLink URL
     * - This property
     * - The rawDisk.source URL
     * - The sourceDisk URL
     *
     * Generated from protobuf field <code>string source_image = 50443319;</code>
     */
    private $source_image = '';
    /**
     * The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_image_encryption_key = 113068203;</code>
     */
    private $source_image_encryption_key = null;
    /**
     * [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
     *
     * Generated from protobuf field <code>string source_image_id = 55328291;</code>
     */
    private $source_image_id = '';
    /**
     * URL of the source snapshot used to create this image.
     * In order to create an image, you must provide the full or partial URL of one of the following:
     * - The selfLink URL
     * - This property
     * - The sourceImage URL
     * - The rawDisk.source URL
     * - The sourceDisk URL
     *
     * Generated from protobuf field <code>string source_snapshot = 126061928;</code>
     */
    private $source_snapshot = '';
    /**
     * The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_snapshot_encryption_key = 35243866;</code>
     */
    private $source_snapshot_encryption_key = null;
    /**
     * [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
     *
     * Generated from protobuf field <code>string source_snapshot_id = 98962258;</code>
     */
    private $source_snapshot_id = '';
    /**
     * The type of the image used to create this disk. The default and only value is RAW
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.Image.SourceType source_type = 183810270;</code>
     */
    private $source_type = 0;
    /**
     * [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.Image.Status status = 181260274;</code>
     */
    private $status = 0;
    /**
     * Cloud Storage bucket storage location of the image (regional or multi-regional).
     *
     * Generated from protobuf field <code>repeated string storage_locations = 59569818;</code>
     */
    private $storage_locations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $archive_size_bytes
     *           Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
     *     @type string $creation_timestamp
     *           [Output Only] Creation timestamp in RFC3339 text format.
     *     @type \Google\Cloud\Compute\V1\DeprecationStatus $deprecated
     *           The deprecation status associated with this image.
     *     @type string $description
     *           An optional description of this resource. Provide this property when you create the resource.
     *     @type string $disk_size_gb
     *           Size of the image when restored onto a persistent disk (in GB).
     *     @type string $family
     *           The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
     *     @type \Google\Cloud\Compute\V1\GuestOsFeature[]|\Google\Protobuf\Internal\RepeatedField $guest_os_features
     *           A list of features to enable on the guest operating system. Applicable only for bootable images. Read  Enabling guest operating system features to see a list of available options.
     *     @type string $id
     *           [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *     @type \Google\Cloud\Compute\V1\CustomerEncryptionKey $image_encryption_key
     *           Encrypts the image using a customer-supplied encryption key.
     *           After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
     *           Customer-supplied encryption keys do not protect access to metadata of the disk.
     *           If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
     *     @type string $kind
     *           [Output Only] Type of the resource. Always compute#image for images.
     *     @type string $label_fingerprint
     *           A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
     *           To see the latest fingerprint, make a get() request to retrieve an image.
     *     @type array|\Google\Protobuf\Internal\MapField $labels
     *           Labels to apply to this image. These can be later modified by the setLabels method.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $license_codes
     *           Integer license codes indicating which licenses are attached to this image.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $licenses
     *           Any applicable license URI.
     *     @type string $name
     *           Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     *     @type \Google\Cloud\Compute\V1\RawDisk $raw_disk
     *           The parameters of the raw disk image.
     *     @type string $self_link
     *           [Output Only] Server-defined URL for the resource.
     *     @type \Google\Cloud\Compute\V1\InitialStateConfig $shielded_instance_initial_state
     *           Set the secure boot keys of shielded instance.
     *     @type string $source_disk
     *           URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
     *           - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
     *           - projects/project/zones/zone/disks/disk
     *           - zones/zone/disks/disk
     *     @type \Google\Cloud\Compute\V1\CustomerEncryptionKey $source_disk_encryption_key
     *           The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
     *     @type string $source_disk_id
     *           [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
     *     @type string $source_image
     *           URL of the source image used to create this image.
     *           In order to create an image, you must provide the full or partial URL of one of the following:
     *           - The selfLink URL
     *           - This property
     *           - The rawDisk.source URL
     *           - The sourceDisk URL
     *     @type \Google\Cloud\Compute\V1\CustomerEncryptionKey $source_image_encryption_key
     *           The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
     *     @type string $source_image_id
     *           [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
     *     @type string $source_snapshot
     *           URL of the source snapshot used to create this image.
     *           In order to create an image, you must provide the full or partial URL of one of the following:
     *           - The selfLink URL
     *           - This property
     *           - The sourceImage URL
     *           - The rawDisk.source URL
     *           - The sourceDisk URL
     *     @type \Google\Cloud\Compute\V1\CustomerEncryptionKey $source_snapshot_encryption_key
     *           The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
     *     @type string $source_snapshot_id
     *           [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
     *     @type int $source_type
     *           The type of the image used to create this disk. The default and only value is RAW
     *     @type int $status
     *           [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $storage_locations
     *           Cloud Storage bucket storage location of the image (regional or multi-regional).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
     *
     * Generated from protobuf field <code>string archive_size_bytes = 112657994;</code>
     * @return string
     */
    public function getArchiveSizeBytes()
    {
        return $this->archive_size_bytes;
    }

    /**
     * Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).
     *
     * Generated from protobuf field <code>string archive_size_bytes = 112657994;</code>
     * @param string $var
     * @return $this
     */
    public function setArchiveSizeBytes($var)
    {
        GPBUtil::checkString($var, True);
        $this->archive_size_bytes = $var;

        return $this;
    }

    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>string creation_timestamp = 30525366;</code>
     * @return string
     */
    public function getCreationTimestamp()
    {
        return $this->creation_timestamp;
    }

    /**
     * [Output Only] Creation timestamp in RFC3339 text format.
     *
     * Generated from protobuf field <code>string creation_timestamp = 30525366;</code>
     * @param string $var
     * @return $this
     */
    public function setCreationTimestamp($var)
    {
        GPBUtil::checkString($var, True);
        $this->creation_timestamp = $var;

        return $this;
    }

    /**
     * The deprecation status associated with this image.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.DeprecationStatus deprecated = 246703539;</code>
     * @return \Google\Cloud\Compute\V1\DeprecationStatus
     */
    public function getDeprecated()
    {
        return isset($this->deprecated) ? $this->deprecated : null;
    }

    public function hasDeprecated()
    {
        return isset($this->deprecated);
    }

    public function clearDeprecated()
    {
        unset($this->deprecated);
    }

    /**
     * The deprecation status associated with this image.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.DeprecationStatus deprecated = 246703539;</code>
     * @param \Google\Cloud\Compute\V1\DeprecationStatus $var
     * @return $this
     */
    public function setDeprecated($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\DeprecationStatus::class);
        $this->deprecated = $var;

        return $this;
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     *
     * Generated from protobuf field <code>string description = 154502140;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * An optional description of this resource. Provide this property when you create the resource.
     *
     * Generated from protobuf field <code>string description = 154502140;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * Size of the image when restored onto a persistent disk (in GB).
     *
     * Generated from protobuf field <code>string disk_size_gb = 47828279;</code>
     * @return string
     */
    public function getDiskSizeGb()
    {
        return $this->disk_size_gb;
    }

    /**
     * Size of the image when restored onto a persistent disk (in GB).
     *
     * Generated from protobuf field <code>string disk_size_gb = 47828279;</code>
     * @param string $var
     * @return $this
     */
    public function setDiskSizeGb($var)
    {
        GPBUtil::checkString($var, True);
        $this->disk_size_gb = $var;

        return $this;
    }

    /**
     * The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
     *
     * Generated from protobuf field <code>string family = 60316516;</code>
     * @return string
     */
    public function getFamily()
    {
        return $this->family;
    }

    /**
     * The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035.
     *
     * Generated from protobuf field <code>string family = 60316516;</code>
     * @param string $var
     * @return $this
     */
    public function setFamily($var)
    {
        GPBUtil::checkString($var, True);
        $this->family = $var;

        return $this;
    }

    /**
     * A list of features to enable on the guest operating system. Applicable only for bootable images. Read  Enabling guest operating system features to see a list of available options.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getGuestOsFeatures()
    {
        return $this->guest_os_features;
    }

    /**
     * A list of features to enable on the guest operating system. Applicable only for bootable images. Read  Enabling guest operating system features to see a list of available options.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.GuestOsFeature guest_os_features = 79294545;</code>
     * @param \Google\Cloud\Compute\V1\GuestOsFeature[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setGuestOsFeatures($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\GuestOsFeature::class);
        $this->guest_os_features = $arr;

        return $this;
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *
     * Generated from protobuf field <code>string id = 3355;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
     *
     * Generated from protobuf field <code>string id = 3355;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Encrypts the image using a customer-supplied encryption key.
     * After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
     * Customer-supplied encryption keys do not protect access to metadata of the disk.
     * If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey image_encryption_key = 111077127;</code>
     * @return \Google\Cloud\Compute\V1\CustomerEncryptionKey
     */
    public function getImageEncryptionKey()
    {
        return isset($this->image_encryption_key) ? $this->image_encryption_key : null;
    }

    public function hasImageEncryptionKey()
    {
        return isset($this->image_encryption_key);
    }

    public function clearImageEncryptionKey()
    {
        unset($this->image_encryption_key);
    }

    /**
     * Encrypts the image using a customer-supplied encryption key.
     * After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image).
     * Customer-supplied encryption keys do not protect access to metadata of the disk.
     * If you do not provide an encryption key when creating the image, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the image later.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey image_encryption_key = 111077127;</code>
     * @param \Google\Cloud\Compute\V1\CustomerEncryptionKey $var
     * @return $this
     */
    public function setImageEncryptionKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\CustomerEncryptionKey::class);
        $this->image_encryption_key = $var;

        return $this;
    }

    /**
     * [Output Only] Type of the resource. Always compute#image for images.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     * @return string
     */
    public function getKind()
    {
        return $this->kind;
    }

    /**
     * [Output Only] Type of the resource. Always compute#image for images.
     *
     * Generated from protobuf field <code>string kind = 3292052;</code>
     * @param string $var
     * @return $this
     */
    public function setKind($var)
    {
        GPBUtil::checkString($var, True);
        $this->kind = $var;

        return $this;
    }

    /**
     * A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
     * To see the latest fingerprint, make a get() request to retrieve an image.
     *
     * Generated from protobuf field <code>string label_fingerprint = 178124825;</code>
     * @return string
     */
    public function getLabelFingerprint()
    {
        return $this->label_fingerprint;
    }

    /**
     * A fingerprint for the labels being applied to this image, which is essentially a hash of the labels used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
     * To see the latest fingerprint, make a get() request to retrieve an image.
     *
     * Generated from protobuf field <code>string label_fingerprint = 178124825;</code>
     * @param string $var
     * @return $this
     */
    public function setLabelFingerprint($var)
    {
        GPBUtil::checkString($var, True);
        $this->label_fingerprint = $var;

        return $this;
    }

    /**
     * Labels to apply to this image. These can be later modified by the setLabels method.
     *
     * Generated from protobuf field <code>map<string, string> labels = 231759871;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getLabels()
    {
        return $this->labels;
    }

    /**
     * Labels to apply to this image. These can be later modified by the setLabels method.
     *
     * Generated from protobuf field <code>map<string, string> labels = 231759871;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setLabels($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->labels = $arr;

        return $this;
    }

    /**
     * Integer license codes indicating which licenses are attached to this image.
     *
     * Generated from protobuf field <code>repeated string license_codes = 45482664;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLicenseCodes()
    {
        return $this->license_codes;
    }

    /**
     * Integer license codes indicating which licenses are attached to this image.
     *
     * Generated from protobuf field <code>repeated string license_codes = 45482664;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLicenseCodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->license_codes = $arr;

        return $this;
    }

    /**
     * Any applicable license URI.
     *
     * Generated from protobuf field <code>repeated string licenses = 69207122;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLicenses()
    {
        return $this->licenses;
    }

    /**
     * Any applicable license URI.
     *
     * Generated from protobuf field <code>repeated string licenses = 69207122;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLicenses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->licenses = $arr;

        return $this;
    }

    /**
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     *
     * Generated from protobuf field <code>string name = 3373707;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The parameters of the raw disk image.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RawDisk raw_disk = 234678100;</code>
     * @return \Google\Cloud\Compute\V1\RawDisk
     */
    public function getRawDisk()
    {
        return isset($this->raw_disk) ? $this->raw_disk : null;
    }

    public function hasRawDisk()
    {
        return isset($this->raw_disk);
    }

    public function clearRawDisk()
    {
        unset($this->raw_disk);
    }

    /**
     * The parameters of the raw disk image.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.RawDisk raw_disk = 234678100;</code>
     * @param \Google\Cloud\Compute\V1\RawDisk $var
     * @return $this
     */
    public function setRawDisk($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\RawDisk::class);
        $this->raw_disk = $var;

        return $this;
    }

    /**
     * [Output Only] Server-defined URL for the resource.
     *
     * Generated from protobuf field <code>string self_link = 187779341;</code>
     * @return string
     */
    public function getSelfLink()
    {
        return $this->self_link;
    }

    /**
     * [Output Only] Server-defined URL for the resource.
     *
     * Generated from protobuf field <code>string self_link = 187779341;</code>
     * @param string $var
     * @return $this
     */
    public function setSelfLink($var)
    {
        GPBUtil::checkString($var, True);
        $this->self_link = $var;

        return $this;
    }

    /**
     * Set the secure boot keys of shielded instance.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;</code>
     * @return \Google\Cloud\Compute\V1\InitialStateConfig
     */
    public function getShieldedInstanceInitialState()
    {
        return isset($this->shielded_instance_initial_state) ? $this->shielded_instance_initial_state : null;
    }

    public function hasShieldedInstanceInitialState()
    {
        return isset($this->shielded_instance_initial_state);
    }

    public function clearShieldedInstanceInitialState()
    {
        unset($this->shielded_instance_initial_state);
    }

    /**
     * Set the secure boot keys of shielded instance.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.InitialStateConfig shielded_instance_initial_state = 192356867;</code>
     * @param \Google\Cloud\Compute\V1\InitialStateConfig $var
     * @return $this
     */
    public function setShieldedInstanceInitialState($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InitialStateConfig::class);
        $this->shielded_instance_initial_state = $var;

        return $this;
    }

    /**
     * URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
     * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
     * - projects/project/zones/zone/disks/disk
     * - zones/zone/disks/disk
     *
     * Generated from protobuf field <code>string source_disk = 183318337;</code>
     * @return string
     */
    public function getSourceDisk()
    {
        return $this->source_disk;
    }

    /**
     * URL of the source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values:
     * - https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
     * - projects/project/zones/zone/disks/disk
     * - zones/zone/disks/disk
     *
     * Generated from protobuf field <code>string source_disk = 183318337;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceDisk($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_disk = $var;

        return $this;
    }

    /**
     * The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 263065697;</code>
     * @return \Google\Cloud\Compute\V1\CustomerEncryptionKey
     */
    public function getSourceDiskEncryptionKey()
    {
        return isset($this->source_disk_encryption_key) ? $this->source_disk_encryption_key : null;
    }

    public function hasSourceDiskEncryptionKey()
    {
        return isset($this->source_disk_encryption_key);
    }

    public function clearSourceDiskEncryptionKey()
    {
        unset($this->source_disk_encryption_key);
    }

    /**
     * The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_disk_encryption_key = 263065697;</code>
     * @param \Google\Cloud\Compute\V1\CustomerEncryptionKey $var
     * @return $this
     */
    public function setSourceDiskEncryptionKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\CustomerEncryptionKey::class);
        $this->source_disk_encryption_key = $var;

        return $this;
    }

    /**
     * [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
     *
     * Generated from protobuf field <code>string source_disk_id = 185755353;</code>
     * @return string
     */
    public function getSourceDiskId()
    {
        return $this->source_disk_id;
    }

    /**
     * [Output Only] The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name.
     *
     * Generated from protobuf field <code>string source_disk_id = 185755353;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceDiskId($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_disk_id = $var;

        return $this;
    }

    /**
     * URL of the source image used to create this image.
     * In order to create an image, you must provide the full or partial URL of one of the following:
     * - The selfLink URL
     * - This property
     * - The rawDisk.source URL
     * - The sourceDisk URL
     *
     * Generated from protobuf field <code>string source_image = 50443319;</code>
     * @return string
     */
    public function getSourceImage()
    {
        return $this->source_image;
    }

    /**
     * URL of the source image used to create this image.
     * In order to create an image, you must provide the full or partial URL of one of the following:
     * - The selfLink URL
     * - This property
     * - The rawDisk.source URL
     * - The sourceDisk URL
     *
     * Generated from protobuf field <code>string source_image = 50443319;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceImage($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_image = $var;

        return $this;
    }

    /**
     * The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_image_encryption_key = 113068203;</code>
     * @return \Google\Cloud\Compute\V1\CustomerEncryptionKey
     */
    public function getSourceImageEncryptionKey()
    {
        return isset($this->source_image_encryption_key) ? $this->source_image_encryption_key : null;
    }

    public function hasSourceImageEncryptionKey()
    {
        return isset($this->source_image_encryption_key);
    }

    public function clearSourceImageEncryptionKey()
    {
        unset($this->source_image_encryption_key);
    }

    /**
     * The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_image_encryption_key = 113068203;</code>
     * @param \Google\Cloud\Compute\V1\CustomerEncryptionKey $var
     * @return $this
     */
    public function setSourceImageEncryptionKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\CustomerEncryptionKey::class);
        $this->source_image_encryption_key = $var;

        return $this;
    }

    /**
     * [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
     *
     * Generated from protobuf field <code>string source_image_id = 55328291;</code>
     * @return string
     */
    public function getSourceImageId()
    {
        return $this->source_image_id;
    }

    /**
     * [Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name.
     *
     * Generated from protobuf field <code>string source_image_id = 55328291;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceImageId($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_image_id = $var;

        return $this;
    }

    /**
     * URL of the source snapshot used to create this image.
     * In order to create an image, you must provide the full or partial URL of one of the following:
     * - The selfLink URL
     * - This property
     * - The sourceImage URL
     * - The rawDisk.source URL
     * - The sourceDisk URL
     *
     * Generated from protobuf field <code>string source_snapshot = 126061928;</code>
     * @return string
     */
    public function getSourceSnapshot()
    {
        return $this->source_snapshot;
    }

    /**
     * URL of the source snapshot used to create this image.
     * In order to create an image, you must provide the full or partial URL of one of the following:
     * - The selfLink URL
     * - This property
     * - The sourceImage URL
     * - The rawDisk.source URL
     * - The sourceDisk URL
     *
     * Generated from protobuf field <code>string source_snapshot = 126061928;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceSnapshot($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_snapshot = $var;

        return $this;
    }

    /**
     * The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_snapshot_encryption_key = 35243866;</code>
     * @return \Google\Cloud\Compute\V1\CustomerEncryptionKey
     */
    public function getSourceSnapshotEncryptionKey()
    {
        return isset($this->source_snapshot_encryption_key) ? $this->source_snapshot_encryption_key : null;
    }

    public function hasSourceSnapshotEncryptionKey()
    {
        return isset($this->source_snapshot_encryption_key);
    }

    public function clearSourceSnapshotEncryptionKey()
    {
        unset($this->source_snapshot_encryption_key);
    }

    /**
     * The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.CustomerEncryptionKey source_snapshot_encryption_key = 35243866;</code>
     * @param \Google\Cloud\Compute\V1\CustomerEncryptionKey $var
     * @return $this
     */
    public function setSourceSnapshotEncryptionKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\CustomerEncryptionKey::class);
        $this->source_snapshot_encryption_key = $var;

        return $this;
    }

    /**
     * [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
     *
     * Generated from protobuf field <code>string source_snapshot_id = 98962258;</code>
     * @return string
     */
    public function getSourceSnapshotId()
    {
        return $this->source_snapshot_id;
    }

    /**
     * [Output Only] The ID value of the snapshot used to create this image. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given snapshot name.
     *
     * Generated from protobuf field <code>string source_snapshot_id = 98962258;</code>
     * @param string $var
     * @return $this
     */
    public function setSourceSnapshotId($var)
    {
        GPBUtil::checkString($var, True);
        $this->source_snapshot_id = $var;

        return $this;
    }

    /**
     * The type of the image used to create this disk. The default and only value is RAW
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.Image.SourceType source_type = 183810270;</code>
     * @return int
     */
    public function getSourceType()
    {
        return $this->source_type;
    }

    /**
     * The type of the image used to create this disk. The default and only value is RAW
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.Image.SourceType source_type = 183810270;</code>
     * @param int $var
     * @return $this
     */
    public function setSourceType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Compute\V1\Image\SourceType::class);
        $this->source_type = $var;

        return $this;
    }

    /**
     * [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.Image.Status status = 181260274;</code>
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * [Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.Image.Status status = 181260274;</code>
     * @param int $var
     * @return $this
     */
    public function setStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Compute\V1\Image\Status::class);
        $this->status = $var;

        return $this;
    }

    /**
     * Cloud Storage bucket storage location of the image (regional or multi-regional).
     *
     * Generated from protobuf field <code>repeated string storage_locations = 59569818;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getStorageLocations()
    {
        return $this->storage_locations;
    }

    /**
     * Cloud Storage bucket storage location of the image (regional or multi-regional).
     *
     * Generated from protobuf field <code>repeated string storage_locations = 59569818;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setStorageLocations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->storage_locations = $arr;

        return $this;
    }

}

