From 5fc09975631ebd365a904050140311b7db36dee6 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Tue, 15 Aug 2023 06:13:56 -0700
Subject: [PATCH] feat: add new enum values for network firewall policies to
API (#6551)
* feat: add fields related to Google services to API
PiperOrigin-RevId: 555584241
Source-Link: https://github.com/googleapis/googleapis/commit/2d1ca1b39f0962ea3fc454535f08d87d312e545c
Source-Link: https://github.com/googleapis/googleapis-gen/commit/8bf0915bac14ba56ef853cf53a999093c8fb8441
Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjhiZjA5MTViYWMxNGJhNTZlZjg1M2NmNTNhOTk5MDkzYzhmYjg0NDEifQ==
* feat: add new enum values for network firewall policies to API
PiperOrigin-RevId: 555590152
Source-Link: https://github.com/googleapis/googleapis/commit/fae3e6e091418d6343902debaf545cfc8f32c3ff
Source-Link: https://github.com/googleapis/googleapis-gen/commit/d1a18e4ca675fa8d485b4bf49d4f0ed8e9b66d7b
Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6ImQxYTE4ZTRjYTY3NWZhOGQ0ODViNGJmNDlkNGYwZWQ4ZTliNjZkN2IifQ==
---
NetworkManagement/metadata/V1/Trace.php | Bin 10847 -> 11297 bytes
.../src/V1/FirewallInfo/FirewallRuleType.php | 18 +++
.../src/V1/GoogleServiceInfo.php | 105 ++++++++++++++++++
.../GoogleServiceInfo/GoogleServiceType.php | 76 +++++++++++++
NetworkManagement/src/V1/Step.php | 33 ++++++
NetworkManagement/src/V1/Step/State.php | 10 ++
6 files changed, 242 insertions(+)
create mode 100644 NetworkManagement/src/V1/GoogleServiceInfo.php
create mode 100644 NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php
diff --git a/NetworkManagement/metadata/V1/Trace.php b/NetworkManagement/metadata/V1/Trace.php
index f9e5864f8de3e097872d7c4b8659f61a6a22b9e8..35023fd6cd4b45c52c4b1b33797ef94efe157bec 100644
GIT binary patch
delta 407
zcmcZ~vM^%9b4I3D!INJy-eX!VwD}~{L`GphF23~q{PdjE_~O)}vdrXE35m%U*)@6H
z!GggMvCY9OnJkPqC-3D5l9T0<3=VM&3W;|M^7oB*_xE@Aag7gl4GQygb`_A`%*R>F
z%(R(hb1#n~Bhy5t$s2f&_zEd-$@sa3g!>11$Gdq3xrRIX_{0bJ`*=D>#s`J^xC*ce
zX>zH;R0O%Yd;0r1`e0Yewz-5ai$$=RiAxa0iIeRmCFGL1gi$>cUs73+D#4_{sKICC
zHu)i|vL}ir&%CsJJrt1;pn9b;G_yg1Ldsn7D4v}>UqIBBor~GiF+hM(NQFzm-OV*V
zAjm%=GTuKZ-ow?=C&VM(*~8V@8zk!F8YI9Z#LLC$?BgHm67S*{EWo_^u27RW0M&bb
AU;qFB
delta 63
zcmV-F0KosDSl?8z=K%t!P?PBa-U7T4v&jOH0kf(EVgv!YlMM+{vwjJD0|Mp)v-}Jp
V0RqGUlOGPmvoH^81hb$NffqNh7oh+E
diff --git a/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php b/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php
index b84f404ffaaa..50c782e97ab2 100644
--- a/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php
+++ b/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php
@@ -52,6 +52,22 @@ class FirewallRuleType
* Generated from protobuf enum SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4;
*/
const SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4;
+ /**
+ * Global network firewall policy rule.
+ * For details, see [Network firewall
+ * policies](https://cloud.google.com/vpc/docs/network-firewall-policies).
+ *
+ * Generated from protobuf enum NETWORK_FIREWALL_POLICY_RULE = 5;
+ */
+ const NETWORK_FIREWALL_POLICY_RULE = 5;
+ /**
+ * Regional network firewall policy rule.
+ * For details, see [Regional network firewall
+ * policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).
+ *
+ * Generated from protobuf enum NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6;
+ */
+ const NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6;
private static $valueToName = [
self::FIREWALL_RULE_TYPE_UNSPECIFIED => 'FIREWALL_RULE_TYPE_UNSPECIFIED',
@@ -59,6 +75,8 @@ class FirewallRuleType
self::VPC_FIREWALL_RULE => 'VPC_FIREWALL_RULE',
self::IMPLIED_VPC_FIREWALL_RULE => 'IMPLIED_VPC_FIREWALL_RULE',
self::SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE => 'SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE',
+ self::NETWORK_FIREWALL_POLICY_RULE => 'NETWORK_FIREWALL_POLICY_RULE',
+ self::NETWORK_REGIONAL_FIREWALL_POLICY_RULE => 'NETWORK_REGIONAL_FIREWALL_POLICY_RULE',
];
public static function name($value)
diff --git a/NetworkManagement/src/V1/GoogleServiceInfo.php b/NetworkManagement/src/V1/GoogleServiceInfo.php
new file mode 100644
index 000000000000..31fc1d500f54
--- /dev/null
+++ b/NetworkManagement/src/V1/GoogleServiceInfo.php
@@ -0,0 +1,105 @@
+google.cloud.networkmanagement.v1.GoogleServiceInfo
+ */
+class GoogleServiceInfo extends \Google\Protobuf\Internal\Message
+{
+ /**
+ * Source IP address.
+ *
+ * Generated from protobuf field string source_ip = 1;
+ */
+ private $source_ip = '';
+ /**
+ * Recognized type of a Google Service.
+ *
+ * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2;
+ */
+ private $google_service_type = 0;
+
+ /**
+ * Constructor.
+ *
+ * @param array $data {
+ * Optional. Data for populating the Message object.
+ *
+ * @type string $source_ip
+ * Source IP address.
+ * @type int $google_service_type
+ * Recognized type of a Google Service.
+ * }
+ */
+ public function __construct($data = NULL) {
+ \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce();
+ parent::__construct($data);
+ }
+
+ /**
+ * Source IP address.
+ *
+ * Generated from protobuf field string source_ip = 1;
+ * @return string
+ */
+ public function getSourceIp()
+ {
+ return $this->source_ip;
+ }
+
+ /**
+ * Source IP address.
+ *
+ * Generated from protobuf field string source_ip = 1;
+ * @param string $var
+ * @return $this
+ */
+ public function setSourceIp($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->source_ip = $var;
+
+ return $this;
+ }
+
+ /**
+ * Recognized type of a Google Service.
+ *
+ * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2;
+ * @return int
+ */
+ public function getGoogleServiceType()
+ {
+ return $this->google_service_type;
+ }
+
+ /**
+ * Recognized type of a Google Service.
+ *
+ * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2;
+ * @param int $var
+ * @return $this
+ */
+ public function setGoogleServiceType($var)
+ {
+ GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo\GoogleServiceType::class);
+ $this->google_service_type = $var;
+
+ return $this;
+ }
+
+}
+
diff --git a/NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php b/NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php
new file mode 100644
index 000000000000..8952beb2ebae
--- /dev/null
+++ b/NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php
@@ -0,0 +1,76 @@
+google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType
+ */
+class GoogleServiceType
+{
+ /**
+ * Unspecified Google Service. Includes most of Google APIs and services.
+ *
+ * Generated from protobuf enum GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0;
+ */
+ const GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0;
+ /**
+ * Identity aware proxy.
+ * https://cloud.google.com/iap/docs/using-tcp-forwarding
+ *
+ * Generated from protobuf enum IAP = 1;
+ */
+ const IAP = 1;
+ /**
+ * One of two services sharing IP ranges:
+ * * Load Balancer proxy
+ * * Centralized Health Check prober
+ * https://cloud.google.com/load-balancing/docs/firewall-rules
+ *
+ * Generated from protobuf enum GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2;
+ */
+ const GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2;
+ /**
+ * Connectivity from Cloud DNS to forwarding targets or alternate name
+ * servers that use private routing.
+ * https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules
+ * https://cloud.google.com/dns/docs/policies#firewall-rules
+ *
+ * Generated from protobuf enum CLOUD_DNS = 3;
+ */
+ const CLOUD_DNS = 3;
+
+ private static $valueToName = [
+ self::GOOGLE_SERVICE_TYPE_UNSPECIFIED => 'GOOGLE_SERVICE_TYPE_UNSPECIFIED',
+ self::IAP => 'IAP',
+ self::GFE_PROXY_OR_HEALTH_CHECK_PROBER => 'GFE_PROXY_OR_HEALTH_CHECK_PROBER',
+ self::CLOUD_DNS => 'CLOUD_DNS',
+ ];
+
+ public static function name($value)
+ {
+ if (!isset(self::$valueToName[$value])) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no name defined for value %s', __CLASS__, $value));
+ }
+ return self::$valueToName[$value];
+ }
+
+
+ public static function value($name)
+ {
+ $const = __CLASS__ . '::' . strtoupper($name);
+ if (!defined($const)) {
+ throw new UnexpectedValueException(sprintf(
+ 'Enum %s has no value defined for name %s', __CLASS__, $name));
+ }
+ return constant($const);
+ }
+}
+
+
diff --git a/NetworkManagement/src/V1/Step.php b/NetworkManagement/src/V1/Step.php
index b974b0d32f44..9e3f4bbe61bc 100644
--- a/NetworkManagement/src/V1/Step.php
+++ b/NetworkManagement/src/V1/Step.php
@@ -67,6 +67,8 @@ class Step extends \Google\Protobuf\Internal\Message
* The endpoint information in an intermediate state may differ with the
* initial input, as it might be modified by state like NAT,
* or Connection Proxy.
+ * @type \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo $google_service
+ * Display information of a Google service
* @type \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo $forwarding_rule
* Display information of a Compute Engine forwarding rule.
* @type \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo $vpn_gateway
@@ -338,6 +340,37 @@ public function setEndpoint($var)
return $this;
}
+ /**
+ * Display information of a Google service
+ *
+ * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24;
+ * @return \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo|null
+ */
+ public function getGoogleService()
+ {
+ return $this->readOneof(24);
+ }
+
+ public function hasGoogleService()
+ {
+ return $this->hasOneof(24);
+ }
+
+ /**
+ * Display information of a Google service
+ *
+ * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24;
+ * @param \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo $var
+ * @return $this
+ */
+ public function setGoogleService($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo::class);
+ $this->writeOneof(24, $var);
+
+ return $this;
+ }
+
/**
* Display information of a Compute Engine forwarding rule.
*
diff --git a/NetworkManagement/src/V1/Step/State.php b/NetworkManagement/src/V1/Step/State.php
index 4fbfa8232557..992206eeb347 100644
--- a/NetworkManagement/src/V1/Step/State.php
+++ b/NetworkManagement/src/V1/Step/State.php
@@ -34,6 +34,15 @@ class State
* Generated from protobuf enum START_FROM_INTERNET = 2;
*/
const START_FROM_INTERNET = 2;
+ /**
+ * Initial state: packet originating from a Google service. Some Google
+ * services, such as health check probers or Identity Aware Proxy use
+ * special routes, outside VPC routing configuration to reach Compute Engine
+ * Instances.
+ *
+ * Generated from protobuf enum START_FROM_GOOGLE_SERVICE = 27;
+ */
+ const START_FROM_GOOGLE_SERVICE = 27;
/**
* Initial state: packet originating from a VPC or on-premises network
* with internal source IP.
@@ -195,6 +204,7 @@ class State
self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
self::START_FROM_INSTANCE => 'START_FROM_INSTANCE',
self::START_FROM_INTERNET => 'START_FROM_INTERNET',
+ self::START_FROM_GOOGLE_SERVICE => 'START_FROM_GOOGLE_SERVICE',
self::START_FROM_PRIVATE_NETWORK => 'START_FROM_PRIVATE_NETWORK',
self::START_FROM_GKE_MASTER => 'START_FROM_GKE_MASTER',
self::START_FROM_CLOUD_SQL_INSTANCE => 'START_FROM_CLOUD_SQL_INSTANCE',