InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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\Compute;
  18. class InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy extends \Google\Collection
  19. {
  20. public const TYPE_HIERARCHY = 'HIERARCHY';
  21. public const TYPE_NETWORK = 'NETWORK';
  22. public const TYPE_NETWORK_REGIONAL = 'NETWORK_REGIONAL';
  23. public const TYPE_SYSTEM_GLOBAL = 'SYSTEM_GLOBAL';
  24. public const TYPE_SYSTEM_REGIONAL = 'SYSTEM_REGIONAL';
  25. public const TYPE_UNSPECIFIED = 'UNSPECIFIED';
  26. protected $collection_key = 'rules';
  27. /**
  28. * Output only. [Output Only] Deprecated, please use short name instead. The
  29. * display name of the firewall policy.
  30. *
  31. * @deprecated
  32. * @var string
  33. */
  34. public $displayName;
  35. /**
  36. * Output only. [Output Only] The name of the firewall policy.
  37. *
  38. * @var string
  39. */
  40. public $name;
  41. protected $packetMirroringRulesType = FirewallPolicyRule::class;
  42. protected $packetMirroringRulesDataType = 'array';
  43. /**
  44. * Output only. [Output only] Priority of firewall policy association. Not
  45. * applicable for type=HIERARCHY.
  46. *
  47. * @var int
  48. */
  49. public $priority;
  50. protected $rulesType = FirewallPolicyRule::class;
  51. protected $rulesDataType = 'array';
  52. /**
  53. * Output only. [Output Only] The short name of the firewall policy.
  54. *
  55. * @var string
  56. */
  57. public $shortName;
  58. /**
  59. * Output only. [Output Only] The type of the firewall policy. Can be one of
  60. * HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL.
  61. *
  62. * @var string
  63. */
  64. public $type;
  65. /**
  66. * Output only. [Output Only] Deprecated, please use short name instead. The
  67. * display name of the firewall policy.
  68. *
  69. * @deprecated
  70. * @param string $displayName
  71. */
  72. public function setDisplayName($displayName)
  73. {
  74. $this->displayName = $displayName;
  75. }
  76. /**
  77. * @deprecated
  78. * @return string
  79. */
  80. public function getDisplayName()
  81. {
  82. return $this->displayName;
  83. }
  84. /**
  85. * Output only. [Output Only] The name of the firewall policy.
  86. *
  87. * @param string $name
  88. */
  89. public function setName($name)
  90. {
  91. $this->name = $name;
  92. }
  93. /**
  94. * @return string
  95. */
  96. public function getName()
  97. {
  98. return $this->name;
  99. }
  100. /**
  101. * Output only. [Output Only] The packet mirroring rules that apply to the
  102. * instance.
  103. *
  104. * @param FirewallPolicyRule[] $packetMirroringRules
  105. */
  106. public function setPacketMirroringRules($packetMirroringRules)
  107. {
  108. $this->packetMirroringRules = $packetMirroringRules;
  109. }
  110. /**
  111. * @return FirewallPolicyRule[]
  112. */
  113. public function getPacketMirroringRules()
  114. {
  115. return $this->packetMirroringRules;
  116. }
  117. /**
  118. * Output only. [Output only] Priority of firewall policy association. Not
  119. * applicable for type=HIERARCHY.
  120. *
  121. * @param int $priority
  122. */
  123. public function setPriority($priority)
  124. {
  125. $this->priority = $priority;
  126. }
  127. /**
  128. * @return int
  129. */
  130. public function getPriority()
  131. {
  132. return $this->priority;
  133. }
  134. /**
  135. * [Output Only] The rules that apply to the instance. Only rules that target
  136. * the specific VM instance are returned if target service accounts or target
  137. * secure tags are specified in the rules.
  138. *
  139. * @param FirewallPolicyRule[] $rules
  140. */
  141. public function setRules($rules)
  142. {
  143. $this->rules = $rules;
  144. }
  145. /**
  146. * @return FirewallPolicyRule[]
  147. */
  148. public function getRules()
  149. {
  150. return $this->rules;
  151. }
  152. /**
  153. * Output only. [Output Only] The short name of the firewall policy.
  154. *
  155. * @param string $shortName
  156. */
  157. public function setShortName($shortName)
  158. {
  159. $this->shortName = $shortName;
  160. }
  161. /**
  162. * @return string
  163. */
  164. public function getShortName()
  165. {
  166. return $this->shortName;
  167. }
  168. /**
  169. * Output only. [Output Only] The type of the firewall policy. Can be one of
  170. * HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL.
  171. *
  172. * Accepted values: HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL,
  173. * SYSTEM_REGIONAL, UNSPECIFIED
  174. *
  175. * @param self::TYPE_* $type
  176. */
  177. public function setType($type)
  178. {
  179. $this->type = $type;
  180. }
  181. /**
  182. * @return self::TYPE_*
  183. */
  184. public function getType()
  185. {
  186. return $this->type;
  187. }
  188. }
  189. // Adding a class alias for backwards compatibility with the previous class name.
  190. class_alias(InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy::class, 'Google_Service_Compute_InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy');