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

namespace Google\Cloud\Kms\V1;

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

/**
 * Response message for [KeyManagementService.AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign].
 *
 * Generated from protobuf message <code>google.cloud.kms.v1.AsymmetricSignResponse</code>
 */
class AsymmetricSignResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The created signature.
     *
     * Generated from protobuf field <code>bytes signature = 1;</code>
     */
    private $signature = '';
    /**
     * Integrity verification field. A CRC32C checksum of the returned
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
     * results to this field. Discard the response in case of non-matching
     * checksum values, and perform a limited number of retries. A persistent
     * mismatch may indicate an issue in your computation of the CRC32C checksum.
     * Note: This field is defined as int64 for reasons of compatibility across
     * different languages. However, it is a non-negative integer, which will
     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
     * that support this type.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value signature_crc32c = 2;</code>
     */
    private $signature_crc32c = null;
    /**
     * Integrity verification field. A flag indicating whether
     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
     * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
     * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
     * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
     * discard the response and perform a limited number of retries.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>bool verified_digest_crc32c = 3;</code>
     */
    private $verified_digest_crc32c = false;
    /**
     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
     * this field to verify that the intended resource was used for signing.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>string name = 4;</code>
     */
    private $name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $signature
     *           The created signature.
     *     @type \Google\Protobuf\Int64Value $signature_crc32c
     *           Integrity verification field. A CRC32C checksum of the returned
     *           [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
     *           [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
     *           CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
     *           results to this field. Discard the response in case of non-matching
     *           checksum values, and perform a limited number of retries. A persistent
     *           mismatch may indicate an issue in your computation of the CRC32C checksum.
     *           Note: This field is defined as int64 for reasons of compatibility across
     *           different languages. However, it is a non-negative integer, which will
     *           never exceed 2^32-1, and can be safely downconverted to uint32 in languages
     *           that support this type.
     *           NOTE: This field is in Beta.
     *     @type bool $verified_digest_crc32c
     *           Integrity verification field. A flag indicating whether
     *           [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
     *           [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
     *           [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
     *           indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
     *           unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     *           set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
     *           discard the response and perform a limited number of retries.
     *           NOTE: This field is in Beta.
     *     @type string $name
     *           The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
     *           this field to verify that the intended resource was used for signing.
     *           NOTE: This field is in Beta.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * The created signature.
     *
     * Generated from protobuf field <code>bytes signature = 1;</code>
     * @return string
     */
    public function getSignature()
    {
        return $this->signature;
    }

    /**
     * The created signature.
     *
     * Generated from protobuf field <code>bytes signature = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSignature($var)
    {
        GPBUtil::checkString($var, False);
        $this->signature = $var;

        return $this;
    }

    /**
     * Integrity verification field. A CRC32C checksum of the returned
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
     * results to this field. Discard the response in case of non-matching
     * checksum values, and perform a limited number of retries. A persistent
     * mismatch may indicate an issue in your computation of the CRC32C checksum.
     * Note: This field is defined as int64 for reasons of compatibility across
     * different languages. However, it is a non-negative integer, which will
     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
     * that support this type.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value signature_crc32c = 2;</code>
     * @return \Google\Protobuf\Int64Value
     */
    public function getSignatureCrc32C()
    {
        return isset($this->signature_crc32c) ? $this->signature_crc32c : null;
    }

    public function hasSignatureCrc32C()
    {
        return isset($this->signature_crc32c);
    }

    public function clearSignatureCrc32C()
    {
        unset($this->signature_crc32c);
    }

    /**
     * Returns the unboxed value from <code>getSignatureCrc32C()</code>

     * Integrity verification field. A CRC32C checksum of the returned
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
     * results to this field. Discard the response in case of non-matching
     * checksum values, and perform a limited number of retries. A persistent
     * mismatch may indicate an issue in your computation of the CRC32C checksum.
     * Note: This field is defined as int64 for reasons of compatibility across
     * different languages. However, it is a non-negative integer, which will
     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
     * that support this type.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value signature_crc32c = 2;</code>
     * @return int|string|null
     */
    public function getSignatureCrc32CValue()
    {
        return $this->readWrapperValue("signature_crc32c");
    }

    /**
     * Integrity verification field. A CRC32C checksum of the returned
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
     * results to this field. Discard the response in case of non-matching
     * checksum values, and perform a limited number of retries. A persistent
     * mismatch may indicate an issue in your computation of the CRC32C checksum.
     * Note: This field is defined as int64 for reasons of compatibility across
     * different languages. However, it is a non-negative integer, which will
     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
     * that support this type.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value signature_crc32c = 2;</code>
     * @param \Google\Protobuf\Int64Value $var
     * @return $this
     */
    public function setSignatureCrc32C($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class);
        $this->signature_crc32c = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object.

     * Integrity verification field. A CRC32C checksum of the returned
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature]. An integrity check of
     * [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] can be performed by computing the
     * CRC32C checksum of [AsymmetricSignResponse.signature][google.cloud.kms.v1.AsymmetricSignResponse.signature] and comparing your
     * results to this field. Discard the response in case of non-matching
     * checksum values, and perform a limited number of retries. A persistent
     * mismatch may indicate an issue in your computation of the CRC32C checksum.
     * Note: This field is defined as int64 for reasons of compatibility across
     * different languages. However, it is a non-negative integer, which will
     * never exceed 2^32-1, and can be safely downconverted to uint32 in languages
     * that support this type.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>.google.protobuf.Int64Value signature_crc32c = 2;</code>
     * @param int|string|null $var
     * @return $this
     */
    public function setSignatureCrc32CValue($var)
    {
        $this->writeWrapperValue("signature_crc32c", $var);
        return $this;}

    /**
     * Integrity verification field. A flag indicating whether
     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
     * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
     * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
     * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
     * discard the response and perform a limited number of retries.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>bool verified_digest_crc32c = 3;</code>
     * @return bool
     */
    public function getVerifiedDigestCrc32C()
    {
        return $this->verified_digest_crc32c;
    }

    /**
     * Integrity verification field. A flag indicating whether
     * [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was received by
     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used for the integrity verification of the
     * [digest][google.cloud.kms.v1.AsymmetricSignRequest.digest]. A false value of this field
     * indicates either that [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] was left
     * unset or that it was not delivered to [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     * set [AsymmetricSignRequest.digest_crc32c][google.cloud.kms.v1.AsymmetricSignRequest.digest_crc32c] but this field is still false,
     * discard the response and perform a limited number of retries.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>bool verified_digest_crc32c = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setVerifiedDigestCrc32C($var)
    {
        GPBUtil::checkBool($var);
        $this->verified_digest_crc32c = $var;

        return $this;
    }

    /**
     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
     * this field to verify that the intended resource was used for signing.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>string name = 4;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The resource name of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for signing. Check
     * this field to verify that the intended resource was used for signing.
     * NOTE: This field is in Beta.
     *
     * Generated from protobuf field <code>string name = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

