[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\Cloudchannel\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Cloudchannel\GoogleCloudChannelV1ListSubscribersResponse;
|
---|
| 21 | use Google\Service\Cloudchannel\GoogleCloudChannelV1RegisterSubscriberRequest;
|
---|
| 22 | use Google\Service\Cloudchannel\GoogleCloudChannelV1RegisterSubscriberResponse;
|
---|
| 23 | use Google\Service\Cloudchannel\GoogleCloudChannelV1UnregisterSubscriberRequest;
|
---|
| 24 | use Google\Service\Cloudchannel\GoogleCloudChannelV1UnregisterSubscriberResponse;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "integrators" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $cloudchannelService = new Google\Service\Cloudchannel(...);
|
---|
| 31 | * $integrators = $cloudchannelService->integrators;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class Integrators extends \Google\Service\Resource
|
---|
| 35 | {
|
---|
| 36 | /**
|
---|
| 37 | * Lists service accounts with subscriber privileges on the Pub/Sub topic
|
---|
| 38 | * created for this Channel Services account or integrator. Possible error
|
---|
| 39 | * codes: * PERMISSION_DENIED: The reseller account making the request and the
|
---|
| 40 | * provided reseller account are different, or the impersonated user is not a
|
---|
| 41 | * super admin. * INVALID_ARGUMENT: Required request parameters are missing or
|
---|
| 42 | * invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-
|
---|
| 43 | * user error related to a technical issue in the backend. Contact Cloud Channel
|
---|
| 44 | * support. * UNKNOWN: Any non-user error related to a technical issue in the
|
---|
| 45 | * backend. Contact Cloud Channel support. Return value: A list of service email
|
---|
| 46 | * addresses. (integrators.listSubscribers)
|
---|
| 47 | *
|
---|
| 48 | * @param string $integrator Optional. Resource name of the integrator. Required
|
---|
| 49 | * if account is not provided. Otherwise, leave this field empty/unset.
|
---|
| 50 | * @param array $optParams Optional parameters.
|
---|
| 51 | *
|
---|
| 52 | * @opt_param string account Optional. Resource name of the account. Required if
|
---|
| 53 | * integrator is not provided. Otherwise, leave this field empty/unset.
|
---|
| 54 | * @opt_param int pageSize Optional. The maximum number of service accounts to
|
---|
| 55 | * return. The service may return fewer than this value. If unspecified, returns
|
---|
| 56 | * at most 100 service accounts. The maximum value is 1000; the server will
|
---|
| 57 | * coerce values above 1000.
|
---|
| 58 | * @opt_param string pageToken Optional. A page token, received from a previous
|
---|
| 59 | * `ListSubscribers` call. Provide this to retrieve the subsequent page. When
|
---|
| 60 | * paginating, all other parameters provided to `ListSubscribers` must match the
|
---|
| 61 | * call that provided the page token.
|
---|
| 62 | * @return GoogleCloudChannelV1ListSubscribersResponse
|
---|
| 63 | * @throws \Google\Service\Exception
|
---|
| 64 | */
|
---|
| 65 | public function listSubscribers($integrator, $optParams = [])
|
---|
| 66 | {
|
---|
| 67 | $params = ['integrator' => $integrator];
|
---|
| 68 | $params = array_merge($params, $optParams);
|
---|
| 69 | return $this->call('listSubscribers', [$params], GoogleCloudChannelV1ListSubscribersResponse::class);
|
---|
| 70 | }
|
---|
| 71 | /**
|
---|
| 72 | * Registers a service account with subscriber privileges on the Pub/Sub topic
|
---|
| 73 | * for this Channel Services account or integrator. After you create a
|
---|
| 74 | * subscriber, you get the events through SubscriberEvent Possible error codes:
|
---|
| 75 | * * PERMISSION_DENIED: The reseller account making the request and the provided
|
---|
| 76 | * reseller account are different, or the impersonated user is not a super
|
---|
| 77 | * admin. * INVALID_ARGUMENT: Required request parameters are missing or
|
---|
| 78 | * invalid. * INTERNAL: Any non-user error related to a technical issue in the
|
---|
| 79 | * backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related
|
---|
| 80 | * to a technical issue in the backend. Contact Cloud Channel support. Return
|
---|
| 81 | * value: The topic name with the registered service email address.
|
---|
| 82 | * (integrators.registerSubscriber)
|
---|
| 83 | *
|
---|
| 84 | * @param string $integrator Optional. Resource name of the integrator. Required
|
---|
| 85 | * if account is not provided. Otherwise, leave this field empty/unset.
|
---|
| 86 | * @param GoogleCloudChannelV1RegisterSubscriberRequest $postBody
|
---|
| 87 | * @param array $optParams Optional parameters.
|
---|
| 88 | * @return GoogleCloudChannelV1RegisterSubscriberResponse
|
---|
| 89 | * @throws \Google\Service\Exception
|
---|
| 90 | */
|
---|
| 91 | public function registerSubscriber($integrator, GoogleCloudChannelV1RegisterSubscriberRequest $postBody, $optParams = [])
|
---|
| 92 | {
|
---|
| 93 | $params = ['integrator' => $integrator, 'postBody' => $postBody];
|
---|
| 94 | $params = array_merge($params, $optParams);
|
---|
| 95 | return $this->call('registerSubscriber', [$params], GoogleCloudChannelV1RegisterSubscriberResponse::class);
|
---|
| 96 | }
|
---|
| 97 | /**
|
---|
| 98 | * Unregisters a service account with subscriber privileges on the Pub/Sub topic
|
---|
| 99 | * created for this Channel Services account or integrator. If there are no
|
---|
| 100 | * service accounts left with subscriber privileges, this deletes the topic. You
|
---|
| 101 | * can call ListSubscribers to check for these accounts. Possible error codes: *
|
---|
| 102 | * PERMISSION_DENIED: The reseller account making the request and the provided
|
---|
| 103 | * reseller account are different, or the impersonated user is not a super
|
---|
| 104 | * admin. * INVALID_ARGUMENT: Required request parameters are missing or
|
---|
| 105 | * invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-
|
---|
| 106 | * user error related to a technical issue in the backend. Contact Cloud Channel
|
---|
| 107 | * support. * UNKNOWN: Any non-user error related to a technical issue in the
|
---|
| 108 | * backend. Contact Cloud Channel support. Return value: The topic name that
|
---|
| 109 | * unregistered the service email address. Returns a success response if the
|
---|
| 110 | * service email address wasn't registered with the topic.
|
---|
| 111 | * (integrators.unregisterSubscriber)
|
---|
| 112 | *
|
---|
| 113 | * @param string $integrator Optional. Resource name of the integrator. Required
|
---|
| 114 | * if account is not provided. Otherwise, leave this field empty/unset.
|
---|
| 115 | * @param GoogleCloudChannelV1UnregisterSubscriberRequest $postBody
|
---|
| 116 | * @param array $optParams Optional parameters.
|
---|
| 117 | * @return GoogleCloudChannelV1UnregisterSubscriberResponse
|
---|
| 118 | * @throws \Google\Service\Exception
|
---|
| 119 | */
|
---|
| 120 | public function unregisterSubscriber($integrator, GoogleCloudChannelV1UnregisterSubscriberRequest $postBody, $optParams = [])
|
---|
| 121 | {
|
---|
| 122 | $params = ['integrator' => $integrator, 'postBody' => $postBody];
|
---|
| 123 | $params = array_merge($params, $optParams);
|
---|
| 124 | return $this->call('unregisterSubscriber', [$params], GoogleCloudChannelV1UnregisterSubscriberResponse::class);
|
---|
| 125 | }
|
---|
| 126 | }
|
---|
| 127 |
|
---|
| 128 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 129 | class_alias(Integrators::class, 'Google_Service_Cloudchannel_Resource_Integrators');
|
---|