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

namespace Google\Cloud\Channel\V1;

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

/**
 * Entity representing a link between distributors and their indirect
 * resellers in an n-tier resale channel.
 *
 * Generated from protobuf message <code>google.cloud.channel.v1.ChannelPartnerLink</code>
 */
class ChannelPartnerLink extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Resource name for the channel partner link, in the format
     * accounts/{account_id}/channelPartnerLinks/{id}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $name = '';
    /**
     * Required. Cloud Identity ID of the linked reseller.
     *
     * Generated from protobuf field <code>string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $reseller_cloud_identity_id = '';
    /**
     * Required. State of the channel partner link.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $link_state = 0;
    /**
     * Output only. URI of the web page where partner accepts the link invitation.
     *
     * Generated from protobuf field <code>string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $invite_link_uri = '';
    /**
     * Output only. Timestamp of when the channel partner link is created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $create_time = null;
    /**
     * Output only. Timestamp of when the channel partner link is updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $update_time = null;
    /**
     * Output only. Public identifier that a customer must use to generate a transfer token
     * to move to this distributor-reseller combination.
     *
     * Generated from protobuf field <code>string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $public_id = '';
    /**
     * Output only. Cloud Identity info of the channel partner (IR).
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $channel_partner_cloud_identity_info = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Output only. Resource name for the channel partner link, in the format
     *           accounts/{account_id}/channelPartnerLinks/{id}.
     *     @type string $reseller_cloud_identity_id
     *           Required. Cloud Identity ID of the linked reseller.
     *     @type int $link_state
     *           Required. State of the channel partner link.
     *     @type string $invite_link_uri
     *           Output only. URI of the web page where partner accepts the link invitation.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. Timestamp of when the channel partner link is created.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Output only. Timestamp of when the channel partner link is updated.
     *     @type string $public_id
     *           Output only. Public identifier that a customer must use to generate a transfer token
     *           to move to this distributor-reseller combination.
     *     @type \Google\Cloud\Channel\V1\CloudIdentityInfo $channel_partner_cloud_identity_info
     *           Output only. Cloud Identity info of the channel partner (IR).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Channel\V1\ChannelPartnerLinks::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Resource name for the channel partner link, in the format
     * accounts/{account_id}/channelPartnerLinks/{id}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Output only. Resource name for the channel partner link, in the format
     * accounts/{account_id}/channelPartnerLinks/{id}.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. Cloud Identity ID of the linked reseller.
     *
     * Generated from protobuf field <code>string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getResellerCloudIdentityId()
    {
        return $this->reseller_cloud_identity_id;
    }

    /**
     * Required. Cloud Identity ID of the linked reseller.
     *
     * Generated from protobuf field <code>string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setResellerCloudIdentityId($var)
    {
        GPBUtil::checkString($var, True);
        $this->reseller_cloud_identity_id = $var;

        return $this;
    }

    /**
     * Required. State of the channel partner link.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getLinkState()
    {
        return $this->link_state;
    }

    /**
     * Required. State of the channel partner link.
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setLinkState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Channel\V1\ChannelPartnerLinkState::class);
        $this->link_state = $var;

        return $this;
    }

    /**
     * Output only. URI of the web page where partner accepts the link invitation.
     *
     * Generated from protobuf field <code>string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getInviteLinkUri()
    {
        return $this->invite_link_uri;
    }

    /**
     * Output only. URI of the web page where partner accepts the link invitation.
     *
     * Generated from protobuf field <code>string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setInviteLinkUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->invite_link_uri = $var;

        return $this;
    }

    /**
     * Output only. Timestamp of when the channel partner link is created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return isset($this->create_time) ? $this->create_time : null;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. Timestamp of when the channel partner link is created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. Timestamp of when the channel partner link is updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getUpdateTime()
    {
        return isset($this->update_time) ? $this->update_time : null;
    }

    public function hasUpdateTime()
    {
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        unset($this->update_time);
    }

    /**
     * Output only. Timestamp of when the channel partner link is updated.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Output only. Public identifier that a customer must use to generate a transfer token
     * to move to this distributor-reseller combination.
     *
     * Generated from protobuf field <code>string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getPublicId()
    {
        return $this->public_id;
    }

    /**
     * Output only. Public identifier that a customer must use to generate a transfer token
     * to move to this distributor-reseller combination.
     *
     * Generated from protobuf field <code>string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPublicId($var)
    {
        GPBUtil::checkString($var, True);
        $this->public_id = $var;

        return $this;
    }

    /**
     * Output only. Cloud Identity info of the channel partner (IR).
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Channel\V1\CloudIdentityInfo|null
     */
    public function getChannelPartnerCloudIdentityInfo()
    {
        return isset($this->channel_partner_cloud_identity_info) ? $this->channel_partner_cloud_identity_info : null;
    }

    public function hasChannelPartnerCloudIdentityInfo()
    {
        return isset($this->channel_partner_cloud_identity_info);
    }

    public function clearChannelPartnerCloudIdentityInfo()
    {
        unset($this->channel_partner_cloud_identity_info);
    }

    /**
     * Output only. Cloud Identity info of the channel partner (IR).
     *
     * Generated from protobuf field <code>.google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Channel\V1\CloudIdentityInfo $var
     * @return $this
     */
    public function setChannelPartnerCloudIdentityInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Channel\V1\CloudIdentityInfo::class);
        $this->channel_partner_cloud_identity_info = $var;

        return $this;
    }

}

