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

namespace Google\Cloud\Kms\V1;

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

/**
 * Contains an HSM-generated attestation about a key operation.
 *
 * Generated from protobuf message <code>google.cloud.kms.v1.KeyOperationAttestation</code>
 */
class KeyOperationAttestation extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The format of the attestation data.
     *
     * Generated from protobuf field <code>.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4;</code>
     */
    private $format = 0;
    /**
     * Output only. The attestation data provided by the HSM when the key
     * operation was performed.
     *
     * Generated from protobuf field <code>bytes content = 5;</code>
     */
    private $content = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $format
     *           Output only. The format of the attestation data.
     *     @type string $content
     *           Output only. The attestation data provided by the HSM when the key
     *           operation was performed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Kms\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The format of the attestation data.
     *
     * Generated from protobuf field <code>.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4;</code>
     * @return int
     */
    public function getFormat()
    {
        return $this->format;
    }

    /**
     * Output only. The format of the attestation data.
     *
     * Generated from protobuf field <code>.google.cloud.kms.v1.KeyOperationAttestation.AttestationFormat format = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setFormat($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\KeyOperationAttestation_AttestationFormat::class);
        $this->format = $var;

        return $this;
    }

    /**
     * Output only. The attestation data provided by the HSM when the key
     * operation was performed.
     *
     * Generated from protobuf field <code>bytes content = 5;</code>
     * @return string
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Output only. The attestation data provided by the HSM when the key
     * operation was performed.
     *
     * Generated from protobuf field <code>bytes content = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setContent($var)
    {
        GPBUtil::checkString($var, False);
        $this->content = $var;

        return $this;
    }

}

