From 29a05a2aac6124fc8d6b322e21841a6f2058049d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 15 Mar 2024 20:01:26 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20post-p?= =?UTF-8?q?rocessor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- NetworkManagement/metadata/V1/Trace.php | Bin 13191 -> 14825 bytes NetworkManagement/src/V1/AbortInfo.php | 54 +- NetworkManagement/src/V1/AbortInfo/Cause.php | 202 ++- NetworkManagement/src/V1/DeliverInfo.php | 34 + .../src/V1/DeliverInfo/Target.php | 28 + NetworkManagement/src/V1/DropInfo.php | 102 ++ NetworkManagement/src/V1/DropInfo/Cause.php | 177 ++- NetworkManagement/src/V1/ForwardInfo.php | 34 + .../src/V1/ForwardInfo/Target.php | 11 +- .../src/V1/LoadBalancerBackendInfo.php | 40 +- .../Networkmanagement/V1/ConnectivityTest.php | Bin 4728 -> 0 bytes .../Networkmanagement/V1/Reachability.php | 79 -- .../Cloud/Networkmanagement/V1/Trace.php | Bin 14825 -> 0 bytes .../Cloud/NetworkManagement/V1/AbortInfo.php | 173 --- .../NetworkManagement/V1/AbortInfo/Cause.php | 296 ---- .../V1/AppEngineVersionInfo.php | 169 --- .../V1/CloudFunctionInfo.php | 169 --- .../V1/CloudRunRevisionInfo.php | 169 --- .../V1/CloudSQLInstanceInfo.php | 241 ---- .../NetworkManagement/V1/ConnectivityTest.php | 649 --------- .../V1/CreateConnectivityTestRequest.php | 198 --- .../V1/DeleteConnectivityTestRequest.php | 85 -- .../NetworkManagement/V1/DeliverInfo.php | 135 -- .../V1/DeliverInfo/Target.php | 151 --- .../Cloud/NetworkManagement/V1/DropInfo.php | 203 --- .../NetworkManagement/V1/DropInfo/Cause.php | 519 ------- .../Cloud/NetworkManagement/V1/Endpoint.php | 695 ---------- .../V1/Endpoint/AppEngineVersionEndpoint.php | 78 -- .../V1/Endpoint/CloudFunctionEndpoint.php | 70 - .../V1/Endpoint/CloudRunRevisionEndpoint.php | 82 -- .../V1/Endpoint/ForwardingRuleTarget.php | 79 -- .../V1/Endpoint/NetworkType.php | 69 - .../NetworkManagement/V1/EndpointInfo.php | 307 ----- .../NetworkManagement/V1/FirewallInfo.php | 394 ------ .../V1/FirewallInfo/FirewallRuleType.php | 105 -- .../NetworkManagement/V1/ForwardInfo.php | 135 -- .../V1/ForwardInfo/Target.php | 113 -- .../V1/ForwardingRuleInfo.php | 271 ---- .../NetworkManagement/V1/GKEMasterInfo.php | 170 --- .../V1/GetConnectivityTestRequest.php | 85 -- .../V1/GoogleServiceInfo.php | 105 -- .../GoogleServiceInfo/GoogleServiceType.php | 78 -- .../NetworkManagement/V1/InstanceInfo.php | 310 ----- .../V1/LatencyDistribution.php | 67 - .../V1/LatencyPercentile.php | 109 -- .../V1/ListConnectivityTestsRequest.php | 281 ---- .../V1/ListConnectivityTestsResponse.php | 135 -- .../V1/LoadBalancerBackend.php | 203 --- .../HealthCheckFirewallState.php | 69 - .../V1/LoadBalancerBackendInfo.php | 409 ------ .../HealthCheckFirewallsConfigState.php | 86 -- .../NetworkManagement/V1/LoadBalancerInfo.php | 203 --- .../V1/LoadBalancerInfo/BackendType.php | 71 - .../V1/LoadBalancerInfo/LoadBalancerType.php | 85 -- .../NetworkManagement/V1/LoadBalancerType.php | 120 -- .../Cloud/NetworkManagement/V1/NatInfo.php | 483 ------- .../NetworkManagement/V1/NatInfo/Type.php | 78 -- .../NetworkManagement/V1/NetworkInfo.php | 135 -- .../V1/OperationMetadata.php | 295 ---- .../NetworkManagement/V1/ProbingDetails.php | 417 ------ .../V1/ProbingDetails/EdgeLocation.php | 71 - .../V1/ProbingDetails/ProbingAbortCause.php | 65 - .../V1/ProbingDetails/ProbingResult.php | 82 -- .../V1/ProxyConnectionInfo.php | 419 ------ .../V1/ReachabilityDetails.php | 197 --- .../V1/ReachabilityDetails/Result.php | 92 -- .../V1/RerunConnectivityTestRequest.php | 71 - .../Cloud/NetworkManagement/V1/RouteInfo.php | 609 --------- .../V1/RouteInfo/NextHopType.php | 140 -- .../V1/RouteInfo/RouteScope.php | 64 - .../V1/RouteInfo/RouteType.php | 104 -- .../Cloud/NetworkManagement/V1/Step.php | 980 -------------- .../Cloud/NetworkManagement/V1/Step/State.php | 264 ---- .../V1/StorageBucketInfo.php | 67 - .../Cloud/NetworkManagement/V1/Trace.php | 148 -- .../V1/UpdateConnectivityTestRequest.php | 141 -- .../NetworkManagement/V1/VpcConnectorInfo.php | 135 -- .../NetworkManagement/V1/VpnGatewayInfo.php | 245 ---- .../NetworkManagement/V1/VpnTunnelInfo.php | 339 ----- .../V1/VpnTunnelInfo/RoutingType.php | 72 - .../create_connectivity_test.php | 119 -- .../delete_connectivity_test.php | 80 -- .../get_connectivity_test.php | 71 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_connectivity_tests.php | 76 -- .../list_locations.php | 62 - .../rerun_connectivity_test.php | 94 -- .../set_iam_policy.php | 77 -- .../test_iam_permissions.php | 84 -- .../update_connectivity_test.php | 106 -- .../V1/Client/ReachabilityServiceClient.php | 617 --------- .../Gapic/ReachabilityServiceGapicClient.php | 1064 --------------- .../v1/src/V1/ReachabilityServiceClient.php | 34 - .../v1/src/V1/gapic_metadata.json | 73 - .../reachability_service_client_config.json | 87 -- ...reachability_service_descriptor_config.php | 193 --- ...eachability_service_rest_client_config.php | 193 --- .../Client/ReachabilityServiceClientTest.php | 1192 ----------------- .../Unit/V1/ReachabilityServiceClientTest.php | 1045 --------------- 100 files changed, 575 insertions(+), 19436 deletions(-) delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/Gapic/ReachabilityServiceGapicClient.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/ReachabilityServiceClient.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/ReachabilityServiceClientTest.php diff --git a/NetworkManagement/metadata/V1/Trace.php b/NetworkManagement/metadata/V1/Trace.php index ace3f1cbc778a55d652c0f0154fd0dd650b44930..bbba5c30650375dbba093d573f137508c29a94af 100644 GIT binary patch delta 1950 zcmah}O>bL86jdBkoT0ccQ<@Jaj`N(4ItfnNv}p^hp5GhW(>%{S=6!^SN<&1P$fb&- zq_9GG2SUIC&5wWu3q*><1|h)~iDefR5-N)du>ipz;Lfw1xOOFWqq%49oO{o?_oMwk zj=%nQNPRbyP11wCruub=B)>mE#m_g3%1_K?GgJG`=Kj6<+RkBPZLd+kw<{ZfTRl8# z-fy0~m-r`>_+ePx&E7TfG(wF-xwE@_R6jnR7@i#}jFeK3KmFxlDv?U&A0*Vn?4vjF zMRdUvG_nFB840$y*fd_i7^Q8OhmI_V%nm4L#(6x3u;qD@unJ{FMnw4f{zZM?#)^sOnzi-}KC>h@f&HI6QXY?JXV zcG`j={Ri#|c!J+1c3=$0fiaY3T#`57XJ!F4&v-t*pFv|GqbwlIA&zv2A5dn+{Y%Ah z6HWR&6gGi2Ivxk4WL$kI)#Q+;e^+s8%qrJ3&@e>U^2_rk3fmhI-%bkSO zla}KM;`@*?fNsf7psVUQzJx|SB5Ksv3IRJtiDM-3GFlwCh8(i3D)5&!XB%Z&@r`L* zL`%;EGg3LL3GgvIs~*p;E5}?=f0@UvSu`EhPG!_d0Th!h^N=~l1bAhl!*(z_iL+?3 zOa>!5K6bdtop(g|DJwMeXI^Z{aC4&Y*aWv`Q`k>AGz*#^QFK_Sg4A2s2sX zyaK?Q#jFa5+BL$AZbiua(DS$mAnM-H5Vb%m>Q|w>>v#>V^x^yS2iu+&F0x$e z7#nyUt%8}`Z_0ve2kNmUfeg5&9khaItq!rO{J)vM;C$wQ*_N*USad`>KYiBX8;A?1Y0N>l= zmKL!Vx&igzpxy5qH?WDa?S-Ltb@zR5A+KtwK?%K3{ICT4d@!Sku|5$Ig{^1>fn`@~ zgayVcxPa!X+a*DDEqYJD%GzdDjaqg`&DcUeMxO3i<{G z9Srss(IE(;TW2rbqDw&?yEKP9J@9{i|Cf*c>CWv>1Qt*YU36dzx#0`?&Z1`o54j#9 zL%;&XPh^(GZQt(<#WwdELstring ip_address = 4 [(.google.api.field_info) = { + */ + private $ip_address = ''; + /** + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * * Generated from protobuf field repeated string projects_missing_permission = 3; */ @@ -46,10 +51,11 @@ class AbortInfo extends \Google\Protobuf\Internal\Message * Causes that the analysis is aborted. * @type string $resource_uri * URI of the resource that caused the abort. + * @type string $ip_address + * IP address that caused the abort. * @type array|\Google\Protobuf\Internal\RepeatedField $projects_missing_permission - * List of project IDs that the user has specified in the request but does - * not have permission to access network configs. Analysis is aborted in this - * case with the PERMISSION_DENIED cause. + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * } */ public function __construct($data = NULL) { @@ -110,9 +116,34 @@ public function setResourceUri($var) } /** - * List of project IDs that the user has specified in the request but does - * not have permission to access network configs. Analysis is aborted in this - * case with the PERMISSION_DENIED cause. + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * * Generated from protobuf field repeated string projects_missing_permission = 3; * @return \Google\Protobuf\Internal\RepeatedField @@ -123,9 +154,8 @@ public function getProjectsMissingPermission() } /** - * List of project IDs that the user has specified in the request but does - * not have permission to access network configs. Analysis is aborted in this - * case with the PERMISSION_DENIED cause. + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * * Generated from protobuf field repeated string projects_missing_permission = 3; * @param array|\Google\Protobuf\Internal\RepeatedField $var diff --git a/NetworkManagement/src/V1/AbortInfo/Cause.php b/NetworkManagement/src/V1/AbortInfo/Cause.php index 2267edd13e36..4ad6af599b68 100644 --- a/NetworkManagement/src/V1/AbortInfo/Cause.php +++ b/NetworkManagement/src/V1/AbortInfo/Cause.php @@ -20,104 +20,128 @@ class Cause */ const CAUSE_UNSPECIFIED = 0; /** - * Aborted due to unknown network. - * The reachability analysis cannot proceed because the user does not have - * access to the host project's network configurations, including firewall - * rules and routes. This happens when the project is a service project and - * the endpoints being traced are in the host project's network. + * Aborted due to unknown network. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNKNOWN_NETWORK = 1; + * Generated from protobuf enum UNKNOWN_NETWORK = 1 [deprecated = true]; */ const UNKNOWN_NETWORK = 1; /** - * Aborted because the IP address(es) are unknown. + * Aborted because no project information can be derived from the test + * input. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNKNOWN_IP = 2; + * Generated from protobuf enum UNKNOWN_PROJECT = 3 [deprecated = true]; */ - const UNKNOWN_IP = 2; + const UNKNOWN_PROJECT = 3; /** - * Aborted because no project information can be derived from the test - * input. + * Aborted because traffic is sent from a public IP to an instance without + * an external IP. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNKNOWN_PROJECT = 3; + * Generated from protobuf enum NO_EXTERNAL_IP = 7 [deprecated = true]; */ - const UNKNOWN_PROJECT = 3; + const NO_EXTERNAL_IP = 7; /** - * Aborted because the user lacks the permission to access all or part of - * the network configurations required to run the test. + * Aborted because none of the traces matches destination information + * specified in the input test request. Deprecated, not used in the new + * tests. * - * Generated from protobuf enum PERMISSION_DENIED = 4; + * Generated from protobuf enum UNINTENDED_DESTINATION = 8 [deprecated = true]; */ - const PERMISSION_DENIED = 4; + const UNINTENDED_DESTINATION = 8; /** - * Aborted because no valid source endpoint is derived from the input test - * request. + * Aborted because the source endpoint could not be found. Deprecated, not + * used in the new tests. * - * Generated from protobuf enum NO_SOURCE_LOCATION = 5; + * Generated from protobuf enum SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; */ - const NO_SOURCE_LOCATION = 5; + const SOURCE_ENDPOINT_NOT_FOUND = 11; /** - * Aborted because the source and/or destination endpoint specified in - * the test are invalid. The possible reasons that an endpoint is - * invalid include: malformed IP address; nonexistent instance or - * network URI; IP address not in the range of specified network URI; and - * instance not owning the network interface in the specified network. + * Aborted because the source network does not match the source endpoint. + * Deprecated, not used in the new tests. * - * Generated from protobuf enum INVALID_ARGUMENT = 6; + * Generated from protobuf enum MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; */ - const INVALID_ARGUMENT = 6; + const MISMATCHED_SOURCE_NETWORK = 12; /** - * Aborted because traffic is sent from a public IP to an instance without - * an external IP. + * Aborted because the destination endpoint could not be found. Deprecated, + * not used in the new tests. * - * Generated from protobuf enum NO_EXTERNAL_IP = 7; + * Generated from protobuf enum DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; */ - const NO_EXTERNAL_IP = 7; + const DESTINATION_ENDPOINT_NOT_FOUND = 13; /** - * Aborted because none of the traces matches destination information - * specified in the input test request. + * Aborted because the destination network does not match the destination + * endpoint. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNINTENDED_DESTINATION = 8; + * Generated from protobuf enum MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; */ - const UNINTENDED_DESTINATION = 8; + const MISMATCHED_DESTINATION_NETWORK = 14; /** - * Aborted because the number of steps in the trace exceeding a certain - * limit which may be caused by routing loop. + * Aborted because no endpoint with the packet's destination IP address is + * found. * - * Generated from protobuf enum TRACE_TOO_LONG = 9; + * Generated from protobuf enum UNKNOWN_IP = 2; */ - const TRACE_TOO_LONG = 9; + const UNKNOWN_IP = 2; /** - * Aborted due to internal server error. + * Aborted because the source IP address doesn't belong to any of the + * subnets of the source VPC network. * - * Generated from protobuf enum INTERNAL_ERROR = 10; + * Generated from protobuf enum SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; */ - const INTERNAL_ERROR = 10; + const SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; /** - * Aborted because the source endpoint could not be found. + * Aborted because user lacks permission to access all or part of the + * network configurations required to run the test. * - * Generated from protobuf enum SOURCE_ENDPOINT_NOT_FOUND = 11; + * Generated from protobuf enum PERMISSION_DENIED = 4; */ - const SOURCE_ENDPOINT_NOT_FOUND = 11; + const PERMISSION_DENIED = 4; /** - * Aborted because the source network does not match the source endpoint. + * Aborted because user lacks permission to access Cloud NAT configs + * required to run the test. * - * Generated from protobuf enum MISMATCHED_SOURCE_NETWORK = 12; + * Generated from protobuf enum PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; */ - const MISMATCHED_SOURCE_NETWORK = 12; + const PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; /** - * Aborted because the destination endpoint could not be found. + * Aborted because user lacks permission to access Network endpoint group + * endpoint configs required to run the test. * - * Generated from protobuf enum DESTINATION_ENDPOINT_NOT_FOUND = 13; + * Generated from protobuf enum PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; */ - const DESTINATION_ENDPOINT_NOT_FOUND = 13; + const PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; /** - * Aborted because the destination network does not match the destination - * endpoint. + * Aborted because no valid source or destination endpoint is derived from + * the input test request. * - * Generated from protobuf enum MISMATCHED_DESTINATION_NETWORK = 14; + * Generated from protobuf enum NO_SOURCE_LOCATION = 5; */ - const MISMATCHED_DESTINATION_NETWORK = 14; + const NO_SOURCE_LOCATION = 5; + /** + * Aborted because the source or destination endpoint specified in + * the request is invalid. Some examples: + * - The request might contain malformed resource URI, project ID, or IP + * address. + * - The request might contain inconsistent information (for example, the + * request might include both the instance and the network, but the instance + * might not have a NIC in that network). + * + * Generated from protobuf enum INVALID_ARGUMENT = 6; + */ + const INVALID_ARGUMENT = 6; + /** + * Aborted because the number of steps in the trace exceeds a certain + * limit. It might be caused by a routing loop. + * + * Generated from protobuf enum TRACE_TOO_LONG = 9; + */ + const TRACE_TOO_LONG = 9; + /** + * Aborted due to internal server error. + * + * Generated from protobuf enum INTERNAL_ERROR = 10; + */ + const INTERNAL_ERROR = 10; /** * Aborted because the test scenario is not supported. * @@ -145,6 +169,30 @@ class Cause * Generated from protobuf enum RESOURCE_CONFIG_NOT_FOUND = 18; */ const RESOURCE_CONFIG_NOT_FOUND = 18; + /** + * Aborted because expected VM instance configuration was missing. + * + * Generated from protobuf enum VM_INSTANCE_CONFIG_NOT_FOUND = 24; + */ + const VM_INSTANCE_CONFIG_NOT_FOUND = 24; + /** + * Aborted because expected network configuration was missing. + * + * Generated from protobuf enum NETWORK_CONFIG_NOT_FOUND = 25; + */ + const NETWORK_CONFIG_NOT_FOUND = 25; + /** + * Aborted because expected firewall configuration was missing. + * + * Generated from protobuf enum FIREWALL_CONFIG_NOT_FOUND = 26; + */ + const FIREWALL_CONFIG_NOT_FOUND = 26; + /** + * Aborted because expected route configuration was missing. + * + * Generated from protobuf enum ROUTE_CONFIG_NOT_FOUND = 27; + */ + const ROUTE_CONFIG_NOT_FOUND = 27; /** * Aborted because a PSC endpoint selection for the Google-managed service * is ambiguous (several PSC endpoints satisfy test input). @@ -166,30 +214,60 @@ class Cause * Generated from protobuf enum SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; */ const SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + /** + * Aborted because one of the endpoints is a non-routable IP address + * (loopback, link-local, etc). + * + * Generated from protobuf enum NON_ROUTABLE_IP_ADDRESS = 22; + */ + const NON_ROUTABLE_IP_ADDRESS = 22; + /** + * Aborted due to an unknown issue in the Google-managed project. + * + * Generated from protobuf enum UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + */ + const UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + /** + * Aborted due to an unsupported configuration of the Google-managed + * project. + * + * Generated from protobuf enum UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + */ + const UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; private static $valueToName = [ self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', self::UNKNOWN_NETWORK => 'UNKNOWN_NETWORK', - self::UNKNOWN_IP => 'UNKNOWN_IP', self::UNKNOWN_PROJECT => 'UNKNOWN_PROJECT', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', - self::INVALID_ARGUMENT => 'INVALID_ARGUMENT', self::NO_EXTERNAL_IP => 'NO_EXTERNAL_IP', self::UNINTENDED_DESTINATION => 'UNINTENDED_DESTINATION', - self::TRACE_TOO_LONG => 'TRACE_TOO_LONG', - self::INTERNAL_ERROR => 'INTERNAL_ERROR', self::SOURCE_ENDPOINT_NOT_FOUND => 'SOURCE_ENDPOINT_NOT_FOUND', self::MISMATCHED_SOURCE_NETWORK => 'MISMATCHED_SOURCE_NETWORK', self::DESTINATION_ENDPOINT_NOT_FOUND => 'DESTINATION_ENDPOINT_NOT_FOUND', self::MISMATCHED_DESTINATION_NETWORK => 'MISMATCHED_DESTINATION_NETWORK', + self::UNKNOWN_IP => 'UNKNOWN_IP', + self::SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK => 'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS => 'PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS', + self::PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS => 'PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS', + self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', + self::INVALID_ARGUMENT => 'INVALID_ARGUMENT', + self::TRACE_TOO_LONG => 'TRACE_TOO_LONG', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', self::UNSUPPORTED => 'UNSUPPORTED', self::MISMATCHED_IP_VERSION => 'MISMATCHED_IP_VERSION', self::GKE_KONNECTIVITY_PROXY_UNSUPPORTED => 'GKE_KONNECTIVITY_PROXY_UNSUPPORTED', self::RESOURCE_CONFIG_NOT_FOUND => 'RESOURCE_CONFIG_NOT_FOUND', + self::VM_INSTANCE_CONFIG_NOT_FOUND => 'VM_INSTANCE_CONFIG_NOT_FOUND', + self::NETWORK_CONFIG_NOT_FOUND => 'NETWORK_CONFIG_NOT_FOUND', + self::FIREWALL_CONFIG_NOT_FOUND => 'FIREWALL_CONFIG_NOT_FOUND', + self::ROUTE_CONFIG_NOT_FOUND => 'ROUTE_CONFIG_NOT_FOUND', self::GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT', self::SOURCE_PSC_CLOUD_SQL_UNSUPPORTED => 'SOURCE_PSC_CLOUD_SQL_UNSUPPORTED', self::SOURCE_FORWARDING_RULE_UNSUPPORTED => 'SOURCE_FORWARDING_RULE_UNSUPPORTED', + self::NON_ROUTABLE_IP_ADDRESS => 'NON_ROUTABLE_IP_ADDRESS', + self::UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT => 'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT', + self::UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG => 'UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/DeliverInfo.php b/NetworkManagement/src/V1/DeliverInfo.php index 155568b2c510..0db79fde2603 100644 --- a/NetworkManagement/src/V1/DeliverInfo.php +++ b/NetworkManagement/src/V1/DeliverInfo.php @@ -27,6 +27,12 @@ class DeliverInfo extends \Google\Protobuf\Internal\Message * Generated from protobuf field string resource_uri = 2; */ private $resource_uri = ''; + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + */ + private $ip_address = ''; /** * Constructor. @@ -38,6 +44,8 @@ class DeliverInfo extends \Google\Protobuf\Internal\Message * Target type where the packet is delivered to. * @type string $resource_uri * URI of the resource that the packet is delivered to. + * @type string $ip_address + * IP address of the target (if applicable). * } */ public function __construct($data = NULL) { @@ -97,5 +105,31 @@ public function setResourceUri($var) return $this; } + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + } diff --git a/NetworkManagement/src/V1/DeliverInfo/Target.php b/NetworkManagement/src/V1/DeliverInfo/Target.php index 79d3c14e06c7..9f2f8e775efb 100644 --- a/NetworkManagement/src/V1/DeliverInfo/Target.php +++ b/NetworkManagement/src/V1/DeliverInfo/Target.php @@ -82,6 +82,30 @@ class Target * Generated from protobuf enum STORAGE_BUCKET = 10; */ const STORAGE_BUCKET = 10; + /** + * Target is a private network. Used only for return traces. + * + * Generated from protobuf enum PRIVATE_NETWORK = 11; + */ + const PRIVATE_NETWORK = 11; + /** + * Target is a Cloud Function. Used only for return traces. + * + * Generated from protobuf enum CLOUD_FUNCTION = 12; + */ + const CLOUD_FUNCTION = 12; + /** + * Target is a App Engine service version. Used only for return traces. + * + * Generated from protobuf enum APP_ENGINE_VERSION = 13; + */ + const APP_ENGINE_VERSION = 13; + /** + * Target is a Cloud Run revision. Used only for return traces. + * + * Generated from protobuf enum CLOUD_RUN_REVISION = 14; + */ + const CLOUD_RUN_REVISION = 14; private static $valueToName = [ self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', @@ -95,6 +119,10 @@ class Target self::PSC_VPC_SC => 'PSC_VPC_SC', self::SERVERLESS_NEG => 'SERVERLESS_NEG', self::STORAGE_BUCKET => 'STORAGE_BUCKET', + self::PRIVATE_NETWORK => 'PRIVATE_NETWORK', + self::CLOUD_FUNCTION => 'CLOUD_FUNCTION', + self::APP_ENGINE_VERSION => 'APP_ENGINE_VERSION', + self::CLOUD_RUN_REVISION => 'CLOUD_RUN_REVISION', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/DropInfo.php b/NetworkManagement/src/V1/DropInfo.php index b6c769a9e020..7c242bb56e5c 100644 --- a/NetworkManagement/src/V1/DropInfo.php +++ b/NetworkManagement/src/V1/DropInfo.php @@ -27,6 +27,24 @@ class DropInfo extends \Google\Protobuf\Internal\Message * Generated from protobuf field string resource_uri = 2; */ private $resource_uri = ''; + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + */ + private $source_ip = ''; + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + */ + private $destination_ip = ''; + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + */ + private $region = ''; /** * Constructor. @@ -38,6 +56,12 @@ class DropInfo extends \Google\Protobuf\Internal\Message * Cause that the packet is dropped. * @type string $resource_uri * URI of the resource that caused the drop. + * @type string $source_ip + * Source IP address of the dropped packet (if relevant). + * @type string $destination_ip + * Destination IP address of the dropped packet (if relevant). + * @type string $region + * Region of the dropped packet (if relevant). * } */ public function __construct($data = NULL) { @@ -97,5 +121,83 @@ public function setResourceUri($var) return $this; } + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + * @return string + */ + public function getSourceIp() + { + return $this->source_ip; + } + + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + * @param string $var + * @return $this + */ + public function setSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->source_ip = $var; + + return $this; + } + + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + * @return string + */ + public function getDestinationIp() + { + return $this->destination_ip; + } + + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + * @param string $var + * @return $this + */ + public function setDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->destination_ip = $var; + + return $this; + } + + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + } diff --git a/NetworkManagement/src/V1/DropInfo/Cause.php b/NetworkManagement/src/V1/DropInfo/Cause.php index bd07f7b1f235..3f8164b5c29d 100644 --- a/NetworkManagement/src/V1/DropInfo/Cause.php +++ b/NetworkManagement/src/V1/DropInfo/Cause.php @@ -42,7 +42,7 @@ class Cause */ const FIREWALL_RULE = 3; /** - * Dropped due to no routes. + * Dropped due to no matching routes. * * Generated from protobuf enum NO_ROUTE = 4; */ @@ -56,11 +56,73 @@ class Cause /** * Packet is sent to a wrong (unintended) network. Example: you trace a * packet from VM1:Network1 to VM2:Network2, however, the route configured - * in Network1 sends the packet destined for VM2's IP addresss to Network3. + * in Network1 sends the packet destined for VM2's IP address to Network3. * * Generated from protobuf enum ROUTE_WRONG_NETWORK = 6; */ const ROUTE_WRONG_NETWORK = 6; + /** + * Route's next hop IP address cannot be resolved to a GCP resource. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + */ + const ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + /** + * Route's next hop resource is not found. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + */ + const ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + /** + * Route's next hop instance doesn't hace a NIC in the route's network. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + */ + const ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + /** + * Route's next hop IP address is not a primary IP address of the next hop + * instance. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + */ + const ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + /** + * Route's next hop forwarding rule doesn't match next hop IP address. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + */ + const ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + /** + * Route's next hop VPN tunnel is down (does not have valid IKE SAs). + * + * Generated from protobuf enum ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + */ + const ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + /** + * Route's next hop forwarding rule type is invalid (it's not a forwarding + * rule of the internal passthrough load balancer). + * + * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + */ + const ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + /** + * Packet is sent from the Internet to the private IPv6 address. + * + * Generated from protobuf enum NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + */ + const NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + /** + * The packet does not match a policy-based VPN tunnel local selector. + * + * Generated from protobuf enum VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + */ + const VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + /** + * The packet does not match a policy-based VPN tunnel remote selector. + * + * Generated from protobuf enum VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + */ + const VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; /** * Packet with internal destination address sent to the internet gateway. * @@ -69,11 +131,19 @@ class Cause const PRIVATE_TRAFFIC_TO_INTERNET = 7; /** * Instance with only an internal IP address tries to access Google API and - * services, but private Google access is not enabled. + * services, but private Google access is not enabled in the subnet. * * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; */ const PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + /** + * Source endpoint tries to access Google API and services through the VPN + * tunnel to another network, but Private Google Access needs to be enabled + * in the source endpoint network. + * + * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + */ + const PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; /** * Instance with only an internal IP address tries to access external hosts, * but Cloud NAT is not enabled in the subnet, unless special configurations @@ -97,13 +167,6 @@ class Cause * Generated from protobuf enum FORWARDING_RULE_MISMATCH = 11; */ const FORWARDING_RULE_MISMATCH = 11; - /** - * Packet could be dropped because it was sent from a different region - * to a regional forwarding without global access. - * - * Generated from protobuf enum FORWARDING_RULE_REGION_MISMATCH = 25; - */ - const FORWARDING_RULE_REGION_MISMATCH = 25; /** * Forwarding rule does not have backends configured. * @@ -268,6 +331,13 @@ class Cause * Generated from protobuf enum VPC_CONNECTOR_NOT_RUNNING = 24; */ const VPC_CONNECTOR_NOT_RUNNING = 24; + /** + * Packet could be dropped because it was sent from a different region + * to a regional forwarding without global access. + * + * Generated from protobuf enum FORWARDING_RULE_REGION_MISMATCH = 25; + */ + const FORWARDING_RULE_REGION_MISMATCH = 25; /** * The Private Service Connect endpoint is in a project that is not approved * to connect to the service. @@ -275,6 +345,59 @@ class Cause * Generated from protobuf enum PSC_CONNECTION_NOT_ACCEPTED = 26; */ const PSC_CONNECTION_NOT_ACCEPTED = 26; + /** + * The packet is sent to the Private Service Connect endpoint over the + * peering, but [it's not + * supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + * + * Generated from protobuf enum PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + */ + const PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group), but the producer PSC forwarding rule does not have + * global access enabled. + * + * Generated from protobuf enum PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + */ + const PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group), but the producer PSC forwarding rule has multiple ports + * specified. + * + * Generated from protobuf enum PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + */ + const PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group) targeting a Cloud SQL service attachment, but this + * configuration is not supported. + * + * Generated from protobuf enum CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + */ + const CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + /** + * No NAT subnets are defined for the PSC service attachment. + * + * Generated from protobuf enum NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + */ + const NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + /** + * The packet sent from the hybrid NEG proxy matches a non-dynamic route, + * but such a configuration is not supported. + * + * Generated from protobuf enum HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + */ + const HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + /** + * The packet sent from the hybrid NEG proxy matches a dynamic route with a + * next hop in a different region, but such a configuration is not + * supported. + * + * Generated from protobuf enum HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + */ + const HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; /** * Packet sent from a Cloud Run revision that is not ready. * @@ -294,6 +417,18 @@ class Cause * Generated from protobuf enum LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; */ const LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + /** + * Packet sent to Cloud Nat without active NAT IPs. + * + * Generated from protobuf enum CLOUD_NAT_NO_ADDRESSES = 40; + */ + const CLOUD_NAT_NO_ADDRESSES = 40; + /** + * Packet is stuck in a routing loop. + * + * Generated from protobuf enum ROUTING_LOOP = 59; + */ + const ROUTING_LOOP = 59; private static $valueToName = [ self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', @@ -303,12 +438,22 @@ class Cause self::NO_ROUTE => 'NO_ROUTE', self::ROUTE_BLACKHOLE => 'ROUTE_BLACKHOLE', self::ROUTE_WRONG_NETWORK => 'ROUTE_WRONG_NETWORK', + self::ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED => 'ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED', + self::ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND => 'ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND', + self::ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK => 'ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK', + self::ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP => 'ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP', + self::ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH => 'ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH', + self::ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED => 'ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED', + self::ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID => 'ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID', + self::NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS => 'NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS', + self::VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH => 'VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH', + self::VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH => 'VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH', self::PRIVATE_TRAFFIC_TO_INTERNET => 'PRIVATE_TRAFFIC_TO_INTERNET', self::PRIVATE_GOOGLE_ACCESS_DISALLOWED => 'PRIVATE_GOOGLE_ACCESS_DISALLOWED', + self::PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED => 'PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED', self::NO_EXTERNAL_ADDRESS => 'NO_EXTERNAL_ADDRESS', self::UNKNOWN_INTERNAL_ADDRESS => 'UNKNOWN_INTERNAL_ADDRESS', self::FORWARDING_RULE_MISMATCH => 'FORWARDING_RULE_MISMATCH', - self::FORWARDING_RULE_REGION_MISMATCH => 'FORWARDING_RULE_REGION_MISMATCH', self::FORWARDING_RULE_NO_INSTANCES => 'FORWARDING_RULE_NO_INSTANCES', self::FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK => 'FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK', self::INSTANCE_NOT_RUNNING => 'INSTANCE_NOT_RUNNING', @@ -332,10 +477,20 @@ class Cause self::CLOUD_FUNCTION_NOT_ACTIVE => 'CLOUD_FUNCTION_NOT_ACTIVE', self::VPC_CONNECTOR_NOT_SET => 'VPC_CONNECTOR_NOT_SET', self::VPC_CONNECTOR_NOT_RUNNING => 'VPC_CONNECTOR_NOT_RUNNING', + self::FORWARDING_RULE_REGION_MISMATCH => 'FORWARDING_RULE_REGION_MISMATCH', self::PSC_CONNECTION_NOT_ACCEPTED => 'PSC_CONNECTION_NOT_ACCEPTED', + self::PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK => 'PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK', + self::PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS => 'PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS', + self::PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS => 'PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS', + self::CLOUD_SQL_PSC_NEG_UNSUPPORTED => 'CLOUD_SQL_PSC_NEG_UNSUPPORTED', + self::NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT => 'NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT', + self::HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED', + self::HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED', self::CLOUD_RUN_REVISION_NOT_READY => 'CLOUD_RUN_REVISION_NOT_READY', self::DROPPED_INSIDE_PSC_SERVICE_PRODUCER => 'DROPPED_INSIDE_PSC_SERVICE_PRODUCER', self::LOAD_BALANCER_HAS_NO_PROXY_SUBNET => 'LOAD_BALANCER_HAS_NO_PROXY_SUBNET', + self::CLOUD_NAT_NO_ADDRESSES => 'CLOUD_NAT_NO_ADDRESSES', + self::ROUTING_LOOP => 'ROUTING_LOOP', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/ForwardInfo.php b/NetworkManagement/src/V1/ForwardInfo.php index 60f29d92b909..4cf237f2a403 100644 --- a/NetworkManagement/src/V1/ForwardInfo.php +++ b/NetworkManagement/src/V1/ForwardInfo.php @@ -27,6 +27,12 @@ class ForwardInfo extends \Google\Protobuf\Internal\Message * Generated from protobuf field string resource_uri = 2; */ private $resource_uri = ''; + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + */ + private $ip_address = ''; /** * Constructor. @@ -38,6 +44,8 @@ class ForwardInfo extends \Google\Protobuf\Internal\Message * Target type where this packet is forwarded to. * @type string $resource_uri * URI of the resource that the packet is forwarded to. + * @type string $ip_address + * IP address of the target (if applicable). * } */ public function __construct($data = NULL) { @@ -97,5 +105,31 @@ public function setResourceUri($var) return $this; } + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + } diff --git a/NetworkManagement/src/V1/ForwardInfo/Target.php b/NetworkManagement/src/V1/ForwardInfo/Target.php index fd7f27fd004b..69e484be4b27 100644 --- a/NetworkManagement/src/V1/ForwardInfo/Target.php +++ b/NetworkManagement/src/V1/ForwardInfo/Target.php @@ -40,7 +40,7 @@ class Target /** * Forwarded to a Google Kubernetes Engine Container cluster master. * - * Generated from protobuf enum GKE_MASTER = 4; + * Generated from protobuf enum GKE_MASTER = 4 [deprecated = true]; */ const GKE_MASTER = 4; /** @@ -52,7 +52,7 @@ class Target /** * Forwarded to a Cloud SQL instance. * - * Generated from protobuf enum CLOUD_SQL_INSTANCE = 6; + * Generated from protobuf enum CLOUD_SQL_INSTANCE = 6 [deprecated = true]; */ const CLOUD_SQL_INSTANCE = 6; /** @@ -67,6 +67,12 @@ class Target * Generated from protobuf enum NCC_HUB = 8; */ const NCC_HUB = 8; + /** + * Forwarded to a router appliance. + * + * Generated from protobuf enum ROUTER_APPLIANCE = 9; + */ + const ROUTER_APPLIANCE = 9; private static $valueToName = [ self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', @@ -78,6 +84,7 @@ class Target self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', self::ANOTHER_PROJECT => 'ANOTHER_PROJECT', self::NCC_HUB => 'NCC_HUB', + self::ROUTER_APPLIANCE => 'ROUTER_APPLIANCE', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/LoadBalancerBackendInfo.php b/NetworkManagement/src/V1/LoadBalancerBackendInfo.php index 54a6e4a71743..af3cbff5cd2c 100644 --- a/NetworkManagement/src/V1/LoadBalancerBackendInfo.php +++ b/NetworkManagement/src/V1/LoadBalancerBackendInfo.php @@ -74,11 +74,11 @@ class LoadBalancerBackendInfo extends \Google\Protobuf\Internal\Message */ private $health_check_uri = ''; /** - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -114,11 +114,11 @@ class LoadBalancerBackendInfo extends \Google\Protobuf\Internal\Message * @type string $health_check_uri * URI of the health check attached to this backend (if applicable). * @type int $health_check_firewalls_config_state - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * } */ @@ -370,11 +370,11 @@ public function setHealthCheckUri($var) } /** - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -386,11 +386,11 @@ public function getHealthCheckFirewallsConfigState() } /** - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php deleted file mode 100644 index 10855029f8cfbc5cfe08f03fcac733bb17d8eee7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4728 zcmcIoZ*SY?5wB!hu}}UZ(@mmiTgs@};$RB}yG7S2Nn1*yU7<3iQj{|f0$7TAB(tGO z_95xQ3k(d{n|*{~A7LM5@Ar1t>wbp;yXPS(%d*@m0qQrh$h+U&b9cYH)AQnU|I~*M z#Y5r}YKCMe4lcy-l!!j{LeKIXaS)A0go>7T=GzXTk|;LXqT1F)rP0(Mp=#ho)FM@J z?0I8{R4m7fh835D-+T1+ndzEiaz@;+a=urwJl7>wXrJ5Rg%Oe>qN#ew_jK)mgy)@!oR)%Q1sMtWN>!hzoB(#6Le8IJPAQp&8=GV>>Wx z*A8vdvHy$*eJPGiCm;xNQ+5=&=%?q3Orh;sWcR5UV=~#tzK4N%DW)EFSgbHk{iYid z>Y7f!K>~}~e(2E-idL&*5>6t_p6otN%rZE8B<{vOR;xFhd?|)BBGcAIk&-Z??sM)p z1Gt?0*PjzV*|+-#HgSeEa%!I29<5fdPIU!xo2o{V1TU<0d&2rU#Uw9oe-c>T#sUe= zGkohw{;6st;{9MTPP zNauT{2MN0A+ZCF`JmyE~*-sk|Szr_K4-#=sE-cGRm_{!VxSt46->R^}i-Pz?`R_R> z%yLQChGoXjVn)pDuGNSj#Z?r|?|;6)d1iwrwK#&}hV(-C81fb+=!L-&QUrdyQi_^p zOPbVr>;`H@KK8>zE5Df53A~S{tW$GfJFMFdv8md4ly$EDNow@=dX%&&^+v3n#$^kA z9oX)8g1X63_ZC3y#G2E9rDu?z4pSbMUXzQs+=LBSIX9h%#5GpUewwL!Dj9M9sl7F5QLH!z)RBZ^Iupz?+ds>|{})?hWQRzU!; zeZw3Mk*Go9={hX?9u2vpD+1P_?IO2ubZ|PX3HM=Z-}_r8Bb1@wc;?W+qcYd1VGoO2%!^ni z!(>iCxGoc3_@r3izI?QRFD*1sOYn76jiIv)x&*@bH8IZ20OzD(IT8CTa?Y`Lyc&(* zI|t`<61!C%q7&GR-=%XoA&}Ap1CF*!Fuw*;K^fM zaC86nZ*v?q-nUo+S-B^SVfB(@DJeaMyYmBz^o^(;lcLmr0>xVcb3^jh15QhpzlQv@ zbH9Y5s_3uU+E<2t(ou|_+U+Ry=0Q_w6y6iIAb(iz7>Pt7gQIIpZL7xg!)*Bi-k(Pt z;Wtn|Xlt)ztDX8aIqXr9 z6Y_*??!R212Ik=4G+-b?1@cG{dxYyd8)0nl=l6ePgb9yeg;46zWG4_(^SF9Q@pdMB z3OT;L1URhOoZU@jIBVuEOA_BB%O>O!zwUvcDcxRcHZdEprYUm$OS#r!nZY#l)T;+s z94~9~QLTB{YxlZ^W$fDPJ+-0eigwggv3^#{FJQZcv)8pQIs|{^xFN2F2y@4ezwxN9 z2=`!`ZFf~kB~P9I5rK-i~_>j*XDkGfe_61RAyLp1|{Im7ht~F z!Z#p>0ch%fit;ikxfjS!-Jn4q$^Mdnpd0k;eyAe!sGSS7}Rbq8cV( zvM43##!ZqDW|8%4Ufo#m3tYR?{n#L5%x{3*Al_k$YaINu1>Bqoo-!PhR)SJ`3hUF~ zaYNodBO&#C4;M+(HB8(q+}bAF8`}|XHg$G6(aHR&8+Wqw=MXNZV{gt4 z39hbqNsinternalAddGeneratedFile( - ' -Ý -4google/cloud/networkmanagement/v1/reachability.proto!google.cloud.networkmanagement.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto9google/cloud/networkmanagement/v1/connectivity_test.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"| -ListConnectivityTestsRequest -parent ( BàA - page_size ( - -page_token (  -filter (  -order_by ( "• -ListConnectivityTestsResponseF - resources ( 23.google.cloud.networkmanagement.v1.ConnectivityTest -next_page_token (  - unreachable ( "/ -GetConnectivityTestRequest -name ( BàA"– -CreateConnectivityTestRequest -parent ( BàA -test_id ( BàAJ -resource ( 23.google.cloud.networkmanagement.v1.ConnectivityTestBàA"¡ -UpdateConnectivityTestRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAJ -resource ( 23.google.cloud.networkmanagement.v1.ConnectivityTestBàA"2 -DeleteConnectivityTestRequest -name ( BàA"1 -RerunConnectivityTestRequest -name ( BàA"Ö -OperationMetadata/ - create_time ( 2.google.protobuf.Timestamp, -end_time ( 2.google.protobuf.Timestamp -target (  -verb (  - status_detail (  -cancel_requested ( - api_version ( 2– -ReachabilityServiceç -ListConnectivityTests?.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest@.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/global}/connectivityTestsÔ -GetConnectivityTest=.google.cloud.networkmanagement.v1.GetConnectivityTestRequest3.google.cloud.networkmanagement.v1.ConnectivityTest"IÚAname‚Óä“<:/v1/{name=projects/*/locations/global/connectivityTests/*}¬ -CreateConnectivityTest@.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.google.longrunning.Operation"°ÊAG -2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadataÚAparent,test_id,resource‚Óä“F":/v1/{parent=projects/*/locations/global}/connectivityTests:resource² -UpdateConnectivityTest@.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.google.longrunning.Operation"¶ÊAG -2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadataÚAupdate_mask,resource‚Óä“O2C/v1/{resource.name=projects/*/locations/global/connectivityTests/*}:resource -RerunConnectivityTest?.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.google.longrunning.Operation"•ÊAG -2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadata‚Óä“E"@/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun:*ñ -DeleteConnectivityTest@.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.google.longrunning.Operation"vÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/global/connectivityTests/*}TÊA networkmanagement.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB‡ -%com.google.cloud.networkmanagement.v1BReachabilityServiceProtoPZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpbª!Google.Cloud.NetworkManagement.V1Ê!Google\\Cloud\\NetworkManagement\\V1ê$Google::Cloud::NetworkManagement::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php deleted file mode 100644 index bbba5c30650375dbba093d573f137508c29a94af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14825 zcmbtbOKclic5PCkBtCsyF8^rBZPT>7?f#fa(8BmWQnXcMKVQF9(M#(Q&dUj zm?jyLlG{mol>ixF1{h?WMK)Pwo6j!EBD)|#kX5#W1jr%*5+I8J0kX)s?^9JQmfO`6 zZ!Ffk@4i>}-OsuAzWVHkqh}*_D_eF4?zl5`kFtlaveRd7b~GMNhuvX6dw6<$?2fbD z;fqnP?~e1?Y^k2D)mvG!WVLQ$>STC2?z%hKli~2B@80kBho?vP2k!LcaQys5XV5uu zU$}$m{j&%6r{hl7&2!F-4LUE}$p{a!4IzQgvuaxn5()%zU=613c+lw|l-x;o+#5}Y;|54~c23-> zCrWy9_dU5RvFjaY?}|O{?96TQ^Xznd>IPTOX2f+vX=sj&@l`p(21pYTK+L$OgR@mysELPp3nkKm!Z28FT_s-mLW{va7$KX>EGkg|O z=$ZA{ETpg{3+Q6!a5$c3HaLSgx@Zu+oc@R{aoKv7PfyUvRa+}t>$b1rcdrTp03<8vgRHq*J+ zb|$~shsTvp=K|;V{TMRh;lBCn)sXXn%?h?EN@p%|mT_#Bv)q-@-QQ+sG;-X*NpIjf zP{av2<;$_RX^ciDpSv%n`fSBE$EO2l?4I>F+bglz@~zsZ16xj&Y=6KO2AyfoUdO=>%~mDov+yDjPgQ@yU*d5MTFhr+;?Jd z4{CBju#hX@xF_&30F2JzDR@sa*ErWW$K4bY3w)m7m;2uoONp3yiJfn@jF#!NYt4pP zw014Cq`jqIVHfb&ZaKSleb2FK_)#mGT4HXXW!g2fr6u*Z+10>|a=l)znoiTS_btrZ z(yz14z;MI1_GwW}eNwj{YYX~Sb}29pD{}UXCYWoN^qcJMz)-PTZ znohNDl$?T5r4z96NAa;)D{0qsI=V)^zDu*f#;)(<=vMU0OgC)E*K~}QFQc@6n`MK~ z>EMj&EOU*`Qkg%Fq*~=0_tw~N)SNO-^NI0PThlY_qQ49cwc53sS=H9{Ep{b1Qgn)S zj1*gSTg&LnY@uefv<>|t)9@-keyT?4c+TmoY`J7s@lv*?=__opWY-(od3r2Gr|Ei{ zrHn$|ZfO@tANDQt3B=Vf?LDhWC+P71Yh~?XVU?u`y>k1^{Y8SU1-&bFuy)j&jQX8d z4rO8zny#{i({Yaj)3kn`r8(L^Mxw=WW}3jKj5!X`380CGDl2e$BaSsWrTeu=lIS5} z$22XfrcXO36X3xGJl$gFBqnn@-R|&oFy$~WT}WmUxi8piAZEqcc7|y$I@9hm7p`gK zj5~u9S8O!*r;BVY2uCY@B4U6Wqd9|~?H zrN77CQ53dWhUL6&&r7*~U14c2AJM;Hj3+Zf?v#&gY{!YJ9)~>ti=?gB+4=xh;yfFU z1UpJ0Hnu;Fag08@8aPyjBhIkOR>kHf-66DsFz&{790caG<9{`2dK~k(#MY7EBI{I^ zM)_!3he@ax^PPk;eexWXka9B5a>z(h(2sS6AA@EB$1xdq{Z%MAO2Z3leDM+RxiItz zvK_LTD{v{G4-TyH0hlw85wC1bkV6n{20pFZb)KCba-T-XK3#e1r-_8ViQ~b@WHbaw zrd<W!!^B4&HT zRs;KlnfebDE=ocnH1DyGYJyMY=719r_B~pwh7c=1FVpOt$EL_Y5}1?$cP`AO|YVBapbo;`-a7$Q)w5pwOo<0 zfLS2Ki^Faf>vMh(r>Z2Apd+qHCdtAETXO=6hRtm7-=2EqemBX^&(#_z42u#g#Zjtc zrS&emFk8$J-b2)rc4K&txmEHrPk1Oe3vGrg`Ym>27WGD{6JU;IkQxDvm3K`?K%Khn zR7|7VsyM}pS$s@S3qU$aeVwHR6fM=7+CuJ+5=@^jki>CDfyl3nT!!pTrYlU~`veI} zfO*a!SrN+-ZbdxyVNB3%Q2{HR`>RE!1=ASHH}tQVKARs+DK67_ZETlf97&jAKKOvk z9um60>6Dl)xIZsXzqQfWr|!05Q8&Y&h)_DH~j)v^?)&67Y#tTCIjq zLHJqd8qMGu2`7c0&1O~pOy!Q*YH-)rSVkryQCg1m)Tqh;6O{cRqb$QYA!(^Xxj`i# zc=_c*?!S}lLX`AlfbuEZno$A|3!>7gqhSn+!$y$V zwaRT9Q7{3|xsG%w@FpQAc$9_6{S)9#>o!{>oJnWO-GsocpT$tSnYZRp7);3WbHBk>Dagv7I*gB^ zEFq!@7XUjGF<2m;#2f~i#aFq1ME)D>2t-9y$dTY=4^=mu6iGyQSDxPq%qYVN^g)V` zq6t6yltQCwIv*ivr+_1MNgkA}5H}LQ;G#hS9&CuMoQ%R48d~H(`61-~dV#G5>f^fU z#V!$b;&dVc^Ybm9osuR(qj^&|5Mr*)XggQD!pcAY{2%^lCAqSg`?DlllG9O{kq&RR z*tW)2JP(-A`7f%w@Uj{VSE34|VZlq&Z@)OUNY$Q*idc#;W}{hj8tp>WYF3a3Do4D; z!83*eY?p~GkyHNIETV`6&>cuCYi1dUk)EMggRIgiv{8g=0W%Wl4%PBji7-@xTjN!! z`MTS>zyFzH+eYr+0n-ERiC^gi1M~ksC-}?68&426r*aR75dIYpf@QHJ8Q~1nr@Ut7 zBsY^Q2`VQb*+&fv2UcuD+Ix<$Wd+rdBEV!KPJD^a$8i|AfKZ{rmtFq?#Wig?2(?$B z!W!oo#P;djpQl;c>*eSMOYuIcglO9_e3v&lU!)FfEKA|8*tZn@7TW?grB3a{dC{9p z$c2vFG5-_cfzVqz_p=q25=$TvD;n))IMN}%ZPy;x>Q8E3bveOh6BtmkS>OY3Zne7O z)jE;oE%WEs+2wYP4y{(gag@v^JT4Mc)FW5;_)S#2>utMeqMBT4)IsS$_Rem-jq>cO zB0-qlGg`p)FhN1BlAtwC@-Dj`U>(J3UC{+t1*a%}8=MZ7tll4QlGF(&$c3$jW0Xp~ zbWIzzYT+GSq3kwLF)f)jY6mRp@3VL39^+*lp@@(QRcnDRnkY-(WA8=M!io5Ar^w$X z2LMKLht+yfNH|4`YSs3Qs#S7;8ryqjt%Zs?TuaL~Ao5ndj@mVY`q%V#S&m%lV^NK^_N~@a0eh(@;;}eS`7vZC&QR<>aNfF( z!rH#yDv<&SP-G}>D;PdE|0=QfAl%&WCd^*eQRc?B^at#o^yaGSC%wI6>=l6d>g}dO z?p^6AD&)vN<*U$u?@)rTe33*WsX`r!8PQy#(tZsUcJeGn0ev4|)3nQ613i^&Hrp6R z!$35M)P9vkUMKYl?BO+ZQo7oW+`s5-r6l{v`j2KESDYIHYVNoCt(iK5hb)8OB$y>j zILP5-?r+Y&!CyfslyE#3B&`&21ZoS(n^w6-GA&t6w43TrV3SFL@SeW#+U^2D2iOw# z?=V^f0}(v@vJWpXiHA>YSdZr-m&nA$fC@E%L*!aax?iOh)B8Fq+96ucFnkaA0Tq%% zWD4duv#URdT3y!GuyzgRXzdv`I&TeaThFuiLu|v!2~jCy*FGkV3eo$OHU4Js?9f^c zleAB$q8=g-v*(~&Iw$RW`ZmiesjGIWfNyY8v~%9+v>N*lmG{*?B*O}9g4|ve2(8My zVgBCl=?8b%tpK5I?$wdo%~R&7JE_)!huqz@inP3NjDTv(WbukXK|j$c2x!%c{t5di znrh!N01s6=Z^r)b^Ri_igev__lgm@u?fGam%4jq!TkqUf$)ScvA!nsRP4pT+WuJH^ zP=F90Q%W>jBT;pTV5*E>B+99Zkx*_lDKQ!SN4PSI2E{7i7hn|WGoUFS+#-DDyUIug z*NC-u0MrcP8-v-LquD-ohXjpwt5UbEF98ii(+0gwm|?^UQMBi&-%Neb2IgZgR>^dT zy#o3=op@;6XRW9%kTHjxu?ilLwkld*q>X(GSunV~OXo^E35Fc6`+A$U^kaDXn&jN##2AaH<0W4$Lv1OagfiWWA9qN@sqH(19RO*BZEH8o1%GZz9Gb zPEhU!X^DrF4~opzx=-YVj!doUOxV{JU*{7pvX=DP4~X z)Izq{1@$mkuMt%@%!qdzBKOk-yU6c;g>Jr4UiqfG8KH{gcU(G9&l4RD+$uOfcVjNj zK2RG&ahDg&WNi!?zr0zet|BkwzLGB*y5#m<7x3Ov-Iefr2@WpgMBL7cv%)#HjEj5I z9xlNM)C<|VgR|avIG_&~L}fQuX4?K}_D*XY=5zAN{pSLjg5sv0{yAIZ(Nw6>}N|hnC5buMY`Vd#;Wl7Hi@pwFNUj`nF(l9D7L>~A3RxkQ%;~cBfc9Us~p=@Zd`q5;P^D2RVe1-ZYrNInjx4!n&6s<_&&htOsAdh zGjbiAhNO@NKDk6RvTKj;S8%(9?t<})TU>Q#`fK!7!sLFQV7F$5RL5;XmwS(UCyr?R z(Lrr&e;K2S`5GBVHUB2K1&k$l53sQCOJgDT_X&0*qFWavBpee=M7$eVOjiX8AtawKM&G?n|((SpX8@Spayb``iTT*ry97rP;g<9tKxo1jP(5I2cUz?xjUh zED(j4ZAMWnl2`J&+o6?HH0X80LxW3{y?DG|N3~3HRi(b!?XS@0s%F{1#lL8ZH06o1 zcQ5mIc;8trtnfbx_6|Nge6vy)82|DMUUoWcB))9&`}p3p;fwnx!-!83VTSlBQQE%$ zsp9DHQN*)9N!}E9Wbzy+O#69l|$Nc_-zg08`@(V`w38PPSfNvQ8EqPn8+S%c} uc6R2N?dh-#6?V#{LiV-google.cloud.networkmanagement.v1.AbortInfo - */ -class AbortInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Causes that the analysis is aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; - */ - protected $cause = 0; - /** - * URI of the resource that caused the abort. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * IP address that caused the abort. - * - * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { - */ - protected $ip_address = ''; - /** - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * - * Generated from protobuf field repeated string projects_missing_permission = 3; - */ - private $projects_missing_permission; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cause - * Causes that the analysis is aborted. - * @type string $resource_uri - * URI of the resource that caused the abort. - * @type string $ip_address - * IP address that caused the abort. - * @type array|\Google\Protobuf\Internal\RepeatedField $projects_missing_permission - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Causes that the analysis is aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; - * @return int - */ - public function getCause() - { - return $this->cause; - } - - /** - * Causes that the analysis is aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; - * @param int $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\AbortInfo\Cause::class); - $this->cause = $var; - - return $this; - } - - /** - * URI of the resource that caused the abort. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that caused the abort. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * IP address that caused the abort. - * - * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address that caused the abort. - * - * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * - * Generated from protobuf field repeated string projects_missing_permission = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProjectsMissingPermission() - { - return $this->projects_missing_permission; - } - - /** - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * - * Generated from protobuf field repeated string projects_missing_permission = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProjectsMissingPermission($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->projects_missing_permission = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php deleted file mode 100644 index 776eaea5e112..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php +++ /dev/null @@ -1,296 +0,0 @@ -google.cloud.networkmanagement.v1.AbortInfo.Cause - */ -class Cause -{ - /** - * Cause is unspecified. - * - * Generated from protobuf enum CAUSE_UNSPECIFIED = 0; - */ - const CAUSE_UNSPECIFIED = 0; - /** - * Aborted due to unknown network. Deprecated, not used in the new tests. - * - * Generated from protobuf enum UNKNOWN_NETWORK = 1 [deprecated = true]; - */ - const UNKNOWN_NETWORK = 1; - /** - * Aborted because no project information can be derived from the test - * input. Deprecated, not used in the new tests. - * - * Generated from protobuf enum UNKNOWN_PROJECT = 3 [deprecated = true]; - */ - const UNKNOWN_PROJECT = 3; - /** - * Aborted because traffic is sent from a public IP to an instance without - * an external IP. Deprecated, not used in the new tests. - * - * Generated from protobuf enum NO_EXTERNAL_IP = 7 [deprecated = true]; - */ - const NO_EXTERNAL_IP = 7; - /** - * Aborted because none of the traces matches destination information - * specified in the input test request. Deprecated, not used in the new - * tests. - * - * Generated from protobuf enum UNINTENDED_DESTINATION = 8 [deprecated = true]; - */ - const UNINTENDED_DESTINATION = 8; - /** - * Aborted because the source endpoint could not be found. Deprecated, not - * used in the new tests. - * - * Generated from protobuf enum SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; - */ - const SOURCE_ENDPOINT_NOT_FOUND = 11; - /** - * Aborted because the source network does not match the source endpoint. - * Deprecated, not used in the new tests. - * - * Generated from protobuf enum MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; - */ - const MISMATCHED_SOURCE_NETWORK = 12; - /** - * Aborted because the destination endpoint could not be found. Deprecated, - * not used in the new tests. - * - * Generated from protobuf enum DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; - */ - const DESTINATION_ENDPOINT_NOT_FOUND = 13; - /** - * Aborted because the destination network does not match the destination - * endpoint. Deprecated, not used in the new tests. - * - * Generated from protobuf enum MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; - */ - const MISMATCHED_DESTINATION_NETWORK = 14; - /** - * Aborted because no endpoint with the packet's destination IP address is - * found. - * - * Generated from protobuf enum UNKNOWN_IP = 2; - */ - const UNKNOWN_IP = 2; - /** - * Aborted because the source IP address doesn't belong to any of the - * subnets of the source VPC network. - * - * Generated from protobuf enum SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - */ - const SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - /** - * Aborted because user lacks permission to access all or part of the - * network configurations required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED = 4; - */ - const PERMISSION_DENIED = 4; - /** - * Aborted because user lacks permission to access Cloud NAT configs - * required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - */ - const PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - /** - * Aborted because user lacks permission to access Network endpoint group - * endpoint configs required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - */ - const PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - /** - * Aborted because no valid source or destination endpoint is derived from - * the input test request. - * - * Generated from protobuf enum NO_SOURCE_LOCATION = 5; - */ - const NO_SOURCE_LOCATION = 5; - /** - * Aborted because the source or destination endpoint specified in - * the request is invalid. Some examples: - * - The request might contain malformed resource URI, project ID, or IP - * address. - * - The request might contain inconsistent information (for example, the - * request might include both the instance and the network, but the instance - * might not have a NIC in that network). - * - * Generated from protobuf enum INVALID_ARGUMENT = 6; - */ - const INVALID_ARGUMENT = 6; - /** - * Aborted because the number of steps in the trace exceeds a certain - * limit. It might be caused by a routing loop. - * - * Generated from protobuf enum TRACE_TOO_LONG = 9; - */ - const TRACE_TOO_LONG = 9; - /** - * Aborted due to internal server error. - * - * Generated from protobuf enum INTERNAL_ERROR = 10; - */ - const INTERNAL_ERROR = 10; - /** - * Aborted because the test scenario is not supported. - * - * Generated from protobuf enum UNSUPPORTED = 15; - */ - const UNSUPPORTED = 15; - /** - * Aborted because the source and destination resources have no common IP - * version. - * - * Generated from protobuf enum MISMATCHED_IP_VERSION = 16; - */ - const MISMATCHED_IP_VERSION = 16; - /** - * Aborted because the connection between the control plane and the node of - * the source cluster is initiated by the node and managed by the - * Konnectivity proxy. - * - * Generated from protobuf enum GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - */ - const GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - /** - * Aborted because expected resource configuration was missing. - * - * Generated from protobuf enum RESOURCE_CONFIG_NOT_FOUND = 18; - */ - const RESOURCE_CONFIG_NOT_FOUND = 18; - /** - * Aborted because expected VM instance configuration was missing. - * - * Generated from protobuf enum VM_INSTANCE_CONFIG_NOT_FOUND = 24; - */ - const VM_INSTANCE_CONFIG_NOT_FOUND = 24; - /** - * Aborted because expected network configuration was missing. - * - * Generated from protobuf enum NETWORK_CONFIG_NOT_FOUND = 25; - */ - const NETWORK_CONFIG_NOT_FOUND = 25; - /** - * Aborted because expected firewall configuration was missing. - * - * Generated from protobuf enum FIREWALL_CONFIG_NOT_FOUND = 26; - */ - const FIREWALL_CONFIG_NOT_FOUND = 26; - /** - * Aborted because expected route configuration was missing. - * - * Generated from protobuf enum ROUTE_CONFIG_NOT_FOUND = 27; - */ - const ROUTE_CONFIG_NOT_FOUND = 27; - /** - * Aborted because a PSC endpoint selection for the Google-managed service - * is ambiguous (several PSC endpoints satisfy test input). - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - */ - const GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - /** - * Aborted because tests with a PSC-based Cloud SQL instance as a source are - * not supported. - * - * Generated from protobuf enum SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - */ - const SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - /** - * Aborted because tests with a forwarding rule as a source are not - * supported. - * - * Generated from protobuf enum SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - */ - const SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - /** - * Aborted because one of the endpoints is a non-routable IP address - * (loopback, link-local, etc). - * - * Generated from protobuf enum NON_ROUTABLE_IP_ADDRESS = 22; - */ - const NON_ROUTABLE_IP_ADDRESS = 22; - /** - * Aborted due to an unknown issue in the Google-managed project. - * - * Generated from protobuf enum UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - */ - const UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - /** - * Aborted due to an unsupported configuration of the Google-managed - * project. - * - * Generated from protobuf enum UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - */ - const UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - - private static $valueToName = [ - self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', - self::UNKNOWN_NETWORK => 'UNKNOWN_NETWORK', - self::UNKNOWN_PROJECT => 'UNKNOWN_PROJECT', - self::NO_EXTERNAL_IP => 'NO_EXTERNAL_IP', - self::UNINTENDED_DESTINATION => 'UNINTENDED_DESTINATION', - self::SOURCE_ENDPOINT_NOT_FOUND => 'SOURCE_ENDPOINT_NOT_FOUND', - self::MISMATCHED_SOURCE_NETWORK => 'MISMATCHED_SOURCE_NETWORK', - self::DESTINATION_ENDPOINT_NOT_FOUND => 'DESTINATION_ENDPOINT_NOT_FOUND', - self::MISMATCHED_DESTINATION_NETWORK => 'MISMATCHED_DESTINATION_NETWORK', - self::UNKNOWN_IP => 'UNKNOWN_IP', - self::SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK => 'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS => 'PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS', - self::PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS => 'PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS', - self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', - self::INVALID_ARGUMENT => 'INVALID_ARGUMENT', - self::TRACE_TOO_LONG => 'TRACE_TOO_LONG', - self::INTERNAL_ERROR => 'INTERNAL_ERROR', - self::UNSUPPORTED => 'UNSUPPORTED', - self::MISMATCHED_IP_VERSION => 'MISMATCHED_IP_VERSION', - self::GKE_KONNECTIVITY_PROXY_UNSUPPORTED => 'GKE_KONNECTIVITY_PROXY_UNSUPPORTED', - self::RESOURCE_CONFIG_NOT_FOUND => 'RESOURCE_CONFIG_NOT_FOUND', - self::VM_INSTANCE_CONFIG_NOT_FOUND => 'VM_INSTANCE_CONFIG_NOT_FOUND', - self::NETWORK_CONFIG_NOT_FOUND => 'NETWORK_CONFIG_NOT_FOUND', - self::FIREWALL_CONFIG_NOT_FOUND => 'FIREWALL_CONFIG_NOT_FOUND', - self::ROUTE_CONFIG_NOT_FOUND => 'ROUTE_CONFIG_NOT_FOUND', - self::GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT', - self::SOURCE_PSC_CLOUD_SQL_UNSUPPORTED => 'SOURCE_PSC_CLOUD_SQL_UNSUPPORTED', - self::SOURCE_FORWARDING_RULE_UNSUPPORTED => 'SOURCE_FORWARDING_RULE_UNSUPPORTED', - self::NON_ROUTABLE_IP_ADDRESS => 'NON_ROUTABLE_IP_ADDRESS', - self::UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT => 'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT', - self::UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG => 'UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Cause::class, \Google\Cloud\NetworkManagement\V1\AbortInfo_Cause::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php deleted file mode 100644 index 070e54ea76de..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.networkmanagement.v1.AppEngineVersionInfo - */ -class AppEngineVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of an App Engine version. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of an App Engine version. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Runtime of the App Engine version. - * - * Generated from protobuf field string runtime = 3; - */ - protected $runtime = ''; - /** - * App Engine execution environment for a version. - * - * Generated from protobuf field string environment = 4; - */ - protected $environment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of an App Engine version. - * @type string $uri - * URI of an App Engine version. - * @type string $runtime - * Runtime of the App Engine version. - * @type string $environment - * App Engine execution environment for a version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of an App Engine version. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of an App Engine version. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of an App Engine version. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of an App Engine version. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Runtime of the App Engine version. - * - * Generated from protobuf field string runtime = 3; - * @return string - */ - public function getRuntime() - { - return $this->runtime; - } - - /** - * Runtime of the App Engine version. - * - * Generated from protobuf field string runtime = 3; - * @param string $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkString($var, True); - $this->runtime = $var; - - return $this; - } - - /** - * App Engine execution environment for a version. - * - * Generated from protobuf field string environment = 4; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * App Engine execution environment for a version. - * - * Generated from protobuf field string environment = 4; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php deleted file mode 100644 index 0706272a11a9..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.networkmanagement.v1.CloudFunctionInfo - */ -class CloudFunctionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Cloud Function. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Cloud Function. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Location in which the Cloud Function is deployed. - * - * Generated from protobuf field string location = 3; - */ - protected $location = ''; - /** - * Latest successfully deployed version id of the Cloud Function. - * - * Generated from protobuf field int64 version_id = 4; - */ - protected $version_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Cloud Function. - * @type string $uri - * URI of a Cloud Function. - * @type string $location - * Location in which the Cloud Function is deployed. - * @type int|string $version_id - * Latest successfully deployed version id of the Cloud Function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Cloud Function. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Cloud Function. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Cloud Function. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Cloud Function. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Location in which the Cloud Function is deployed. - * - * Generated from protobuf field string location = 3; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location in which the Cloud Function is deployed. - * - * Generated from protobuf field string location = 3; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Latest successfully deployed version id of the Cloud Function. - * - * Generated from protobuf field int64 version_id = 4; - * @return int|string - */ - public function getVersionId() - { - return $this->version_id; - } - - /** - * Latest successfully deployed version id of the Cloud Function. - * - * Generated from protobuf field int64 version_id = 4; - * @param int|string $var - * @return $this - */ - public function setVersionId($var) - { - GPBUtil::checkInt64($var); - $this->version_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php deleted file mode 100644 index 4848d1718d60..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.networkmanagement.v1.CloudRunRevisionInfo - */ -class CloudRunRevisionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Cloud Run revision. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Cloud Run revision. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Location in which this revision is deployed. - * - * Generated from protobuf field string location = 4; - */ - protected $location = ''; - /** - * URI of Cloud Run service this revision belongs to. - * - * Generated from protobuf field string service_uri = 5; - */ - protected $service_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Cloud Run revision. - * @type string $uri - * URI of a Cloud Run revision. - * @type string $location - * Location in which this revision is deployed. - * @type string $service_uri - * URI of Cloud Run service this revision belongs to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Cloud Run revision. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Cloud Run revision. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Cloud Run revision. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Cloud Run revision. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Location in which this revision is deployed. - * - * Generated from protobuf field string location = 4; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location in which this revision is deployed. - * - * Generated from protobuf field string location = 4; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * URI of Cloud Run service this revision belongs to. - * - * Generated from protobuf field string service_uri = 5; - * @return string - */ - public function getServiceUri() - { - return $this->service_uri; - } - - /** - * URI of Cloud Run service this revision belongs to. - * - * Generated from protobuf field string service_uri = 5; - * @param string $var - * @return $this - */ - public function setServiceUri($var) - { - GPBUtil::checkString($var, True); - $this->service_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php deleted file mode 100644 index 6dc47236ce8f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - */ -class CloudSQLInstanceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Cloud SQL instance. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Cloud SQL instance. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * - * Generated from protobuf field string network_uri = 4; - */ - protected $network_uri = ''; - /** - * Internal IP address of a Cloud SQL instance. - * - * Generated from protobuf field string internal_ip = 5; - */ - protected $internal_ip = ''; - /** - * External IP address of a Cloud SQL instance. - * - * Generated from protobuf field string external_ip = 6; - */ - protected $external_ip = ''; - /** - * Region in which the Cloud SQL instance is running. - * - * Generated from protobuf field string region = 7; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Cloud SQL instance. - * @type string $uri - * URI of a Cloud SQL instance. - * @type string $network_uri - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * @type string $internal_ip - * Internal IP address of a Cloud SQL instance. - * @type string $external_ip - * External IP address of a Cloud SQL instance. - * @type string $region - * Region in which the Cloud SQL instance is running. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Cloud SQL instance. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Cloud SQL instance. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Cloud SQL instance. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Cloud SQL instance. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * - * Generated from protobuf field string network_uri = 4; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * - * Generated from protobuf field string network_uri = 4; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Internal IP address of a Cloud SQL instance. - * - * Generated from protobuf field string internal_ip = 5; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of a Cloud SQL instance. - * - * Generated from protobuf field string internal_ip = 5; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * External IP address of a Cloud SQL instance. - * - * Generated from protobuf field string external_ip = 6; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * External IP address of a Cloud SQL instance. - * - * Generated from protobuf field string external_ip = 6; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - - /** - * Region in which the Cloud SQL instance is running. - * - * Generated from protobuf field string region = 7; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Region in which the Cloud SQL instance is running. - * - * Generated from protobuf field string region = 7; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php deleted file mode 100644 index d9c4d65f7d9f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php +++ /dev/null @@ -1,649 +0,0 @@ -google.cloud.networkmanagement.v1.ConnectivityTest - */ -class ConnectivityTest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination = null; - /** - * IP Protocol of the test. When not provided, "TCP" is assumed. - * - * Generated from protobuf field string protocol = 5; - */ - protected $protocol = ''; - /** - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * - * Generated from protobuf field repeated string related_projects = 6; - */ - private $related_projects; - /** - * Output only. The display name of a Connectivity Test. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Output only. The time the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the test's configuration was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reachability_details = null; - /** - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $probing_details = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` - * @type string $description - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * @type \Google\Cloud\NetworkManagement\V1\Endpoint $source - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * @type \Google\Cloud\NetworkManagement\V1\Endpoint $destination - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * @type string $protocol - * IP Protocol of the test. When not provided, "TCP" is assumed. - * @type array|\Google\Protobuf\Internal\RepeatedField $related_projects - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * @type string $display_name - * Output only. The display name of a Connectivity Test. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user-provided metadata. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the test was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the test's configuration was updated. - * @type \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $reachability_details - * Output only. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * @type \Google\Cloud\NetworkManagement\V1\ProbingDetails $probing_details - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint::class); - $this->source = $var; - - return $this; - } - - /** - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint|null - */ - public function getDestination() - { - return $this->destination; - } - - public function hasDestination() - { - return isset($this->destination); - } - - public function clearDestination() - { - unset($this->destination); - } - - /** - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint::class); - $this->destination = $var; - - return $this; - } - - /** - * IP Protocol of the test. When not provided, "TCP" is assumed. - * - * Generated from protobuf field string protocol = 5; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP Protocol of the test. When not provided, "TCP" is assumed. - * - * Generated from protobuf field string protocol = 5; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * - * Generated from protobuf field repeated string related_projects = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedProjects() - { - return $this->related_projects; - } - - /** - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * - * Generated from protobuf field repeated string related_projects = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->related_projects = $arr; - - return $this; - } - - /** - * Output only. The display name of a Connectivity Test. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The display name of a Connectivity Test. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The time the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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. The time the test's configuration was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the test's configuration was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetworkManagement\V1\ReachabilityDetails|null - */ - public function getReachabilityDetails() - { - return $this->reachability_details; - } - - public function hasReachabilityDetails() - { - return isset($this->reachability_details); - } - - public function clearReachabilityDetails() - { - unset($this->reachability_details); - } - - /** - * Output only. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $var - * @return $this - */ - public function setReachabilityDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails::class); - $this->reachability_details = $var; - - return $this; - } - - /** - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetworkManagement\V1\ProbingDetails|null - */ - public function getProbingDetails() - { - return $this->probing_details; - } - - public function hasProbingDetails() - { - return isset($this->probing_details); - } - - public function clearProbingDetails() - { - unset($this->probing_details); - } - - /** - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetworkManagement\V1\ProbingDetails $var - * @return $this - */ - public function setProbingDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails::class); - $this->probing_details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php deleted file mode 100644 index 04926c31350f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - */ -class CreateConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * - * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $test_id = ''; - /** - * Required. A `ConnectivityTest` resource - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - - /** - * @param string $parent Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @param string $testId Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource Required. A `ConnectivityTest` resource - * - * @return \Google\Cloud\NetworkManagement\V1\CreateConnectivityTestRequest - * - * @experimental - */ - public static function build(string $parent, string $testId, \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource): self - { - return (new self()) - ->setParent($parent) - ->setTestId($testId) - ->setResource($resource); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @type string $test_id - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @type \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource - * Required. A `ConnectivityTest` resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * - * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTestId() - { - return $this->test_id; - } - - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * - * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTestId($var) - { - GPBUtil::checkString($var, True); - $this->test_id = $var; - - return $this; - } - - /** - * Required. A `ConnectivityTest` resource - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. A `ConnectivityTest` resource - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); - $this->resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php deleted file mode 100644 index e5318082aa1f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - */ -class DeleteConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * @return \Google\Cloud\NetworkManagement\V1\DeleteConnectivityTestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php deleted file mode 100644 index 89bf7090122b..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.DeliverInfo - */ -class DeliverInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Target type where the packet is delivered to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; - */ - protected $target = 0; - /** - * URI of the resource that the packet is delivered to. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - */ - protected $ip_address = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target - * Target type where the packet is delivered to. - * @type string $resource_uri - * URI of the resource that the packet is delivered to. - * @type string $ip_address - * IP address of the target (if applicable). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Target type where the packet is delivered to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; - * @return int - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target type where the packet is delivered to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; - * @param int $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\DeliverInfo\Target::class); - $this->target = $var; - - return $this; - } - - /** - * URI of the resource that the packet is delivered to. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that the packet is delivered to. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php deleted file mode 100644 index 906c7cc79be9..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.networkmanagement.v1.DeliverInfo.Target - */ -class Target -{ - /** - * Target not specified. - * - * Generated from protobuf enum TARGET_UNSPECIFIED = 0; - */ - const TARGET_UNSPECIFIED = 0; - /** - * Target is a Compute Engine instance. - * - * Generated from protobuf enum INSTANCE = 1; - */ - const INSTANCE = 1; - /** - * Target is the internet. - * - * Generated from protobuf enum INTERNET = 2; - */ - const INTERNET = 2; - /** - * Target is a Google API. - * - * Generated from protobuf enum GOOGLE_API = 3; - */ - const GOOGLE_API = 3; - /** - * Target is a Google Kubernetes Engine cluster master. - * - * Generated from protobuf enum GKE_MASTER = 4; - */ - const GKE_MASTER = 4; - /** - * Target is a Cloud SQL instance. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE = 5; - */ - const CLOUD_SQL_INSTANCE = 5; - /** - * Target is a published service that uses [Private Service - * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - * - * Generated from protobuf enum PSC_PUBLISHED_SERVICE = 6; - */ - const PSC_PUBLISHED_SERVICE = 6; - /** - * Target is all Google APIs that use [Private Service - * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - * - * Generated from protobuf enum PSC_GOOGLE_API = 7; - */ - const PSC_GOOGLE_API = 7; - /** - * Target is a VPC-SC that uses [Private Service - * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - * - * Generated from protobuf enum PSC_VPC_SC = 8; - */ - const PSC_VPC_SC = 8; - /** - * Target is a serverless network endpoint group. - * - * Generated from protobuf enum SERVERLESS_NEG = 9; - */ - const SERVERLESS_NEG = 9; - /** - * Target is a Cloud Storage bucket. - * - * Generated from protobuf enum STORAGE_BUCKET = 10; - */ - const STORAGE_BUCKET = 10; - /** - * Target is a private network. Used only for return traces. - * - * Generated from protobuf enum PRIVATE_NETWORK = 11; - */ - const PRIVATE_NETWORK = 11; - /** - * Target is a Cloud Function. Used only for return traces. - * - * Generated from protobuf enum CLOUD_FUNCTION = 12; - */ - const CLOUD_FUNCTION = 12; - /** - * Target is a App Engine service version. Used only for return traces. - * - * Generated from protobuf enum APP_ENGINE_VERSION = 13; - */ - const APP_ENGINE_VERSION = 13; - /** - * Target is a Cloud Run revision. Used only for return traces. - * - * Generated from protobuf enum CLOUD_RUN_REVISION = 14; - */ - const CLOUD_RUN_REVISION = 14; - - private static $valueToName = [ - self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', - self::INSTANCE => 'INSTANCE', - self::INTERNET => 'INTERNET', - self::GOOGLE_API => 'GOOGLE_API', - self::GKE_MASTER => 'GKE_MASTER', - self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', - self::PSC_PUBLISHED_SERVICE => 'PSC_PUBLISHED_SERVICE', - self::PSC_GOOGLE_API => 'PSC_GOOGLE_API', - self::PSC_VPC_SC => 'PSC_VPC_SC', - self::SERVERLESS_NEG => 'SERVERLESS_NEG', - self::STORAGE_BUCKET => 'STORAGE_BUCKET', - self::PRIVATE_NETWORK => 'PRIVATE_NETWORK', - self::CLOUD_FUNCTION => 'CLOUD_FUNCTION', - self::APP_ENGINE_VERSION => 'APP_ENGINE_VERSION', - self::CLOUD_RUN_REVISION => 'CLOUD_RUN_REVISION', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Target::class, \Google\Cloud\NetworkManagement\V1\DeliverInfo_Target::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php deleted file mode 100644 index b8cb02168001..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.networkmanagement.v1.DropInfo - */ -class DropInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Cause that the packet is dropped. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; - */ - protected $cause = 0; - /** - * URI of the resource that caused the drop. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * Source IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string source_ip = 3; - */ - protected $source_ip = ''; - /** - * Destination IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string destination_ip = 4; - */ - protected $destination_ip = ''; - /** - * Region of the dropped packet (if relevant). - * - * Generated from protobuf field string region = 5; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cause - * Cause that the packet is dropped. - * @type string $resource_uri - * URI of the resource that caused the drop. - * @type string $source_ip - * Source IP address of the dropped packet (if relevant). - * @type string $destination_ip - * Destination IP address of the dropped packet (if relevant). - * @type string $region - * Region of the dropped packet (if relevant). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Cause that the packet is dropped. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; - * @return int - */ - public function getCause() - { - return $this->cause; - } - - /** - * Cause that the packet is dropped. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; - * @param int $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\DropInfo\Cause::class); - $this->cause = $var; - - return $this; - } - - /** - * URI of the resource that caused the drop. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that caused the drop. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * Source IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string source_ip = 3; - * @return string - */ - public function getSourceIp() - { - return $this->source_ip; - } - - /** - * Source IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string source_ip = 3; - * @param string $var - * @return $this - */ - public function setSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->source_ip = $var; - - return $this; - } - - /** - * Destination IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string destination_ip = 4; - * @return string - */ - public function getDestinationIp() - { - return $this->destination_ip; - } - - /** - * Destination IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string destination_ip = 4; - * @param string $var - * @return $this - */ - public function setDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->destination_ip = $var; - - return $this; - } - - /** - * Region of the dropped packet (if relevant). - * - * Generated from protobuf field string region = 5; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Region of the dropped packet (if relevant). - * - * Generated from protobuf field string region = 5; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php deleted file mode 100644 index 14cea624808f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php +++ /dev/null @@ -1,519 +0,0 @@ -google.cloud.networkmanagement.v1.DropInfo.Cause - */ -class Cause -{ - /** - * Cause is unspecified. - * - * Generated from protobuf enum CAUSE_UNSPECIFIED = 0; - */ - const CAUSE_UNSPECIFIED = 0; - /** - * Destination external address cannot be resolved to a known target. If - * the address is used in a Google Cloud project, provide the project ID - * as test input. - * - * Generated from protobuf enum UNKNOWN_EXTERNAL_ADDRESS = 1; - */ - const UNKNOWN_EXTERNAL_ADDRESS = 1; - /** - * A Compute Engine instance can only send or receive a packet with a - * foreign IP address if ip_forward is enabled. - * - * Generated from protobuf enum FOREIGN_IP_DISALLOWED = 2; - */ - const FOREIGN_IP_DISALLOWED = 2; - /** - * Dropped due to a firewall rule, unless allowed due to connection - * tracking. - * - * Generated from protobuf enum FIREWALL_RULE = 3; - */ - const FIREWALL_RULE = 3; - /** - * Dropped due to no matching routes. - * - * Generated from protobuf enum NO_ROUTE = 4; - */ - const NO_ROUTE = 4; - /** - * Dropped due to invalid route. Route's next hop is a blackhole. - * - * Generated from protobuf enum ROUTE_BLACKHOLE = 5; - */ - const ROUTE_BLACKHOLE = 5; - /** - * Packet is sent to a wrong (unintended) network. Example: you trace a - * packet from VM1:Network1 to VM2:Network2, however, the route configured - * in Network1 sends the packet destined for VM2's IP address to Network3. - * - * Generated from protobuf enum ROUTE_WRONG_NETWORK = 6; - */ - const ROUTE_WRONG_NETWORK = 6; - /** - * Route's next hop IP address cannot be resolved to a GCP resource. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - */ - const ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - /** - * Route's next hop resource is not found. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - */ - const ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - /** - * Route's next hop instance doesn't hace a NIC in the route's network. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - */ - const ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - /** - * Route's next hop IP address is not a primary IP address of the next hop - * instance. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - */ - const ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - /** - * Route's next hop forwarding rule doesn't match next hop IP address. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - */ - const ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - /** - * Route's next hop VPN tunnel is down (does not have valid IKE SAs). - * - * Generated from protobuf enum ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - */ - const ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - /** - * Route's next hop forwarding rule type is invalid (it's not a forwarding - * rule of the internal passthrough load balancer). - * - * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - */ - const ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - /** - * Packet is sent from the Internet to the private IPv6 address. - * - * Generated from protobuf enum NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - */ - const NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - /** - * The packet does not match a policy-based VPN tunnel local selector. - * - * Generated from protobuf enum VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - */ - const VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - /** - * The packet does not match a policy-based VPN tunnel remote selector. - * - * Generated from protobuf enum VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - */ - const VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - /** - * Packet with internal destination address sent to the internet gateway. - * - * Generated from protobuf enum PRIVATE_TRAFFIC_TO_INTERNET = 7; - */ - const PRIVATE_TRAFFIC_TO_INTERNET = 7; - /** - * Instance with only an internal IP address tries to access Google API and - * services, but private Google access is not enabled in the subnet. - * - * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - */ - const PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - /** - * Source endpoint tries to access Google API and services through the VPN - * tunnel to another network, but Private Google Access needs to be enabled - * in the source endpoint network. - * - * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - */ - const PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - /** - * Instance with only an internal IP address tries to access external hosts, - * but Cloud NAT is not enabled in the subnet, unless special configurations - * on a VM allow this connection. - * - * Generated from protobuf enum NO_EXTERNAL_ADDRESS = 9; - */ - const NO_EXTERNAL_ADDRESS = 9; - /** - * Destination internal address cannot be resolved to a known target. If - * this is a shared VPC scenario, verify if the service project ID is - * provided as test input. Otherwise, verify if the IP address is being - * used in the project. - * - * Generated from protobuf enum UNKNOWN_INTERNAL_ADDRESS = 10; - */ - const UNKNOWN_INTERNAL_ADDRESS = 10; - /** - * Forwarding rule's protocol and ports do not match the packet header. - * - * Generated from protobuf enum FORWARDING_RULE_MISMATCH = 11; - */ - const FORWARDING_RULE_MISMATCH = 11; - /** - * Forwarding rule does not have backends configured. - * - * Generated from protobuf enum FORWARDING_RULE_NO_INSTANCES = 12; - */ - const FORWARDING_RULE_NO_INSTANCES = 12; - /** - * Firewalls block the health check probes to the backends and cause - * the backends to be unavailable for traffic from the load balancer. - * For more details, see [Health check firewall - * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). - * - * Generated from protobuf enum FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - */ - const FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - /** - * Packet is sent from or to a Compute Engine instance that is not in a - * running state. - * - * Generated from protobuf enum INSTANCE_NOT_RUNNING = 14; - */ - const INSTANCE_NOT_RUNNING = 14; - /** - * Packet sent from or to a GKE cluster that is not in running state. - * - * Generated from protobuf enum GKE_CLUSTER_NOT_RUNNING = 27; - */ - const GKE_CLUSTER_NOT_RUNNING = 27; - /** - * Packet sent from or to a Cloud SQL instance that is not in running state. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - */ - const CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - /** - * The type of traffic is blocked and the user cannot configure a firewall - * rule to enable it. See [Always blocked - * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for - * more details. - * - * Generated from protobuf enum TRAFFIC_TYPE_BLOCKED = 15; - */ - const TRAFFIC_TYPE_BLOCKED = 15; - /** - * Access to Google Kubernetes Engine cluster master's endpoint is not - * authorized. See [Access to the cluster - * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) - * for more details. - * - * Generated from protobuf enum GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - */ - const GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - /** - * Access to the Cloud SQL instance endpoint is not authorized. - * See [Authorizing with authorized - * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for - * more details. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - */ - const CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - /** - * Packet was dropped inside Google Kubernetes Engine Service. - * - * Generated from protobuf enum DROPPED_INSIDE_GKE_SERVICE = 18; - */ - const DROPPED_INSIDE_GKE_SERVICE = 18; - /** - * Packet was dropped inside Cloud SQL Service. - * - * Generated from protobuf enum DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - */ - const DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - /** - * Packet was dropped because there is no peering between the originating - * network and the Google Managed Services Network. - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - */ - const GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - /** - * Packet was dropped because the Google-managed service uses Private - * Service Connect (PSC), but the PSC endpoint is not found in the project. - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - */ - const GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - /** - * Packet was dropped because the GKE cluster uses Private Service Connect - * (PSC), but the PSC endpoint is not found in the project. - * - * Generated from protobuf enum GKE_PSC_ENDPOINT_MISSING = 36; - */ - const GKE_PSC_ENDPOINT_MISSING = 36; - /** - * Packet was dropped because the Cloud SQL instance has neither a private - * nor a public IP address. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - */ - const CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - /** - * Packet was dropped because a GKE cluster private endpoint is - * unreachable from a region different from the cluster's region. - * - * Generated from protobuf enum GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - */ - const GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - /** - * Packet sent from a public GKE cluster control plane to a private - * IP address. - * - * Generated from protobuf enum PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - */ - const PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - /** - * Packet was dropped because there is no route from a GKE cluster - * control plane to a destination network. - * - * Generated from protobuf enum GKE_CONTROL_PLANE_NO_ROUTE = 32; - */ - const GKE_CONTROL_PLANE_NO_ROUTE = 32; - /** - * Packet sent from a Cloud SQL instance to an external IP address is not - * allowed. The Cloud SQL instance is not configured to send packets to - * external IP addresses. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - */ - const CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - /** - * Packet sent from a Cloud SQL instance with only a public IP address to a - * private IP address. - * - * Generated from protobuf enum PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - */ - const PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - /** - * Packet was dropped because there is no route from a Cloud SQL - * instance to a destination network. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - */ - const CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - /** - * Packet could be dropped because the Cloud Function is not in an active - * status. - * - * Generated from protobuf enum CLOUD_FUNCTION_NOT_ACTIVE = 22; - */ - const CLOUD_FUNCTION_NOT_ACTIVE = 22; - /** - * Packet could be dropped because no VPC connector is set. - * - * Generated from protobuf enum VPC_CONNECTOR_NOT_SET = 23; - */ - const VPC_CONNECTOR_NOT_SET = 23; - /** - * Packet could be dropped because the VPC connector is not in a running - * state. - * - * Generated from protobuf enum VPC_CONNECTOR_NOT_RUNNING = 24; - */ - const VPC_CONNECTOR_NOT_RUNNING = 24; - /** - * Packet could be dropped because it was sent from a different region - * to a regional forwarding without global access. - * - * Generated from protobuf enum FORWARDING_RULE_REGION_MISMATCH = 25; - */ - const FORWARDING_RULE_REGION_MISMATCH = 25; - /** - * The Private Service Connect endpoint is in a project that is not approved - * to connect to the service. - * - * Generated from protobuf enum PSC_CONNECTION_NOT_ACCEPTED = 26; - */ - const PSC_CONNECTION_NOT_ACCEPTED = 26; - /** - * The packet is sent to the Private Service Connect endpoint over the - * peering, but [it's not - * supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). - * - * Generated from protobuf enum PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - */ - const PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - /** - * The packet is sent to the Private Service Connect backend (network - * endpoint group), but the producer PSC forwarding rule does not have - * global access enabled. - * - * Generated from protobuf enum PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - */ - const PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - /** - * The packet is sent to the Private Service Connect backend (network - * endpoint group), but the producer PSC forwarding rule has multiple ports - * specified. - * - * Generated from protobuf enum PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - */ - const PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - /** - * The packet is sent to the Private Service Connect backend (network - * endpoint group) targeting a Cloud SQL service attachment, but this - * configuration is not supported. - * - * Generated from protobuf enum CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - */ - const CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - /** - * No NAT subnets are defined for the PSC service attachment. - * - * Generated from protobuf enum NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - */ - const NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - /** - * The packet sent from the hybrid NEG proxy matches a non-dynamic route, - * but such a configuration is not supported. - * - * Generated from protobuf enum HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - */ - const HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - /** - * The packet sent from the hybrid NEG proxy matches a dynamic route with a - * next hop in a different region, but such a configuration is not - * supported. - * - * Generated from protobuf enum HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - */ - const HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - /** - * Packet sent from a Cloud Run revision that is not ready. - * - * Generated from protobuf enum CLOUD_RUN_REVISION_NOT_READY = 29; - */ - const CLOUD_RUN_REVISION_NOT_READY = 29; - /** - * Packet was dropped inside Private Service Connect service producer. - * - * Generated from protobuf enum DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - */ - const DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - /** - * Packet sent to a load balancer, which requires a proxy-only subnet and - * the subnet is not found. - * - * Generated from protobuf enum LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - */ - const LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - /** - * Packet sent to Cloud Nat without active NAT IPs. - * - * Generated from protobuf enum CLOUD_NAT_NO_ADDRESSES = 40; - */ - const CLOUD_NAT_NO_ADDRESSES = 40; - /** - * Packet is stuck in a routing loop. - * - * Generated from protobuf enum ROUTING_LOOP = 59; - */ - const ROUTING_LOOP = 59; - - private static $valueToName = [ - self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', - self::UNKNOWN_EXTERNAL_ADDRESS => 'UNKNOWN_EXTERNAL_ADDRESS', - self::FOREIGN_IP_DISALLOWED => 'FOREIGN_IP_DISALLOWED', - self::FIREWALL_RULE => 'FIREWALL_RULE', - self::NO_ROUTE => 'NO_ROUTE', - self::ROUTE_BLACKHOLE => 'ROUTE_BLACKHOLE', - self::ROUTE_WRONG_NETWORK => 'ROUTE_WRONG_NETWORK', - self::ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED => 'ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED', - self::ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND => 'ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND', - self::ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK => 'ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK', - self::ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP => 'ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP', - self::ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH => 'ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH', - self::ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED => 'ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED', - self::ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID => 'ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID', - self::NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS => 'NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS', - self::VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH => 'VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH', - self::VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH => 'VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH', - self::PRIVATE_TRAFFIC_TO_INTERNET => 'PRIVATE_TRAFFIC_TO_INTERNET', - self::PRIVATE_GOOGLE_ACCESS_DISALLOWED => 'PRIVATE_GOOGLE_ACCESS_DISALLOWED', - self::PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED => 'PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED', - self::NO_EXTERNAL_ADDRESS => 'NO_EXTERNAL_ADDRESS', - self::UNKNOWN_INTERNAL_ADDRESS => 'UNKNOWN_INTERNAL_ADDRESS', - self::FORWARDING_RULE_MISMATCH => 'FORWARDING_RULE_MISMATCH', - self::FORWARDING_RULE_NO_INSTANCES => 'FORWARDING_RULE_NO_INSTANCES', - self::FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK => 'FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK', - self::INSTANCE_NOT_RUNNING => 'INSTANCE_NOT_RUNNING', - self::GKE_CLUSTER_NOT_RUNNING => 'GKE_CLUSTER_NOT_RUNNING', - self::CLOUD_SQL_INSTANCE_NOT_RUNNING => 'CLOUD_SQL_INSTANCE_NOT_RUNNING', - self::TRAFFIC_TYPE_BLOCKED => 'TRAFFIC_TYPE_BLOCKED', - self::GKE_MASTER_UNAUTHORIZED_ACCESS => 'GKE_MASTER_UNAUTHORIZED_ACCESS', - self::CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS => 'CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS', - self::DROPPED_INSIDE_GKE_SERVICE => 'DROPPED_INSIDE_GKE_SERVICE', - self::DROPPED_INSIDE_CLOUD_SQL_SERVICE => 'DROPPED_INSIDE_CLOUD_SQL_SERVICE', - self::GOOGLE_MANAGED_SERVICE_NO_PEERING => 'GOOGLE_MANAGED_SERVICE_NO_PEERING', - self::GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT', - self::GKE_PSC_ENDPOINT_MISSING => 'GKE_PSC_ENDPOINT_MISSING', - self::CLOUD_SQL_INSTANCE_NO_IP_ADDRESS => 'CLOUD_SQL_INSTANCE_NO_IP_ADDRESS', - self::GKE_CONTROL_PLANE_REGION_MISMATCH => 'GKE_CONTROL_PLANE_REGION_MISMATCH', - self::PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION => 'PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION', - self::GKE_CONTROL_PLANE_NO_ROUTE => 'GKE_CONTROL_PLANE_NO_ROUTE', - self::CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC => 'CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC', - self::PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION => 'PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION', - self::CLOUD_SQL_INSTANCE_NO_ROUTE => 'CLOUD_SQL_INSTANCE_NO_ROUTE', - self::CLOUD_FUNCTION_NOT_ACTIVE => 'CLOUD_FUNCTION_NOT_ACTIVE', - self::VPC_CONNECTOR_NOT_SET => 'VPC_CONNECTOR_NOT_SET', - self::VPC_CONNECTOR_NOT_RUNNING => 'VPC_CONNECTOR_NOT_RUNNING', - self::FORWARDING_RULE_REGION_MISMATCH => 'FORWARDING_RULE_REGION_MISMATCH', - self::PSC_CONNECTION_NOT_ACCEPTED => 'PSC_CONNECTION_NOT_ACCEPTED', - self::PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK => 'PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK', - self::PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS => 'PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS', - self::PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS => 'PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS', - self::CLOUD_SQL_PSC_NEG_UNSUPPORTED => 'CLOUD_SQL_PSC_NEG_UNSUPPORTED', - self::NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT => 'NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT', - self::HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED', - self::HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED', - self::CLOUD_RUN_REVISION_NOT_READY => 'CLOUD_RUN_REVISION_NOT_READY', - self::DROPPED_INSIDE_PSC_SERVICE_PRODUCER => 'DROPPED_INSIDE_PSC_SERVICE_PRODUCER', - self::LOAD_BALANCER_HAS_NO_PROXY_SUBNET => 'LOAD_BALANCER_HAS_NO_PROXY_SUBNET', - self::CLOUD_NAT_NO_ADDRESSES => 'CLOUD_NAT_NO_ADDRESSES', - self::ROUTING_LOOP => 'ROUTING_LOOP', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Cause::class, \Google\Cloud\NetworkManagement\V1\DropInfo_Cause::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php deleted file mode 100644 index a798c5b10593..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php +++ /dev/null @@ -1,695 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint - */ -class Endpoint extends \Google\Protobuf\Internal\Message -{ - /** - * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). - * - * Generated from protobuf field string ip_address = 1; - */ - protected $ip_address = ''; - /** - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * - * Generated from protobuf field int32 port = 2; - */ - protected $port = 0; - /** - * A Compute Engine instance URI. - * - * Generated from protobuf field string instance = 3; - */ - protected $instance = ''; - /** - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * - * Generated from protobuf field string forwarding_rule = 13; - */ - protected $forwarding_rule = ''; - /** - * Output only. Specifies the type of the target of the forwarding rule. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $forwarding_rule_target = null; - /** - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * - * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $load_balancer_id = null; - /** - * Output only. Type of the load balancer the forwarding rule points to. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $load_balancer_type = null; - /** - * A cluster URI for [Google Kubernetes Engine - * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * - * Generated from protobuf field string gke_master_cluster = 7; - */ - protected $gke_master_cluster = ''; - /** - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * - * Generated from protobuf field string cloud_sql_instance = 8; - */ - protected $cloud_sql_instance = ''; - /** - * A [Cloud Function](https://cloud.google.com/functions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; - */ - protected $cloud_function = null; - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; - */ - protected $app_engine_version = null; - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; - */ - protected $cloud_run_revision = null; - /** - * A Compute Engine network URI. - * - * Generated from protobuf field string network = 4; - */ - protected $network = ''; - /** - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; - */ - protected $network_type = 0; - /** - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * - * Generated from protobuf field string project_id = 6; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_address - * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). - * @type int $port - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * @type string $instance - * A Compute Engine instance URI. - * @type string $forwarding_rule - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * @type int $forwarding_rule_target - * Output only. Specifies the type of the target of the forwarding rule. - * @type string $load_balancer_id - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * @type int $load_balancer_type - * Output only. Type of the load balancer the forwarding rule points to. - * @type string $gke_master_cluster - * A cluster URI for [Google Kubernetes Engine - * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * @type string $cloud_sql_instance - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * @type \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint $cloud_function - * A [Cloud Function](https://cloud.google.com/functions). - * @type \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint $app_engine_version - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * @type \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint $cloud_run_revision - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * @type string $network - * A Compute Engine network URI. - * @type int $network_type - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * @type string $project_id - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). - * - * Generated from protobuf field string ip_address = 1; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). - * - * Generated from protobuf field string ip_address = 1; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * - * Generated from protobuf field int32 port = 2; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * - * Generated from protobuf field int32 port = 2; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * A Compute Engine instance URI. - * - * Generated from protobuf field string instance = 3; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * A Compute Engine instance URI. - * - * Generated from protobuf field string instance = 3; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * - * Generated from protobuf field string forwarding_rule = 13; - * @return string - */ - public function getForwardingRule() - { - return $this->forwarding_rule; - } - - /** - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * - * Generated from protobuf field string forwarding_rule = 13; - * @param string $var - * @return $this - */ - public function setForwardingRule($var) - { - GPBUtil::checkString($var, True); - $this->forwarding_rule = $var; - - return $this; - } - - /** - * Output only. Specifies the type of the target of the forwarding rule. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getForwardingRuleTarget() - { - return isset($this->forwarding_rule_target) ? $this->forwarding_rule_target : 0; - } - - public function hasForwardingRuleTarget() - { - return isset($this->forwarding_rule_target); - } - - public function clearForwardingRuleTarget() - { - unset($this->forwarding_rule_target); - } - - /** - * Output only. Specifies the type of the target of the forwarding rule. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setForwardingRuleTarget($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Endpoint\ForwardingRuleTarget::class); - $this->forwarding_rule_target = $var; - - return $this; - } - - /** - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * - * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLoadBalancerId() - { - return isset($this->load_balancer_id) ? $this->load_balancer_id : ''; - } - - public function hasLoadBalancerId() - { - return isset($this->load_balancer_id); - } - - public function clearLoadBalancerId() - { - unset($this->load_balancer_id); - } - - /** - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * - * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLoadBalancerId($var) - { - GPBUtil::checkString($var, True); - $this->load_balancer_id = $var; - - return $this; - } - - /** - * Output only. Type of the load balancer the forwarding rule points to. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLoadBalancerType() - { - return isset($this->load_balancer_type) ? $this->load_balancer_type : 0; - } - - public function hasLoadBalancerType() - { - return isset($this->load_balancer_type); - } - - public function clearLoadBalancerType() - { - unset($this->load_balancer_type); - } - - /** - * Output only. Type of the load balancer the forwarding rule points to. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLoadBalancerType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerType::class); - $this->load_balancer_type = $var; - - return $this; - } - - /** - * A cluster URI for [Google Kubernetes Engine - * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * - * Generated from protobuf field string gke_master_cluster = 7; - * @return string - */ - public function getGkeMasterCluster() - { - return $this->gke_master_cluster; - } - - /** - * A cluster URI for [Google Kubernetes Engine - * master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * - * Generated from protobuf field string gke_master_cluster = 7; - * @param string $var - * @return $this - */ - public function setGkeMasterCluster($var) - { - GPBUtil::checkString($var, True); - $this->gke_master_cluster = $var; - - return $this; - } - - /** - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * - * Generated from protobuf field string cloud_sql_instance = 8; - * @return string - */ - public function getCloudSqlInstance() - { - return $this->cloud_sql_instance; - } - - /** - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * - * Generated from protobuf field string cloud_sql_instance = 8; - * @param string $var - * @return $this - */ - public function setCloudSqlInstance($var) - { - GPBUtil::checkString($var, True); - $this->cloud_sql_instance = $var; - - return $this; - } - - /** - * A [Cloud Function](https://cloud.google.com/functions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint|null - */ - public function getCloudFunction() - { - return $this->cloud_function; - } - - public function hasCloudFunction() - { - return isset($this->cloud_function); - } - - public function clearCloudFunction() - { - unset($this->cloud_function); - } - - /** - * A [Cloud Function](https://cloud.google.com/functions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint $var - * @return $this - */ - public function setCloudFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint::class); - $this->cloud_function = $var; - - return $this; - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint|null - */ - public function getAppEngineVersion() - { - return $this->app_engine_version; - } - - public function hasAppEngineVersion() - { - return isset($this->app_engine_version); - } - - public function clearAppEngineVersion() - { - unset($this->app_engine_version); - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint $var - * @return $this - */ - public function setAppEngineVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint::class); - $this->app_engine_version = $var; - - return $this; - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint|null - */ - public function getCloudRunRevision() - { - return $this->cloud_run_revision; - } - - public function hasCloudRunRevision() - { - return isset($this->cloud_run_revision); - } - - public function clearCloudRunRevision() - { - unset($this->cloud_run_revision); - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint $var - * @return $this - */ - public function setCloudRunRevision($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint::class); - $this->cloud_run_revision = $var; - - return $this; - } - - /** - * A Compute Engine network URI. - * - * Generated from protobuf field string network = 4; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * A Compute Engine network URI. - * - * Generated from protobuf field string network = 4; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; - * @return int - */ - public function getNetworkType() - { - return $this->network_type; - } - - /** - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; - * @param int $var - * @return $this - */ - public function setNetworkType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Endpoint\NetworkType::class); - $this->network_type = $var; - - return $this; - } - - /** - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * - * Generated from protobuf field string project_id = 6; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * - * Generated from protobuf field string project_id = 6; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php deleted file mode 100644 index 00601e729f56..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - */ -class AppEngineVersionEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AppEngineVersionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_AppEngineVersionEndpoint::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php deleted file mode 100644 index dfc3b0f413a5..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - */ -class CloudFunctionEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * A [Cloud Function](https://cloud.google.com/functions) name. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * A [Cloud Function](https://cloud.google.com/functions) name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * A [Cloud Function](https://cloud.google.com/functions) name. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * A [Cloud Function](https://cloud.google.com/functions) name. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudFunctionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_CloudFunctionEndpoint::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php deleted file mode 100644 index 4b4c40adef9c..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - */ -class CloudRunRevisionEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudRunRevisionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_CloudRunRevisionEndpoint::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php deleted file mode 100644 index 7f8ffa54e280..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget - */ -class ForwardingRuleTarget -{ - /** - * Forwarding rule target is unknown. - * - * Generated from protobuf enum FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - */ - const FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - /** - * Compute Engine instance for protocol forwarding. - * - * Generated from protobuf enum INSTANCE = 1; - */ - const INSTANCE = 1; - /** - * Load Balancer. The specific type can be found from [load_balancer_type] - * [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. - * - * Generated from protobuf enum LOAD_BALANCER = 2; - */ - const LOAD_BALANCER = 2; - /** - * Classic Cloud VPN Gateway. - * - * Generated from protobuf enum VPN_GATEWAY = 3; - */ - const VPN_GATEWAY = 3; - /** - * Forwarding Rule is a Private Service Connect endpoint. - * - * Generated from protobuf enum PSC = 4; - */ - const PSC = 4; - - private static $valueToName = [ - self::FORWARDING_RULE_TARGET_UNSPECIFIED => 'FORWARDING_RULE_TARGET_UNSPECIFIED', - self::INSTANCE => 'INSTANCE', - self::LOAD_BALANCER => 'LOAD_BALANCER', - self::VPN_GATEWAY => 'VPN_GATEWAY', - self::PSC => 'PSC', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ForwardingRuleTarget::class, \Google\Cloud\NetworkManagement\V1\Endpoint_ForwardingRuleTarget::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php deleted file mode 100644 index cdd595a94e5e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.NetworkType - */ -class NetworkType -{ - /** - * Default type if unspecified. - * - * Generated from protobuf enum NETWORK_TYPE_UNSPECIFIED = 0; - */ - const NETWORK_TYPE_UNSPECIFIED = 0; - /** - * A network hosted within Google Cloud. - * To receive more detailed output, specify the URI for the source or - * destination network. - * - * Generated from protobuf enum GCP_NETWORK = 1; - */ - const GCP_NETWORK = 1; - /** - * A network hosted outside of Google Cloud. - * This can be an on-premises network, or a network hosted by another cloud - * provider. - * - * Generated from protobuf enum NON_GCP_NETWORK = 2; - */ - const NON_GCP_NETWORK = 2; - - private static $valueToName = [ - self::NETWORK_TYPE_UNSPECIFIED => 'NETWORK_TYPE_UNSPECIFIED', - self::GCP_NETWORK => 'GCP_NETWORK', - self::NON_GCP_NETWORK => 'NON_GCP_NETWORK', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkType::class, \Google\Cloud\NetworkManagement\V1\Endpoint_NetworkType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php deleted file mode 100644 index d87bc1cea5b2..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.networkmanagement.v1.EndpointInfo - */ -class EndpointInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - */ - protected $source_ip = ''; - /** - * Destination IP address. - * - * Generated from protobuf field string destination_ip = 2; - */ - protected $destination_ip = ''; - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 3; - */ - protected $protocol = ''; - /** - * Source port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 source_port = 4; - */ - protected $source_port = 0; - /** - * Destination port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 destination_port = 5; - */ - protected $destination_port = 0; - /** - * URI of the network where this packet originates from. - * - * Generated from protobuf field string source_network_uri = 6; - */ - protected $source_network_uri = ''; - /** - * URI of the network where this packet is sent to. - * - * Generated from protobuf field string destination_network_uri = 7; - */ - protected $destination_network_uri = ''; - /** - * URI of the source telemetry agent this packet originates from. - * - * Generated from protobuf field string source_agent_uri = 8; - */ - protected $source_agent_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_ip - * Source IP address. - * @type string $destination_ip - * Destination IP address. - * @type string $protocol - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * @type int $source_port - * Source port. Only valid when protocol is TCP or UDP. - * @type int $destination_port - * Destination port. Only valid when protocol is TCP or UDP. - * @type string $source_network_uri - * URI of the network where this packet originates from. - * @type string $destination_network_uri - * URI of the network where this packet is sent to. - * @type string $source_agent_uri - * URI of the source telemetry agent this packet originates from. - * } - */ - 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; - } - - /** - * Destination IP address. - * - * Generated from protobuf field string destination_ip = 2; - * @return string - */ - public function getDestinationIp() - { - return $this->destination_ip; - } - - /** - * Destination IP address. - * - * Generated from protobuf field string destination_ip = 2; - * @param string $var - * @return $this - */ - public function setDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->destination_ip = $var; - - return $this; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 3; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 3; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * Source port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 source_port = 4; - * @return int - */ - public function getSourcePort() - { - return $this->source_port; - } - - /** - * Source port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 source_port = 4; - * @param int $var - * @return $this - */ - public function setSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->source_port = $var; - - return $this; - } - - /** - * Destination port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 destination_port = 5; - * @return int - */ - public function getDestinationPort() - { - return $this->destination_port; - } - - /** - * Destination port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 destination_port = 5; - * @param int $var - * @return $this - */ - public function setDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->destination_port = $var; - - return $this; - } - - /** - * URI of the network where this packet originates from. - * - * Generated from protobuf field string source_network_uri = 6; - * @return string - */ - public function getSourceNetworkUri() - { - return $this->source_network_uri; - } - - /** - * URI of the network where this packet originates from. - * - * Generated from protobuf field string source_network_uri = 6; - * @param string $var - * @return $this - */ - public function setSourceNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->source_network_uri = $var; - - return $this; - } - - /** - * URI of the network where this packet is sent to. - * - * Generated from protobuf field string destination_network_uri = 7; - * @return string - */ - public function getDestinationNetworkUri() - { - return $this->destination_network_uri; - } - - /** - * URI of the network where this packet is sent to. - * - * Generated from protobuf field string destination_network_uri = 7; - * @param string $var - * @return $this - */ - public function setDestinationNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->destination_network_uri = $var; - - return $this; - } - - /** - * URI of the source telemetry agent this packet originates from. - * - * Generated from protobuf field string source_agent_uri = 8; - * @return string - */ - public function getSourceAgentUri() - { - return $this->source_agent_uri; - } - - /** - * URI of the source telemetry agent this packet originates from. - * - * Generated from protobuf field string source_agent_uri = 8; - * @param string $var - * @return $this - */ - public function setSourceAgentUri($var) - { - GPBUtil::checkString($var, True); - $this->source_agent_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php deleted file mode 100644 index 1c23e96ba591..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php +++ /dev/null @@ -1,394 +0,0 @@ -google.cloud.networkmanagement.v1.FirewallInfo - */ -class FirewallInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The display name of the VPC firewall rule. This field is not applicable - * to hierarchical firewall policy rules. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The URI of the VPC firewall rule. This field is not applicable to - * implied firewall rules or hierarchical firewall policy rules. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Possible values: INGRESS, EGRESS - * - * Generated from protobuf field string direction = 3; - */ - protected $direction = ''; - /** - * Possible values: ALLOW, DENY - * - * Generated from protobuf field string action = 4; - */ - protected $action = ''; - /** - * The priority of the firewall rule. - * - * Generated from protobuf field int32 priority = 5; - */ - protected $priority = 0; - /** - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field string network_uri = 6; - */ - protected $network_uri = ''; - /** - * The target tags defined by the VPC firewall rule. This field is not - * applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field repeated string target_tags = 7; - */ - private $target_tags; - /** - * The target service accounts specified by the firewall rule. - * - * Generated from protobuf field repeated string target_service_accounts = 8; - */ - private $target_service_accounts; - /** - * The hierarchical firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules. - * - * Generated from protobuf field string policy = 9; - */ - protected $policy = ''; - /** - * The firewall rule's type. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; - */ - protected $firewall_rule_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The display name of the VPC firewall rule. This field is not applicable - * to hierarchical firewall policy rules. - * @type string $uri - * The URI of the VPC firewall rule. This field is not applicable to - * implied firewall rules or hierarchical firewall policy rules. - * @type string $direction - * Possible values: INGRESS, EGRESS - * @type string $action - * Possible values: ALLOW, DENY - * @type int $priority - * The priority of the firewall rule. - * @type string $network_uri - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_tags - * The target tags defined by the VPC firewall rule. This field is not - * applicable to hierarchical firewall policy rules. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_service_accounts - * The target service accounts specified by the firewall rule. - * @type string $policy - * The hierarchical firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules. - * @type int $firewall_rule_type - * The firewall rule's type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * The display name of the VPC firewall rule. This field is not applicable - * to hierarchical firewall policy rules. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the VPC firewall rule. This field is not applicable - * to hierarchical firewall policy rules. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The URI of the VPC firewall rule. This field is not applicable to - * implied firewall rules or hierarchical firewall policy rules. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the VPC firewall rule. This field is not applicable to - * implied firewall rules or hierarchical firewall policy rules. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Possible values: INGRESS, EGRESS - * - * Generated from protobuf field string direction = 3; - * @return string - */ - public function getDirection() - { - return $this->direction; - } - - /** - * Possible values: INGRESS, EGRESS - * - * Generated from protobuf field string direction = 3; - * @param string $var - * @return $this - */ - public function setDirection($var) - { - GPBUtil::checkString($var, True); - $this->direction = $var; - - return $this; - } - - /** - * Possible values: ALLOW, DENY - * - * Generated from protobuf field string action = 4; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * Possible values: ALLOW, DENY - * - * Generated from protobuf field string action = 4; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - - /** - * The priority of the firewall rule. - * - * Generated from protobuf field int32 priority = 5; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of the firewall rule. - * - * Generated from protobuf field int32 priority = 5; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field string network_uri = 6; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field string network_uri = 6; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * The target tags defined by the VPC firewall rule. This field is not - * applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field repeated string target_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetTags() - { - return $this->target_tags; - } - - /** - * The target tags defined by the VPC firewall rule. This field is not - * applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field repeated string target_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_tags = $arr; - - return $this; - } - - /** - * The target service accounts specified by the firewall rule. - * - * Generated from protobuf field repeated string target_service_accounts = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetServiceAccounts() - { - return $this->target_service_accounts; - } - - /** - * The target service accounts specified by the firewall rule. - * - * Generated from protobuf field repeated string target_service_accounts = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetServiceAccounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_service_accounts = $arr; - - return $this; - } - - /** - * The hierarchical firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules. - * - * Generated from protobuf field string policy = 9; - * @return string - */ - public function getPolicy() - { - return $this->policy; - } - - /** - * The hierarchical firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules. - * - * Generated from protobuf field string policy = 9; - * @param string $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkString($var, True); - $this->policy = $var; - - return $this; - } - - /** - * The firewall rule's type. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; - * @return int - */ - public function getFirewallRuleType() - { - return $this->firewall_rule_type; - } - - /** - * The firewall rule's type. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; - * @param int $var - * @return $this - */ - public function setFirewallRuleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\FirewallInfo\FirewallRuleType::class); - $this->firewall_rule_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php deleted file mode 100644 index bc6f3f99ad23..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType - */ -class FirewallRuleType -{ - /** - * Unspecified type. - * - * Generated from protobuf enum FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - */ - const FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - /** - * Hierarchical firewall policy rule. For details, see - * [Hierarchical firewall policies - * overview](https://cloud.google.com/vpc/docs/firewall-policies). - * - * Generated from protobuf enum HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - */ - const HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - /** - * VPC firewall rule. For details, see - * [VPC firewall rules - * overview](https://cloud.google.com/vpc/docs/firewalls). - * - * Generated from protobuf enum VPC_FIREWALL_RULE = 2; - */ - const VPC_FIREWALL_RULE = 2; - /** - * Implied VPC firewall rule. For details, see - * [Implied - * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). - * - * Generated from protobuf enum IMPLIED_VPC_FIREWALL_RULE = 3; - */ - const IMPLIED_VPC_FIREWALL_RULE = 3; - /** - * Implicit firewall rules that are managed by serverless VPC access to - * allow ingress access. They are not visible in the Google Cloud console. - * For details, see [VPC connector's implicit - * rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). - * - * 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', - self::HIERARCHICAL_FIREWALL_POLICY_RULE => 'HIERARCHICAL_FIREWALL_POLICY_RULE', - 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) - { - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FirewallRuleType::class, \Google\Cloud\NetworkManagement\V1\FirewallInfo_FirewallRuleType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php deleted file mode 100644 index f2c3ac4705a2..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.ForwardInfo - */ -class ForwardInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Target type where this packet is forwarded to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; - */ - protected $target = 0; - /** - * URI of the resource that the packet is forwarded to. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - */ - protected $ip_address = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target - * Target type where this packet is forwarded to. - * @type string $resource_uri - * URI of the resource that the packet is forwarded to. - * @type string $ip_address - * IP address of the target (if applicable). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Target type where this packet is forwarded to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; - * @return int - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target type where this packet is forwarded to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; - * @param int $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ForwardInfo\Target::class); - $this->target = $var; - - return $this; - } - - /** - * URI of the resource that the packet is forwarded to. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that the packet is forwarded to. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php deleted file mode 100644 index eb8e65ec9c58..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.networkmanagement.v1.ForwardInfo.Target - */ -class Target -{ - /** - * Target not specified. - * - * Generated from protobuf enum TARGET_UNSPECIFIED = 0; - */ - const TARGET_UNSPECIFIED = 0; - /** - * Forwarded to a VPC peering network. - * - * Generated from protobuf enum PEERING_VPC = 1; - */ - const PEERING_VPC = 1; - /** - * Forwarded to a Cloud VPN gateway. - * - * Generated from protobuf enum VPN_GATEWAY = 2; - */ - const VPN_GATEWAY = 2; - /** - * Forwarded to a Cloud Interconnect connection. - * - * Generated from protobuf enum INTERCONNECT = 3; - */ - const INTERCONNECT = 3; - /** - * Forwarded to a Google Kubernetes Engine Container cluster master. - * - * Generated from protobuf enum GKE_MASTER = 4 [deprecated = true]; - */ - const GKE_MASTER = 4; - /** - * Forwarded to the next hop of a custom route imported from a peering VPC. - * - * Generated from protobuf enum IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - */ - const IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - /** - * Forwarded to a Cloud SQL instance. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE = 6 [deprecated = true]; - */ - const CLOUD_SQL_INSTANCE = 6; - /** - * Forwarded to a VPC network in another project. - * - * Generated from protobuf enum ANOTHER_PROJECT = 7; - */ - const ANOTHER_PROJECT = 7; - /** - * Forwarded to an NCC Hub. - * - * Generated from protobuf enum NCC_HUB = 8; - */ - const NCC_HUB = 8; - /** - * Forwarded to a router appliance. - * - * Generated from protobuf enum ROUTER_APPLIANCE = 9; - */ - const ROUTER_APPLIANCE = 9; - - private static $valueToName = [ - self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', - self::PEERING_VPC => 'PEERING_VPC', - self::VPN_GATEWAY => 'VPN_GATEWAY', - self::INTERCONNECT => 'INTERCONNECT', - self::GKE_MASTER => 'GKE_MASTER', - self::IMPORTED_CUSTOM_ROUTE_NEXT_HOP => 'IMPORTED_CUSTOM_ROUTE_NEXT_HOP', - self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', - self::ANOTHER_PROJECT => 'ANOTHER_PROJECT', - self::NCC_HUB => 'NCC_HUB', - self::ROUTER_APPLIANCE => 'ROUTER_APPLIANCE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Target::class, \Google\Cloud\NetworkManagement\V1\ForwardInfo_Target::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php deleted file mode 100644 index 14cffe6e3ef0..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php +++ /dev/null @@ -1,271 +0,0 @@ -google.cloud.networkmanagement.v1.ForwardingRuleInfo - */ -class ForwardingRuleInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Compute Engine forwarding rule. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Compute Engine forwarding rule. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Protocol defined in the forwarding rule that matches the test. - * - * Generated from protobuf field string matched_protocol = 3; - */ - protected $matched_protocol = ''; - /** - * Port range defined in the forwarding rule that matches the test. - * - * Generated from protobuf field string matched_port_range = 6; - */ - protected $matched_port_range = ''; - /** - * VIP of the forwarding rule. - * - * Generated from protobuf field string vip = 4; - */ - protected $vip = ''; - /** - * Target type of the forwarding rule. - * - * Generated from protobuf field string target = 5; - */ - protected $target = ''; - /** - * Network URI. Only valid for Internal Load Balancer. - * - * Generated from protobuf field string network_uri = 7; - */ - protected $network_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Compute Engine forwarding rule. - * @type string $uri - * URI of a Compute Engine forwarding rule. - * @type string $matched_protocol - * Protocol defined in the forwarding rule that matches the test. - * @type string $matched_port_range - * Port range defined in the forwarding rule that matches the test. - * @type string $vip - * VIP of the forwarding rule. - * @type string $target - * Target type of the forwarding rule. - * @type string $network_uri - * Network URI. Only valid for Internal Load Balancer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Compute Engine forwarding rule. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Compute Engine forwarding rule. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Compute Engine forwarding rule. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Compute Engine forwarding rule. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Protocol defined in the forwarding rule that matches the test. - * - * Generated from protobuf field string matched_protocol = 3; - * @return string - */ - public function getMatchedProtocol() - { - return $this->matched_protocol; - } - - /** - * Protocol defined in the forwarding rule that matches the test. - * - * Generated from protobuf field string matched_protocol = 3; - * @param string $var - * @return $this - */ - public function setMatchedProtocol($var) - { - GPBUtil::checkString($var, True); - $this->matched_protocol = $var; - - return $this; - } - - /** - * Port range defined in the forwarding rule that matches the test. - * - * Generated from protobuf field string matched_port_range = 6; - * @return string - */ - public function getMatchedPortRange() - { - return $this->matched_port_range; - } - - /** - * Port range defined in the forwarding rule that matches the test. - * - * Generated from protobuf field string matched_port_range = 6; - * @param string $var - * @return $this - */ - public function setMatchedPortRange($var) - { - GPBUtil::checkString($var, True); - $this->matched_port_range = $var; - - return $this; - } - - /** - * VIP of the forwarding rule. - * - * Generated from protobuf field string vip = 4; - * @return string - */ - public function getVip() - { - return $this->vip; - } - - /** - * VIP of the forwarding rule. - * - * Generated from protobuf field string vip = 4; - * @param string $var - * @return $this - */ - public function setVip($var) - { - GPBUtil::checkString($var, True); - $this->vip = $var; - - return $this; - } - - /** - * Target type of the forwarding rule. - * - * Generated from protobuf field string target = 5; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target type of the forwarding rule. - * - * Generated from protobuf field string target = 5; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Network URI. Only valid for Internal Load Balancer. - * - * Generated from protobuf field string network_uri = 7; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * Network URI. Only valid for Internal Load Balancer. - * - * Generated from protobuf field string network_uri = 7; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php deleted file mode 100644 index f5973a802e12..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.networkmanagement.v1.GKEMasterInfo - */ -class GKEMasterInfo extends \Google\Protobuf\Internal\Message -{ - /** - * URI of a GKE cluster. - * - * Generated from protobuf field string cluster_uri = 2; - */ - protected $cluster_uri = ''; - /** - * URI of a GKE cluster network. - * - * Generated from protobuf field string cluster_network_uri = 4; - */ - protected $cluster_network_uri = ''; - /** - * Internal IP address of a GKE cluster master. - * - * Generated from protobuf field string internal_ip = 5; - */ - protected $internal_ip = ''; - /** - * External IP address of a GKE cluster master. - * - * Generated from protobuf field string external_ip = 6; - */ - protected $external_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_uri - * URI of a GKE cluster. - * @type string $cluster_network_uri - * URI of a GKE cluster network. - * @type string $internal_ip - * Internal IP address of a GKE cluster master. - * @type string $external_ip - * External IP address of a GKE cluster master. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * URI of a GKE cluster. - * - * Generated from protobuf field string cluster_uri = 2; - * @return string - */ - public function getClusterUri() - { - return $this->cluster_uri; - } - - /** - * URI of a GKE cluster. - * - * Generated from protobuf field string cluster_uri = 2; - * @param string $var - * @return $this - */ - public function setClusterUri($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uri = $var; - - return $this; - } - - /** - * URI of a GKE cluster network. - * - * Generated from protobuf field string cluster_network_uri = 4; - * @return string - */ - public function getClusterNetworkUri() - { - return $this->cluster_network_uri; - } - - /** - * URI of a GKE cluster network. - * - * Generated from protobuf field string cluster_network_uri = 4; - * @param string $var - * @return $this - */ - public function setClusterNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->cluster_network_uri = $var; - - return $this; - } - - /** - * Internal IP address of a GKE cluster master. - * - * Generated from protobuf field string internal_ip = 5; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of a GKE cluster master. - * - * Generated from protobuf field string internal_ip = 5; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * External IP address of a GKE cluster master. - * - * Generated from protobuf field string external_ip = 6; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * External IP address of a GKE cluster master. - * - * Generated from protobuf field string external_ip = 6; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php deleted file mode 100644 index d85b7ebb7475..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.networkmanagement.v1.GetConnectivityTestRequest - */ -class GetConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * @return \Google\Cloud\NetworkManagement\V1\GetConnectivityTestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php deleted file mode 100644 index d402ca6ee52f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.networkmanagement.v1.GoogleServiceInfo - */ -class GoogleServiceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - */ - protected $source_ip = ''; - /** - * Recognized type of a Google Service. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; - */ - protected $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/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php deleted file mode 100644 index f754e7bf8dda..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php +++ /dev/null @@ -1,78 +0,0 @@ -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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GoogleServiceType::class, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo_GoogleServiceType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php deleted file mode 100644 index 0dab4eebffcc..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php +++ /dev/null @@ -1,310 +0,0 @@ -google.cloud.networkmanagement.v1.InstanceInfo - */ -class InstanceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Compute Engine instance. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Compute Engine instance. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Name of the network interface of a Compute Engine instance. - * - * Generated from protobuf field string interface = 3; - */ - protected $interface = ''; - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string network_uri = 4; - */ - protected $network_uri = ''; - /** - * Internal IP address of the network interface. - * - * Generated from protobuf field string internal_ip = 5; - */ - protected $internal_ip = ''; - /** - * External IP address of the network interface. - * - * Generated from protobuf field string external_ip = 6; - */ - protected $external_ip = ''; - /** - * Network tags configured on the instance. - * - * Generated from protobuf field repeated string network_tags = 7; - */ - private $network_tags; - /** - * Service account authorized for the instance. - * - * Generated from protobuf field string service_account = 8 [deprecated = true]; - * @deprecated - */ - protected $service_account = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Compute Engine instance. - * @type string $uri - * URI of a Compute Engine instance. - * @type string $interface - * Name of the network interface of a Compute Engine instance. - * @type string $network_uri - * URI of a Compute Engine network. - * @type string $internal_ip - * Internal IP address of the network interface. - * @type string $external_ip - * External IP address of the network interface. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * Network tags configured on the instance. - * @type string $service_account - * Service account authorized for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Compute Engine instance. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Compute Engine instance. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Compute Engine instance. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Compute Engine instance. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Name of the network interface of a Compute Engine instance. - * - * Generated from protobuf field string interface = 3; - * @return string - */ - public function getInterface() - { - return $this->interface; - } - - /** - * Name of the network interface of a Compute Engine instance. - * - * Generated from protobuf field string interface = 3; - * @param string $var - * @return $this - */ - public function setInterface($var) - { - GPBUtil::checkString($var, True); - $this->interface = $var; - - return $this; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string network_uri = 4; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string network_uri = 4; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Internal IP address of the network interface. - * - * Generated from protobuf field string internal_ip = 5; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the network interface. - * - * Generated from protobuf field string internal_ip = 5; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * External IP address of the network interface. - * - * Generated from protobuf field string external_ip = 6; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * External IP address of the network interface. - * - * Generated from protobuf field string external_ip = 6; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - - /** - * Network tags configured on the instance. - * - * Generated from protobuf field repeated string network_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * Network tags configured on the instance. - * - * Generated from protobuf field repeated string network_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * Service account authorized for the instance. - * - * Generated from protobuf field string service_account = 8 [deprecated = true]; - * @return string - * @deprecated - */ - public function getServiceAccount() - { - @trigger_error('service_account is deprecated.', E_USER_DEPRECATED); - return $this->service_account; - } - - /** - * Service account authorized for the instance. - * - * Generated from protobuf field string service_account = 8 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setServiceAccount($var) - { - @trigger_error('service_account is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php deleted file mode 100644 index 0c62df4ba113..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.networkmanagement.v1.LatencyDistribution - */ -class LatencyDistribution extends \Google\Protobuf\Internal\Message -{ - /** - * Representative latency percentiles. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; - */ - private $latency_percentiles; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkManagement\V1\LatencyPercentile>|\Google\Protobuf\Internal\RepeatedField $latency_percentiles - * Representative latency percentiles. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Representative latency percentiles. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLatencyPercentiles() - { - return $this->latency_percentiles; - } - - /** - * Representative latency percentiles. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; - * @param array<\Google\Cloud\NetworkManagement\V1\LatencyPercentile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLatencyPercentiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\LatencyPercentile::class); - $this->latency_percentiles = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php deleted file mode 100644 index 850e7f81bad8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkmanagement.v1.LatencyPercentile - */ -class LatencyPercentile extends \Google\Protobuf\Internal\Message -{ - /** - * Percentage of samples this data point applies to. - * - * Generated from protobuf field int32 percent = 1; - */ - protected $percent = 0; - /** - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * - * Generated from protobuf field int64 latency_micros = 2; - */ - protected $latency_micros = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $percent - * Percentage of samples this data point applies to. - * @type int|string $latency_micros - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Percentage of samples this data point applies to. - * - * Generated from protobuf field int32 percent = 1; - * @return int - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Percentage of samples this data point applies to. - * - * Generated from protobuf field int32 percent = 1; - * @param int $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkInt32($var); - $this->percent = $var; - - return $this; - } - - /** - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * - * Generated from protobuf field int64 latency_micros = 2; - * @return int|string - */ - public function getLatencyMicros() - { - return $this->latency_micros; - } - - /** - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * - * Generated from protobuf field int64 latency_micros = 2; - * @param int|string $var - * @return $this - */ - public function setLatencyMicros($var) - { - GPBUtil::checkInt64($var); - $this->latency_micros = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php deleted file mode 100644 index caa5de5fb4f7..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - */ -class ListConnectivityTestsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Number of `ConnectivityTests` to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token from an earlier query, as returned in `next_page_token`. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * - * @return \Google\Cloud\NetworkManagement\V1\ListConnectivityTestsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @type int $page_size - * Number of `ConnectivityTests` to return. - * @type string $page_token - * Page token from an earlier query, as returned in `next_page_token`. - * @type string $filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @type string $order_by - * Field to use to sort the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Number of `ConnectivityTests` to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of `ConnectivityTests` to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token from an earlier query, as returned in `next_page_token`. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token from an earlier query, as returned in `next_page_token`. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php deleted file mode 100644 index c026cd03326a..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - */ -class ListConnectivityTestsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of Connectivity Tests. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; - */ - private $resources; - /** - * Page token to fetch the next set of Connectivity Tests. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached (when querying all locations with `-`). - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkManagement\V1\ConnectivityTest>|\Google\Protobuf\Internal\RepeatedField $resources - * List of Connectivity Tests. - * @type string $next_page_token - * Page token to fetch the next set of Connectivity Tests. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached (when querying all locations with `-`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * List of Connectivity Tests. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * List of Connectivity Tests. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; - * @param array<\Google\Cloud\NetworkManagement\V1\ConnectivityTest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); - $this->resources = $arr; - - return $this; - } - - /** - * Page token to fetch the next set of Connectivity Tests. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token to fetch the next set of Connectivity Tests. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached (when querying all locations with `-`). - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached (when querying all locations with `-`). - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php deleted file mode 100644 index b4b0114164fb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackend - */ -class LoadBalancerBackend extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * State of the health check firewall configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; - */ - protected $health_check_firewall_state = 0; - /** - * A list of firewall rule URIs allowing probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; - */ - private $health_check_allowing_firewall_rules; - /** - * A list of firewall rule URIs blocking probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; - */ - private $health_check_blocking_firewall_rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Compute Engine instance or network endpoint. - * @type string $uri - * URI of a Compute Engine instance or network endpoint. - * @type int $health_check_firewall_state - * State of the health check firewall configuration. - * @type array|\Google\Protobuf\Internal\RepeatedField $health_check_allowing_firewall_rules - * A list of firewall rule URIs allowing probes from health check IP ranges. - * @type array|\Google\Protobuf\Internal\RepeatedField $health_check_blocking_firewall_rules - * A list of firewall rule URIs blocking probes from health check IP ranges. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * State of the health check firewall configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; - * @return int - */ - public function getHealthCheckFirewallState() - { - return $this->health_check_firewall_state; - } - - /** - * State of the health check firewall configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; - * @param int $var - * @return $this - */ - public function setHealthCheckFirewallState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend\HealthCheckFirewallState::class); - $this->health_check_firewall_state = $var; - - return $this; - } - - /** - * A list of firewall rule URIs allowing probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHealthCheckAllowingFirewallRules() - { - return $this->health_check_allowing_firewall_rules; - } - - /** - * A list of firewall rule URIs allowing probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHealthCheckAllowingFirewallRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->health_check_allowing_firewall_rules = $arr; - - return $this; - } - - /** - * A list of firewall rule URIs blocking probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHealthCheckBlockingFirewallRules() - { - return $this->health_check_blocking_firewall_rules; - } - - /** - * A list of firewall rule URIs blocking probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHealthCheckBlockingFirewallRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->health_check_blocking_firewall_rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php deleted file mode 100644 index ebf941b4b52e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState - */ -class HealthCheckFirewallState -{ - /** - * State is unspecified. Default state if not populated. - * - * Generated from protobuf enum HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - */ - const HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - /** - * There are configured firewall rules to allow health check probes to the - * backend. - * - * Generated from protobuf enum CONFIGURED = 1; - */ - const CONFIGURED = 1; - /** - * There are firewall rules configured to allow partial health check ranges - * or block all health check ranges. - * If a health check probe is sent from denied IP ranges, - * the health check to the backend will fail. Then, the backend will be - * marked unhealthy and will not receive traffic sent to the load balancer. - * - * Generated from protobuf enum MISCONFIGURED = 2; - */ - const MISCONFIGURED = 2; - - private static $valueToName = [ - self::HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED => 'HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED', - self::CONFIGURED => 'CONFIGURED', - self::MISCONFIGURED => 'MISCONFIGURED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HealthCheckFirewallState::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend_HealthCheckFirewallState::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php deleted file mode 100644 index 0fb0d2efa27b..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php +++ /dev/null @@ -1,409 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - */ -class LoadBalancerBackendInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * - * Generated from protobuf field string instance_uri = 2; - */ - protected $instance_uri = ''; - /** - * URI of the backend service this backend belongs to (if applicable). - * - * Generated from protobuf field string backend_service_uri = 3; - */ - protected $backend_service_uri = ''; - /** - * URI of the instance group this backend belongs to (if applicable). - * - * Generated from protobuf field string instance_group_uri = 4; - */ - protected $instance_group_uri = ''; - /** - * URI of the network endpoint group this backend belongs to (if applicable). - * - * Generated from protobuf field string network_endpoint_group_uri = 5; - */ - protected $network_endpoint_group_uri = ''; - /** - * URI of the backend bucket this backend targets (if applicable). - * - * Generated from protobuf field string backend_bucket_uri = 8; - */ - protected $backend_bucket_uri = ''; - /** - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 9; - */ - protected $psc_service_attachment_uri = ''; - /** - * PSC Google API target this PSC NEG backend targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 10; - */ - protected $psc_google_api_target = ''; - /** - * URI of the health check attached to this backend (if applicable). - * - * Generated from protobuf field string health_check_uri = 6; - */ - protected $health_check_uri = ''; - /** - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_check_firewalls_config_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * @type string $instance_uri - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * @type string $backend_service_uri - * URI of the backend service this backend belongs to (if applicable). - * @type string $instance_group_uri - * URI of the instance group this backend belongs to (if applicable). - * @type string $network_endpoint_group_uri - * URI of the network endpoint group this backend belongs to (if applicable). - * @type string $backend_bucket_uri - * URI of the backend bucket this backend targets (if applicable). - * @type string $psc_service_attachment_uri - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * @type string $psc_google_api_target - * PSC Google API target this PSC NEG backend targets (if applicable). - * @type string $health_check_uri - * URI of the health check attached to this backend (if applicable). - * @type int $health_check_firewalls_config_state - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * - * Generated from protobuf field string instance_uri = 2; - * @return string - */ - public function getInstanceUri() - { - return $this->instance_uri; - } - - /** - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * - * Generated from protobuf field string instance_uri = 2; - * @param string $var - * @return $this - */ - public function setInstanceUri($var) - { - GPBUtil::checkString($var, True); - $this->instance_uri = $var; - - return $this; - } - - /** - * URI of the backend service this backend belongs to (if applicable). - * - * Generated from protobuf field string backend_service_uri = 3; - * @return string - */ - public function getBackendServiceUri() - { - return $this->backend_service_uri; - } - - /** - * URI of the backend service this backend belongs to (if applicable). - * - * Generated from protobuf field string backend_service_uri = 3; - * @param string $var - * @return $this - */ - public function setBackendServiceUri($var) - { - GPBUtil::checkString($var, True); - $this->backend_service_uri = $var; - - return $this; - } - - /** - * URI of the instance group this backend belongs to (if applicable). - * - * Generated from protobuf field string instance_group_uri = 4; - * @return string - */ - public function getInstanceGroupUri() - { - return $this->instance_group_uri; - } - - /** - * URI of the instance group this backend belongs to (if applicable). - * - * Generated from protobuf field string instance_group_uri = 4; - * @param string $var - * @return $this - */ - public function setInstanceGroupUri($var) - { - GPBUtil::checkString($var, True); - $this->instance_group_uri = $var; - - return $this; - } - - /** - * URI of the network endpoint group this backend belongs to (if applicable). - * - * Generated from protobuf field string network_endpoint_group_uri = 5; - * @return string - */ - public function getNetworkEndpointGroupUri() - { - return $this->network_endpoint_group_uri; - } - - /** - * URI of the network endpoint group this backend belongs to (if applicable). - * - * Generated from protobuf field string network_endpoint_group_uri = 5; - * @param string $var - * @return $this - */ - public function setNetworkEndpointGroupUri($var) - { - GPBUtil::checkString($var, True); - $this->network_endpoint_group_uri = $var; - - return $this; - } - - /** - * URI of the backend bucket this backend targets (if applicable). - * - * Generated from protobuf field string backend_bucket_uri = 8; - * @return string - */ - public function getBackendBucketUri() - { - return $this->backend_bucket_uri; - } - - /** - * URI of the backend bucket this backend targets (if applicable). - * - * Generated from protobuf field string backend_bucket_uri = 8; - * @param string $var - * @return $this - */ - public function setBackendBucketUri($var) - { - GPBUtil::checkString($var, True); - $this->backend_bucket_uri = $var; - - return $this; - } - - /** - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 9; - * @return string - */ - public function getPscServiceAttachmentUri() - { - return $this->psc_service_attachment_uri; - } - - /** - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 9; - * @param string $var - * @return $this - */ - public function setPscServiceAttachmentUri($var) - { - GPBUtil::checkString($var, True); - $this->psc_service_attachment_uri = $var; - - return $this; - } - - /** - * PSC Google API target this PSC NEG backend targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 10; - * @return string - */ - public function getPscGoogleApiTarget() - { - return $this->psc_google_api_target; - } - - /** - * PSC Google API target this PSC NEG backend targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 10; - * @param string $var - * @return $this - */ - public function setPscGoogleApiTarget($var) - { - GPBUtil::checkString($var, True); - $this->psc_google_api_target = $var; - - return $this; - } - - /** - * URI of the health check attached to this backend (if applicable). - * - * Generated from protobuf field string health_check_uri = 6; - * @return string - */ - public function getHealthCheckUri() - { - return $this->health_check_uri; - } - - /** - * URI of the health check attached to this backend (if applicable). - * - * Generated from protobuf field string health_check_uri = 6; - * @param string $var - * @return $this - */ - public function setHealthCheckUri($var) - { - GPBUtil::checkString($var, True); - $this->health_check_uri = $var; - - return $this; - } - - /** - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getHealthCheckFirewallsConfigState() - { - return $this->health_check_firewalls_config_state; - } - - /** - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setHealthCheckFirewallsConfigState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo\HealthCheckFirewallsConfigState::class); - $this->health_check_firewalls_config_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php deleted file mode 100644 index 4ca34e3878b2..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState - */ -class HealthCheckFirewallsConfigState -{ - /** - * Configuration state unspecified. It usually means that the backend has - * no health check attached, or there was an unexpected configuration error - * preventing Connectivity tests from verifying health check configuration. - * - * Generated from protobuf enum HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - */ - const HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - /** - * Firewall rules (policies) allowing health check traffic from all required - * IP ranges to the backend are configured. - * - * Generated from protobuf enum FIREWALLS_CONFIGURED = 1; - */ - const FIREWALLS_CONFIGURED = 1; - /** - * Firewall rules (policies) allow health check traffic only from a part of - * required IP ranges. - * - * Generated from protobuf enum FIREWALLS_PARTIALLY_CONFIGURED = 2; - */ - const FIREWALLS_PARTIALLY_CONFIGURED = 2; - /** - * Firewall rules (policies) deny health check traffic from all required - * IP ranges to the backend. - * - * Generated from protobuf enum FIREWALLS_NOT_CONFIGURED = 3; - */ - const FIREWALLS_NOT_CONFIGURED = 3; - /** - * The network contains firewall rules of unsupported types, so Connectivity - * tests were not able to verify health check configuration status. Please - * refer to the documentation for the list of unsupported configurations: - * https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs - * - * Generated from protobuf enum FIREWALLS_UNSUPPORTED = 4; - */ - const FIREWALLS_UNSUPPORTED = 4; - - private static $valueToName = [ - self::HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED => 'HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED', - self::FIREWALLS_CONFIGURED => 'FIREWALLS_CONFIGURED', - self::FIREWALLS_PARTIALLY_CONFIGURED => 'FIREWALLS_PARTIALLY_CONFIGURED', - self::FIREWALLS_NOT_CONFIGURED => 'FIREWALLS_NOT_CONFIGURED', - self::FIREWALLS_UNSUPPORTED => 'FIREWALLS_UNSUPPORTED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HealthCheckFirewallsConfigState::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo_HealthCheckFirewallsConfigState::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php deleted file mode 100644 index 1a5bcd92fc53..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerInfo - */ -class LoadBalancerInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the load balancer. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; - */ - protected $load_balancer_type = 0; - /** - * URI of the health check for the load balancer. - * - * Generated from protobuf field string health_check_uri = 2; - */ - protected $health_check_uri = ''; - /** - * Information for the loadbalancer backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; - */ - private $backends; - /** - * Type of load balancer's backend configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; - */ - protected $backend_type = 0; - /** - * Backend configuration URI. - * - * Generated from protobuf field string backend_uri = 5; - */ - protected $backend_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $load_balancer_type - * Type of the load balancer. - * @type string $health_check_uri - * URI of the health check for the load balancer. - * @type array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $backends - * Information for the loadbalancer backends. - * @type int $backend_type - * Type of load balancer's backend configuration. - * @type string $backend_uri - * Backend configuration URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Type of the load balancer. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; - * @return int - */ - public function getLoadBalancerType() - { - return $this->load_balancer_type; - } - - /** - * Type of the load balancer. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; - * @param int $var - * @return $this - */ - public function setLoadBalancerType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\LoadBalancerType::class); - $this->load_balancer_type = $var; - - return $this; - } - - /** - * URI of the health check for the load balancer. - * - * Generated from protobuf field string health_check_uri = 2; - * @return string - */ - public function getHealthCheckUri() - { - return $this->health_check_uri; - } - - /** - * URI of the health check for the load balancer. - * - * Generated from protobuf field string health_check_uri = 2; - * @param string $var - * @return $this - */ - public function setHealthCheckUri($var) - { - GPBUtil::checkString($var, True); - $this->health_check_uri = $var; - - return $this; - } - - /** - * Information for the loadbalancer backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackends() - { - return $this->backends; - } - - /** - * Information for the loadbalancer backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; - * @param array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackends($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend::class); - $this->backends = $arr; - - return $this; - } - - /** - * Type of load balancer's backend configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; - * @return int - */ - public function getBackendType() - { - return $this->backend_type; - } - - /** - * Type of load balancer's backend configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; - * @param int $var - * @return $this - */ - public function setBackendType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\BackendType::class); - $this->backend_type = $var; - - return $this; - } - - /** - * Backend configuration URI. - * - * Generated from protobuf field string backend_uri = 5; - * @return string - */ - public function getBackendUri() - { - return $this->backend_uri; - } - - /** - * Backend configuration URI. - * - * Generated from protobuf field string backend_uri = 5; - * @param string $var - * @return $this - */ - public function setBackendUri($var) - { - GPBUtil::checkString($var, True); - $this->backend_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php deleted file mode 100644 index 6b984fd67be6..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType - */ -class BackendType -{ - /** - * Type is unspecified. - * - * Generated from protobuf enum BACKEND_TYPE_UNSPECIFIED = 0; - */ - const BACKEND_TYPE_UNSPECIFIED = 0; - /** - * Backend Service as the load balancer's backend. - * - * Generated from protobuf enum BACKEND_SERVICE = 1; - */ - const BACKEND_SERVICE = 1; - /** - * Target Pool as the load balancer's backend. - * - * Generated from protobuf enum TARGET_POOL = 2; - */ - const TARGET_POOL = 2; - /** - * Target Instance as the load balancer's backend. - * - * Generated from protobuf enum TARGET_INSTANCE = 3; - */ - const TARGET_INSTANCE = 3; - - private static $valueToName = [ - self::BACKEND_TYPE_UNSPECIFIED => 'BACKEND_TYPE_UNSPECIFIED', - self::BACKEND_SERVICE => 'BACKEND_SERVICE', - self::TARGET_POOL => 'TARGET_POOL', - self::TARGET_INSTANCE => 'TARGET_INSTANCE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackendType::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo_BackendType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php deleted file mode 100644 index ee000a238478..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType - */ -class LoadBalancerType -{ - /** - * Type is unspecified. - * - * Generated from protobuf enum LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - */ - const LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - /** - * Internal TCP/UDP load balancer. - * - * Generated from protobuf enum INTERNAL_TCP_UDP = 1; - */ - const INTERNAL_TCP_UDP = 1; - /** - * Network TCP/UDP load balancer. - * - * Generated from protobuf enum NETWORK_TCP_UDP = 2; - */ - const NETWORK_TCP_UDP = 2; - /** - * HTTP(S) proxy load balancer. - * - * Generated from protobuf enum HTTP_PROXY = 3; - */ - const HTTP_PROXY = 3; - /** - * TCP proxy load balancer. - * - * Generated from protobuf enum TCP_PROXY = 4; - */ - const TCP_PROXY = 4; - /** - * SSL proxy load balancer. - * - * Generated from protobuf enum SSL_PROXY = 5; - */ - const SSL_PROXY = 5; - - private static $valueToName = [ - self::LOAD_BALANCER_TYPE_UNSPECIFIED => 'LOAD_BALANCER_TYPE_UNSPECIFIED', - self::INTERNAL_TCP_UDP => 'INTERNAL_TCP_UDP', - self::NETWORK_TCP_UDP => 'NETWORK_TCP_UDP', - self::HTTP_PROXY => 'HTTP_PROXY', - self::TCP_PROXY => 'TCP_PROXY', - self::SSL_PROXY => 'SSL_PROXY', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoadBalancerType::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo_LoadBalancerType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php deleted file mode 100644 index 12dcb4c5e14b..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerType - */ -class LoadBalancerType -{ - /** - * Forwarding rule points to a different target than a load balancer or a - * load balancer type is unknown. - * - * Generated from protobuf enum LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - */ - const LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - /** - * Global external HTTP(S) load balancer. - * - * Generated from protobuf enum HTTPS_ADVANCED_LOAD_BALANCER = 1; - */ - const HTTPS_ADVANCED_LOAD_BALANCER = 1; - /** - * Global external HTTP(S) load balancer (classic) - * - * Generated from protobuf enum HTTPS_LOAD_BALANCER = 2; - */ - const HTTPS_LOAD_BALANCER = 2; - /** - * Regional external HTTP(S) load balancer. - * - * Generated from protobuf enum REGIONAL_HTTPS_LOAD_BALANCER = 3; - */ - const REGIONAL_HTTPS_LOAD_BALANCER = 3; - /** - * Internal HTTP(S) load balancer. - * - * Generated from protobuf enum INTERNAL_HTTPS_LOAD_BALANCER = 4; - */ - const INTERNAL_HTTPS_LOAD_BALANCER = 4; - /** - * External SSL proxy load balancer. - * - * Generated from protobuf enum SSL_PROXY_LOAD_BALANCER = 5; - */ - const SSL_PROXY_LOAD_BALANCER = 5; - /** - * External TCP proxy load balancer. - * - * Generated from protobuf enum TCP_PROXY_LOAD_BALANCER = 6; - */ - const TCP_PROXY_LOAD_BALANCER = 6; - /** - * Internal regional TCP proxy load balancer. - * - * Generated from protobuf enum INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - */ - const INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - /** - * External TCP/UDP Network load balancer. - * - * Generated from protobuf enum NETWORK_LOAD_BALANCER = 8; - */ - const NETWORK_LOAD_BALANCER = 8; - /** - * Target-pool based external TCP/UDP Network load balancer. - * - * Generated from protobuf enum LEGACY_NETWORK_LOAD_BALANCER = 9; - */ - const LEGACY_NETWORK_LOAD_BALANCER = 9; - /** - * Internal TCP/UDP load balancer. - * - * Generated from protobuf enum TCP_UDP_INTERNAL_LOAD_BALANCER = 10; - */ - const TCP_UDP_INTERNAL_LOAD_BALANCER = 10; - - private static $valueToName = [ - self::LOAD_BALANCER_TYPE_UNSPECIFIED => 'LOAD_BALANCER_TYPE_UNSPECIFIED', - self::HTTPS_ADVANCED_LOAD_BALANCER => 'HTTPS_ADVANCED_LOAD_BALANCER', - self::HTTPS_LOAD_BALANCER => 'HTTPS_LOAD_BALANCER', - self::REGIONAL_HTTPS_LOAD_BALANCER => 'REGIONAL_HTTPS_LOAD_BALANCER', - self::INTERNAL_HTTPS_LOAD_BALANCER => 'INTERNAL_HTTPS_LOAD_BALANCER', - self::SSL_PROXY_LOAD_BALANCER => 'SSL_PROXY_LOAD_BALANCER', - self::TCP_PROXY_LOAD_BALANCER => 'TCP_PROXY_LOAD_BALANCER', - self::INTERNAL_TCP_PROXY_LOAD_BALANCER => 'INTERNAL_TCP_PROXY_LOAD_BALANCER', - self::NETWORK_LOAD_BALANCER => 'NETWORK_LOAD_BALANCER', - self::LEGACY_NETWORK_LOAD_BALANCER => 'LEGACY_NETWORK_LOAD_BALANCER', - self::TCP_UDP_INTERNAL_LOAD_BALANCER => 'TCP_UDP_INTERNAL_LOAD_BALANCER', - ]; - - 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/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php deleted file mode 100644 index 0b290c387878..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php +++ /dev/null @@ -1,483 +0,0 @@ -google.cloud.networkmanagement.v1.NatInfo - */ -class NatInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Type of NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; - */ - protected $type = 0; - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 2; - */ - protected $protocol = ''; - /** - * URI of the network where NAT translation takes place. - * - * Generated from protobuf field string network_uri = 3; - */ - protected $network_uri = ''; - /** - * Source IP address before NAT translation. - * - * Generated from protobuf field string old_source_ip = 4; - */ - protected $old_source_ip = ''; - /** - * Source IP address after NAT translation. - * - * Generated from protobuf field string new_source_ip = 5; - */ - protected $new_source_ip = ''; - /** - * Destination IP address before NAT translation. - * - * Generated from protobuf field string old_destination_ip = 6; - */ - protected $old_destination_ip = ''; - /** - * Destination IP address after NAT translation. - * - * Generated from protobuf field string new_destination_ip = 7; - */ - protected $new_destination_ip = ''; - /** - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 old_source_port = 8; - */ - protected $old_source_port = 0; - /** - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 9; - */ - protected $new_source_port = 0; - /** - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_destination_port = 10; - */ - protected $old_destination_port = 0; - /** - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 11; - */ - protected $new_destination_port = 0; - /** - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string router_uri = 12; - */ - protected $router_uri = ''; - /** - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string nat_gateway_name = 13; - */ - protected $nat_gateway_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of NAT. - * @type string $protocol - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * @type string $network_uri - * URI of the network where NAT translation takes place. - * @type string $old_source_ip - * Source IP address before NAT translation. - * @type string $new_source_ip - * Source IP address after NAT translation. - * @type string $old_destination_ip - * Destination IP address before NAT translation. - * @type string $new_destination_ip - * Destination IP address after NAT translation. - * @type int $old_source_port - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * @type int $new_source_port - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * @type int $old_destination_port - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * @type int $new_destination_port - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * @type string $router_uri - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * @type string $nat_gateway_name - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Type of NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\NatInfo\Type::class); - $this->type = $var; - - return $this; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 2; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 2; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * URI of the network where NAT translation takes place. - * - * Generated from protobuf field string network_uri = 3; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of the network where NAT translation takes place. - * - * Generated from protobuf field string network_uri = 3; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Source IP address before NAT translation. - * - * Generated from protobuf field string old_source_ip = 4; - * @return string - */ - public function getOldSourceIp() - { - return $this->old_source_ip; - } - - /** - * Source IP address before NAT translation. - * - * Generated from protobuf field string old_source_ip = 4; - * @param string $var - * @return $this - */ - public function setOldSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->old_source_ip = $var; - - return $this; - } - - /** - * Source IP address after NAT translation. - * - * Generated from protobuf field string new_source_ip = 5; - * @return string - */ - public function getNewSourceIp() - { - return $this->new_source_ip; - } - - /** - * Source IP address after NAT translation. - * - * Generated from protobuf field string new_source_ip = 5; - * @param string $var - * @return $this - */ - public function setNewSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->new_source_ip = $var; - - return $this; - } - - /** - * Destination IP address before NAT translation. - * - * Generated from protobuf field string old_destination_ip = 6; - * @return string - */ - public function getOldDestinationIp() - { - return $this->old_destination_ip; - } - - /** - * Destination IP address before NAT translation. - * - * Generated from protobuf field string old_destination_ip = 6; - * @param string $var - * @return $this - */ - public function setOldDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->old_destination_ip = $var; - - return $this; - } - - /** - * Destination IP address after NAT translation. - * - * Generated from protobuf field string new_destination_ip = 7; - * @return string - */ - public function getNewDestinationIp() - { - return $this->new_destination_ip; - } - - /** - * Destination IP address after NAT translation. - * - * Generated from protobuf field string new_destination_ip = 7; - * @param string $var - * @return $this - */ - public function setNewDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->new_destination_ip = $var; - - return $this; - } - - /** - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 old_source_port = 8; - * @return int - */ - public function getOldSourcePort() - { - return $this->old_source_port; - } - - /** - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 old_source_port = 8; - * @param int $var - * @return $this - */ - public function setOldSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->old_source_port = $var; - - return $this; - } - - /** - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 9; - * @return int - */ - public function getNewSourcePort() - { - return $this->new_source_port; - } - - /** - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 9; - * @param int $var - * @return $this - */ - public function setNewSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->new_source_port = $var; - - return $this; - } - - /** - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_destination_port = 10; - * @return int - */ - public function getOldDestinationPort() - { - return $this->old_destination_port; - } - - /** - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_destination_port = 10; - * @param int $var - * @return $this - */ - public function setOldDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->old_destination_port = $var; - - return $this; - } - - /** - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 11; - * @return int - */ - public function getNewDestinationPort() - { - return $this->new_destination_port; - } - - /** - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 11; - * @param int $var - * @return $this - */ - public function setNewDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->new_destination_port = $var; - - return $this; - } - - /** - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string router_uri = 12; - * @return string - */ - public function getRouterUri() - { - return $this->router_uri; - } - - /** - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string router_uri = 12; - * @param string $var - * @return $this - */ - public function setRouterUri($var) - { - GPBUtil::checkString($var, True); - $this->router_uri = $var; - - return $this; - } - - /** - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string nat_gateway_name = 13; - * @return string - */ - public function getNatGatewayName() - { - return $this->nat_gateway_name; - } - - /** - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string nat_gateway_name = 13; - * @param string $var - * @return $this - */ - public function setNatGatewayName($var) - { - GPBUtil::checkString($var, True); - $this->nat_gateway_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php deleted file mode 100644 index ef9862445568..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networkmanagement.v1.NatInfo.Type - */ -class Type -{ - /** - * Type is unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * From Compute Engine instance's internal address to external address. - * - * Generated from protobuf enum INTERNAL_TO_EXTERNAL = 1; - */ - const INTERNAL_TO_EXTERNAL = 1; - /** - * From Compute Engine instance's external address to internal address. - * - * Generated from protobuf enum EXTERNAL_TO_INTERNAL = 2; - */ - const EXTERNAL_TO_INTERNAL = 2; - /** - * Cloud NAT Gateway. - * - * Generated from protobuf enum CLOUD_NAT = 3; - */ - const CLOUD_NAT = 3; - /** - * Private service connect NAT. - * - * Generated from protobuf enum PRIVATE_SERVICE_CONNECT = 4; - */ - const PRIVATE_SERVICE_CONNECT = 4; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::INTERNAL_TO_EXTERNAL => 'INTERNAL_TO_EXTERNAL', - self::EXTERNAL_TO_INTERNAL => 'EXTERNAL_TO_INTERNAL', - self::CLOUD_NAT => 'CLOUD_NAT', - self::PRIVATE_SERVICE_CONNECT => 'PRIVATE_SERVICE_CONNECT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\NetworkManagement\V1\NatInfo_Type::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php deleted file mode 100644 index 55f66ee49157..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.NetworkInfo - */ -class NetworkInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Compute Engine network. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * The IP range that matches the test. - * - * Generated from protobuf field string matched_ip_range = 4; - */ - protected $matched_ip_range = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Compute Engine network. - * @type string $uri - * URI of a Compute Engine network. - * @type string $matched_ip_range - * The IP range that matches the test. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Compute Engine network. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Compute Engine network. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The IP range that matches the test. - * - * Generated from protobuf field string matched_ip_range = 4; - * @return string - */ - public function getMatchedIpRange() - { - return $this->matched_ip_range; - } - - /** - * The IP range that matches the test. - * - * Generated from protobuf field string matched_ip_range = 4; - * @param string $var - * @return $this - */ - public function setMatchedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->matched_ip_range = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php deleted file mode 100644 index c063a6d1f374..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.networkmanagement.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - */ - protected $status_detail = ''; - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - */ - protected $cancel_requested = false; - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_detail - * Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Specifies if cancellation was requested for the operation. - * @type string $api_version - * API version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php deleted file mode 100644 index 254b6271a30e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php +++ /dev/null @@ -1,417 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails - */ -class ProbingDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The overall result of active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; - */ - protected $result = 0; - /** - * The time that reachability was assessed through active probing. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - */ - protected $verify_time = null; - /** - * Details about an internal failure or the cancellation of active probing. - * - * Generated from protobuf field .google.rpc.Status error = 3; - */ - protected $error = null; - /** - * The reason probing was aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; - */ - protected $abort_cause = 0; - /** - * Number of probes sent. - * - * Generated from protobuf field int32 sent_probe_count = 5; - */ - protected $sent_probe_count = 0; - /** - * Number of probes that reached the destination. - * - * Generated from protobuf field int32 successful_probe_count = 6; - */ - protected $successful_probe_count = 0; - /** - * The source and destination endpoints derived from the test input and used - * for active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; - */ - protected $endpoint_info = null; - /** - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; - */ - protected $probing_latency = null; - /** - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; - */ - protected $destination_egress_location = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $result - * The overall result of active probing. - * @type \Google\Protobuf\Timestamp $verify_time - * The time that reachability was assessed through active probing. - * @type \Google\Rpc\Status $error - * Details about an internal failure or the cancellation of active probing. - * @type int $abort_cause - * The reason probing was aborted. - * @type int $sent_probe_count - * Number of probes sent. - * @type int $successful_probe_count - * Number of probes that reached the destination. - * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint_info - * The source and destination endpoints derived from the test input and used - * for active probing. - * @type \Google\Cloud\NetworkManagement\V1\LatencyDistribution $probing_latency - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * @type \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $destination_egress_location - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * The overall result of active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The overall result of active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\ProbingResult::class); - $this->result = $var; - - return $this; - } - - /** - * The time that reachability was assessed through active probing. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVerifyTime() - { - return $this->verify_time; - } - - public function hasVerifyTime() - { - return isset($this->verify_time); - } - - public function clearVerifyTime() - { - unset($this->verify_time); - } - - /** - * The time that reachability was assessed through active probing. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVerifyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->verify_time = $var; - - return $this; - } - - /** - * Details about an internal failure or the cancellation of active probing. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Details about an internal failure or the cancellation of active probing. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * The reason probing was aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; - * @return int - */ - public function getAbortCause() - { - return $this->abort_cause; - } - - /** - * The reason probing was aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; - * @param int $var - * @return $this - */ - public function setAbortCause($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\ProbingAbortCause::class); - $this->abort_cause = $var; - - return $this; - } - - /** - * Number of probes sent. - * - * Generated from protobuf field int32 sent_probe_count = 5; - * @return int - */ - public function getSentProbeCount() - { - return $this->sent_probe_count; - } - - /** - * Number of probes sent. - * - * Generated from protobuf field int32 sent_probe_count = 5; - * @param int $var - * @return $this - */ - public function setSentProbeCount($var) - { - GPBUtil::checkInt32($var); - $this->sent_probe_count = $var; - - return $this; - } - - /** - * Number of probes that reached the destination. - * - * Generated from protobuf field int32 successful_probe_count = 6; - * @return int - */ - public function getSuccessfulProbeCount() - { - return $this->successful_probe_count; - } - - /** - * Number of probes that reached the destination. - * - * Generated from protobuf field int32 successful_probe_count = 6; - * @param int $var - * @return $this - */ - public function setSuccessfulProbeCount($var) - { - GPBUtil::checkInt32($var); - $this->successful_probe_count = $var; - - return $this; - } - - /** - * The source and destination endpoints derived from the test input and used - * for active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; - * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null - */ - public function getEndpointInfo() - { - return $this->endpoint_info; - } - - public function hasEndpointInfo() - { - return isset($this->endpoint_info); - } - - public function clearEndpointInfo() - { - unset($this->endpoint_info); - } - - /** - * The source and destination endpoints derived from the test input and used - * for active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; - * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var - * @return $this - */ - public function setEndpointInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); - $this->endpoint_info = $var; - - return $this; - } - - /** - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; - * @return \Google\Cloud\NetworkManagement\V1\LatencyDistribution|null - */ - public function getProbingLatency() - { - return $this->probing_latency; - } - - public function hasProbingLatency() - { - return isset($this->probing_latency); - } - - public function clearProbingLatency() - { - unset($this->probing_latency); - } - - /** - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; - * @param \Google\Cloud\NetworkManagement\V1\LatencyDistribution $var - * @return $this - */ - public function setProbingLatency($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LatencyDistribution::class); - $this->probing_latency = $var; - - return $this; - } - - /** - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; - * @return \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation|null - */ - public function getDestinationEgressLocation() - { - return $this->destination_egress_location; - } - - public function hasDestinationEgressLocation() - { - return isset($this->destination_egress_location); - } - - public function clearDestinationEgressLocation() - { - unset($this->destination_egress_location); - } - - /** - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; - * @param \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $var - * @return $this - */ - public function setDestinationEgressLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation::class); - $this->destination_egress_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php deleted file mode 100644 index b2c41ea9e303..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - */ -class EdgeLocation extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the metropolitan area. - * - * Generated from protobuf field string metropolitan_area = 1; - */ - protected $metropolitan_area = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metropolitan_area - * Name of the metropolitan area. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Name of the metropolitan area. - * - * Generated from protobuf field string metropolitan_area = 1; - * @return string - */ - public function getMetropolitanArea() - { - return $this->metropolitan_area; - } - - /** - * Name of the metropolitan area. - * - * Generated from protobuf field string metropolitan_area = 1; - * @param string $var - * @return $this - */ - public function setMetropolitanArea($var) - { - GPBUtil::checkString($var, True); - $this->metropolitan_area = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EdgeLocation::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_EdgeLocation::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php deleted file mode 100644 index a35527cc41eb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause - */ -class ProbingAbortCause -{ - /** - * No reason was specified. - * - * Generated from protobuf enum PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - */ - const PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - /** - * The user lacks permission to access some of the - * network resources required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED = 1; - */ - const PERMISSION_DENIED = 1; - /** - * No valid source endpoint could be derived from the request. - * - * Generated from protobuf enum NO_SOURCE_LOCATION = 2; - */ - const NO_SOURCE_LOCATION = 2; - - private static $valueToName = [ - self::PROBING_ABORT_CAUSE_UNSPECIFIED => 'PROBING_ABORT_CAUSE_UNSPECIFIED', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProbingAbortCause::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_ProbingAbortCause::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php deleted file mode 100644 index 567ea2be878f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult - */ -class ProbingResult -{ - /** - * No result was specified. - * - * Generated from protobuf enum PROBING_RESULT_UNSPECIFIED = 0; - */ - const PROBING_RESULT_UNSPECIFIED = 0; - /** - * At least 95% of packets reached the destination. - * - * Generated from protobuf enum REACHABLE = 1; - */ - const REACHABLE = 1; - /** - * No packets reached the destination. - * - * Generated from protobuf enum UNREACHABLE = 2; - */ - const UNREACHABLE = 2; - /** - * Less than 95% of packets reached the destination. - * - * Generated from protobuf enum REACHABILITY_INCONSISTENT = 3; - */ - const REACHABILITY_INCONSISTENT = 3; - /** - * Reachability could not be determined. Possible reasons are: - * * The user lacks permission to access some of the network resources - * required to run the test. - * * No valid source endpoint could be derived from the request. - * * An internal error occurred. - * - * Generated from protobuf enum UNDETERMINED = 4; - */ - const UNDETERMINED = 4; - - private static $valueToName = [ - self::PROBING_RESULT_UNSPECIFIED => 'PROBING_RESULT_UNSPECIFIED', - self::REACHABLE => 'REACHABLE', - self::UNREACHABLE => 'UNREACHABLE', - self::REACHABILITY_INCONSISTENT => 'REACHABILITY_INCONSISTENT', - self::UNDETERMINED => 'UNDETERMINED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProbingResult::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_ProbingResult::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php deleted file mode 100644 index feb1c10943c7..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php +++ /dev/null @@ -1,419 +0,0 @@ -google.cloud.networkmanagement.v1.ProxyConnectionInfo - */ -class ProxyConnectionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 1; - */ - protected $protocol = ''; - /** - * Source IP address of an original connection. - * - * Generated from protobuf field string old_source_ip = 2; - */ - protected $old_source_ip = ''; - /** - * Source IP address of a new connection. - * - * Generated from protobuf field string new_source_ip = 3; - */ - protected $new_source_ip = ''; - /** - * Destination IP address of an original connection - * - * Generated from protobuf field string old_destination_ip = 4; - */ - protected $old_destination_ip = ''; - /** - * Destination IP address of a new connection. - * - * Generated from protobuf field string new_destination_ip = 5; - */ - protected $new_destination_ip = ''; - /** - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_source_port = 6; - */ - protected $old_source_port = 0; - /** - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 7; - */ - protected $new_source_port = 0; - /** - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * - * Generated from protobuf field int32 old_destination_port = 8; - */ - protected $old_destination_port = 0; - /** - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 9; - */ - protected $new_destination_port = 0; - /** - * Uri of proxy subnet. - * - * Generated from protobuf field string subnet_uri = 10; - */ - protected $subnet_uri = ''; - /** - * URI of the network where connection is proxied. - * - * Generated from protobuf field string network_uri = 11; - */ - protected $network_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $protocol - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * @type string $old_source_ip - * Source IP address of an original connection. - * @type string $new_source_ip - * Source IP address of a new connection. - * @type string $old_destination_ip - * Destination IP address of an original connection - * @type string $new_destination_ip - * Destination IP address of a new connection. - * @type int $old_source_port - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * @type int $new_source_port - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * @type int $old_destination_port - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * @type int $new_destination_port - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * @type string $subnet_uri - * Uri of proxy subnet. - * @type string $network_uri - * URI of the network where connection is proxied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 1; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 1; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * Source IP address of an original connection. - * - * Generated from protobuf field string old_source_ip = 2; - * @return string - */ - public function getOldSourceIp() - { - return $this->old_source_ip; - } - - /** - * Source IP address of an original connection. - * - * Generated from protobuf field string old_source_ip = 2; - * @param string $var - * @return $this - */ - public function setOldSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->old_source_ip = $var; - - return $this; - } - - /** - * Source IP address of a new connection. - * - * Generated from protobuf field string new_source_ip = 3; - * @return string - */ - public function getNewSourceIp() - { - return $this->new_source_ip; - } - - /** - * Source IP address of a new connection. - * - * Generated from protobuf field string new_source_ip = 3; - * @param string $var - * @return $this - */ - public function setNewSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->new_source_ip = $var; - - return $this; - } - - /** - * Destination IP address of an original connection - * - * Generated from protobuf field string old_destination_ip = 4; - * @return string - */ - public function getOldDestinationIp() - { - return $this->old_destination_ip; - } - - /** - * Destination IP address of an original connection - * - * Generated from protobuf field string old_destination_ip = 4; - * @param string $var - * @return $this - */ - public function setOldDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->old_destination_ip = $var; - - return $this; - } - - /** - * Destination IP address of a new connection. - * - * Generated from protobuf field string new_destination_ip = 5; - * @return string - */ - public function getNewDestinationIp() - { - return $this->new_destination_ip; - } - - /** - * Destination IP address of a new connection. - * - * Generated from protobuf field string new_destination_ip = 5; - * @param string $var - * @return $this - */ - public function setNewDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->new_destination_ip = $var; - - return $this; - } - - /** - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_source_port = 6; - * @return int - */ - public function getOldSourcePort() - { - return $this->old_source_port; - } - - /** - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_source_port = 6; - * @param int $var - * @return $this - */ - public function setOldSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->old_source_port = $var; - - return $this; - } - - /** - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 7; - * @return int - */ - public function getNewSourcePort() - { - return $this->new_source_port; - } - - /** - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 7; - * @param int $var - * @return $this - */ - public function setNewSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->new_source_port = $var; - - return $this; - } - - /** - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * - * Generated from protobuf field int32 old_destination_port = 8; - * @return int - */ - public function getOldDestinationPort() - { - return $this->old_destination_port; - } - - /** - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * - * Generated from protobuf field int32 old_destination_port = 8; - * @param int $var - * @return $this - */ - public function setOldDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->old_destination_port = $var; - - return $this; - } - - /** - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 9; - * @return int - */ - public function getNewDestinationPort() - { - return $this->new_destination_port; - } - - /** - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 9; - * @param int $var - * @return $this - */ - public function setNewDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->new_destination_port = $var; - - return $this; - } - - /** - * Uri of proxy subnet. - * - * Generated from protobuf field string subnet_uri = 10; - * @return string - */ - public function getSubnetUri() - { - return $this->subnet_uri; - } - - /** - * Uri of proxy subnet. - * - * Generated from protobuf field string subnet_uri = 10; - * @param string $var - * @return $this - */ - public function setSubnetUri($var) - { - GPBUtil::checkString($var, True); - $this->subnet_uri = $var; - - return $this; - } - - /** - * URI of the network where connection is proxied. - * - * Generated from protobuf field string network_uri = 11; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of the network where connection is proxied. - * - * Generated from protobuf field string network_uri = 11; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php deleted file mode 100644 index 487aecd9228d..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.networkmanagement.v1.ReachabilityDetails - */ -class ReachabilityDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The overall result of the test's configuration analysis. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; - */ - protected $result = 0; - /** - * The time of the configuration analysis. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - */ - protected $verify_time = null; - /** - * The details of a failure or a cancellation of reachability analysis. - * - * Generated from protobuf field .google.rpc.Status error = 3; - */ - protected $error = null; - /** - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; - */ - private $traces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $result - * The overall result of the test's configuration analysis. - * @type \Google\Protobuf\Timestamp $verify_time - * The time of the configuration analysis. - * @type \Google\Rpc\Status $error - * The details of a failure or a cancellation of reachability analysis. - * @type array<\Google\Cloud\NetworkManagement\V1\Trace>|\Google\Protobuf\Internal\RepeatedField $traces - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * The overall result of the test's configuration analysis. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The overall result of the test's configuration analysis. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails\Result::class); - $this->result = $var; - - return $this; - } - - /** - * The time of the configuration analysis. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVerifyTime() - { - return $this->verify_time; - } - - public function hasVerifyTime() - { - return isset($this->verify_time); - } - - public function clearVerifyTime() - { - unset($this->verify_time); - } - - /** - * The time of the configuration analysis. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVerifyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->verify_time = $var; - - return $this; - } - - /** - * The details of a failure or a cancellation of reachability analysis. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * The details of a failure or a cancellation of reachability analysis. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTraces() - { - return $this->traces; - } - - /** - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; - * @param array<\Google\Cloud\NetworkManagement\V1\Trace>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\Trace::class); - $this->traces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php deleted file mode 100644 index 3ad419b3f795..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.networkmanagement.v1.ReachabilityDetails.Result - */ -class Result -{ - /** - * No result was specified. - * - * Generated from protobuf enum RESULT_UNSPECIFIED = 0; - */ - const RESULT_UNSPECIFIED = 0; - /** - * Possible scenarios are: - * * The configuration analysis determined that a packet originating from - * the source is expected to reach the destination. - * * The analysis didn't complete because the user lacks permission for - * some of the resources in the trace. However, at the time the user's - * permission became insufficient, the trace had been successful so far. - * - * Generated from protobuf enum REACHABLE = 1; - */ - const REACHABLE = 1; - /** - * A packet originating from the source is expected to be dropped before - * reaching the destination. - * - * Generated from protobuf enum UNREACHABLE = 2; - */ - const UNREACHABLE = 2; - /** - * The source and destination endpoints do not uniquely identify - * the test location in the network, and the reachability result contains - * multiple traces. For some traces, a packet could be delivered, and for - * others, it would not be. - * - * Generated from protobuf enum AMBIGUOUS = 4; - */ - const AMBIGUOUS = 4; - /** - * The configuration analysis did not complete. Possible reasons are: - * * A permissions error occurred--for example, the user might not have - * read permission for all of the resources named in the test. - * * An internal error occurred. - * * The analyzer received an invalid or unsupported argument or was unable - * to identify a known endpoint. - * - * Generated from protobuf enum UNDETERMINED = 5; - */ - const UNDETERMINED = 5; - - private static $valueToName = [ - self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', - self::REACHABLE => 'REACHABLE', - self::UNREACHABLE => 'UNREACHABLE', - self::AMBIGUOUS => 'AMBIGUOUS', - self::UNDETERMINED => 'UNDETERMINED', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails_Result::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php deleted file mode 100644 index fa21f9b7053f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - */ -class RerunConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php deleted file mode 100644 index adbf221856b8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php +++ /dev/null @@ -1,609 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo - */ -class RouteInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Type of route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; - */ - protected $route_type = 0; - /** - * Type of next hop. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; - */ - protected $next_hop_type = 0; - /** - * Indicates where route is applicable. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; - */ - protected $route_scope = 0; - /** - * Name of a route. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a route. - * Dynamic, peering static and peering dynamic routes do not have an URI. - * Advertised route from Google Cloud VPC to on-premises network also does - * not have an URI. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Destination IP range of the route. - * - * Generated from protobuf field string dest_ip_range = 3; - */ - protected $dest_ip_range = ''; - /** - * Next hop of the route. - * - * Generated from protobuf field string next_hop = 4; - */ - protected $next_hop = ''; - /** - * URI of a Compute Engine network. NETWORK routes only. - * - * Generated from protobuf field string network_uri = 5; - */ - protected $network_uri = ''; - /** - * Priority of the route. - * - * Generated from protobuf field int32 priority = 6; - */ - protected $priority = 0; - /** - * Instance tags of the route. - * - * Generated from protobuf field repeated string instance_tags = 7; - */ - private $instance_tags; - /** - * Source IP address range of the route. Policy based routes only. - * - * Generated from protobuf field string src_ip_range = 10; - */ - protected $src_ip_range = ''; - /** - * Destination port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string dest_port_ranges = 11; - */ - private $dest_port_ranges; - /** - * Source port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string src_port_ranges = 12; - */ - private $src_port_ranges; - /** - * Protocols of the route. Policy based routes only. - * - * Generated from protobuf field repeated string protocols = 13; - */ - private $protocols; - /** - * URI of a NCC Hub. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_hub_uri = 15; - */ - protected $ncc_hub_uri = null; - /** - * URI of a NCC Spoke. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_spoke_uri = 16; - */ - protected $ncc_spoke_uri = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $route_type - * Type of route. - * @type int $next_hop_type - * Type of next hop. - * @type int $route_scope - * Indicates where route is applicable. - * @type string $display_name - * Name of a route. - * @type string $uri - * URI of a route. - * Dynamic, peering static and peering dynamic routes do not have an URI. - * Advertised route from Google Cloud VPC to on-premises network also does - * not have an URI. - * @type string $dest_ip_range - * Destination IP range of the route. - * @type string $next_hop - * Next hop of the route. - * @type string $network_uri - * URI of a Compute Engine network. NETWORK routes only. - * @type int $priority - * Priority of the route. - * @type array|\Google\Protobuf\Internal\RepeatedField $instance_tags - * Instance tags of the route. - * @type string $src_ip_range - * Source IP address range of the route. Policy based routes only. - * @type array|\Google\Protobuf\Internal\RepeatedField $dest_port_ranges - * Destination port ranges of the route. Policy based routes only. - * @type array|\Google\Protobuf\Internal\RepeatedField $src_port_ranges - * Source port ranges of the route. Policy based routes only. - * @type array|\Google\Protobuf\Internal\RepeatedField $protocols - * Protocols of the route. Policy based routes only. - * @type string $ncc_hub_uri - * URI of a NCC Hub. NCC_HUB routes only. - * @type string $ncc_spoke_uri - * URI of a NCC Spoke. NCC_HUB routes only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Type of route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; - * @return int - */ - public function getRouteType() - { - return $this->route_type; - } - - /** - * Type of route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; - * @param int $var - * @return $this - */ - public function setRouteType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\RouteType::class); - $this->route_type = $var; - - return $this; - } - - /** - * Type of next hop. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; - * @return int - */ - public function getNextHopType() - { - return $this->next_hop_type; - } - - /** - * Type of next hop. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; - * @param int $var - * @return $this - */ - public function setNextHopType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\NextHopType::class); - $this->next_hop_type = $var; - - return $this; - } - - /** - * Indicates where route is applicable. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; - * @return int - */ - public function getRouteScope() - { - return $this->route_scope; - } - - /** - * Indicates where route is applicable. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; - * @param int $var - * @return $this - */ - public function setRouteScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\RouteScope::class); - $this->route_scope = $var; - - return $this; - } - - /** - * Name of a route. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a route. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a route. - * Dynamic, peering static and peering dynamic routes do not have an URI. - * Advertised route from Google Cloud VPC to on-premises network also does - * not have an URI. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a route. - * Dynamic, peering static and peering dynamic routes do not have an URI. - * Advertised route from Google Cloud VPC to on-premises network also does - * not have an URI. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Destination IP range of the route. - * - * Generated from protobuf field string dest_ip_range = 3; - * @return string - */ - public function getDestIpRange() - { - return $this->dest_ip_range; - } - - /** - * Destination IP range of the route. - * - * Generated from protobuf field string dest_ip_range = 3; - * @param string $var - * @return $this - */ - public function setDestIpRange($var) - { - GPBUtil::checkString($var, True); - $this->dest_ip_range = $var; - - return $this; - } - - /** - * Next hop of the route. - * - * Generated from protobuf field string next_hop = 4; - * @return string - */ - public function getNextHop() - { - return $this->next_hop; - } - - /** - * Next hop of the route. - * - * Generated from protobuf field string next_hop = 4; - * @param string $var - * @return $this - */ - public function setNextHop($var) - { - GPBUtil::checkString($var, True); - $this->next_hop = $var; - - return $this; - } - - /** - * URI of a Compute Engine network. NETWORK routes only. - * - * Generated from protobuf field string network_uri = 5; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network. NETWORK routes only. - * - * Generated from protobuf field string network_uri = 5; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Priority of the route. - * - * Generated from protobuf field int32 priority = 6; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Priority of the route. - * - * Generated from protobuf field int32 priority = 6; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * Instance tags of the route. - * - * Generated from protobuf field repeated string instance_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceTags() - { - return $this->instance_tags; - } - - /** - * Instance tags of the route. - * - * Generated from protobuf field repeated string instance_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_tags = $arr; - - return $this; - } - - /** - * Source IP address range of the route. Policy based routes only. - * - * Generated from protobuf field string src_ip_range = 10; - * @return string - */ - public function getSrcIpRange() - { - return $this->src_ip_range; - } - - /** - * Source IP address range of the route. Policy based routes only. - * - * Generated from protobuf field string src_ip_range = 10; - * @param string $var - * @return $this - */ - public function setSrcIpRange($var) - { - GPBUtil::checkString($var, True); - $this->src_ip_range = $var; - - return $this; - } - - /** - * Destination port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string dest_port_ranges = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestPortRanges() - { - return $this->dest_port_ranges; - } - - /** - * Destination port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string dest_port_ranges = 11; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestPortRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->dest_port_ranges = $arr; - - return $this; - } - - /** - * Source port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string src_port_ranges = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSrcPortRanges() - { - return $this->src_port_ranges; - } - - /** - * Source port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string src_port_ranges = 12; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSrcPortRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->src_port_ranges = $arr; - - return $this; - } - - /** - * Protocols of the route. Policy based routes only. - * - * Generated from protobuf field repeated string protocols = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProtocols() - { - return $this->protocols; - } - - /** - * Protocols of the route. Policy based routes only. - * - * Generated from protobuf field repeated string protocols = 13; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProtocols($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->protocols = $arr; - - return $this; - } - - /** - * URI of a NCC Hub. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_hub_uri = 15; - * @return string - */ - public function getNccHubUri() - { - return isset($this->ncc_hub_uri) ? $this->ncc_hub_uri : ''; - } - - public function hasNccHubUri() - { - return isset($this->ncc_hub_uri); - } - - public function clearNccHubUri() - { - unset($this->ncc_hub_uri); - } - - /** - * URI of a NCC Hub. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_hub_uri = 15; - * @param string $var - * @return $this - */ - public function setNccHubUri($var) - { - GPBUtil::checkString($var, True); - $this->ncc_hub_uri = $var; - - return $this; - } - - /** - * URI of a NCC Spoke. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_spoke_uri = 16; - * @return string - */ - public function getNccSpokeUri() - { - return isset($this->ncc_spoke_uri) ? $this->ncc_spoke_uri : ''; - } - - public function hasNccSpokeUri() - { - return isset($this->ncc_spoke_uri); - } - - public function clearNccSpokeUri() - { - unset($this->ncc_spoke_uri); - } - - /** - * URI of a NCC Spoke. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_spoke_uri = 16; - * @param string $var - * @return $this - */ - public function setNccSpokeUri($var) - { - GPBUtil::checkString($var, True); - $this->ncc_spoke_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php deleted file mode 100644 index 68b5c2112fd8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo.NextHopType - */ -class NextHopType -{ - /** - * Unspecified type. Default value. - * - * Generated from protobuf enum NEXT_HOP_TYPE_UNSPECIFIED = 0; - */ - const NEXT_HOP_TYPE_UNSPECIFIED = 0; - /** - * Next hop is an IP address. - * - * Generated from protobuf enum NEXT_HOP_IP = 1; - */ - const NEXT_HOP_IP = 1; - /** - * Next hop is a Compute Engine instance. - * - * Generated from protobuf enum NEXT_HOP_INSTANCE = 2; - */ - const NEXT_HOP_INSTANCE = 2; - /** - * Next hop is a VPC network gateway. - * - * Generated from protobuf enum NEXT_HOP_NETWORK = 3; - */ - const NEXT_HOP_NETWORK = 3; - /** - * Next hop is a peering VPC. - * - * Generated from protobuf enum NEXT_HOP_PEERING = 4; - */ - const NEXT_HOP_PEERING = 4; - /** - * Next hop is an interconnect. - * - * Generated from protobuf enum NEXT_HOP_INTERCONNECT = 5; - */ - const NEXT_HOP_INTERCONNECT = 5; - /** - * Next hop is a VPN tunnel. - * - * Generated from protobuf enum NEXT_HOP_VPN_TUNNEL = 6; - */ - const NEXT_HOP_VPN_TUNNEL = 6; - /** - * Next hop is a VPN gateway. This scenario only happens when tracing - * connectivity from an on-premises network to Google Cloud through a VPN. - * The analysis simulates a packet departing from the on-premises network - * through a VPN tunnel and arriving at a Cloud VPN gateway. - * - * Generated from protobuf enum NEXT_HOP_VPN_GATEWAY = 7; - */ - const NEXT_HOP_VPN_GATEWAY = 7; - /** - * Next hop is an internet gateway. - * - * Generated from protobuf enum NEXT_HOP_INTERNET_GATEWAY = 8; - */ - const NEXT_HOP_INTERNET_GATEWAY = 8; - /** - * Next hop is blackhole; that is, the next hop either does not exist or is - * not running. - * - * Generated from protobuf enum NEXT_HOP_BLACKHOLE = 9; - */ - const NEXT_HOP_BLACKHOLE = 9; - /** - * Next hop is the forwarding rule of an Internal Load Balancer. - * - * Generated from protobuf enum NEXT_HOP_ILB = 10; - */ - const NEXT_HOP_ILB = 10; - /** - * Next hop is a - * [router appliance - * instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). - * - * Generated from protobuf enum NEXT_HOP_ROUTER_APPLIANCE = 11; - */ - const NEXT_HOP_ROUTER_APPLIANCE = 11; - /** - * Next hop is an NCC hub. - * - * Generated from protobuf enum NEXT_HOP_NCC_HUB = 12; - */ - const NEXT_HOP_NCC_HUB = 12; - - private static $valueToName = [ - self::NEXT_HOP_TYPE_UNSPECIFIED => 'NEXT_HOP_TYPE_UNSPECIFIED', - self::NEXT_HOP_IP => 'NEXT_HOP_IP', - self::NEXT_HOP_INSTANCE => 'NEXT_HOP_INSTANCE', - self::NEXT_HOP_NETWORK => 'NEXT_HOP_NETWORK', - self::NEXT_HOP_PEERING => 'NEXT_HOP_PEERING', - self::NEXT_HOP_INTERCONNECT => 'NEXT_HOP_INTERCONNECT', - self::NEXT_HOP_VPN_TUNNEL => 'NEXT_HOP_VPN_TUNNEL', - self::NEXT_HOP_VPN_GATEWAY => 'NEXT_HOP_VPN_GATEWAY', - self::NEXT_HOP_INTERNET_GATEWAY => 'NEXT_HOP_INTERNET_GATEWAY', - self::NEXT_HOP_BLACKHOLE => 'NEXT_HOP_BLACKHOLE', - self::NEXT_HOP_ILB => 'NEXT_HOP_ILB', - self::NEXT_HOP_ROUTER_APPLIANCE => 'NEXT_HOP_ROUTER_APPLIANCE', - self::NEXT_HOP_NCC_HUB => 'NEXT_HOP_NCC_HUB', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NextHopType::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_NextHopType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php deleted file mode 100644 index 63ab17217fcb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo.RouteScope - */ -class RouteScope -{ - /** - * Unspecified scope. Default value. - * - * Generated from protobuf enum ROUTE_SCOPE_UNSPECIFIED = 0; - */ - const ROUTE_SCOPE_UNSPECIFIED = 0; - /** - * Route is applicable to packets in Network. - * - * Generated from protobuf enum NETWORK = 1; - */ - const NETWORK = 1; - /** - * Route is applicable to packets using NCC Hub's routing table. - * - * Generated from protobuf enum NCC_HUB = 2; - */ - const NCC_HUB = 2; - - private static $valueToName = [ - self::ROUTE_SCOPE_UNSPECIFIED => 'ROUTE_SCOPE_UNSPECIFIED', - self::NETWORK => 'NETWORK', - self::NCC_HUB => 'NCC_HUB', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteScope::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_RouteScope::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php deleted file mode 100644 index 2d7cd079361e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo.RouteType - */ -class RouteType -{ - /** - * Unspecified type. Default value. - * - * Generated from protobuf enum ROUTE_TYPE_UNSPECIFIED = 0; - */ - const ROUTE_TYPE_UNSPECIFIED = 0; - /** - * Route is a subnet route automatically created by the system. - * - * Generated from protobuf enum SUBNET = 1; - */ - const SUBNET = 1; - /** - * Static route created by the user, including the default route to the - * internet. - * - * Generated from protobuf enum STATIC = 2; - */ - const PBSTATIC = 2; - /** - * Dynamic route exchanged between BGP peers. - * - * Generated from protobuf enum DYNAMIC = 3; - */ - const DYNAMIC = 3; - /** - * A subnet route received from peering network. - * - * Generated from protobuf enum PEERING_SUBNET = 4; - */ - const PEERING_SUBNET = 4; - /** - * A static route received from peering network. - * - * Generated from protobuf enum PEERING_STATIC = 5; - */ - const PEERING_STATIC = 5; - /** - * A dynamic route received from peering network. - * - * Generated from protobuf enum PEERING_DYNAMIC = 6; - */ - const PEERING_DYNAMIC = 6; - /** - * Policy based route. - * - * Generated from protobuf enum POLICY_BASED = 7; - */ - const POLICY_BASED = 7; - - private static $valueToName = [ - self::ROUTE_TYPE_UNSPECIFIED => 'ROUTE_TYPE_UNSPECIFIED', - self::SUBNET => 'SUBNET', - self::PBSTATIC => 'STATIC', - self::DYNAMIC => 'DYNAMIC', - self::PEERING_SUBNET => 'PEERING_SUBNET', - self::PEERING_STATIC => 'PEERING_STATIC', - self::PEERING_DYNAMIC => 'PEERING_DYNAMIC', - self::POLICY_BASED => 'POLICY_BASED', - ]; - - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteType::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_RouteType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php deleted file mode 100644 index 102c1413dabe..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php +++ /dev/null @@ -1,980 +0,0 @@ -google.cloud.networkmanagement.v1.Step - */ -class Step extends \Google\Protobuf\Internal\Message -{ - /** - * A description of the step. Usually this is a summary of the state. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - /** - * Each step is in one of the pre-defined states. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; - */ - protected $state = 0; - /** - * This is a step that leads to the final state Drop. - * - * Generated from protobuf field bool causes_drop = 3; - */ - protected $causes_drop = false; - /** - * Project ID that contains the configuration this step is validating. - * - * Generated from protobuf field string project_id = 4; - */ - protected $project_id = ''; - protected $step_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $description - * A description of the step. Usually this is a summary of the state. - * @type int $state - * Each step is in one of the pre-defined states. - * @type bool $causes_drop - * This is a step that leads to the final state Drop. - * @type string $project_id - * Project ID that contains the configuration this step is validating. - * @type \Google\Cloud\NetworkManagement\V1\InstanceInfo $instance - * Display information of a Compute Engine instance. - * @type \Google\Cloud\NetworkManagement\V1\FirewallInfo $firewall - * Display information of a Compute Engine firewall rule. - * @type \Google\Cloud\NetworkManagement\V1\RouteInfo $route - * Display information of a Compute Engine route. - * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint - * Display information of the source and destination under analysis. - * 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 - * Display information of a Compute Engine VPN gateway. - * @type \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo $vpn_tunnel - * Display information of a Compute Engine VPN tunnel. - * @type \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo $vpc_connector - * Display information of a VPC connector. - * @type \Google\Cloud\NetworkManagement\V1\DeliverInfo $deliver - * Display information of the final state "deliver" and reason. - * @type \Google\Cloud\NetworkManagement\V1\ForwardInfo $forward - * Display information of the final state "forward" and reason. - * @type \Google\Cloud\NetworkManagement\V1\AbortInfo $abort - * Display information of the final state "abort" and reason. - * @type \Google\Cloud\NetworkManagement\V1\DropInfo $drop - * Display information of the final state "drop" and reason. - * @type \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $load_balancer - * Display information of the load balancers. - * @type \Google\Cloud\NetworkManagement\V1\NetworkInfo $network - * Display information of a Google Cloud network. - * @type \Google\Cloud\NetworkManagement\V1\GKEMasterInfo $gke_master - * Display information of a Google Kubernetes Engine cluster master. - * @type \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo $cloud_sql_instance - * Display information of a Cloud SQL instance. - * @type \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo $cloud_function - * Display information of a Cloud Function. - * @type \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo $app_engine_version - * Display information of an App Engine service version. - * @type \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo $cloud_run_revision - * Display information of a Cloud Run revision. - * @type \Google\Cloud\NetworkManagement\V1\NatInfo $nat - * Display information of a NAT. - * @type \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo $proxy_connection - * Display information of a ProxyConnection. - * @type \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo $load_balancer_backend_info - * Display information of a specific load balancer backend. - * @type \Google\Cloud\NetworkManagement\V1\StorageBucketInfo $storage_bucket - * Display information of a Storage Bucket. Used only for return traces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * A description of the step. Usually this is a summary of the state. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the step. Usually this is a summary of the state. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Each step is in one of the pre-defined states. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Each step is in one of the pre-defined states. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Step\State::class); - $this->state = $var; - - return $this; - } - - /** - * This is a step that leads to the final state Drop. - * - * Generated from protobuf field bool causes_drop = 3; - * @return bool - */ - public function getCausesDrop() - { - return $this->causes_drop; - } - - /** - * This is a step that leads to the final state Drop. - * - * Generated from protobuf field bool causes_drop = 3; - * @param bool $var - * @return $this - */ - public function setCausesDrop($var) - { - GPBUtil::checkBool($var); - $this->causes_drop = $var; - - return $this; - } - - /** - * Project ID that contains the configuration this step is validating. - * - * Generated from protobuf field string project_id = 4; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project ID that contains the configuration this step is validating. - * - * Generated from protobuf field string project_id = 4; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Display information of a Compute Engine instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; - * @return \Google\Cloud\NetworkManagement\V1\InstanceInfo|null - */ - public function getInstance() - { - return $this->readOneof(5); - } - - public function hasInstance() - { - return $this->hasOneof(5); - } - - /** - * Display information of a Compute Engine instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; - * @param \Google\Cloud\NetworkManagement\V1\InstanceInfo $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\InstanceInfo::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Display information of a Compute Engine firewall rule. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; - * @return \Google\Cloud\NetworkManagement\V1\FirewallInfo|null - */ - public function getFirewall() - { - return $this->readOneof(6); - } - - public function hasFirewall() - { - return $this->hasOneof(6); - } - - /** - * Display information of a Compute Engine firewall rule. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; - * @param \Google\Cloud\NetworkManagement\V1\FirewallInfo $var - * @return $this - */ - public function setFirewall($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\FirewallInfo::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Display information of a Compute Engine route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo route = 7; - * @return \Google\Cloud\NetworkManagement\V1\RouteInfo|null - */ - public function getRoute() - { - return $this->readOneof(7); - } - - public function hasRoute() - { - return $this->hasOneof(7); - } - - /** - * Display information of a Compute Engine route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo route = 7; - * @param \Google\Cloud\NetworkManagement\V1\RouteInfo $var - * @return $this - */ - public function setRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\RouteInfo::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Display information of the source and destination under analysis. - * 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. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; - * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null - */ - public function getEndpoint() - { - return $this->readOneof(8); - } - - public function hasEndpoint() - { - return $this->hasOneof(8); - } - - /** - * Display information of the source and destination under analysis. - * 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. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; - * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); - $this->writeOneof(8, $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. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; - * @return \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo|null - */ - public function getForwardingRule() - { - return $this->readOneof(9); - } - - public function hasForwardingRule() - { - return $this->hasOneof(9); - } - - /** - * Display information of a Compute Engine forwarding rule. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; - * @param \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo $var - * @return $this - */ - public function setForwardingRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Display information of a Compute Engine VPN gateway. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; - * @return \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo|null - */ - public function getVpnGateway() - { - return $this->readOneof(10); - } - - public function hasVpnGateway() - { - return $this->hasOneof(10); - } - - /** - * Display information of a Compute Engine VPN gateway. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; - * @param \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo $var - * @return $this - */ - public function setVpnGateway($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Display information of a Compute Engine VPN tunnel. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; - * @return \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo|null - */ - public function getVpnTunnel() - { - return $this->readOneof(11); - } - - public function hasVpnTunnel() - { - return $this->hasOneof(11); - } - - /** - * Display information of a Compute Engine VPN tunnel. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; - * @param \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo $var - * @return $this - */ - public function setVpnTunnel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Display information of a VPC connector. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; - * @return \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo|null - */ - public function getVpcConnector() - { - return $this->readOneof(21); - } - - public function hasVpcConnector() - { - return $this->hasOneof(21); - } - - /** - * Display information of a VPC connector. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; - * @param \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo $var - * @return $this - */ - public function setVpcConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Display information of the final state "deliver" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; - * @return \Google\Cloud\NetworkManagement\V1\DeliverInfo|null - */ - public function getDeliver() - { - return $this->readOneof(12); - } - - public function hasDeliver() - { - return $this->hasOneof(12); - } - - /** - * Display information of the final state "deliver" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; - * @param \Google\Cloud\NetworkManagement\V1\DeliverInfo $var - * @return $this - */ - public function setDeliver($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\DeliverInfo::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Display information of the final state "forward" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; - * @return \Google\Cloud\NetworkManagement\V1\ForwardInfo|null - */ - public function getForward() - { - return $this->readOneof(13); - } - - public function hasForward() - { - return $this->hasOneof(13); - } - - /** - * Display information of the final state "forward" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; - * @param \Google\Cloud\NetworkManagement\V1\ForwardInfo $var - * @return $this - */ - public function setForward($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ForwardInfo::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Display information of the final state "abort" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo abort = 14; - * @return \Google\Cloud\NetworkManagement\V1\AbortInfo|null - */ - public function getAbort() - { - return $this->readOneof(14); - } - - public function hasAbort() - { - return $this->hasOneof(14); - } - - /** - * Display information of the final state "abort" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo abort = 14; - * @param \Google\Cloud\NetworkManagement\V1\AbortInfo $var - * @return $this - */ - public function setAbort($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\AbortInfo::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Display information of the final state "drop" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo drop = 15; - * @return \Google\Cloud\NetworkManagement\V1\DropInfo|null - */ - public function getDrop() - { - return $this->readOneof(15); - } - - public function hasDrop() - { - return $this->hasOneof(15); - } - - /** - * Display information of the final state "drop" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo drop = 15; - * @param \Google\Cloud\NetworkManagement\V1\DropInfo $var - * @return $this - */ - public function setDrop($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\DropInfo::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Display information of the load balancers. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; - * @return \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo|null - */ - public function getLoadBalancer() - { - return $this->readOneof(16); - } - - public function hasLoadBalancer() - { - return $this->hasOneof(16); - } - - /** - * Display information of the load balancers. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; - * @param \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $var - * @return $this - */ - public function setLoadBalancer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Display information of a Google Cloud network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NetworkInfo network = 17; - * @return \Google\Cloud\NetworkManagement\V1\NetworkInfo|null - */ - public function getNetwork() - { - return $this->readOneof(17); - } - - public function hasNetwork() - { - return $this->hasOneof(17); - } - - /** - * Display information of a Google Cloud network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NetworkInfo network = 17; - * @param \Google\Cloud\NetworkManagement\V1\NetworkInfo $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\NetworkInfo::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Display information of a Google Kubernetes Engine cluster master. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; - * @return \Google\Cloud\NetworkManagement\V1\GKEMasterInfo|null - */ - public function getGkeMaster() - { - return $this->readOneof(18); - } - - public function hasGkeMaster() - { - return $this->hasOneof(18); - } - - /** - * Display information of a Google Kubernetes Engine cluster master. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; - * @param \Google\Cloud\NetworkManagement\V1\GKEMasterInfo $var - * @return $this - */ - public function setGkeMaster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\GKEMasterInfo::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Display information of a Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; - * @return \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo|null - */ - public function getCloudSqlInstance() - { - return $this->readOneof(19); - } - - public function hasCloudSqlInstance() - { - return $this->hasOneof(19); - } - - /** - * Display information of a Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; - * @param \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo $var - * @return $this - */ - public function setCloudSqlInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * Display information of a Cloud Function. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; - * @return \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo|null - */ - public function getCloudFunction() - { - return $this->readOneof(20); - } - - public function hasCloudFunction() - { - return $this->hasOneof(20); - } - - /** - * Display information of a Cloud Function. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; - * @param \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo $var - * @return $this - */ - public function setCloudFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Display information of an App Engine service version. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; - * @return \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo|null - */ - public function getAppEngineVersion() - { - return $this->readOneof(22); - } - - public function hasAppEngineVersion() - { - return $this->hasOneof(22); - } - - /** - * Display information of an App Engine service version. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; - * @param \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo $var - * @return $this - */ - public function setAppEngineVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Display information of a Cloud Run revision. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; - * @return \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo|null - */ - public function getCloudRunRevision() - { - return $this->readOneof(23); - } - - public function hasCloudRunRevision() - { - return $this->hasOneof(23); - } - - /** - * Display information of a Cloud Run revision. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; - * @param \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo $var - * @return $this - */ - public function setCloudRunRevision($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * Display information of a NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo nat = 25; - * @return \Google\Cloud\NetworkManagement\V1\NatInfo|null - */ - public function getNat() - { - return $this->readOneof(25); - } - - public function hasNat() - { - return $this->hasOneof(25); - } - - /** - * Display information of a NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo nat = 25; - * @param \Google\Cloud\NetworkManagement\V1\NatInfo $var - * @return $this - */ - public function setNat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\NatInfo::class); - $this->writeOneof(25, $var); - - return $this; - } - - /** - * Display information of a ProxyConnection. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProxyConnectionInfo proxy_connection = 26; - * @return \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo|null - */ - public function getProxyConnection() - { - return $this->readOneof(26); - } - - public function hasProxyConnection() - { - return $this->hasOneof(26); - } - - /** - * Display information of a ProxyConnection. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProxyConnectionInfo proxy_connection = 26; - * @param \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo $var - * @return $this - */ - public function setProxyConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo::class); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * Display information of a specific load balancer backend. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo load_balancer_backend_info = 27; - * @return \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo|null - */ - public function getLoadBalancerBackendInfo() - { - return $this->readOneof(27); - } - - public function hasLoadBalancerBackendInfo() - { - return $this->hasOneof(27); - } - - /** - * Display information of a specific load balancer backend. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo load_balancer_backend_info = 27; - * @param \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo $var - * @return $this - */ - public function setLoadBalancerBackendInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo::class); - $this->writeOneof(27, $var); - - return $this; - } - - /** - * Display information of a Storage Bucket. Used only for return traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.StorageBucketInfo storage_bucket = 28; - * @return \Google\Cloud\NetworkManagement\V1\StorageBucketInfo|null - */ - public function getStorageBucket() - { - return $this->readOneof(28); - } - - public function hasStorageBucket() - { - return $this->hasOneof(28); - } - - /** - * Display information of a Storage Bucket. Used only for return traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.StorageBucketInfo storage_bucket = 28; - * @param \Google\Cloud\NetworkManagement\V1\StorageBucketInfo $var - * @return $this - */ - public function setStorageBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\StorageBucketInfo::class); - $this->writeOneof(28, $var); - - return $this; - } - - /** - * @return string - */ - public function getStepInfo() - { - return $this->whichOneof("step_info"); - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php deleted file mode 100644 index aa3d74cdb17c..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php +++ /dev/null @@ -1,264 +0,0 @@ -google.cloud.networkmanagement.v1.Step.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Initial state: packet originating from a Compute Engine instance. - * An InstanceInfo is populated with starting instance information. - * - * Generated from protobuf enum START_FROM_INSTANCE = 1; - */ - const START_FROM_INSTANCE = 1; - /** - * Initial state: packet originating from the internet. - * The endpoint information is populated. - * - * 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. - * If the source is a VPC network visible to the user, a NetworkInfo - * is populated with details of the network. - * - * Generated from protobuf enum START_FROM_PRIVATE_NETWORK = 3; - */ - const START_FROM_PRIVATE_NETWORK = 3; - /** - * Initial state: packet originating from a Google Kubernetes Engine cluster - * master. A GKEMasterInfo is populated with starting instance information. - * - * Generated from protobuf enum START_FROM_GKE_MASTER = 21; - */ - const START_FROM_GKE_MASTER = 21; - /** - * Initial state: packet originating from a Cloud SQL instance. - * A CloudSQLInstanceInfo is populated with starting instance information. - * - * Generated from protobuf enum START_FROM_CLOUD_SQL_INSTANCE = 22; - */ - const START_FROM_CLOUD_SQL_INSTANCE = 22; - /** - * Initial state: packet originating from a Cloud Function. - * A CloudFunctionInfo is populated with starting function information. - * - * Generated from protobuf enum START_FROM_CLOUD_FUNCTION = 23; - */ - const START_FROM_CLOUD_FUNCTION = 23; - /** - * Initial state: packet originating from an App Engine service version. - * An AppEngineVersionInfo is populated with starting version information. - * - * Generated from protobuf enum START_FROM_APP_ENGINE_VERSION = 25; - */ - const START_FROM_APP_ENGINE_VERSION = 25; - /** - * Initial state: packet originating from a Cloud Run revision. - * A CloudRunRevisionInfo is populated with starting revision information. - * - * Generated from protobuf enum START_FROM_CLOUD_RUN_REVISION = 26; - */ - const START_FROM_CLOUD_RUN_REVISION = 26; - /** - * Config checking state: verify ingress firewall rule. - * - * Generated from protobuf enum APPLY_INGRESS_FIREWALL_RULE = 4; - */ - const APPLY_INGRESS_FIREWALL_RULE = 4; - /** - * Config checking state: verify egress firewall rule. - * - * Generated from protobuf enum APPLY_EGRESS_FIREWALL_RULE = 5; - */ - const APPLY_EGRESS_FIREWALL_RULE = 5; - /** - * Config checking state: verify route. - * - * Generated from protobuf enum APPLY_ROUTE = 6; - */ - const APPLY_ROUTE = 6; - /** - * Config checking state: match forwarding rule. - * - * Generated from protobuf enum APPLY_FORWARDING_RULE = 7; - */ - const APPLY_FORWARDING_RULE = 7; - /** - * Config checking state: verify load balancer backend configuration. - * - * Generated from protobuf enum ANALYZE_LOAD_BALANCER_BACKEND = 28; - */ - const ANALYZE_LOAD_BALANCER_BACKEND = 28; - /** - * Config checking state: packet sent or received under foreign IP - * address and allowed. - * - * Generated from protobuf enum SPOOFING_APPROVED = 8; - */ - const SPOOFING_APPROVED = 8; - /** - * Forwarding state: arriving at a Compute Engine instance. - * - * Generated from protobuf enum ARRIVE_AT_INSTANCE = 9; - */ - const ARRIVE_AT_INSTANCE = 9; - /** - * Forwarding state: arriving at a Compute Engine internal load balancer. - * - * Generated from protobuf enum ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; - */ - const ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; - /** - * Forwarding state: arriving at a Compute Engine external load balancer. - * - * Generated from protobuf enum ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; - */ - const ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; - /** - * Forwarding state: arriving at a Cloud VPN gateway. - * - * Generated from protobuf enum ARRIVE_AT_VPN_GATEWAY = 12; - */ - const ARRIVE_AT_VPN_GATEWAY = 12; - /** - * Forwarding state: arriving at a Cloud VPN tunnel. - * - * Generated from protobuf enum ARRIVE_AT_VPN_TUNNEL = 13; - */ - const ARRIVE_AT_VPN_TUNNEL = 13; - /** - * Forwarding state: arriving at a VPC connector. - * - * Generated from protobuf enum ARRIVE_AT_VPC_CONNECTOR = 24; - */ - const ARRIVE_AT_VPC_CONNECTOR = 24; - /** - * Transition state: packet header translated. - * - * Generated from protobuf enum NAT = 14; - */ - const NAT = 14; - /** - * Transition state: original connection is terminated and a new proxied - * connection is initiated. - * - * Generated from protobuf enum PROXY_CONNECTION = 15; - */ - const PROXY_CONNECTION = 15; - /** - * Final state: packet could be delivered. - * - * Generated from protobuf enum DELIVER = 16; - */ - const DELIVER = 16; - /** - * Final state: packet could be dropped. - * - * Generated from protobuf enum DROP = 17; - */ - const DROP = 17; - /** - * Final state: packet could be forwarded to a network with an unknown - * configuration. - * - * Generated from protobuf enum FORWARD = 18; - */ - const FORWARD = 18; - /** - * Final state: analysis is aborted. - * - * Generated from protobuf enum ABORT = 19; - */ - const ABORT = 19; - /** - * Special state: viewer of the test result does not have permission to - * see the configuration in this step. - * - * Generated from protobuf enum VIEWER_PERMISSION_MISSING = 20; - */ - const VIEWER_PERMISSION_MISSING = 20; - - private static $valueToName = [ - 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', - self::START_FROM_CLOUD_FUNCTION => 'START_FROM_CLOUD_FUNCTION', - self::START_FROM_APP_ENGINE_VERSION => 'START_FROM_APP_ENGINE_VERSION', - self::START_FROM_CLOUD_RUN_REVISION => 'START_FROM_CLOUD_RUN_REVISION', - self::APPLY_INGRESS_FIREWALL_RULE => 'APPLY_INGRESS_FIREWALL_RULE', - self::APPLY_EGRESS_FIREWALL_RULE => 'APPLY_EGRESS_FIREWALL_RULE', - self::APPLY_ROUTE => 'APPLY_ROUTE', - self::APPLY_FORWARDING_RULE => 'APPLY_FORWARDING_RULE', - self::ANALYZE_LOAD_BALANCER_BACKEND => 'ANALYZE_LOAD_BALANCER_BACKEND', - self::SPOOFING_APPROVED => 'SPOOFING_APPROVED', - self::ARRIVE_AT_INSTANCE => 'ARRIVE_AT_INSTANCE', - self::ARRIVE_AT_INTERNAL_LOAD_BALANCER => 'ARRIVE_AT_INTERNAL_LOAD_BALANCER', - self::ARRIVE_AT_EXTERNAL_LOAD_BALANCER => 'ARRIVE_AT_EXTERNAL_LOAD_BALANCER', - self::ARRIVE_AT_VPN_GATEWAY => 'ARRIVE_AT_VPN_GATEWAY', - self::ARRIVE_AT_VPN_TUNNEL => 'ARRIVE_AT_VPN_TUNNEL', - self::ARRIVE_AT_VPC_CONNECTOR => 'ARRIVE_AT_VPC_CONNECTOR', - self::NAT => 'NAT', - self::PROXY_CONNECTION => 'PROXY_CONNECTION', - self::DELIVER => 'DELIVER', - self::DROP => 'DROP', - self::FORWARD => 'FORWARD', - self::ABORT => 'ABORT', - self::VIEWER_PERMISSION_MISSING => 'VIEWER_PERMISSION_MISSING', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetworkManagement\V1\Step_State::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php deleted file mode 100644 index 58b34cf98567..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.networkmanagement.v1.StorageBucketInfo - */ -class StorageBucketInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - */ - protected $bucket = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Cloud Storage Bucket name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php deleted file mode 100644 index 5b002795c2a7..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.networkmanagement.v1.Trace - */ -class Trace extends \Google\Protobuf\Internal\Message -{ - /** - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; - */ - protected $endpoint_info = null; - /** - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; - */ - private $steps; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint_info - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * @type array<\Google\Cloud\NetworkManagement\V1\Step>|\Google\Protobuf\Internal\RepeatedField $steps - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; - * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null - */ - public function getEndpointInfo() - { - return $this->endpoint_info; - } - - public function hasEndpointInfo() - { - return isset($this->endpoint_info); - } - - public function clearEndpointInfo() - { - unset($this->endpoint_info); - } - - /** - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; - * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var - * @return $this - */ - public function setEndpointInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); - $this->endpoint_info = $var; - - return $this; - } - - /** - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; - * @param array<\Google\Cloud\NetworkManagement\V1\Step>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\Step::class); - $this->steps = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php deleted file mode 100644 index 095a3a882e67..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - */ -class UpdateConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - - /** - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource Required. Only fields specified in update_mask are updated. - * - * @return \Google\Cloud\NetworkManagement\V1\UpdateConnectivityTestRequest - * - * @experimental - */ - public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource): self - { - return (new self()) - ->setUpdateMask($updateMask) - ->setResource($resource); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @type \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource - * Required. Only fields specified in update_mask are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); - $this->resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php deleted file mode 100644 index c96a59d85686..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.VpcConnectorInfo - */ -class VpcConnectorInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a VPC connector. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a VPC connector. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Location in which the VPC connector is deployed. - * - * Generated from protobuf field string location = 3; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a VPC connector. - * @type string $uri - * URI of a VPC connector. - * @type string $location - * Location in which the VPC connector is deployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a VPC connector. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a VPC connector. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a VPC connector. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a VPC connector. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Location in which the VPC connector is deployed. - * - * Generated from protobuf field string location = 3; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location in which the VPC connector is deployed. - * - * Generated from protobuf field string location = 3; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php deleted file mode 100644 index 61f964197e52..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.networkmanagement.v1.VpnGatewayInfo - */ -class VpnGatewayInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a VPN gateway. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a VPN gateway. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of a Compute Engine network where the VPN gateway is configured. - * - * Generated from protobuf field string network_uri = 3; - */ - protected $network_uri = ''; - /** - * IP address of the VPN gateway. - * - * Generated from protobuf field string ip_address = 4; - */ - protected $ip_address = ''; - /** - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * - * Generated from protobuf field string vpn_tunnel_uri = 5; - */ - protected $vpn_tunnel_uri = ''; - /** - * Name of a Google Cloud region where this VPN gateway is configured. - * - * Generated from protobuf field string region = 6; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a VPN gateway. - * @type string $uri - * URI of a VPN gateway. - * @type string $network_uri - * URI of a Compute Engine network where the VPN gateway is configured. - * @type string $ip_address - * IP address of the VPN gateway. - * @type string $vpn_tunnel_uri - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * @type string $region - * Name of a Google Cloud region where this VPN gateway is configured. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a VPN gateway. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a VPN gateway. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a VPN gateway. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a VPN gateway. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of a Compute Engine network where the VPN gateway is configured. - * - * Generated from protobuf field string network_uri = 3; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network where the VPN gateway is configured. - * - * Generated from protobuf field string network_uri = 3; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * IP address of the VPN gateway. - * - * Generated from protobuf field string ip_address = 4; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address of the VPN gateway. - * - * Generated from protobuf field string ip_address = 4; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * - * Generated from protobuf field string vpn_tunnel_uri = 5; - * @return string - */ - public function getVpnTunnelUri() - { - return $this->vpn_tunnel_uri; - } - - /** - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * - * Generated from protobuf field string vpn_tunnel_uri = 5; - * @param string $var - * @return $this - */ - public function setVpnTunnelUri($var) - { - GPBUtil::checkString($var, True); - $this->vpn_tunnel_uri = $var; - - return $this; - } - - /** - * Name of a Google Cloud region where this VPN gateway is configured. - * - * Generated from protobuf field string region = 6; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Name of a Google Cloud region where this VPN gateway is configured. - * - * Generated from protobuf field string region = 6; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php deleted file mode 100644 index 8785392491d0..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.networkmanagement.v1.VpnTunnelInfo - */ -class VpnTunnelInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a VPN tunnel. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a VPN tunnel. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of the VPN gateway at local end of the tunnel. - * - * Generated from protobuf field string source_gateway = 3; - */ - protected $source_gateway = ''; - /** - * URI of a VPN gateway at remote end of the tunnel. - * - * Generated from protobuf field string remote_gateway = 4; - */ - protected $remote_gateway = ''; - /** - * Remote VPN gateway's IP address. - * - * Generated from protobuf field string remote_gateway_ip = 5; - */ - protected $remote_gateway_ip = ''; - /** - * Local VPN gateway's IP address. - * - * Generated from protobuf field string source_gateway_ip = 6; - */ - protected $source_gateway_ip = ''; - /** - * URI of a Compute Engine network where the VPN tunnel is configured. - * - * Generated from protobuf field string network_uri = 7; - */ - protected $network_uri = ''; - /** - * Name of a Google Cloud region where this VPN tunnel is configured. - * - * Generated from protobuf field string region = 8; - */ - protected $region = ''; - /** - * Type of the routing policy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; - */ - protected $routing_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a VPN tunnel. - * @type string $uri - * URI of a VPN tunnel. - * @type string $source_gateway - * URI of the VPN gateway at local end of the tunnel. - * @type string $remote_gateway - * URI of a VPN gateway at remote end of the tunnel. - * @type string $remote_gateway_ip - * Remote VPN gateway's IP address. - * @type string $source_gateway_ip - * Local VPN gateway's IP address. - * @type string $network_uri - * URI of a Compute Engine network where the VPN tunnel is configured. - * @type string $region - * Name of a Google Cloud region where this VPN tunnel is configured. - * @type int $routing_type - * Type of the routing policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a VPN tunnel. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a VPN tunnel. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a VPN tunnel. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a VPN tunnel. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of the VPN gateway at local end of the tunnel. - * - * Generated from protobuf field string source_gateway = 3; - * @return string - */ - public function getSourceGateway() - { - return $this->source_gateway; - } - - /** - * URI of the VPN gateway at local end of the tunnel. - * - * Generated from protobuf field string source_gateway = 3; - * @param string $var - * @return $this - */ - public function setSourceGateway($var) - { - GPBUtil::checkString($var, True); - $this->source_gateway = $var; - - return $this; - } - - /** - * URI of a VPN gateway at remote end of the tunnel. - * - * Generated from protobuf field string remote_gateway = 4; - * @return string - */ - public function getRemoteGateway() - { - return $this->remote_gateway; - } - - /** - * URI of a VPN gateway at remote end of the tunnel. - * - * Generated from protobuf field string remote_gateway = 4; - * @param string $var - * @return $this - */ - public function setRemoteGateway($var) - { - GPBUtil::checkString($var, True); - $this->remote_gateway = $var; - - return $this; - } - - /** - * Remote VPN gateway's IP address. - * - * Generated from protobuf field string remote_gateway_ip = 5; - * @return string - */ - public function getRemoteGatewayIp() - { - return $this->remote_gateway_ip; - } - - /** - * Remote VPN gateway's IP address. - * - * Generated from protobuf field string remote_gateway_ip = 5; - * @param string $var - * @return $this - */ - public function setRemoteGatewayIp($var) - { - GPBUtil::checkString($var, True); - $this->remote_gateway_ip = $var; - - return $this; - } - - /** - * Local VPN gateway's IP address. - * - * Generated from protobuf field string source_gateway_ip = 6; - * @return string - */ - public function getSourceGatewayIp() - { - return $this->source_gateway_ip; - } - - /** - * Local VPN gateway's IP address. - * - * Generated from protobuf field string source_gateway_ip = 6; - * @param string $var - * @return $this - */ - public function setSourceGatewayIp($var) - { - GPBUtil::checkString($var, True); - $this->source_gateway_ip = $var; - - return $this; - } - - /** - * URI of a Compute Engine network where the VPN tunnel is configured. - * - * Generated from protobuf field string network_uri = 7; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network where the VPN tunnel is configured. - * - * Generated from protobuf field string network_uri = 7; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Name of a Google Cloud region where this VPN tunnel is configured. - * - * Generated from protobuf field string region = 8; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Name of a Google Cloud region where this VPN tunnel is configured. - * - * Generated from protobuf field string region = 8; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Type of the routing policy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; - * @return int - */ - public function getRoutingType() - { - return $this->routing_type; - } - - /** - * Type of the routing policy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; - * @param int $var - * @return $this - */ - public function setRoutingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo\RoutingType::class); - $this->routing_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php deleted file mode 100644 index 2550fd4408aa..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType - */ -class RoutingType -{ - /** - * Unspecified type. Default value. - * - * Generated from protobuf enum ROUTING_TYPE_UNSPECIFIED = 0; - */ - const ROUTING_TYPE_UNSPECIFIED = 0; - /** - * Route based VPN. - * - * Generated from protobuf enum ROUTE_BASED = 1; - */ - const ROUTE_BASED = 1; - /** - * Policy based routing. - * - * Generated from protobuf enum POLICY_BASED = 2; - */ - const POLICY_BASED = 2; - /** - * Dynamic (BGP) routing. - * - * Generated from protobuf enum DYNAMIC = 3; - */ - const DYNAMIC = 3; - - private static $valueToName = [ - self::ROUTING_TYPE_UNSPECIFIED => 'ROUTING_TYPE_UNSPECIFIED', - self::ROUTE_BASED => 'ROUTE_BASED', - self::POLICY_BASED => 'POLICY_BASED', - self::DYNAMIC => 'DYNAMIC', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RoutingType::class, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo_RoutingType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php deleted file mode 100644 index 43907391a04e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php +++ /dev/null @@ -1,119 +0,0 @@ -AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * @param string $parent The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @param string $testId The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param string $resourceName Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` - */ -function create_connectivity_test_sample( - string $parent, - string $testId, - string $resourceName -): void { - // Create a client. - $reachabilityServiceClient = new ReachabilityServiceClient(); - - // Prepare the request message. - $resourceSource = new Endpoint(); - $resourceDestination = new Endpoint(); - $resource = (new ConnectivityTest()) - ->setName($resourceName) - ->setSource($resourceSource) - ->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($parent) - ->setTestId($testId) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->createConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectivityTest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $testId = '[TEST_ID]'; - $resourceName = '[NAME]'; - - create_connectivity_test_sample($parent, $testId, $resourceName); -} -// [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php deleted file mode 100644 index 6fe17e4914aa..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->deleteConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - delete_connectivity_test_sample($name); -} -// [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php deleted file mode 100644 index 543f50a7d02d..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var ConnectivityTest $response */ - $response = $reachabilityServiceClient->getConnectivityTest($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - get_connectivity_test_sample($name); -} -// [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php deleted file mode 100644 index e4226170ac96..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $reachabilityServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networkmanagement_v1_generated_ReachabilityService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php deleted file mode 100644 index e594c2cfd061..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkmanagement_v1_generated_ReachabilityService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php deleted file mode 100644 index e86ea79887cd..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reachabilityServiceClient->listConnectivityTests($request); - - /** @var ConnectivityTest $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_connectivity_tests_sample($parent); -} -// [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php deleted file mode 100644 index e91b67957674..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkmanagement_v1_generated_ReachabilityService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php deleted file mode 100644 index dd6b468b3962..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->rerunConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectivityTest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - rerun_connectivity_test_sample($name); -} -// [END networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php deleted file mode 100644 index 8a0d67908524..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $reachabilityServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networkmanagement_v1_generated_ReachabilityService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php deleted file mode 100644 index 000a79d492e0..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $reachabilityServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networkmanagement_v1_generated_ReachabilityService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php deleted file mode 100644 index 9ba76af5f474..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php +++ /dev/null @@ -1,106 +0,0 @@ -UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for for more details. - * - * @param string $resourceName Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` - */ -function update_connectivity_test_sample(string $resourceName): void -{ - // Create a client. - $reachabilityServiceClient = new ReachabilityServiceClient(); - - // Prepare the request message. - $updateMask = new FieldMask(); - $resourceSource = new Endpoint(); - $resourceDestination = new Endpoint(); - $resource = (new ConnectivityTest()) - ->setName($resourceName) - ->setSource($resourceSource) - ->setDestination($resourceDestination); - $request = (new UpdateConnectivityTestRequest()) - ->setUpdateMask($updateMask) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->updateConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectivityTest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resourceName = '[NAME]'; - - update_connectivity_test_sample($resourceName); -} -// [END networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php b/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php deleted file mode 100644 index 346820fb5219..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php +++ /dev/null @@ -1,617 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/reachability_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/reachability_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/reachability_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/reachability_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * connectivity_test resource. - * - * @param string $project - * @param string $test - * - * @return string The formatted connectivity_test resource. - */ - public static function connectivityTestName(string $project, string $test): string - { - return self::getPathTemplate('connectivityTest')->render([ - 'project' => $project, - 'test' => $test, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connectivityTest: projects/{project}/locations/global/connectivityTests/{test} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networkmanagement.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Connectivity Test. - * After you create a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, containing non-existent resources in the network, or you - * don't have read permissions to the network configurations of listed - * projects), then the reachability result returns a value of `UNKNOWN`. - * - * If the endpoint specifications in `ConnectivityTest` are - * incomplete, the reachability result returns a value of - * AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * The async variant is - * {@see ReachabilityServiceClient::createConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/create_connectivity_test.php - * - * @param CreateConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createConnectivityTest(CreateConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific `ConnectivityTest`. - * - * The async variant is - * {@see ReachabilityServiceClient::deleteConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/delete_connectivity_test.php - * - * @param DeleteConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteConnectivityTest(DeleteConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a specific Connectivity Test. - * - * The async variant is - * {@see ReachabilityServiceClient::getConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/get_connectivity_test.php - * - * @param GetConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ConnectivityTest - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConnectivityTest(GetConnectivityTestRequest $request, array $callOptions = []): ConnectivityTest - { - return $this->startApiCall('GetConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Lists all Connectivity Tests owned by a project. - * - * The async variant is - * {@see ReachabilityServiceClient::listConnectivityTestsAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/list_connectivity_tests.php - * - * @param ListConnectivityTestsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listConnectivityTests(ListConnectivityTestsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConnectivityTests', $request, $callOptions); - } - - /** - * Rerun an existing `ConnectivityTest`. - * After the user triggers the rerun, the reachability analysis is performed - * as part of the long running operation, which completes when the analysis - * completes. - * - * Even though the test configuration remains the same, the reachability - * result may change due to underlying network configuration changes. - * - * If the endpoint specifications in `ConnectivityTest` become invalid (for - * example, specified resources are deleted in the network, or you lost - * read permissions to the network configurations of listed projects), then - * the reachability result returns a value of `UNKNOWN`. - * - * The async variant is - * {@see ReachabilityServiceClient::rerunConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php - * - * @param RerunConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rerunConnectivityTest(RerunConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RerunConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Updates the configuration of an existing `ConnectivityTest`. - * After you update a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * The Reachability state in the test resource is updated with the new result. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, they contain non-existent resources in the network, or the - * user does not have read permissions to the network configurations of - * listed projects), then the reachability result returns a value of - * UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for for more details. - * - * The async variant is - * {@see ReachabilityServiceClient::updateConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/update_connectivity_test.php - * - * @param UpdateConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateConnectivityTest(UpdateConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ReachabilityServiceClient::getLocationAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ReachabilityServiceClient::listLocationsAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see ReachabilityServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see ReachabilityServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see ReachabilityServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/ReachabilityServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/Gapic/ReachabilityServiceGapicClient.php b/owl-bot-staging/NetworkManagement/v1/src/V1/Gapic/ReachabilityServiceGapicClient.php deleted file mode 100644 index d1bcbd8a0172..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/Gapic/ReachabilityServiceGapicClient.php +++ /dev/null @@ -1,1064 +0,0 @@ -createConnectivityTest($parent, $testId, $resource); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $reachabilityServiceClient->createConnectivityTest($parent, $testId, $resource); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $reachabilityServiceClient->resumeOperation($operationName, 'createConnectivityTest'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\NetworkManagement\V1\Client\ReachabilityServiceClient}. - */ -class ReachabilityServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.networkmanagement.v1.ReachabilityService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'networkmanagement.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networkmanagement.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static $connectivityTestNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/reachability_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/reachability_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/reachability_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/reachability_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getConnectivityTestNameTemplate() - { - if (self::$connectivityTestNameTemplate == null) { - self::$connectivityTestNameTemplate = new PathTemplate('projects/{project}/locations/global/connectivityTests/{test}'); - } - - return self::$connectivityTestNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'connectivityTest' => self::getConnectivityTestNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * connectivity_test resource. - * - * @param string $project - * @param string $test - * - * @return string The formatted connectivity_test resource. - */ - public static function connectivityTestName($project, $test) - { - return self::getConnectivityTestNameTemplate()->render([ - 'project' => $project, - 'test' => $test, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connectivityTest: projects/{project}/locations/global/connectivityTests/{test} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networkmanagement.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates a new Connectivity Test. - * After you create a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, containing non-existent resources in the network, or you - * don't have read permissions to the network configurations of listed - * projects), then the reachability result returns a value of `UNKNOWN`. - * - * If the endpoint specifications in `ConnectivityTest` are - * incomplete, the reachability result returns a value of - * AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $parent = 'parent'; - * $testId = 'test_id'; - * $resource = new ConnectivityTest(); - * $operationResponse = $reachabilityServiceClient->createConnectivityTest($parent, $testId, $resource); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $reachabilityServiceClient->createConnectivityTest($parent, $testId, $resource); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $reachabilityServiceClient->resumeOperation($operationName, 'createConnectivityTest'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @param string $testId Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param ConnectivityTest $resource Required. A `ConnectivityTest` resource - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createConnectivityTest($parent, $testId, $resource, array $optionalArgs = []) - { - $request = new CreateConnectivityTestRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTestId($testId); - $request->setResource($resource); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateConnectivityTest', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a specific `ConnectivityTest`. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $name = 'name'; - * $operationResponse = $reachabilityServiceClient->deleteConnectivityTest($name); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $reachabilityServiceClient->deleteConnectivityTest($name); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $reachabilityServiceClient->resumeOperation($operationName, 'deleteConnectivityTest'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * // operation succeeded and returns no value - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function deleteConnectivityTest($name, array $optionalArgs = []) - { - $request = new DeleteConnectivityTestRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('DeleteConnectivityTest', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets the details of a specific Connectivity Test. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $name = 'name'; - * $response = $reachabilityServiceClient->getConnectivityTest($name); - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $name Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest - * - * @throws ApiException if the remote call fails - */ - public function getConnectivityTest($name, array $optionalArgs = []) - { - $request = new GetConnectivityTestRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetConnectivityTest', ConnectivityTest::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists all Connectivity Tests owned by a project. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $reachabilityServiceClient->listConnectivityTests($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $reachabilityServiceClient->listConnectivityTests($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @type string $orderBy - * Field to use to sort the list. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listConnectivityTests($parent, array $optionalArgs = []) - { - $request = new ListConnectivityTestsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListConnectivityTests', $optionalArgs, ListConnectivityTestsResponse::class, $request); - } - - /** - * Rerun an existing `ConnectivityTest`. - * After the user triggers the rerun, the reachability analysis is performed - * as part of the long running operation, which completes when the analysis - * completes. - * - * Even though the test configuration remains the same, the reachability - * result may change due to underlying network configuration changes. - * - * If the endpoint specifications in `ConnectivityTest` become invalid (for - * example, specified resources are deleted in the network, or you lost - * read permissions to the network configurations of listed projects), then - * the reachability result returns a value of `UNKNOWN`. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $name = 'name'; - * $operationResponse = $reachabilityServiceClient->rerunConnectivityTest($name); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $reachabilityServiceClient->rerunConnectivityTest($name); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $reachabilityServiceClient->resumeOperation($operationName, 'rerunConnectivityTest'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function rerunConnectivityTest($name, array $optionalArgs = []) - { - $request = new RerunConnectivityTestRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RerunConnectivityTest', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates the configuration of an existing `ConnectivityTest`. - * After you update a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * The Reachability state in the test resource is updated with the new result. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, they contain non-existent resources in the network, or the - * user does not have read permissions to the network configurations of - * listed projects), then the reachability result returns a value of - * UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for for more details. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $updateMask = new FieldMask(); - * $resource = new ConnectivityTest(); - * $operationResponse = $reachabilityServiceClient->updateConnectivityTest($updateMask, $resource); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $reachabilityServiceClient->updateConnectivityTest($updateMask, $resource); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $reachabilityServiceClient->resumeOperation($operationName, 'updateConnectivityTest'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param ConnectivityTest $resource Required. Only fields specified in update_mask are updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateConnectivityTest($updateMask, $resource, array $optionalArgs = []) - { - $request = new UpdateConnectivityTestRequest(); - $requestParamHeaders = []; - $request->setUpdateMask($updateMask); - $request->setResource($resource); - $requestParamHeaders['resource.name'] = $resource->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateConnectivityTest', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Gets information about a location. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $response = $reachabilityServiceClient->getLocation(); - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * Resource name for the location. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Location\Location - * - * @throws ApiException if the remote call fails - */ - public function getLocation(array $optionalArgs = []) - { - $request = new GetLocationRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $reachabilityServiceClient->listLocations(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $reachabilityServiceClient->listLocations(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The resource that owns the locations collection, if applicable. - * @type string $filter - * The standard list filter. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listLocations(array $optionalArgs = []) - { - $request = new ListLocationsRequest(); - $requestParamHeaders = []; - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - $requestParamHeaders['name'] = $optionalArgs['name']; - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations'); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $resource = 'resource'; - * $response = $reachabilityServiceClient->getIamPolicy($resource); - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $reachabilityServiceClient->setIamPolicy($resource, $policy); - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * Sample code: - * ``` - * $reachabilityServiceClient = new ReachabilityServiceClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $reachabilityServiceClient->testIamPermissions($resource, $permissions); - * } finally { - * $reachabilityServiceClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.iam.v1.IAMPolicy')->wait(); - } -} diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/ReachabilityServiceClient.php b/owl-bot-staging/NetworkManagement/v1/src/V1/ReachabilityServiceClient.php deleted file mode 100644 index d7d74f7c83e4..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/ReachabilityServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.cloud.networkmanagement.v1.ReachabilityService' => [ - 'CreateConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RerunConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'resource.name', - 'fieldAccessors' => [ - 'getResource', - 'getName', - ], - ], - ], - ], - 'GetConnectivityTest' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectivityTests' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkManagement\V1\ListConnectivityTestsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'connectivityTest' => 'projects/{project}/locations/global/connectivityTests/{test}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php deleted file mode 100644 index f88ed948a781..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php +++ /dev/null @@ -1,193 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networkmanagement.v1.ReachabilityService' => [ - 'CreateConnectivityTest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/connectivityTests', - 'body' => 'resource', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'test_id', - ], - ], - 'DeleteConnectivityTest' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConnectivityTest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectivityTests' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/connectivityTests', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RerunConnectivityTest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateConnectivityTest' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{resource.name=projects/*/locations/global/connectivityTests/*}', - 'body' => 'resource', - 'placeholders' => [ - 'resource.name' => [ - 'getters' => [ - 'getResource', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php b/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php deleted file mode 100644 index 48821ee3fdeb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php +++ /dev/null @@ -1,1192 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ReachabilityServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReachabilityServiceClient($options); - } - - /** @test */ - public function createConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($parent) - ->setTestId($testId) - ->setResource($resource); - $response = $gapicClient->createConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getTestId(); - $this->assertProtobufEquals($testId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($parent) - ->setTestId($testId) - ->setResource($resource); - $response = $gapicClient->createConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new DeleteConnectivityTestRequest()) - ->setName($name); - $response = $gapicClient->deleteConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/DeleteConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new DeleteConnectivityTestRequest()) - ->setName($name); - $response = $gapicClient->deleteConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getConnectivityTestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetConnectivityTestRequest()) - ->setName($name); - $response = $gapicClient->getConnectivityTest($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/GetConnectivityTest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectivityTestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new GetConnectivityTestRequest()) - ->setName($name); - try { - $gapicClient->getConnectivityTest($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectivityTestsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new ConnectivityTest(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListConnectivityTestsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListConnectivityTestsRequest()) - ->setParent($parent); - $response = $gapicClient->listConnectivityTests($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/ListConnectivityTests', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectivityTestsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListConnectivityTestsRequest()) - ->setParent($parent); - try { - $gapicClient->listConnectivityTests($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rerunConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rerunConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rerunConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new RerunConnectivityTestRequest()) - ->setName($name); - $response = $gapicClient->rerunConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/RerunConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rerunConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rerunConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new RerunConnectivityTestRequest()) - ->setName($name); - $response = $gapicClient->rerunConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new UpdateConnectivityTestRequest()) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/UpdateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new UpdateConnectivityTestRequest()) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConnectivityTestAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($parent) - ->setTestId($testId) - ->setResource($resource); - $response = $gapicClient->createConnectivityTestAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getTestId(); - $this->assertProtobufEquals($testId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/ReachabilityServiceClientTest.php b/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/ReachabilityServiceClientTest.php deleted file mode 100644 index 1e070ff3dd74..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/ReachabilityServiceClientTest.php +++ /dev/null @@ -1,1045 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ReachabilityServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReachabilityServiceClient($options); - } - - /** @test */ - public function createConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $response = $gapicClient->createConnectivityTest($parent, $testId, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getTestId(); - $this->assertProtobufEquals($testId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $response = $gapicClient->createConnectivityTest($parent, $testId, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->deleteConnectivityTest($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/DeleteConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->deleteConnectivityTest($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getConnectivityTestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->getConnectivityTest($name); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/GetConnectivityTest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectivityTestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->getConnectivityTest($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectivityTestsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new ConnectivityTest(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListConnectivityTestsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listConnectivityTests($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/ListConnectivityTests', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectivityTestsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - try { - $gapicClient->listConnectivityTests($parent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rerunConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rerunConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rerunConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->rerunConnectivityTest($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/RerunConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rerunConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rerunConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->rerunConnectivityTest($name); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $response = $gapicClient->updateConnectivityTest($updateMask, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/UpdateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $resource = new ConnectivityTest(); - $resourceName = 'resourceName-384566343'; - $resource->setName($resourceName); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $response = $gapicClient->updateConnectivityTest($updateMask, $resource); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $response = $gapicClient->getLocation(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->getLocation(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listLocations(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listLocations(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -}