<?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.MacVerify][google.cloud.kms.v1.KeyManagementService.MacVerify].
 *
 * Generated from protobuf message <code>google.cloud.kms.v1.MacVerifyResponse</code>
 */
class MacVerifyResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the
     * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
     * verification. Check this field to verify that the intended resource was
     * used for verification.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * This field indicates whether or not the verification operation for
     * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over
     * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was
     * successful.
     *
     * Generated from protobuf field <code>bool success = 2;</code>
     */
    private $success = false;
    /**
     * Integrity verification field. A flag indicating whether
     * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
     * was received by
     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
     * for the integrity verification of the
     * [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this
     * field indicates either that
     * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
     * was left unset or that it was not delivered to
     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     * set
     * [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
     * but this field is still false, discard the response and perform a limited
     * number of retries.
     *
     * Generated from protobuf field <code>bool verified_data_crc32c = 3;</code>
     */
    private $verified_data_crc32c = false;
    /**
     * Integrity verification field. A flag indicating whether
     * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
     * was received by
     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
     * for the integrity verification of the
     * [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this
     * field indicates either that
     * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
     * was left unset or that it was not delivered to
     * [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     * set
     * [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
     * but this field is still false, discard the response and perform a limited
     * number of retries.
     *
     * Generated from protobuf field <code>bool verified_mac_crc32c = 4;</code>
     */
    private $verified_mac_crc32c = false;
    /**
     * Integrity verification field. This value is used for the integrity
     * verification of [MacVerifyResponse.success]. If the value of this field
     * contradicts the value of [MacVerifyResponse.success], discard the response
     * and perform a limited number of retries.
     *
     * Generated from protobuf field <code>bool verified_success_integrity = 5;</code>
     */
    private $verified_success_integrity = false;
    /**
     * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
     * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
     * verification.
     *
     * Generated from protobuf field <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code>
     */
    private $protection_level = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The resource name of the
     *           [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
     *           verification. Check this field to verify that the intended resource was
     *           used for verification.
     *     @type bool $success
     *           This field indicates whether or not the verification operation for
     *           [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over
     *           [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was
     *           successful.
     *     @type bool $verified_data_crc32c
     *           Integrity verification field. A flag indicating whether
     *           [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
     *           was received by
     *           [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
     *           for the integrity verification of the
     *           [data][google.cloud.kms.v1.MacVerifyRequest.data]. A false value of this
     *           field indicates either that
     *           [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
     *           was left unset or that it was not delivered to
     *           [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     *           set
     *           [MacVerifyRequest.data_crc32c][google.cloud.kms.v1.MacVerifyRequest.data_crc32c]
     *           but this field is still false, discard the response and perform a limited
     *           number of retries.
     *     @type bool $verified_mac_crc32c
     *           Integrity verification field. A flag indicating whether
     *           [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
     *           was received by
     *           [KeyManagementService][google.cloud.kms.v1.KeyManagementService] and used
     *           for the integrity verification of the
     *           [data][google.cloud.kms.v1.MacVerifyRequest.mac]. A false value of this
     *           field indicates either that
     *           [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
     *           was left unset or that it was not delivered to
     *           [KeyManagementService][google.cloud.kms.v1.KeyManagementService]. If you've
     *           set
     *           [MacVerifyRequest.mac_crc32c][google.cloud.kms.v1.MacVerifyRequest.mac_crc32c]
     *           but this field is still false, discard the response and perform a limited
     *           number of retries.
     *     @type bool $verified_success_integrity
     *           Integrity verification field. This value is used for the integrity
     *           verification of [MacVerifyResponse.success]. If the value of this field
     *           contradicts the value of [MacVerifyResponse.success], discard the response
     *           and perform a limited number of retries.
     *     @type int $protection_level
     *           The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
     *           [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
     *           verification.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * This field indicates whether or not the verification operation for
     * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over
     * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was
     * successful.
     *
     * Generated from protobuf field <code>bool success = 2;</code>
     * @return bool
     */
    public function getSuccess()
    {
        return $this->success;
    }

    /**
     * This field indicates whether or not the verification operation for
     * [MacVerifyRequest.mac][google.cloud.kms.v1.MacVerifyRequest.mac] over
     * [MacVerifyRequest.data][google.cloud.kms.v1.MacVerifyRequest.data] was
     * successful.
     *
     * Generated from protobuf field <code>bool success = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setSuccess($var)
    {
        GPBUtil::checkBool($var);
        $this->success = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Integrity verification field. This value is used for the integrity
     * verification of [MacVerifyResponse.success]. If the value of this field
     * contradicts the value of [MacVerifyResponse.success], discard the response
     * and perform a limited number of retries.
     *
     * Generated from protobuf field <code>bool verified_success_integrity = 5;</code>
     * @return bool
     */
    public function getVerifiedSuccessIntegrity()
    {
        return $this->verified_success_integrity;
    }

    /**
     * Integrity verification field. This value is used for the integrity
     * verification of [MacVerifyResponse.success]. If the value of this field
     * contradicts the value of [MacVerifyResponse.success], discard the response
     * and perform a limited number of retries.
     *
     * Generated from protobuf field <code>bool verified_success_integrity = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setVerifiedSuccessIntegrity($var)
    {
        GPBUtil::checkBool($var);
        $this->verified_success_integrity = $var;

        return $this;
    }

    /**
     * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
     * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
     * verification.
     *
     * Generated from protobuf field <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code>
     * @return int
     */
    public function getProtectionLevel()
    {
        return $this->protection_level;
    }

    /**
     * The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] of the
     * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] used for
     * verification.
     *
     * Generated from protobuf field <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setProtectionLevel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\ProtectionLevel::class);
        $this->protection_level = $var;

        return $this;
    }

}

