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\CloudRun\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudRun\DomainMapping;
|
---|
21 | use Google\Service\CloudRun\ListDomainMappingsResponse;
|
---|
22 | use Google\Service\CloudRun\Status;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * The "domainmappings" collection of methods.
|
---|
26 | * Typical usage is:
|
---|
27 | * <code>
|
---|
28 | * $runService = new Google\Service\CloudRun(...);
|
---|
29 | * $domainmappings = $runService->domainmappings;
|
---|
30 | * </code>
|
---|
31 | */
|
---|
32 | class NamespacesDomainmappings extends \Google\Service\Resource
|
---|
33 | {
|
---|
34 | /**
|
---|
35 | * Create a new domain mapping. (domainmappings.create)
|
---|
36 | *
|
---|
37 | * @param string $parent The namespace in which the domain mapping should be
|
---|
38 | * created. For Cloud Run (fully managed), replace {namespace_id} with the
|
---|
39 | * project ID or number.
|
---|
40 | * @param DomainMapping $postBody
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | *
|
---|
43 | * @opt_param string dryRun Indicates that the server should validate the
|
---|
44 | * request and populate default values without persisting the request. Supported
|
---|
45 | * values: `all`
|
---|
46 | * @return DomainMapping
|
---|
47 | */
|
---|
48 | public function create($parent, DomainMapping $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('create', [$params], DomainMapping::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Delete a domain mapping. (domainmappings.delete)
|
---|
56 | *
|
---|
57 | * @param string $name The name of the domain mapping to delete. For Cloud Run
|
---|
58 | * (fully managed), replace {namespace_id} with the project ID or number.
|
---|
59 | * @param array $optParams Optional parameters.
|
---|
60 | *
|
---|
61 | * @opt_param string apiVersion Cloud Run currently ignores this parameter.
|
---|
62 | * @opt_param string dryRun Indicates that the server should validate the
|
---|
63 | * request and populate default values without persisting the request. Supported
|
---|
64 | * values: `all`
|
---|
65 | * @opt_param string kind Cloud Run currently ignores this parameter.
|
---|
66 | * @opt_param string propagationPolicy Specifies the propagation policy of
|
---|
67 | * delete. Cloud Run currently ignores this setting, and deletes in the
|
---|
68 | * background. Please see kubernetes.io/docs/concepts/workloads/controllers
|
---|
69 | * /garbage-collection/ for more information.
|
---|
70 | * @return Status
|
---|
71 | */
|
---|
72 | public function delete($name, $optParams = [])
|
---|
73 | {
|
---|
74 | $params = ['name' => $name];
|
---|
75 | $params = array_merge($params, $optParams);
|
---|
76 | return $this->call('delete', [$params], Status::class);
|
---|
77 | }
|
---|
78 | /**
|
---|
79 | * Get information about a domain mapping. (domainmappings.get)
|
---|
80 | *
|
---|
81 | * @param string $name The name of the domain mapping to retrieve. For Cloud Run
|
---|
82 | * (fully managed), replace {namespace_id} with the project ID or number.
|
---|
83 | * @param array $optParams Optional parameters.
|
---|
84 | * @return DomainMapping
|
---|
85 | */
|
---|
86 | public function get($name, $optParams = [])
|
---|
87 | {
|
---|
88 | $params = ['name' => $name];
|
---|
89 | $params = array_merge($params, $optParams);
|
---|
90 | return $this->call('get', [$params], DomainMapping::class);
|
---|
91 | }
|
---|
92 | /**
|
---|
93 | * List domain mappings. (domainmappings.listNamespacesDomainmappings)
|
---|
94 | *
|
---|
95 | * @param string $parent The namespace from which the domain mappings should be
|
---|
96 | * listed. For Cloud Run (fully managed), replace {namespace_id} with the
|
---|
97 | * project ID or number.
|
---|
98 | * @param array $optParams Optional parameters.
|
---|
99 | *
|
---|
100 | * @opt_param string continue Optional. Encoded string to continue paging.
|
---|
101 | * @opt_param string fieldSelector Allows to filter resources based on a
|
---|
102 | * specific value for a field name. Send this in a query string format. i.e.
|
---|
103 | * 'metadata.name%3Dlorem'. Not currently used by Cloud Run.
|
---|
104 | * @opt_param bool includeUninitialized Not currently used by Cloud Run.
|
---|
105 | * @opt_param string labelSelector Allows to filter resources based on a label.
|
---|
106 | * Supported operations are =, !=, exists, in, and notIn.
|
---|
107 | * @opt_param int limit Optional. The maximum number of records that should be
|
---|
108 | * returned.
|
---|
109 | * @opt_param string resourceVersion The baseline resource version from which
|
---|
110 | * the list or watch operation should start. Not currently used by Cloud Run.
|
---|
111 | * @opt_param bool watch Flag that indicates that the client expects to watch
|
---|
112 | * this resource as well. Not currently used by Cloud Run.
|
---|
113 | * @return ListDomainMappingsResponse
|
---|
114 | */
|
---|
115 | public function listNamespacesDomainmappings($parent, $optParams = [])
|
---|
116 | {
|
---|
117 | $params = ['parent' => $parent];
|
---|
118 | $params = array_merge($params, $optParams);
|
---|
119 | return $this->call('list', [$params], ListDomainMappingsResponse::class);
|
---|
120 | }
|
---|
121 | }
|
---|
122 |
|
---|
123 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
124 | class_alias(NamespacesDomainmappings::class, 'Google_Service_CloudRun_Resource_NamespacesDomainmappings');
|
---|