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

namespace Google\Cloud\Security\PrivateCA\V1;

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

/**
 * Describes a set of X.509 extensions that may be part of some certificate
 * issuance controls.
 *
 * Generated from protobuf message <code>google.cloud.security.privateca.v1.CertificateExtensionConstraints</code>
 */
class CertificateExtensionConstraints extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. A set of named X.509 extensions. Will be combined with
     * [additional_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.additional_extensions]
     * to determine the full set of X.509 extensions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension known_extensions = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $known_extensions;
    /**
     * Optional. A set of [ObjectIds][google.cloud.security.privateca.v1.ObjectId]
     * identifying custom X.509 extensions. Will be combined with
     * [known_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.known_extensions]
     * to determine the full set of X.509 extensions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.security.privateca.v1.ObjectId additional_extensions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $additional_extensions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $known_extensions
     *           Optional. A set of named X.509 extensions. Will be combined with
     *           [additional_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.additional_extensions]
     *           to determine the full set of X.509 extensions.
     *     @type array<\Google\Cloud\Security\PrivateCA\V1\ObjectId>|\Google\Protobuf\Internal\RepeatedField $additional_extensions
     *           Optional. A set of [ObjectIds][google.cloud.security.privateca.v1.ObjectId]
     *           identifying custom X.509 extensions. Will be combined with
     *           [known_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.known_extensions]
     *           to determine the full set of X.509 extensions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Security\Privateca\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. A set of named X.509 extensions. Will be combined with
     * [additional_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.additional_extensions]
     * to determine the full set of X.509 extensions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension known_extensions = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getKnownExtensions()
    {
        return $this->known_extensions;
    }

    /**
     * Optional. A set of named X.509 extensions. Will be combined with
     * [additional_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.additional_extensions]
     * to determine the full set of X.509 extensions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension known_extensions = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setKnownExtensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Security\PrivateCA\V1\CertificateExtensionConstraints\KnownCertificateExtension::class);
        $this->known_extensions = $arr;

        return $this;
    }

    /**
     * Optional. A set of [ObjectIds][google.cloud.security.privateca.v1.ObjectId]
     * identifying custom X.509 extensions. Will be combined with
     * [known_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.known_extensions]
     * to determine the full set of X.509 extensions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.security.privateca.v1.ObjectId additional_extensions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAdditionalExtensions()
    {
        return $this->additional_extensions;
    }

    /**
     * Optional. A set of [ObjectIds][google.cloud.security.privateca.v1.ObjectId]
     * identifying custom X.509 extensions. Will be combined with
     * [known_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.known_extensions]
     * to determine the full set of X.509 extensions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.security.privateca.v1.ObjectId additional_extensions = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\Security\PrivateCA\V1\ObjectId>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAdditionalExtensions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Security\PrivateCA\V1\ObjectId::class);
        $this->additional_extensions = $arr;

        return $this;
    }

}

