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

namespace Google\Cloud\GSuiteAddOns\V1;

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

/**
 * The authorization information used when invoking deployment endpoints.
 *
 * Generated from protobuf message <code>google.cloud.gsuiteaddons.v1.Authorization</code>
 */
class Authorization extends \Google\Protobuf\Internal\Message
{
    /**
     * The canonical full name of this resource.
     * Example:  `projects/123/authorization`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The email address of the service account used to authenticate requests to
     * add-on callback endpoints.
     *
     * Generated from protobuf field <code>string service_account_email = 2;</code>
     */
    private $service_account_email = '';
    /**
     * The OAuth client ID used to obtain OAuth access tokens for a user on the
     * add-on's behalf.
     *
     * Generated from protobuf field <code>string oauth_client_id = 3;</code>
     */
    private $oauth_client_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The canonical full name of this resource.
     *           Example:  `projects/123/authorization`
     *     @type string $service_account_email
     *           The email address of the service account used to authenticate requests to
     *           add-on callback endpoints.
     *     @type string $oauth_client_id
     *           The OAuth client ID used to obtain OAuth access tokens for a user on the
     *           add-on's behalf.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gsuiteaddons\V1\Gsuiteaddons::initOnce();
        parent::__construct($data);
    }

    /**
     * The canonical full name of this resource.
     * Example:  `projects/123/authorization`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The canonical full name of this resource.
     * Example:  `projects/123/authorization`
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The email address of the service account used to authenticate requests to
     * add-on callback endpoints.
     *
     * Generated from protobuf field <code>string service_account_email = 2;</code>
     * @return string
     */
    public function getServiceAccountEmail()
    {
        return $this->service_account_email;
    }

    /**
     * The email address of the service account used to authenticate requests to
     * add-on callback endpoints.
     *
     * Generated from protobuf field <code>string service_account_email = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setServiceAccountEmail($var)
    {
        GPBUtil::checkString($var, True);
        $this->service_account_email = $var;

        return $this;
    }

    /**
     * The OAuth client ID used to obtain OAuth access tokens for a user on the
     * add-on's behalf.
     *
     * Generated from protobuf field <code>string oauth_client_id = 3;</code>
     * @return string
     */
    public function getOauthClientId()
    {
        return $this->oauth_client_id;
    }

    /**
     * The OAuth client ID used to obtain OAuth access tokens for a user on the
     * add-on's behalf.
     *
     * Generated from protobuf field <code>string oauth_client_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setOauthClientId($var)
    {
        GPBUtil::checkString($var, True);
        $this->oauth_client_id = $var;

        return $this;
    }

}

