source: vendor/google/apiclient-services/src/ServiceNetworking/Resource/Services.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 6 weeks ago

Upload project files

  • Property mode set to 100644
File size: 6.7 KB
RevLine 
[e3d4e0a]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
18namespace Google\Service\ServiceNetworking\Resource;
19
20use Google\Service\ServiceNetworking\AddSubnetworkRequest;
21use Google\Service\ServiceNetworking\DisableVpcServiceControlsRequest;
22use Google\Service\ServiceNetworking\EnableVpcServiceControlsRequest;
23use Google\Service\ServiceNetworking\Operation;
24use Google\Service\ServiceNetworking\SearchRangeRequest;
25use Google\Service\ServiceNetworking\ValidateConsumerConfigRequest;
26use Google\Service\ServiceNetworking\ValidateConsumerConfigResponse;
27
28/**
29 * The "services" collection of methods.
30 * Typical usage is:
31 * <code>
32 * $servicenetworkingService = new Google\Service\ServiceNetworking(...);
33 * $services = $servicenetworkingService->services;
34 * </code>
35 */
36class Services extends \Google\Service\Resource
37{
38 /**
39 * For service producers, provisions a new subnet in a peered service's shared
40 * VPC network in the requested region and with the requested size that's
41 * expressed as a CIDR range (number of leading bits of ipV4 network mask). The
42 * method checks against the assigned allocated ranges to find a non-conflicting
43 * IP address range. The method will reuse a subnet if subsequent calls contain
44 * the same subnet name, region, and prefix length. This method will make
45 * producer's tenant project to be a shared VPC service project as needed.
46 * (services.addSubnetwork)
47 *
48 * @param string $parent Required. A tenant project in the service producer
49 * organization, in the following format: services/{service}/{collection-
50 * id}/{resource-id}. {collection-id} is the cloud resource collection type that
51 * represents the tenant project. Only `projects` are supported. {resource-id}
52 * is the tenant project numeric id, such as `123456`. {service} the name of the
53 * peering service, such as `service-peering.example.com`. This service must
54 * already be enabled in the service consumer's project.
55 * @param AddSubnetworkRequest $postBody
56 * @param array $optParams Optional parameters.
57 * @return Operation
58 * @throws \Google\Service\Exception
59 */
60 public function addSubnetwork($parent, AddSubnetworkRequest $postBody, $optParams = [])
61 {
62 $params = ['parent' => $parent, 'postBody' => $postBody];
63 $params = array_merge($params, $optParams);
64 return $this->call('addSubnetwork', [$params], Operation::class);
65 }
66 /**
67 * Disables VPC service controls for a connection.
68 * (services.disableVpcServiceControls)
69 *
70 * @param string $parent The service that is managing peering connectivity for a
71 * service producer's organization. For Google services that support this
72 * functionality, this value is `services/servicenetworking.googleapis.com`.
73 * @param DisableVpcServiceControlsRequest $postBody
74 * @param array $optParams Optional parameters.
75 * @return Operation
76 * @throws \Google\Service\Exception
77 */
78 public function disableVpcServiceControls($parent, DisableVpcServiceControlsRequest $postBody, $optParams = [])
79 {
80 $params = ['parent' => $parent, 'postBody' => $postBody];
81 $params = array_merge($params, $optParams);
82 return $this->call('disableVpcServiceControls', [$params], Operation::class);
83 }
84 /**
85 * Enables VPC service controls for a connection.
86 * (services.enableVpcServiceControls)
87 *
88 * @param string $parent The service that is managing peering connectivity for a
89 * service producer's organization. For Google services that support this
90 * functionality, this value is `services/servicenetworking.googleapis.com`.
91 * @param EnableVpcServiceControlsRequest $postBody
92 * @param array $optParams Optional parameters.
93 * @return Operation
94 * @throws \Google\Service\Exception
95 */
96 public function enableVpcServiceControls($parent, EnableVpcServiceControlsRequest $postBody, $optParams = [])
97 {
98 $params = ['parent' => $parent, 'postBody' => $postBody];
99 $params = array_merge($params, $optParams);
100 return $this->call('enableVpcServiceControls', [$params], Operation::class);
101 }
102 /**
103 * Service producers can use this method to find a currently unused range within
104 * consumer allocated ranges. This returned range is not reserved, and not
105 * guaranteed to remain unused. It will validate previously provided allocated
106 * ranges, find non-conflicting sub-range of requested size (expressed in number
107 * of leading bits of ipv4 network mask, as in CIDR range notation).
108 * (services.searchRange)
109 *
110 * @param string $parent Required. This is in a form services/{service}.
111 * {service} the name of the private access management service, for example
112 * 'service-peering.example.com'.
113 * @param SearchRangeRequest $postBody
114 * @param array $optParams Optional parameters.
115 * @return Operation
116 * @throws \Google\Service\Exception
117 */
118 public function searchRange($parent, SearchRangeRequest $postBody, $optParams = [])
119 {
120 $params = ['parent' => $parent, 'postBody' => $postBody];
121 $params = array_merge($params, $optParams);
122 return $this->call('searchRange', [$params], Operation::class);
123 }
124 /**
125 * Service producers use this method to validate if the consumer provided
126 * network, project and requested range are valid. This allows them to use a
127 * fail-fast mechanism for consumer requests, and not have to wait for
128 * AddSubnetwork operation completion to determine if user request is invalid.
129 * (services.validate)
130 *
131 * @param string $parent Required. This is in a form services/{service} where
132 * {service} is the name of the private access management service. For example
133 * 'service-peering.example.com'.
134 * @param ValidateConsumerConfigRequest $postBody
135 * @param array $optParams Optional parameters.
136 * @return ValidateConsumerConfigResponse
137 * @throws \Google\Service\Exception
138 */
139 public function validate($parent, ValidateConsumerConfigRequest $postBody, $optParams = [])
140 {
141 $params = ['parent' => $parent, 'postBody' => $postBody];
142 $params = array_merge($params, $optParams);
143 return $this->call('validate', [$params], ValidateConsumerConfigResponse::class);
144 }
145}
146
147// Adding a class alias for backwards compatibility with the previous class name.
148class_alias(Services::class, 'Google_Service_ServiceNetworking_Resource_Services');
Note: See TracBrowser for help on using the repository browser.