source: vendor/google/apiclient-services/src/ServiceDirectory/Resource/ProjectsLocationsNamespacesServicesEndpoints.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 6.5 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\ServiceDirectory\Resource;
19
20use Google\Service\ServiceDirectory\Endpoint;
21use Google\Service\ServiceDirectory\ListEndpointsResponse;
22use Google\Service\ServiceDirectory\ServicedirectoryEmpty;
23
24/**
25 * The "endpoints" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $servicedirectoryService = new Google\Service\ServiceDirectory(...);
29 * $endpoints = $servicedirectoryService->projects_locations_namespaces_services_endpoints;
30 * </code>
31 */
32class ProjectsLocationsNamespacesServicesEndpoints extends \Google\Service\Resource
33{
34 /**
35 * Creates an endpoint, and returns the new endpoint. (endpoints.create)
36 *
37 * @param string $parent Required. The resource name of the service that this
38 * endpoint provides.
39 * @param Endpoint $postBody
40 * @param array $optParams Optional parameters.
41 *
42 * @opt_param string endpointId Required. The Resource ID must be 1-63
43 * characters long, and comply with RFC1035. Specifically, the name must be 1-63
44 * characters long and match the regular expression
45 * `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first character must be a
46 * lowercase letter, and all following characters must be a dash, lowercase
47 * letter, or digit, except the last character, which cannot be a dash.
48 * @return Endpoint
49 * @throws \Google\Service\Exception
50 */
51 public function create($parent, Endpoint $postBody, $optParams = [])
52 {
53 $params = ['parent' => $parent, 'postBody' => $postBody];
54 $params = array_merge($params, $optParams);
55 return $this->call('create', [$params], Endpoint::class);
56 }
57 /**
58 * Deletes an endpoint. (endpoints.delete)
59 *
60 * @param string $name Required. The name of the endpoint to delete.
61 * @param array $optParams Optional parameters.
62 * @return ServicedirectoryEmpty
63 * @throws \Google\Service\Exception
64 */
65 public function delete($name, $optParams = [])
66 {
67 $params = ['name' => $name];
68 $params = array_merge($params, $optParams);
69 return $this->call('delete', [$params], ServicedirectoryEmpty::class);
70 }
71 /**
72 * Gets an endpoint. (endpoints.get)
73 *
74 * @param string $name Required. The name of the endpoint to get.
75 * @param array $optParams Optional parameters.
76 * @return Endpoint
77 * @throws \Google\Service\Exception
78 */
79 public function get($name, $optParams = [])
80 {
81 $params = ['name' => $name];
82 $params = array_merge($params, $optParams);
83 return $this->call('get', [$params], Endpoint::class);
84 }
85 /**
86 * Lists all endpoints.
87 * (endpoints.listProjectsLocationsNamespacesServicesEndpoints)
88 *
89 * @param string $parent Required. The resource name of the service whose
90 * endpoints you'd like to list.
91 * @param array $optParams Optional parameters.
92 *
93 * @opt_param string filter Optional. The filter to list results by. General
94 * `filter` string syntax: ` ()` * `` can be `name`, `address`, `port`, or
95 * `annotations.` for map field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`,
96 * `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be
97 * the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid
98 * filters: * `annotations.owner` returns endpoints that have a annotation with
99 * the key `owner`, this is the same as `annotations:owner` *
100 * `annotations.protocol=gRPC` returns endpoints that have key/value
101 * `protocol=gRPC` * `address=192.108.1.105` returns endpoints that have this
102 * address * `port>8080` returns endpoints that have port number larger than
103 * 8080 * `name>projects/my-project/locations/us-east1/namespaces/my-
104 * namespace/services/my-service/endpoints/endpoint-c` returns endpoints that
105 * have name that is alphabetically later than the string, so "endpoint-e" is
106 * returned but "endpoint-a" is not * `annotations.owner!=sd AND
107 * annotations.foo=bar` returns endpoints that have `owner` in annotation key
108 * but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar`
109 * returns an empty list. Note that endpoint doesn't have a field called
110 * "doesnotexist". Since the filter does not match any endpoints, it returns no
111 * results For more information about filtering, see [API
112 * Filtering](https://aip.dev/160).
113 * @opt_param string orderBy Optional. The order to list results by. General
114 * `order_by` string syntax: ` () (,)` * `` allows values: `name`, `address`,
115 * `port` * `` ascending or descending order by ``. If this is left blank, `asc`
116 * is used Note that an empty `order_by` string results in default order, which
117 * is order by `name` in ascending order.
118 * @opt_param int pageSize Optional. The maximum number of items to return.
119 * @opt_param string pageToken Optional. The next_page_token value returned from
120 * a previous List request, if any.
121 * @return ListEndpointsResponse
122 * @throws \Google\Service\Exception
123 */
124 public function listProjectsLocationsNamespacesServicesEndpoints($parent, $optParams = [])
125 {
126 $params = ['parent' => $parent];
127 $params = array_merge($params, $optParams);
128 return $this->call('list', [$params], ListEndpointsResponse::class);
129 }
130 /**
131 * Updates an endpoint. (endpoints.patch)
132 *
133 * @param string $name Immutable. The resource name for the endpoint in the
134 * format `projects/locations/namespaces/services/endpoints`.
135 * @param Endpoint $postBody
136 * @param array $optParams Optional parameters.
137 *
138 * @opt_param string updateMask Required. List of fields to be updated in this
139 * request.
140 * @return Endpoint
141 * @throws \Google\Service\Exception
142 */
143 public function patch($name, Endpoint $postBody, $optParams = [])
144 {
145 $params = ['name' => $name, 'postBody' => $postBody];
146 $params = array_merge($params, $optParams);
147 return $this->call('patch', [$params], Endpoint::class);
148 }
149}
150
151// Adding a class alias for backwards compatibility with the previous class name.
152class_alias(ProjectsLocationsNamespacesServicesEndpoints::class, 'Google_Service_ServiceDirectory_Resource_ProjectsLocationsNamespacesServicesEndpoints');
Note: See TracBrowser for help on using the repository browser.