source: vendor/google/apiclient-services/src/ServiceNetworking/Resource/ServicesProjectsServicenetworkingGlobalNetworks.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: 5.2 KB
Line 
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\ConsumerConfig;
21use Google\Service\ServiceNetworking\Operation;
22use Google\Service\ServiceNetworking\UpdateConsumerConfigRequest;
23use Google\Service\ServiceNetworking\VpcServiceControls;
24
25/**
26 * The "networks" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $servicenetworkingService = new Google\Service\ServiceNetworking(...);
30 * $networks = $servicenetworkingService->services_projects_global_networks;
31 * </code>
32 */
33class ServicesProjectsServicenetworkingGlobalNetworks extends \Google\Service\Resource
34{
35 /**
36 * Service producers use this method to get the configuration of their
37 * connection including the import/export of custom routes and subnetwork routes
38 * with public IP. (networks.get)
39 *
40 * @param string $name Required. Name of the consumer config to retrieve in the
41 * format: `services/{service}/projects/{project}/global/networks/{network}`.
42 * {service} is the peering service that is managing connectivity for the
43 * service producer's organization. For Google services that support this
44 * functionality, this value is `servicenetworking.googleapis.com`. {project} is
45 * a project number e.g. `12345` that contains the service consumer's VPC
46 * network. {network} is the name of the service consumer's VPC network.
47 * @param array $optParams Optional parameters.
48 *
49 * @opt_param bool includeUsedIpRanges Optional. When true, include the used IP
50 * ranges as part of the GetConsumerConfig output. This includes routes created
51 * inside the service networking network, consumer network, peers of the
52 * consumer network, and reserved ranges inside the service networking network.
53 * By default, this is false
54 * @return ConsumerConfig
55 * @throws \Google\Service\Exception
56 */
57 public function get($name, $optParams = [])
58 {
59 $params = ['name' => $name];
60 $params = array_merge($params, $optParams);
61 return $this->call('get', [$params], ConsumerConfig::class);
62 }
63 /**
64 * Consumers use this method to find out the state of VPC Service Controls. The
65 * controls could be enabled or disabled for a connection.
66 * (networks.getVpcServiceControls)
67 *
68 * @param string $name Required. Name of the VPC Service Controls config to
69 * retrieve in the format:
70 * `services/{service}/projects/{project}/global/networks/{network}`. {service}
71 * is the peering service that is managing connectivity for the service
72 * producer's organization. For Google services that support this functionality,
73 * this value is `servicenetworking.googleapis.com`. {project} is a project
74 * number e.g. `12345` that contains the service consumer's VPC network.
75 * {network} is the name of the service consumer's VPC network.
76 * @param array $optParams Optional parameters.
77 * @return VpcServiceControls
78 * @throws \Google\Service\Exception
79 */
80 public function getVpcServiceControls($name, $optParams = [])
81 {
82 $params = ['name' => $name];
83 $params = array_merge($params, $optParams);
84 return $this->call('getVpcServiceControls', [$params], VpcServiceControls::class);
85 }
86 /**
87 * Service producers use this method to update the configuration of their
88 * connection including the import/export of custom routes and subnetwork routes
89 * with public IP. (networks.updateConsumerConfig)
90 *
91 * @param string $parent Required. Parent resource identifying the connection
92 * for which the consumer config is being updated in the format:
93 * `services/{service}/projects/{project}/global/networks/{network}` {service}
94 * is the peering service that is managing connectivity for the service
95 * producer's organization. For Google services that support this functionality,
96 * this value is `servicenetworking.googleapis.com`. {project} is the number of
97 * the project that contains the service consumer's VPC network e.g. `12345`.
98 * {network} is the name of the service consumer's VPC network.
99 * @param UpdateConsumerConfigRequest $postBody
100 * @param array $optParams Optional parameters.
101 * @return Operation
102 * @throws \Google\Service\Exception
103 */
104 public function updateConsumerConfig($parent, UpdateConsumerConfigRequest $postBody, $optParams = [])
105 {
106 $params = ['parent' => $parent, 'postBody' => $postBody];
107 $params = array_merge($params, $optParams);
108 return $this->call('updateConsumerConfig', [$params], Operation::class);
109 }
110}
111
112// Adding a class alias for backwards compatibility with the previous class name.
113class_alias(ServicesProjectsServicenetworkingGlobalNetworks::class, 'Google_Service_ServiceNetworking_Resource_ServicesProjectsServicenetworkingGlobalNetworks');
Note: See TracBrowser for help on using the repository browser.