<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

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

/**
 * Include to use an existing data crypto key wrapped by KMS.
 * The wrapped key must be a 128/192/256 bit key.
 * Authorization requires the following IAM permissions when sending a request
 * to perform a crypto transformation using a kms-wrapped crypto key:
 * dlp.kms.encrypt
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.KmsWrappedCryptoKey</code>
 */
class KmsWrappedCryptoKey extends \Google\Protobuf\Internal\Message
{
    /**
     * The wrapped data crypto key. [required]
     *
     * Generated from protobuf field <code>bytes wrapped_key = 1;</code>
     */
    private $wrapped_key = '';
    /**
     * The resource name of the KMS CryptoKey to use for unwrapping. [required]
     *
     * Generated from protobuf field <code>string crypto_key_name = 2;</code>
     */
    private $crypto_key_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $wrapped_key
     *           The wrapped data crypto key. [required]
     *     @type string $crypto_key_name
     *           The resource name of the KMS CryptoKey to use for unwrapping. [required]
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * The wrapped data crypto key. [required]
     *
     * Generated from protobuf field <code>bytes wrapped_key = 1;</code>
     * @return string
     */
    public function getWrappedKey()
    {
        return $this->wrapped_key;
    }

    /**
     * The wrapped data crypto key. [required]
     *
     * Generated from protobuf field <code>bytes wrapped_key = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setWrappedKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->wrapped_key = $var;

        return $this;
    }

    /**
     * The resource name of the KMS CryptoKey to use for unwrapping. [required]
     *
     * Generated from protobuf field <code>string crypto_key_name = 2;</code>
     * @return string
     */
    public function getCryptoKeyName()
    {
        return $this->crypto_key_name;
    }

    /**
     * The resource name of the KMS CryptoKey to use for unwrapping. [required]
     *
     * Generated from protobuf field <code>string crypto_key_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCryptoKeyName($var)
    {
        GPBUtil::checkString($var, True);
        $this->crypto_key_name = $var;

        return $this;
    }

}

