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

namespace Google\Identity\AccessContextManager\V1\ServicePerimeterConfig;

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

/**
 * Defines the conditions under which an [IngressPolicy]
 * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressPolicy]
 * matches a request. Conditions are based on information about the
 * [ApiOperation]
 * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]
 * intended to be performed on the target resource of the request. The request
 * must satisfy what is defined in `operations` AND `resources` in order to
 * match.
 *
 * Generated from protobuf message <code>google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressTo</code>
 */
class IngressTo extends \Google\Protobuf\Internal\Message
{
    /**
     * A list of [ApiOperations]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]
     * allowed to be performed by the sources specified in corresponding
     * [IngressFrom]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]
     * in this [ServicePerimeter]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter].
     *
     * Generated from protobuf field <code>repeated .google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation operations = 1;</code>
     */
    private $operations;
    /**
     * A list of resources, currently only projects in the form
     * `projects/<projectnumber>`, protected by this [ServicePerimeter]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter] that are
     * allowed to be accessed by sources defined in the corresponding
     * [IngressFrom]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom].
     * If a single `*` is specified, then access to all resources inside the
     * perimeter are allowed.
     *
     * Generated from protobuf field <code>repeated string resources = 2;</code>
     */
    private $resources;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Identity\AccessContextManager\V1\ServicePerimeterConfig\ApiOperation>|\Google\Protobuf\Internal\RepeatedField $operations
     *           A list of [ApiOperations]
     *           [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]
     *           allowed to be performed by the sources specified in corresponding
     *           [IngressFrom]
     *           [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]
     *           in this [ServicePerimeter]
     *           [google.identity.accesscontextmanager.v1.ServicePerimeter].
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $resources
     *           A list of resources, currently only projects in the form
     *           `projects/<projectnumber>`, protected by this [ServicePerimeter]
     *           [google.identity.accesscontextmanager.v1.ServicePerimeter] that are
     *           allowed to be accessed by sources defined in the corresponding
     *           [IngressFrom]
     *           [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom].
     *           If a single `*` is specified, then access to all resources inside the
     *           perimeter are allowed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Identity\Accesscontextmanager\V1\ServicePerimeter::initOnce();
        parent::__construct($data);
    }

    /**
     * A list of [ApiOperations]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]
     * allowed to be performed by the sources specified in corresponding
     * [IngressFrom]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]
     * in this [ServicePerimeter]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter].
     *
     * Generated from protobuf field <code>repeated .google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation operations = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOperations()
    {
        return $this->operations;
    }

    /**
     * A list of [ApiOperations]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation]
     * allowed to be performed by the sources specified in corresponding
     * [IngressFrom]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom]
     * in this [ServicePerimeter]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter].
     *
     * Generated from protobuf field <code>repeated .google.identity.accesscontextmanager.v1.ServicePerimeterConfig.ApiOperation operations = 1;</code>
     * @param array<\Google\Identity\AccessContextManager\V1\ServicePerimeterConfig\ApiOperation>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOperations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Identity\AccessContextManager\V1\ServicePerimeterConfig\ApiOperation::class);
        $this->operations = $arr;

        return $this;
    }

    /**
     * A list of resources, currently only projects in the form
     * `projects/<projectnumber>`, protected by this [ServicePerimeter]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter] that are
     * allowed to be accessed by sources defined in the corresponding
     * [IngressFrom]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom].
     * If a single `*` is specified, then access to all resources inside the
     * perimeter are allowed.
     *
     * Generated from protobuf field <code>repeated string resources = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getResources()
    {
        return $this->resources;
    }

    /**
     * A list of resources, currently only projects in the form
     * `projects/<projectnumber>`, protected by this [ServicePerimeter]
     * [google.identity.accesscontextmanager.v1.ServicePerimeter] that are
     * allowed to be accessed by sources defined in the corresponding
     * [IngressFrom]
     * [google.identity.accesscontextmanager.v1.ServicePerimeterConfig.IngressFrom].
     * If a single `*` is specified, then access to all resources inside the
     * perimeter are allowed.
     *
     * Generated from protobuf field <code>repeated string resources = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setResources($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->resources = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(IngressTo::class, \Google\Identity\AccessContextManager\V1\ServicePerimeterConfig_IngressTo::class);

