Channel.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\Eventarc;
  18. class Channel extends \Google\Model
  19. {
  20. /**
  21. * Default value. This value is unused.
  22. */
  23. public const STATE_STATE_UNSPECIFIED = 'STATE_UNSPECIFIED';
  24. /**
  25. * The PENDING state indicates that a Channel has been created successfully
  26. * and there is a new activation token available for the subscriber to use to
  27. * convey the Channel to the provider in order to create a Connection.
  28. */
  29. public const STATE_PENDING = 'PENDING';
  30. /**
  31. * The ACTIVE state indicates that a Channel has been successfully connected
  32. * with the event provider. An ACTIVE Channel is ready to receive and route
  33. * events from the event provider.
  34. */
  35. public const STATE_ACTIVE = 'ACTIVE';
  36. /**
  37. * The INACTIVE state indicates that the Channel cannot receive events
  38. * permanently. There are two possible cases this state can happen: 1. The
  39. * SaaS provider disconnected from this Channel. 2. The Channel activation
  40. * token has expired but the SaaS provider wasn't connected. To re-establish a
  41. * Connection with a provider, the subscriber should create a new Channel and
  42. * give it to the provider.
  43. */
  44. public const STATE_INACTIVE = 'INACTIVE';
  45. /**
  46. * Output only. The activation token for the channel. The token must be used
  47. * by the provider to register the channel for publishing.
  48. *
  49. * @var string
  50. */
  51. public $activationToken;
  52. /**
  53. * Output only. The creation time.
  54. *
  55. * @var string
  56. */
  57. public $createTime;
  58. /**
  59. * Optional. Resource name of a KMS crypto key (managed by the user) used to
  60. * encrypt/decrypt their event data. It must match the pattern
  61. * `projects/locations/keyRings/cryptoKeys`.
  62. *
  63. * @var string
  64. */
  65. public $cryptoKeyName;
  66. /**
  67. * Optional. Resource labels.
  68. *
  69. * @var string[]
  70. */
  71. public $labels;
  72. /**
  73. * Required. The resource name of the channel. Must be unique within the
  74. * location on the project and must be in
  75. * `projects/{project}/locations/{location}/channels/{channel_id}` format.
  76. *
  77. * @var string
  78. */
  79. public $name;
  80. /**
  81. * The name of the event provider (e.g. Eventarc SaaS partner) associated with
  82. * the channel. This provider will be granted permissions to publish events to
  83. * the channel. Format:
  84. * `projects/{project}/locations/{location}/providers/{provider_id}`.
  85. *
  86. * @var string
  87. */
  88. public $provider;
  89. /**
  90. * Output only. The name of the Pub/Sub topic created and managed by Eventarc
  91. * system as a transport for the event delivery. Format:
  92. * `projects/{project}/topics/{topic_id}`.
  93. *
  94. * @var string
  95. */
  96. public $pubsubTopic;
  97. /**
  98. * Output only. Whether or not this Channel satisfies the requirements of
  99. * physical zone separation
  100. *
  101. * @var bool
  102. */
  103. public $satisfiesPzs;
  104. /**
  105. * Output only. The state of a Channel.
  106. *
  107. * @var string
  108. */
  109. public $state;
  110. /**
  111. * Output only. Server assigned unique identifier for the channel. The value
  112. * is a UUID4 string and guaranteed to remain unchanged until the resource is
  113. * deleted.
  114. *
  115. * @var string
  116. */
  117. public $uid;
  118. /**
  119. * Output only. The last-modified time.
  120. *
  121. * @var string
  122. */
  123. public $updateTime;
  124. /**
  125. * Output only. The activation token for the channel. The token must be used
  126. * by the provider to register the channel for publishing.
  127. *
  128. * @param string $activationToken
  129. */
  130. public function setActivationToken($activationToken)
  131. {
  132. $this->activationToken = $activationToken;
  133. }
  134. /**
  135. * @return string
  136. */
  137. public function getActivationToken()
  138. {
  139. return $this->activationToken;
  140. }
  141. /**
  142. * Output only. The creation time.
  143. *
  144. * @param string $createTime
  145. */
  146. public function setCreateTime($createTime)
  147. {
  148. $this->createTime = $createTime;
  149. }
  150. /**
  151. * @return string
  152. */
  153. public function getCreateTime()
  154. {
  155. return $this->createTime;
  156. }
  157. /**
  158. * Optional. Resource name of a KMS crypto key (managed by the user) used to
  159. * encrypt/decrypt their event data. It must match the pattern
  160. * `projects/locations/keyRings/cryptoKeys`.
  161. *
  162. * @param string $cryptoKeyName
  163. */
  164. public function setCryptoKeyName($cryptoKeyName)
  165. {
  166. $this->cryptoKeyName = $cryptoKeyName;
  167. }
  168. /**
  169. * @return string
  170. */
  171. public function getCryptoKeyName()
  172. {
  173. return $this->cryptoKeyName;
  174. }
  175. /**
  176. * Optional. Resource labels.
  177. *
  178. * @param string[] $labels
  179. */
  180. public function setLabels($labels)
  181. {
  182. $this->labels = $labels;
  183. }
  184. /**
  185. * @return string[]
  186. */
  187. public function getLabels()
  188. {
  189. return $this->labels;
  190. }
  191. /**
  192. * Required. The resource name of the channel. Must be unique within the
  193. * location on the project and must be in
  194. * `projects/{project}/locations/{location}/channels/{channel_id}` format.
  195. *
  196. * @param string $name
  197. */
  198. public function setName($name)
  199. {
  200. $this->name = $name;
  201. }
  202. /**
  203. * @return string
  204. */
  205. public function getName()
  206. {
  207. return $this->name;
  208. }
  209. /**
  210. * The name of the event provider (e.g. Eventarc SaaS partner) associated with
  211. * the channel. This provider will be granted permissions to publish events to
  212. * the channel. Format:
  213. * `projects/{project}/locations/{location}/providers/{provider_id}`.
  214. *
  215. * @param string $provider
  216. */
  217. public function setProvider($provider)
  218. {
  219. $this->provider = $provider;
  220. }
  221. /**
  222. * @return string
  223. */
  224. public function getProvider()
  225. {
  226. return $this->provider;
  227. }
  228. /**
  229. * Output only. The name of the Pub/Sub topic created and managed by Eventarc
  230. * system as a transport for the event delivery. Format:
  231. * `projects/{project}/topics/{topic_id}`.
  232. *
  233. * @param string $pubsubTopic
  234. */
  235. public function setPubsubTopic($pubsubTopic)
  236. {
  237. $this->pubsubTopic = $pubsubTopic;
  238. }
  239. /**
  240. * @return string
  241. */
  242. public function getPubsubTopic()
  243. {
  244. return $this->pubsubTopic;
  245. }
  246. /**
  247. * Output only. Whether or not this Channel satisfies the requirements of
  248. * physical zone separation
  249. *
  250. * @param bool $satisfiesPzs
  251. */
  252. public function setSatisfiesPzs($satisfiesPzs)
  253. {
  254. $this->satisfiesPzs = $satisfiesPzs;
  255. }
  256. /**
  257. * @return bool
  258. */
  259. public function getSatisfiesPzs()
  260. {
  261. return $this->satisfiesPzs;
  262. }
  263. /**
  264. * Output only. The state of a Channel.
  265. *
  266. * Accepted values: STATE_UNSPECIFIED, PENDING, ACTIVE, INACTIVE
  267. *
  268. * @param self::STATE_* $state
  269. */
  270. public function setState($state)
  271. {
  272. $this->state = $state;
  273. }
  274. /**
  275. * @return self::STATE_*
  276. */
  277. public function getState()
  278. {
  279. return $this->state;
  280. }
  281. /**
  282. * Output only. Server assigned unique identifier for the channel. The value
  283. * is a UUID4 string and guaranteed to remain unchanged until the resource is
  284. * deleted.
  285. *
  286. * @param string $uid
  287. */
  288. public function setUid($uid)
  289. {
  290. $this->uid = $uid;
  291. }
  292. /**
  293. * @return string
  294. */
  295. public function getUid()
  296. {
  297. return $this->uid;
  298. }
  299. /**
  300. * Output only. The last-modified time.
  301. *
  302. * @param string $updateTime
  303. */
  304. public function setUpdateTime($updateTime)
  305. {
  306. $this->updateTime = $updateTime;
  307. }
  308. /**
  309. * @return string
  310. */
  311. public function getUpdateTime()
  312. {
  313. return $this->updateTime;
  314. }
  315. }
  316. // Adding a class alias for backwards compatibility with the previous class name.
  317. class_alias(Channel::class, 'Google_Service_Eventarc_Channel');