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

namespace Google\Cloud\AccessApproval\V1;

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

/**
 * Information about the digital signature of the resource.
 *
 * Generated from protobuf message <code>google.cloud.accessapproval.v1.SignatureInfo</code>
 */
class SignatureInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The digital signature.
     *
     * Generated from protobuf field <code>bytes signature = 1;</code>
     */
    private $signature = '';
    protected $verification_info;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $signature
     *           The digital signature.
     *     @type string $google_public_key_pem
     *           The public key for the Google default signing, encoded in PEM format. The
     *           signature was created using a private key which may be verified using
     *           this public key.
     *     @type string $customer_kms_key_version
     *           The resource name of the customer CryptoKeyVersion used for signing.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Accessapproval\V1\Accessapproval::initOnce();
        parent::__construct($data);
    }

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

    /**
     * The digital 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;
    }

    /**
     * The public key for the Google default signing, encoded in PEM format. The
     * signature was created using a private key which may be verified using
     * this public key.
     *
     * Generated from protobuf field <code>string google_public_key_pem = 2;</code>
     * @return string
     */
    public function getGooglePublicKeyPem()
    {
        return $this->readOneof(2);
    }

    public function hasGooglePublicKeyPem()
    {
        return $this->hasOneof(2);
    }

    /**
     * The public key for the Google default signing, encoded in PEM format. The
     * signature was created using a private key which may be verified using
     * this public key.
     *
     * Generated from protobuf field <code>string google_public_key_pem = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setGooglePublicKeyPem($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The resource name of the customer CryptoKeyVersion used for signing.
     *
     * Generated from protobuf field <code>string customer_kms_key_version = 3;</code>
     * @return string
     */
    public function getCustomerKmsKeyVersion()
    {
        return $this->readOneof(3);
    }

    public function hasCustomerKmsKeyVersion()
    {
        return $this->hasOneof(3);
    }

    /**
     * The resource name of the customer CryptoKeyVersion used for signing.
     *
     * Generated from protobuf field <code>string customer_kms_key_version = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setCustomerKmsKeyVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getVerificationInfo()
    {
        return $this->whichOneof("verification_info");
    }

}

