Skip to content

Commit 27fc658

Browse files
Regenerate networkconnectivity client (#6591)
1 parent 207b360 commit 27fc658

7 files changed

Lines changed: 277 additions & 1 deletion

File tree

src/Networkconnectivity.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
9696
'type' => 'string',
9797
'required' => true,
9898
],
99+
'extraLocationTypes' => [
100+
'location' => 'query',
101+
'type' => 'string',
102+
'repeated' => true,
103+
],
99104
'filter' => [
100105
'location' => 'query',
101106
'type' => 'string',
@@ -698,6 +703,20 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
698703
'required' => true,
699704
],
700705
],
706+
],'getIamPolicy' => [
707+
'path' => 'v1/{+resource}:getIamPolicy',
708+
'httpMethod' => 'GET',
709+
'parameters' => [
710+
'resource' => [
711+
'location' => 'path',
712+
'type' => 'string',
713+
'required' => true,
714+
],
715+
'options.requestedPolicyVersion' => [
716+
'location' => 'query',
717+
'type' => 'integer',
718+
],
719+
],
701720
],'list' => [
702721
'path' => 'v1/{+parent}/internalRanges',
703722
'httpMethod' => 'GET',
@@ -742,6 +761,26 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
742761
'type' => 'string',
743762
],
744763
],
764+
],'setIamPolicy' => [
765+
'path' => 'v1/{+resource}:setIamPolicy',
766+
'httpMethod' => 'POST',
767+
'parameters' => [
768+
'resource' => [
769+
'location' => 'path',
770+
'type' => 'string',
771+
'required' => true,
772+
],
773+
],
774+
],'testIamPermissions' => [
775+
'path' => 'v1/{+resource}:testIamPermissions',
776+
'httpMethod' => 'POST',
777+
'parameters' => [
778+
'resource' => [
779+
'location' => 'path',
780+
'type' => 'string',
781+
'required' => true,
782+
],
783+
],
745784
],
746785
]
747786
]
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\Networkconnectivity;
19+
20+
class AllocationOptions extends \Google\Model
21+
{
22+
/**
23+
* @var string
24+
*/
25+
public $allocationStrategy;
26+
/**
27+
* @var int
28+
*/
29+
public $firstAvailableRangesLookupSize;
30+
31+
/**
32+
* @param string
33+
*/
34+
public function setAllocationStrategy($allocationStrategy)
35+
{
36+
$this->allocationStrategy = $allocationStrategy;
37+
}
38+
/**
39+
* @return string
40+
*/
41+
public function getAllocationStrategy()
42+
{
43+
return $this->allocationStrategy;
44+
}
45+
/**
46+
* @param int
47+
*/
48+
public function setFirstAvailableRangesLookupSize($firstAvailableRangesLookupSize)
49+
{
50+
$this->firstAvailableRangesLookupSize = $firstAvailableRangesLookupSize;
51+
}
52+
/**
53+
* @return int
54+
*/
55+
public function getFirstAvailableRangesLookupSize()
56+
{
57+
return $this->firstAvailableRangesLookupSize;
58+
}
59+
}
60+
61+
// Adding a class alias for backwards compatibility with the previous class name.
62+
class_alias(AllocationOptions::class, 'Google_Service_Networkconnectivity_AllocationOptions');

src/Networkconnectivity/InternalRange.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
class InternalRange extends \Google\Collection
2121
{
2222
protected $collection_key = 'users';
23+
protected $allocationOptionsType = AllocationOptions::class;
24+
protected $allocationOptionsDataType = '';
2325
/**
2426
* @var string
2527
*/
@@ -83,6 +85,20 @@ class InternalRange extends \Google\Collection
8385
*/
8486
public $users;
8587

88+
/**
89+
* @param AllocationOptions
90+
*/
91+
public function setAllocationOptions(AllocationOptions $allocationOptions)
92+
{
93+
$this->allocationOptions = $allocationOptions;
94+
}
95+
/**
96+
* @return AllocationOptions
97+
*/
98+
public function getAllocationOptions()
99+
{
100+
return $this->allocationOptions;
101+
}
86102
/**
87103
* @param string
88104
*/
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\Networkconnectivity;
19+
20+
class NextHopSpoke extends \Google\Model
21+
{
22+
/**
23+
* @var bool
24+
*/
25+
public $siteToSiteDataTransfer;
26+
/**
27+
* @var string
28+
*/
29+
public $uri;
30+
31+
/**
32+
* @param bool
33+
*/
34+
public function setSiteToSiteDataTransfer($siteToSiteDataTransfer)
35+
{
36+
$this->siteToSiteDataTransfer = $siteToSiteDataTransfer;
37+
}
38+
/**
39+
* @return bool
40+
*/
41+
public function getSiteToSiteDataTransfer()
42+
{
43+
return $this->siteToSiteDataTransfer;
44+
}
45+
/**
46+
* @param string
47+
*/
48+
public function setUri($uri)
49+
{
50+
$this->uri = $uri;
51+
}
52+
/**
53+
* @return string
54+
*/
55+
public function getUri()
56+
{
57+
return $this->uri;
58+
}
59+
}
60+
61+
// Adding a class alias for backwards compatibility with the previous class name.
62+
class_alias(NextHopSpoke::class, 'Google_Service_Networkconnectivity_NextHopSpoke');

src/Networkconnectivity/Resource/ProjectsLocations.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public function get($name, $optParams = [])
5252
* applicable.
5353
* @param array $optParams Optional parameters.
5454
*
55+
* @opt_param string extraLocationTypes Optional. A list of extra location types
56+
* that should be used as conditions for controlling the visibility of the
57+
* locations.
5558
* @opt_param string filter A filter to narrow down results to a preferred
5659
* subset. The filtering language accepts strings like `"displayName=tokyo"`,
5760
* and is documented in more detail in [AIP-160](https://google.aip.dev/160).

src/Networkconnectivity/Resource/ProjectsLocationsInternalRanges.php

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
use Google\Service\Networkconnectivity\GoogleLongrunningOperation;
2121
use Google\Service\Networkconnectivity\InternalRange;
2222
use 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.

src/Networkconnectivity/Route.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class Route extends \Google\Model
4747
protected $nextHopInterconnectAttachmentDataType = '';
4848
protected $nextHopRouterApplianceInstanceType = NextHopRouterApplianceInstance::class;
4949
protected $nextHopRouterApplianceInstanceDataType = '';
50+
protected $nextHopSpokeType = NextHopSpoke::class;
51+
protected $nextHopSpokeDataType = '';
5052
protected $nextHopVpcNetworkType = NextHopVpcNetwork::class;
5153
protected $nextHopVpcNetworkDataType = '';
5254
protected $nextHopVpnTunnelType = NextHopVPNTunnel::class;
@@ -188,6 +190,20 @@ public function getNextHopRouterApplianceInstance()
188190
{
189191
return $this->nextHopRouterApplianceInstance;
190192
}
193+
/**
194+
* @param NextHopSpoke
195+
*/
196+
public function setNextHopSpoke(NextHopSpoke $nextHopSpoke)
197+
{
198+
$this->nextHopSpoke = $nextHopSpoke;
199+
}
200+
/**
201+
* @return NextHopSpoke
202+
*/
203+
public function getNextHopSpoke()
204+
{
205+
return $this->nextHopSpoke;
206+
}
191207
/**
192208
* @param NextHopVpcNetwork
193209
*/

0 commit comments

Comments
 (0)