source: vendor/google/apiclient-services/src/MyBusinessPlaceActions/Resource/LocationsPlaceActionLinks.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 10 days ago

Upload new project files

  • Property mode set to 100644
File size: 5.7 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\MyBusinessPlaceActions\Resource;
19
20use Google\Service\MyBusinessPlaceActions\ListPlaceActionLinksResponse;
21use Google\Service\MyBusinessPlaceActions\MybusinessplaceactionsEmpty;
22use Google\Service\MyBusinessPlaceActions\PlaceActionLink;
23
24/**
25 * The "placeActionLinks" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $mybusinessplaceactionsService = new Google\Service\MyBusinessPlaceActions(...);
29 * $placeActionLinks = $mybusinessplaceactionsService->locations_placeActionLinks;
30 * </code>
31 */
32class LocationsPlaceActionLinks extends \Google\Service\Resource
33{
34 /**
35 * Creates a place action link associated with the specified location, and
36 * returns it. The request is considered duplicate if the `parent`,
37 * `place_action_link.uri` and `place_action_link.place_action_type` are the
38 * same as a previous request. (placeActionLinks.create)
39 *
40 * @param string $parent Required. The resource name of the location where to
41 * create this place action link. `locations/{location_id}`.
42 * @param PlaceActionLink $postBody
43 * @param array $optParams Optional parameters.
44 * @return PlaceActionLink
45 * @throws \Google\Service\Exception
46 */
47 public function create($parent, PlaceActionLink $postBody, $optParams = [])
48 {
49 $params = ['parent' => $parent, 'postBody' => $postBody];
50 $params = array_merge($params, $optParams);
51 return $this->call('create', [$params], PlaceActionLink::class);
52 }
53 /**
54 * Deletes a place action link from the specified location.
55 * (placeActionLinks.delete)
56 *
57 * @param string $name Required. The resource name of the place action link to
58 * remove from the location.
59 * @param array $optParams Optional parameters.
60 * @return MybusinessplaceactionsEmpty
61 * @throws \Google\Service\Exception
62 */
63 public function delete($name, $optParams = [])
64 {
65 $params = ['name' => $name];
66 $params = array_merge($params, $optParams);
67 return $this->call('delete', [$params], MybusinessplaceactionsEmpty::class);
68 }
69 /**
70 * Gets the specified place action link. (placeActionLinks.get)
71 *
72 * @param string $name Required. The name of the place action link to fetch.
73 * @param array $optParams Optional parameters.
74 * @return PlaceActionLink
75 * @throws \Google\Service\Exception
76 */
77 public function get($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('get', [$params], PlaceActionLink::class);
82 }
83 /**
84 * Lists the place action links for the specified location.
85 * (placeActionLinks.listLocationsPlaceActionLinks)
86 *
87 * @param string $parent Required. The name of the location whose place action
88 * links will be listed. `locations/{location_id}`.
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param string filter Optional. A filter constraining the place action
92 * links to return. The response includes entries that match the filter. We
93 * support only the following filter: 1. place_action_type=XYZ where XYZ is a
94 * valid PlaceActionType.
95 * @opt_param int pageSize Optional. How many place action links to return per
96 * page. Default of 10. The minimum is 1.
97 * @opt_param string pageToken Optional. If specified, returns the next page of
98 * place action links.
99 * @return ListPlaceActionLinksResponse
100 * @throws \Google\Service\Exception
101 */
102 public function listLocationsPlaceActionLinks($parent, $optParams = [])
103 {
104 $params = ['parent' => $parent];
105 $params = array_merge($params, $optParams);
106 return $this->call('list', [$params], ListPlaceActionLinksResponse::class);
107 }
108 /**
109 * Updates the specified place action link and returns it.
110 * (placeActionLinks.patch)
111 *
112 * @param string $name Optional. The resource name, in the format
113 * `locations/{location_id}/placeActionLinks/{place_action_link_id}`. The name
114 * field will only be considered in UpdatePlaceActionLink and
115 * DeletePlaceActionLink requests for updating and deleting links respectively.
116 * However, it will be ignored in CreatePlaceActionLink request, where
117 * `place_action_link_id` will be assigned by the server on successful creation
118 * of a new link and returned as part of the response.
119 * @param PlaceActionLink $postBody
120 * @param array $optParams Optional parameters.
121 *
122 * @opt_param string updateMask Required. The specific fields to update. The
123 * only editable fields are `uri`, `place_action_type` and `is_preferred`. If
124 * the updated link already exists at the same location with the same
125 * `place_action_type` and `uri`, fails with an `ALREADY_EXISTS` error.
126 * @return PlaceActionLink
127 * @throws \Google\Service\Exception
128 */
129 public function patch($name, PlaceActionLink $postBody, $optParams = [])
130 {
131 $params = ['name' => $name, 'postBody' => $postBody];
132 $params = array_merge($params, $optParams);
133 return $this->call('patch', [$params], PlaceActionLink::class);
134 }
135}
136
137// Adding a class alias for backwards compatibility with the previous class name.
138class_alias(LocationsPlaceActionLinks::class, 'Google_Service_MyBusinessPlaceActions_Resource_LocationsPlaceActionLinks');
Note: See TracBrowser for help on using the repository browser.