api.Tenant */ class Tenant extends \Google\Protobuf\Internal\Message { /** * Tenant ID (UUID). * Note: this value will be automatically generated on create. * * Generated from protobuf field string id = 1; */ protected $id = ''; /** * Tenant name, * * Generated from protobuf field string name = 2; */ protected $name = ''; /** * Tenant description. * * Generated from protobuf field string description = 3; */ protected $description = ''; /** * Can the tenant create and "own" Gateways? * * Generated from protobuf field bool can_have_gateways = 4; */ protected $can_have_gateways = false; /** * Max. gateway count for tenant. * When set to 0, the tenant can have unlimited gateways. * * Generated from protobuf field uint32 max_gateway_count = 5; */ protected $max_gateway_count = 0; /** * Max. device count for tenant. * When set to 0, the tenant can have unlimited devices. * * Generated from protobuf field uint32 max_device_count = 6; */ protected $max_device_count = 0; /** * Private gateways (uplink). * If enabled, then uplink messages will not be shared with other tenants. * * Generated from protobuf field bool private_gateways_up = 7; */ protected $private_gateways_up = false; /** * Private gateways (downlink). * If enabled, then other tenants will not be able to schedule downlink * messages through the gateways of this tenant. For example, in case you * do want to share uplinks with other tenants (private_gateways_up=false), * but you want to prevent other tenants from using gateway airtime. * * Generated from protobuf field bool private_gateways_down = 8; */ protected $private_gateways_down = false; /** * Tags (user defined). * These tags can be used to add additional information to the tenant. These * tags are NOT exposed in the integration events. * * Generated from protobuf field map tags = 9; */ private $tags; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $id * Tenant ID (UUID). * Note: this value will be automatically generated on create. * @type string $name * Tenant name, * @type string $description * Tenant description. * @type bool $can_have_gateways * Can the tenant create and "own" Gateways? * @type int $max_gateway_count * Max. gateway count for tenant. * When set to 0, the tenant can have unlimited gateways. * @type int $max_device_count * Max. device count for tenant. * When set to 0, the tenant can have unlimited devices. * @type bool $private_gateways_up * Private gateways (uplink). * If enabled, then uplink messages will not be shared with other tenants. * @type bool $private_gateways_down * Private gateways (downlink). * If enabled, then other tenants will not be able to schedule downlink * messages through the gateways of this tenant. For example, in case you * do want to share uplinks with other tenants (private_gateways_up=false), * but you want to prevent other tenants from using gateway airtime. * @type array|\Google\Protobuf\Internal\MapField $tags * Tags (user defined). * These tags can be used to add additional information to the tenant. These * tags are NOT exposed in the integration events. * } */ public function __construct($data = NULL) { \GPBMetadata\Chirpstack\Api\Tenant::initOnce(); parent::__construct($data); } /** * Tenant ID (UUID). * Note: this value will be automatically generated on create. * * Generated from protobuf field string id = 1; * @return string */ public function getId() { return $this->id; } /** * Tenant ID (UUID). * Note: this value will be automatically generated on create. * * Generated from protobuf field string id = 1; * @param string $var * @return $this */ public function setId($var) { GPBUtil::checkString($var, True); $this->id = $var; return $this; } /** * Tenant name, * * Generated from protobuf field string name = 2; * @return string */ public function getName() { return $this->name; } /** * Tenant name, * * Generated from protobuf field string name = 2; * @param string $var * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; } /** * Tenant description. * * Generated from protobuf field string description = 3; * @return string */ public function getDescription() { return $this->description; } /** * Tenant description. * * Generated from protobuf field string description = 3; * @param string $var * @return $this */ public function setDescription($var) { GPBUtil::checkString($var, True); $this->description = $var; return $this; } /** * Can the tenant create and "own" Gateways? * * Generated from protobuf field bool can_have_gateways = 4; * @return bool */ public function getCanHaveGateways() { return $this->can_have_gateways; } /** * Can the tenant create and "own" Gateways? * * Generated from protobuf field bool can_have_gateways = 4; * @param bool $var * @return $this */ public function setCanHaveGateways($var) { GPBUtil::checkBool($var); $this->can_have_gateways = $var; return $this; } /** * Max. gateway count for tenant. * When set to 0, the tenant can have unlimited gateways. * * Generated from protobuf field uint32 max_gateway_count = 5; * @return int */ public function getMaxGatewayCount() { return $this->max_gateway_count; } /** * Max. gateway count for tenant. * When set to 0, the tenant can have unlimited gateways. * * Generated from protobuf field uint32 max_gateway_count = 5; * @param int $var * @return $this */ public function setMaxGatewayCount($var) { GPBUtil::checkUint32($var); $this->max_gateway_count = $var; return $this; } /** * Max. device count for tenant. * When set to 0, the tenant can have unlimited devices. * * Generated from protobuf field uint32 max_device_count = 6; * @return int */ public function getMaxDeviceCount() { return $this->max_device_count; } /** * Max. device count for tenant. * When set to 0, the tenant can have unlimited devices. * * Generated from protobuf field uint32 max_device_count = 6; * @param int $var * @return $this */ public function setMaxDeviceCount($var) { GPBUtil::checkUint32($var); $this->max_device_count = $var; return $this; } /** * Private gateways (uplink). * If enabled, then uplink messages will not be shared with other tenants. * * Generated from protobuf field bool private_gateways_up = 7; * @return bool */ public function getPrivateGatewaysUp() { return $this->private_gateways_up; } /** * Private gateways (uplink). * If enabled, then uplink messages will not be shared with other tenants. * * Generated from protobuf field bool private_gateways_up = 7; * @param bool $var * @return $this */ public function setPrivateGatewaysUp($var) { GPBUtil::checkBool($var); $this->private_gateways_up = $var; return $this; } /** * Private gateways (downlink). * If enabled, then other tenants will not be able to schedule downlink * messages through the gateways of this tenant. For example, in case you * do want to share uplinks with other tenants (private_gateways_up=false), * but you want to prevent other tenants from using gateway airtime. * * Generated from protobuf field bool private_gateways_down = 8; * @return bool */ public function getPrivateGatewaysDown() { return $this->private_gateways_down; } /** * Private gateways (downlink). * If enabled, then other tenants will not be able to schedule downlink * messages through the gateways of this tenant. For example, in case you * do want to share uplinks with other tenants (private_gateways_up=false), * but you want to prevent other tenants from using gateway airtime. * * Generated from protobuf field bool private_gateways_down = 8; * @param bool $var * @return $this */ public function setPrivateGatewaysDown($var) { GPBUtil::checkBool($var); $this->private_gateways_down = $var; return $this; } /** * Tags (user defined). * These tags can be used to add additional information to the tenant. These * tags are NOT exposed in the integration events. * * Generated from protobuf field map tags = 9; * @return \Google\Protobuf\Internal\MapField */ public function getTags() { return $this->tags; } /** * Tags (user defined). * These tags can be used to add additional information to the tenant. These * tags are NOT exposed in the integration events. * * Generated from protobuf field map tags = 9; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ public function setTags($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); $this->tags = $arr; return $this; } }