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

namespace Google\Cloud\CloudControlsPartner\V1beta;

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

/**
 * The permissions granted to the partner for a workload
 *
 * Generated from protobuf message <code>google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions</code>
 */
class PartnerPermissions extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Format:
     * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * The partner permissions granted for the workload
     *
     * Generated from protobuf field <code>repeated .google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission partner_permissions = 2;</code>
     */
    private $partner_permissions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Format:
     *           `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions`
     *     @type int[] $partner_permissions
     *           The partner permissions granted for the workload
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Cloudcontrolspartner\V1Beta\PartnerPermissions::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Format:
     * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Format:
     * `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions`
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The partner permissions granted for the workload
     *
     * Generated from protobuf field <code>repeated .google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission partner_permissions = 2;</code>
     * @return RepeatedField<int>
     */
    public function getPartnerPermissions()
    {
        return $this->partner_permissions;
    }

    /**
     * The partner permissions granted for the workload
     *
     * Generated from protobuf field <code>repeated .google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission partner_permissions = 2;</code>
     * @param int[] $var
     * @return $this
     */
    public function setPartnerPermissions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\CloudControlsPartner\V1beta\PartnerPermissions\Permission::class);
        $this->partner_permissions = $arr;

        return $this;
    }

}

