2020use Google \Service \Networkconnectivity \GoogleLongrunningOperation ;
2121use Google \Service \Networkconnectivity \InternalRange ;
2222use Google \Service \Networkconnectivity \ListInternalRangesResponse ;
23+ use Google \Service \Networkconnectivity \Policy ;
24+ use Google \Service \Networkconnectivity \SetIamPolicyRequest ;
25+ use Google \Service \Networkconnectivity \TestIamPermissionsRequest ;
26+ use Google \Service \Networkconnectivity \TestIamPermissionsResponse ;
2327
2428/**
2529 * The "internalRanges" collection of methods.
@@ -103,6 +107,37 @@ public function get($name, $optParams = [])
103107 $ params = array_merge ($ params , $ optParams );
104108 return $ this ->call ('get ' , [$ params ], InternalRange::class);
105109 }
110+ /**
111+ * Gets the access control policy for a resource. Returns an empty policy if the
112+ * resource exists and does not have a policy set. (internalRanges.getIamPolicy)
113+ *
114+ * @param string $resource REQUIRED: The resource for which the policy is being
115+ * requested. See [Resource
116+ * names](https://cloud.google.com/apis/design/resource_names) for the
117+ * appropriate value for this field.
118+ * @param array $optParams Optional parameters.
119+ *
120+ * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
121+ * version that will be used to format the policy. Valid values are 0, 1, and 3.
122+ * Requests specifying an invalid value will be rejected. Requests for policies
123+ * with any conditional role bindings must specify version 3. Policies with no
124+ * conditional role bindings may specify any valid value or leave the field
125+ * unset. The policy in the response might use the policy version that you
126+ * specified, or it might use a lower policy version. For example, if you
127+ * specify version 3, but the policy has no conditional role bindings, the
128+ * response uses version 1. To learn which resources support conditions in their
129+ * IAM policies, see the [IAM
130+ * documentation](https://cloud.google.com/iam/help/conditions/resource-
131+ * policies).
132+ * @return Policy
133+ * @throws \Google\Service\Exception
134+ */
135+ public function getIamPolicy ($ resource , $ optParams = [])
136+ {
137+ $ params = ['resource ' => $ resource ];
138+ $ params = array_merge ($ params , $ optParams );
139+ return $ this ->call ('getIamPolicy ' , [$ params ], Policy::class);
140+ }
106141 /**
107142 * Lists internal ranges in a given project and location.
108143 * (internalRanges.listProjectsLocationsInternalRanges)
@@ -128,7 +163,7 @@ public function listProjectsLocationsInternalRanges($parent, $optParams = [])
128163 /**
129164 * Updates the parameters of a single internal range. (internalRanges.patch)
130165 *
131- * @param string $name Immutable . The name of an internal range. Format:
166+ * @param string $name Identifier . The name of an internal range. Format:
132167 * projects/{project}/locations/{location}/internalRanges/{internal_range} See:
133168 * https://google.aip.dev/122#fields-representing-resource-names
134169 * @param InternalRange $postBody
@@ -159,6 +194,49 @@ public function patch($name, InternalRange $postBody, $optParams = [])
159194 $ params = array_merge ($ params , $ optParams );
160195 return $ this ->call ('patch ' , [$ params ], GoogleLongrunningOperation::class);
161196 }
197+ /**
198+ * Sets the access control policy on the specified resource. Replaces any
199+ * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
200+ * `PERMISSION_DENIED` errors. (internalRanges.setIamPolicy)
201+ *
202+ * @param string $resource REQUIRED: The resource for which the policy is being
203+ * specified. See [Resource
204+ * names](https://cloud.google.com/apis/design/resource_names) for the
205+ * appropriate value for this field.
206+ * @param SetIamPolicyRequest $postBody
207+ * @param array $optParams Optional parameters.
208+ * @return Policy
209+ * @throws \Google\Service\Exception
210+ */
211+ public function setIamPolicy ($ resource , SetIamPolicyRequest $ postBody , $ optParams = [])
212+ {
213+ $ params = ['resource ' => $ resource , 'postBody ' => $ postBody ];
214+ $ params = array_merge ($ params , $ optParams );
215+ return $ this ->call ('setIamPolicy ' , [$ params ], Policy::class);
216+ }
217+ /**
218+ * Returns permissions that a caller has on the specified resource. If the
219+ * resource does not exist, this will return an empty set of permissions, not a
220+ * `NOT_FOUND` error. Note: This operation is designed to be used for building
221+ * permission-aware UIs and command-line tools, not for authorization checking.
222+ * This operation may "fail open" without warning.
223+ * (internalRanges.testIamPermissions)
224+ *
225+ * @param string $resource REQUIRED: The resource for which the policy detail is
226+ * being requested. See [Resource
227+ * names](https://cloud.google.com/apis/design/resource_names) for the
228+ * appropriate value for this field.
229+ * @param TestIamPermissionsRequest $postBody
230+ * @param array $optParams Optional parameters.
231+ * @return TestIamPermissionsResponse
232+ * @throws \Google\Service\Exception
233+ */
234+ public function testIamPermissions ($ resource , TestIamPermissionsRequest $ postBody , $ optParams = [])
235+ {
236+ $ params = ['resource ' => $ resource , 'postBody ' => $ postBody ];
237+ $ params = array_merge ($ params , $ optParams );
238+ return $ this ->call ('testIamPermissions ' , [$ params ], TestIamPermissionsResponse::class);
239+ }
162240}
163241
164242// Adding a class alias for backwards compatibility with the previous class name.
0 commit comments