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

namespace Google\Cloud\ConfidentialComputing\V1\VerifyConfidentialGkeRequest;

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

/**
 * Token options for Confidential GKE attestation.
 *
 * Generated from protobuf message <code>google.cloud.confidentialcomputing.v1.VerifyConfidentialGkeRequest.ConfidentialGkeOptions</code>
 */
class ConfidentialGkeOptions extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Optional string to issue the token with a custom audience
     * claim. Required if custom nonces are specified.
     *
     * Generated from protobuf field <code>string audience = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $audience = '';
    /**
     * Optional. Optional parameter to place one or more nonces in the eat_nonce
     * claim in the output token. The minimum size for JSON-encoded EATs is 10
     * bytes and the maximum size is 74 bytes.
     *
     * Generated from protobuf field <code>repeated string nonce = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $nonce;
    /**
     * Optional. Optional specification for how to sign the attestation token.
     * Defaults to SIGNATURE_TYPE_OIDC if unspecified.
     *
     * Generated from protobuf field <code>.google.cloud.confidentialcomputing.v1.SignatureType signature_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $signature_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $audience
     *           Optional. Optional string to issue the token with a custom audience
     *           claim. Required if custom nonces are specified.
     *     @type string[] $nonce
     *           Optional. Optional parameter to place one or more nonces in the eat_nonce
     *           claim in the output token. The minimum size for JSON-encoded EATs is 10
     *           bytes and the maximum size is 74 bytes.
     *     @type int $signature_type
     *           Optional. Optional specification for how to sign the attestation token.
     *           Defaults to SIGNATURE_TYPE_OIDC if unspecified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Confidentialcomputing\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Optional string to issue the token with a custom audience
     * claim. Required if custom nonces are specified.
     *
     * Generated from protobuf field <code>string audience = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getAudience()
    {
        return $this->audience;
    }

    /**
     * Optional. Optional string to issue the token with a custom audience
     * claim. Required if custom nonces are specified.
     *
     * Generated from protobuf field <code>string audience = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setAudience($var)
    {
        GPBUtil::checkString($var, True);
        $this->audience = $var;

        return $this;
    }

    /**
     * Optional. Optional parameter to place one or more nonces in the eat_nonce
     * claim in the output token. The minimum size for JSON-encoded EATs is 10
     * bytes and the maximum size is 74 bytes.
     *
     * Generated from protobuf field <code>repeated string nonce = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<string>
     */
    public function getNonce()
    {
        return $this->nonce;
    }

    /**
     * Optional. Optional parameter to place one or more nonces in the eat_nonce
     * claim in the output token. The minimum size for JSON-encoded EATs is 10
     * bytes and the maximum size is 74 bytes.
     *
     * Generated from protobuf field <code>repeated string nonce = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string[] $var
     * @return $this
     */
    public function setNonce($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->nonce = $arr;

        return $this;
    }

    /**
     * Optional. Optional specification for how to sign the attestation token.
     * Defaults to SIGNATURE_TYPE_OIDC if unspecified.
     *
     * Generated from protobuf field <code>.google.cloud.confidentialcomputing.v1.SignatureType signature_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getSignatureType()
    {
        return $this->signature_type;
    }

    /**
     * Optional. Optional specification for how to sign the attestation token.
     * Defaults to SIGNATURE_TYPE_OIDC if unspecified.
     *
     * Generated from protobuf field <code>.google.cloud.confidentialcomputing.v1.SignatureType signature_type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setSignatureType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ConfidentialComputing\V1\SignatureType::class);
        $this->signature_type = $var;

        return $this;
    }

}

