[e3d4e0a] | 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\Advisorynotifications\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Advisorynotifications\GoogleCloudAdvisorynotificationsV1ListNotificationsResponse;
|
---|
| 21 | use Google\Service\Advisorynotifications\GoogleCloudAdvisorynotificationsV1Notification;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * The "notifications" collection of methods.
|
---|
| 25 | * Typical usage is:
|
---|
| 26 | * <code>
|
---|
| 27 | * $advisorynotificationsService = new Google\Service\Advisorynotifications(...);
|
---|
| 28 | * $notifications = $advisorynotificationsService->projects_locations_notifications;
|
---|
| 29 | * </code>
|
---|
| 30 | */
|
---|
| 31 | class ProjectsLocationsNotifications extends \Google\Service\Resource
|
---|
| 32 | {
|
---|
| 33 | /**
|
---|
| 34 | * Gets a notification. (notifications.get)
|
---|
| 35 | *
|
---|
| 36 | * @param string $name Required. A name of the notification to retrieve. Format:
|
---|
| 37 | * organizations/{organization}/locations/{location}/notifications/{notification
|
---|
| 38 | * } or projects/{projects}/locations/{location}/notifications/{notification}.
|
---|
| 39 | * @param array $optParams Optional parameters.
|
---|
| 40 | *
|
---|
| 41 | * @opt_param string languageCode ISO code for requested localization language.
|
---|
| 42 | * If unset, will be interpereted as "en". If the requested language is valid,
|
---|
| 43 | * but not supported for this notification, English will be returned with an
|
---|
| 44 | * "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a
|
---|
| 45 | * real language), this RPC will throw an error.
|
---|
| 46 | * @return GoogleCloudAdvisorynotificationsV1Notification
|
---|
| 47 | * @throws \Google\Service\Exception
|
---|
| 48 | */
|
---|
| 49 | public function get($name, $optParams = [])
|
---|
| 50 | {
|
---|
| 51 | $params = ['name' => $name];
|
---|
| 52 | $params = array_merge($params, $optParams);
|
---|
| 53 | return $this->call('get', [$params], GoogleCloudAdvisorynotificationsV1Notification::class);
|
---|
| 54 | }
|
---|
| 55 | /**
|
---|
| 56 | * Lists notifications under a given parent.
|
---|
| 57 | * (notifications.listProjectsLocationsNotifications)
|
---|
| 58 | *
|
---|
| 59 | * @param string $parent Required. The parent, which owns this collection of
|
---|
| 60 | * notifications. Must be of the form
|
---|
| 61 | * "organizations/{organization}/locations/{location}" or
|
---|
| 62 | * "projects/{project}/locations/{location}".
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | *
|
---|
| 65 | * @opt_param string languageCode ISO code for requested localization language.
|
---|
| 66 | * If unset, will be interpereted as "en". If the requested language is valid,
|
---|
| 67 | * but not supported for this notification, English will be returned with an
|
---|
| 68 | * "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a
|
---|
| 69 | * real language), this RPC will throw an error.
|
---|
| 70 | * @opt_param int pageSize The maximum number of notifications to return. The
|
---|
| 71 | * service may return fewer than this value. If unspecified or equal to 0, at
|
---|
| 72 | * most 50 notifications will be returned. The maximum value is 50; values above
|
---|
| 73 | * 50 will be coerced to 50.
|
---|
| 74 | * @opt_param string pageToken A page token returned from a previous request.
|
---|
| 75 | * When paginating, all other parameters provided in the request must match the
|
---|
| 76 | * call that returned the page token.
|
---|
| 77 | * @opt_param string view Specifies which parts of the notification resource
|
---|
| 78 | * should be returned in the response.
|
---|
| 79 | * @return GoogleCloudAdvisorynotificationsV1ListNotificationsResponse
|
---|
| 80 | * @throws \Google\Service\Exception
|
---|
| 81 | */
|
---|
| 82 | public function listProjectsLocationsNotifications($parent, $optParams = [])
|
---|
| 83 | {
|
---|
| 84 | $params = ['parent' => $parent];
|
---|
| 85 | $params = array_merge($params, $optParams);
|
---|
| 86 | return $this->call('list', [$params], GoogleCloudAdvisorynotificationsV1ListNotificationsResponse::class);
|
---|
| 87 | }
|
---|
| 88 | }
|
---|
| 89 |
|
---|
| 90 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 91 | class_alias(ProjectsLocationsNotifications::class, 'Google_Service_Advisorynotifications_Resource_ProjectsLocationsNotifications');
|
---|