source: vendor/google/apiclient-services/src/PubsubLite/Resource/AdminProjectsLocationsReservations.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.1 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\PubsubLite\Resource;
19
20use Google\Service\PubsubLite\ListReservationsResponse;
21use Google\Service\PubsubLite\PubsubliteEmpty;
22use Google\Service\PubsubLite\Reservation;
23
24/**
25 * The "reservations" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $pubsubliteService = new Google\Service\PubsubLite(...);
29 * $reservations = $pubsubliteService->admin_projects_locations_reservations;
30 * </code>
31 */
32class AdminProjectsLocationsReservations extends \Google\Service\Resource
33{
34 /**
35 * Creates a new reservation. (reservations.create)
36 *
37 * @param string $parent Required. The parent location in which to create the
38 * reservation. Structured like
39 * `projects/{project_number}/locations/{location}`.
40 * @param Reservation $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string reservationId Required. The ID to use for the reservation,
44 * which will become the final component of the reservation's name. This value
45 * is structured like: `my-reservation-name`.
46 * @return Reservation
47 * @throws \Google\Service\Exception
48 */
49 public function create($parent, Reservation $postBody, $optParams = [])
50 {
51 $params = ['parent' => $parent, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('create', [$params], Reservation::class);
54 }
55 /**
56 * Deletes the specified reservation. (reservations.delete)
57 *
58 * @param string $name Required. The name of the reservation to delete.
59 * Structured like:
60 * projects/{project_number}/locations/{location}/reservations/{reservation_id}
61 * @param array $optParams Optional parameters.
62 * @return PubsubliteEmpty
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], PubsubliteEmpty::class);
70 }
71 /**
72 * Returns the reservation configuration. (reservations.get)
73 *
74 * @param string $name Required. The name of the reservation whose configuration
75 * to return. Structured like:
76 * projects/{project_number}/locations/{location}/reservations/{reservation_id}
77 * @param array $optParams Optional parameters.
78 * @return Reservation
79 * @throws \Google\Service\Exception
80 */
81 public function get($name, $optParams = [])
82 {
83 $params = ['name' => $name];
84 $params = array_merge($params, $optParams);
85 return $this->call('get', [$params], Reservation::class);
86 }
87 /**
88 * Returns the list of reservations for the given project.
89 * (reservations.listAdminProjectsLocationsReservations)
90 *
91 * @param string $parent Required. The parent whose reservations are to be
92 * listed. Structured like `projects/{project_number}/locations/{location}`.
93 * @param array $optParams Optional parameters.
94 *
95 * @opt_param int pageSize The maximum number of reservations to return. The
96 * service may return fewer than this value. If unset or zero, all reservations
97 * for the parent will be returned.
98 * @opt_param string pageToken A page token, received from a previous
99 * `ListReservations` call. Provide this to retrieve the subsequent page. When
100 * paginating, all other parameters provided to `ListReservations` must match
101 * the call that provided the page token.
102 * @return ListReservationsResponse
103 * @throws \Google\Service\Exception
104 */
105 public function listAdminProjectsLocationsReservations($parent, $optParams = [])
106 {
107 $params = ['parent' => $parent];
108 $params = array_merge($params, $optParams);
109 return $this->call('list', [$params], ListReservationsResponse::class);
110 }
111 /**
112 * Updates properties of the specified reservation. (reservations.patch)
113 *
114 * @param string $name The name of the reservation. Structured like:
115 * projects/{project_number}/locations/{location}/reservations/{reservation_id}
116 * @param Reservation $postBody
117 * @param array $optParams Optional parameters.
118 *
119 * @opt_param string updateMask Required. A mask specifying the reservation
120 * fields to change.
121 * @return Reservation
122 * @throws \Google\Service\Exception
123 */
124 public function patch($name, Reservation $postBody, $optParams = [])
125 {
126 $params = ['name' => $name, 'postBody' => $postBody];
127 $params = array_merge($params, $optParams);
128 return $this->call('patch', [$params], Reservation::class);
129 }
130}
131
132// Adding a class alias for backwards compatibility with the previous class name.
133class_alias(AdminProjectsLocationsReservations::class, 'Google_Service_PubsubLite_Resource_AdminProjectsLocationsReservations');
Note: See TracBrowser for help on using the repository browser.