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\DataFusion\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\DataFusion\DatafusionEmpty;
|
---|
21 | use Google\Service\DataFusion\DnsPeering;
|
---|
22 | use Google\Service\DataFusion\ListDnsPeeringsResponse;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "dnsPeerings" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $datafusionService = new Google\Service\DataFusion(...);
|
---|
29 | * $dnsPeerings = $datafusionService->projects_locations_instances_dnsPeerings;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class ProjectsLocationsInstancesDnsPeerings extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Creates DNS peering on the given resource. (dnsPeerings.create)
|
---|
36 | *
|
---|
37 | * @param string $parent Required. The resource on which DNS peering will be
|
---|
38 | * created.
|
---|
39 | * @param DnsPeering $postBody
|
---|
40 | * @param array $optParams Optional parameters.
|
---|
41 | *
|
---|
42 | * @opt_param string dnsPeeringId Required. The name of the peering to create.
|
---|
43 | * @return DnsPeering
|
---|
44 | * @throws \Google\Service\Exception
|
---|
45 | */
|
---|
46 | public function create($parent, DnsPeering $postBody, $optParams = [])
|
---|
47 | {
|
---|
48 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
49 | $params = array_merge($params, $optParams);
|
---|
50 | return $this->call('create', [$params], DnsPeering::class);
|
---|
51 | }
|
---|
52 | /**
|
---|
53 | * Deletes DNS peering on the given resource. (dnsPeerings.delete)
|
---|
54 | *
|
---|
55 | * @param string $name Required. The name of the DNS peering zone to delete.
|
---|
56 | * Format: projects/{project}/locations/{location}/instances/{instance}/dnsPeeri
|
---|
57 | * ngs/{dns_peering}
|
---|
58 | * @param array $optParams Optional parameters.
|
---|
59 | * @return DatafusionEmpty
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function delete($name, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['name' => $name];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('delete', [$params], DatafusionEmpty::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Lists DNS peerings for a given resource.
|
---|
70 | * (dnsPeerings.listProjectsLocationsInstancesDnsPeerings)
|
---|
71 | *
|
---|
72 | * @param string $parent Required. The parent, which owns this collection of dns
|
---|
73 | * peerings. Format:
|
---|
74 | * projects/{project}/locations/{location}/instances/{instance}
|
---|
75 | * @param array $optParams Optional parameters.
|
---|
76 | *
|
---|
77 | * @opt_param int pageSize The maximum number of dns peerings to return. The
|
---|
78 | * service may return fewer than this value. If unspecified, at most 50 dns
|
---|
79 | * peerings will be returned. The maximum value is 200; values above 200 will be
|
---|
80 | * coerced to 200.
|
---|
81 | * @opt_param string pageToken A page token, received from a previous
|
---|
82 | * `ListDnsPeerings` call. Provide this to retrieve the subsequent page. When
|
---|
83 | * paginating, all other parameters provided to `ListDnsPeerings` must match the
|
---|
84 | * call that provided the page token.
|
---|
85 | * @return ListDnsPeeringsResponse
|
---|
86 | * @throws \Google\Service\Exception
|
---|
87 | */
|
---|
88 | public function listProjectsLocationsInstancesDnsPeerings($parent, $optParams = [])
|
---|
89 | {
|
---|
90 | $params = ['parent' => $parent];
|
---|
91 | $params = array_merge($params, $optParams);
|
---|
92 | return $this->call('list', [$params], ListDnsPeeringsResponse::class);
|
---|
93 | }
|
---|
94 | }
|
---|
95 |
|
---|
96 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
97 | class_alias(ProjectsLocationsInstancesDnsPeerings::class, 'Google_Service_DataFusion_Resource_ProjectsLocationsInstancesDnsPeerings');
|
---|