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\Appengine\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Appengine\DomainMapping;
|
---|
21 | use Google\Service\Appengine\ListDomainMappingsResponse;
|
---|
22 | use Google\Service\Appengine\Operation;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "domainMappings" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $appengineService = new Google\Service\Appengine(...);
|
---|
29 | * $domainMappings = $appengineService->apps_domainMappings;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class AppsDomainMappings extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Maps a domain to an application. A user must be authorized to administer a
|
---|
36 | * domain in order to map it to an application. For a list of available
|
---|
37 | * authorized domains, see AuthorizedDomains.ListAuthorizedDomains.
|
---|
38 | * (domainMappings.create)
|
---|
39 | *
|
---|
40 | * @param string $appsId Part of `parent`. Name of the parent Application
|
---|
41 | * resource. Example: apps/myapp.
|
---|
42 | * @param DomainMapping $postBody
|
---|
43 | * @param array $optParams Optional parameters.
|
---|
44 | *
|
---|
45 | * @opt_param string overrideStrategy Whether the domain creation should
|
---|
46 | * override any existing mappings for this domain. By default, overrides are
|
---|
47 | * rejected.
|
---|
48 | * @return Operation
|
---|
49 | * @throws \Google\Service\Exception
|
---|
50 | */
|
---|
51 | public function create($appsId, DomainMapping $postBody, $optParams = [])
|
---|
52 | {
|
---|
53 | $params = ['appsId' => $appsId, 'postBody' => $postBody];
|
---|
54 | $params = array_merge($params, $optParams);
|
---|
55 | return $this->call('create', [$params], Operation::class);
|
---|
56 | }
|
---|
57 | /**
|
---|
58 | * Deletes the specified domain mapping. A user must be authorized to administer
|
---|
59 | * the associated domain in order to delete a DomainMapping resource.
|
---|
60 | * (domainMappings.delete)
|
---|
61 | *
|
---|
62 | * @param string $appsId Part of `name`. Name of the resource to delete.
|
---|
63 | * Example: apps/myapp/domainMappings/example.com.
|
---|
64 | * @param string $domainMappingsId Part of `name`. See documentation of
|
---|
65 | * `appsId`.
|
---|
66 | * @param array $optParams Optional parameters.
|
---|
67 | * @return Operation
|
---|
68 | * @throws \Google\Service\Exception
|
---|
69 | */
|
---|
70 | public function delete($appsId, $domainMappingsId, $optParams = [])
|
---|
71 | {
|
---|
72 | $params = ['appsId' => $appsId, 'domainMappingsId' => $domainMappingsId];
|
---|
73 | $params = array_merge($params, $optParams);
|
---|
74 | return $this->call('delete', [$params], Operation::class);
|
---|
75 | }
|
---|
76 | /**
|
---|
77 | * Gets the specified domain mapping. (domainMappings.get)
|
---|
78 | *
|
---|
79 | * @param string $appsId Part of `name`. Name of the resource requested.
|
---|
80 | * Example: apps/myapp/domainMappings/example.com.
|
---|
81 | * @param string $domainMappingsId Part of `name`. See documentation of
|
---|
82 | * `appsId`.
|
---|
83 | * @param array $optParams Optional parameters.
|
---|
84 | * @return DomainMapping
|
---|
85 | * @throws \Google\Service\Exception
|
---|
86 | */
|
---|
87 | public function get($appsId, $domainMappingsId, $optParams = [])
|
---|
88 | {
|
---|
89 | $params = ['appsId' => $appsId, 'domainMappingsId' => $domainMappingsId];
|
---|
90 | $params = array_merge($params, $optParams);
|
---|
91 | return $this->call('get', [$params], DomainMapping::class);
|
---|
92 | }
|
---|
93 | /**
|
---|
94 | * Lists the domain mappings on an application.
|
---|
95 | * (domainMappings.listAppsDomainMappings)
|
---|
96 | *
|
---|
97 | * @param string $appsId Part of `parent`. Name of the parent Application
|
---|
98 | * resource. Example: apps/myapp.
|
---|
99 | * @param array $optParams Optional parameters.
|
---|
100 | *
|
---|
101 | * @opt_param int pageSize Maximum results to return per page.
|
---|
102 | * @opt_param string pageToken Continuation token for fetching the next page of
|
---|
103 | * results.
|
---|
104 | * @return ListDomainMappingsResponse
|
---|
105 | * @throws \Google\Service\Exception
|
---|
106 | */
|
---|
107 | public function listAppsDomainMappings($appsId, $optParams = [])
|
---|
108 | {
|
---|
109 | $params = ['appsId' => $appsId];
|
---|
110 | $params = array_merge($params, $optParams);
|
---|
111 | return $this->call('list', [$params], ListDomainMappingsResponse::class);
|
---|
112 | }
|
---|
113 | /**
|
---|
114 | * Updates the specified domain mapping. To map an SSL certificate to a domain
|
---|
115 | * mapping, update certificate_id to point to an AuthorizedCertificate resource.
|
---|
116 | * A user must be authorized to administer the associated domain in order to
|
---|
117 | * update a DomainMapping resource. (domainMappings.patch)
|
---|
118 | *
|
---|
119 | * @param string $appsId Part of `name`. Name of the resource to update.
|
---|
120 | * Example: apps/myapp/domainMappings/example.com.
|
---|
121 | * @param string $domainMappingsId Part of `name`. See documentation of
|
---|
122 | * `appsId`.
|
---|
123 | * @param DomainMapping $postBody
|
---|
124 | * @param array $optParams Optional parameters.
|
---|
125 | *
|
---|
126 | * @opt_param string updateMask Required. Standard field mask for the set of
|
---|
127 | * fields to be updated.
|
---|
128 | * @return Operation
|
---|
129 | * @throws \Google\Service\Exception
|
---|
130 | */
|
---|
131 | public function patch($appsId, $domainMappingsId, DomainMapping $postBody, $optParams = [])
|
---|
132 | {
|
---|
133 | $params = ['appsId' => $appsId, 'domainMappingsId' => $domainMappingsId, 'postBody' => $postBody];
|
---|
134 | $params = array_merge($params, $optParams);
|
---|
135 | return $this->call('patch', [$params], Operation::class);
|
---|
136 | }
|
---|
137 | }
|
---|
138 |
|
---|
139 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
140 | class_alias(AppsDomainMappings::class, 'Google_Service_Appengine_Resource_AppsDomainMappings');
|
---|