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

namespace Google\Cloud\Channel\V1;

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

/**
 * Request Message for RegisterSubscriber.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.RegisterSubscriberRequest</code>
 */
class RegisterSubscriberRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Resource name of the account. Required if integrator is not
     * provided. Otherwise, leave this field empty/unset.
     *
     * Generated from protobuf field <code>string account = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    protected $account = '';
    /**
     * Required. Service account that provides subscriber access to the registered
     * topic.
     *
     * Generated from protobuf field <code>string service_account = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $service_account = '';
    /**
     * Optional. Resource name of the integrator. Required if account is not
     * provided. Otherwise, leave this field empty/unset.
     *
     * Generated from protobuf field <code>optional string integrator = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $integrator = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $account
     *           Optional. Resource name of the account. Required if integrator is not
     *           provided. Otherwise, leave this field empty/unset.
     *     @type string $service_account
     *           Required. Service account that provides subscriber access to the registered
     *           topic.
     *     @type string $integrator
     *           Optional. Resource name of the integrator. Required if account is not
     *           provided. Otherwise, leave this field empty/unset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Resource name of the account. Required if integrator is not
     * provided. Otherwise, leave this field empty/unset.
     *
     * Generated from protobuf field <code>string account = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getAccount()
    {
        return $this->account;
    }

    /**
     * Optional. Resource name of the account. Required if integrator is not
     * provided. Otherwise, leave this field empty/unset.
     *
     * Generated from protobuf field <code>string account = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setAccount($var)
    {
        GPBUtil::checkString($var, True);
        $this->account = $var;

        return $this;
    }

    /**
     * Required. Service account that provides subscriber access to the registered
     * topic.
     *
     * Generated from protobuf field <code>string service_account = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getServiceAccount()
    {
        return $this->service_account;
    }

    /**
     * Required. Service account that provides subscriber access to the registered
     * topic.
     *
     * Generated from protobuf field <code>string service_account = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setServiceAccount($var)
    {
        GPBUtil::checkString($var, True);
        $this->service_account = $var;

        return $this;
    }

    /**
     * Optional. Resource name of the integrator. Required if account is not
     * provided. Otherwise, leave this field empty/unset.
     *
     * Generated from protobuf field <code>optional string integrator = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getIntegrator()
    {
        return isset($this->integrator) ? $this->integrator : '';
    }

    public function hasIntegrator()
    {
        return isset($this->integrator);
    }

    public function clearIntegrator()
    {
        unset($this->integrator);
    }

    /**
     * Optional. Resource name of the integrator. Required if account is not
     * provided. Otherwise, leave this field empty/unset.
     *
     * Generated from protobuf field <code>optional string integrator = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setIntegrator($var)
    {
        GPBUtil::checkString($var, True);
        $this->integrator = $var;

        return $this;
    }

}

