source: vendor/google/apiclient-services/src/GoogleMarketingPlatformAdminAPI/Resource/OrganizationsAnalyticsAccountLinks.php

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

Upload project files

  • Property mode set to 100644
File size: 5.6 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\GoogleMarketingPlatformAdminAPI\Resource;
19
20use Google\Service\GoogleMarketingPlatformAdminAPI\AnalyticsAccountLink;
21use Google\Service\GoogleMarketingPlatformAdminAPI\ListAnalyticsAccountLinksResponse;
22use Google\Service\GoogleMarketingPlatformAdminAPI\MarketingplatformadminEmpty;
23use Google\Service\GoogleMarketingPlatformAdminAPI\SetPropertyServiceLevelRequest;
24use Google\Service\GoogleMarketingPlatformAdminAPI\SetPropertyServiceLevelResponse;
25
26/**
27 * The "analyticsAccountLinks" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $marketingplatformadminService = new Google\Service\GoogleMarketingPlatformAdminAPI(...);
31 * $analyticsAccountLinks = $marketingplatformadminService->organizations_analyticsAccountLinks;
32 * </code>
33 */
34class OrganizationsAnalyticsAccountLinks extends \Google\Service\Resource
35{
36 /**
37 * Creates the link between the Analytics account and the Google Marketing
38 * Platform organization. User needs to be an org user, and admin on the
39 * Analytics account to create the link. If the account is already linked to an
40 * organization, user needs to unlink the account from the current organization,
41 * then try link again. (analyticsAccountLinks.create)
42 *
43 * @param string $parent Required. The parent resource where this Analytics
44 * account link will be created. Format: organizations/{org_id}
45 * @param AnalyticsAccountLink $postBody
46 * @param array $optParams Optional parameters.
47 * @return AnalyticsAccountLink
48 * @throws \Google\Service\Exception
49 */
50 public function create($parent, AnalyticsAccountLink $postBody, $optParams = [])
51 {
52 $params = ['parent' => $parent, 'postBody' => $postBody];
53 $params = array_merge($params, $optParams);
54 return $this->call('create', [$params], AnalyticsAccountLink::class);
55 }
56 /**
57 * Deletes the AnalyticsAccountLink, which detaches the Analytics account from
58 * the Google Marketing Platform organization. User needs to be an org user, and
59 * admin on the Analytics account in order to delete the link.
60 * (analyticsAccountLinks.delete)
61 *
62 * @param string $name Required. The name of the Analytics account link to
63 * delete. Format:
64 * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}
65 * @param array $optParams Optional parameters.
66 * @return MarketingplatformadminEmpty
67 * @throws \Google\Service\Exception
68 */
69 public function delete($name, $optParams = [])
70 {
71 $params = ['name' => $name];
72 $params = array_merge($params, $optParams);
73 return $this->call('delete', [$params], MarketingplatformadminEmpty::class);
74 }
75 /**
76 * Lists the Google Analytics accounts link to the specified Google Marketing
77 * Platform organization.
78 * (analyticsAccountLinks.listOrganizationsAnalyticsAccountLinks)
79 *
80 * @param string $parent Required. The parent organization, which owns this
81 * collection of Analytics account links. Format: organizations/{org_id}
82 * @param array $optParams Optional parameters.
83 *
84 * @opt_param int pageSize Optional. The maximum number of Analytics account
85 * links to return in one call. The service may return fewer than this value. If
86 * unspecified, at most 50 Analytics account links will be returned. The maximum
87 * value is 1000; values above 1000 will be coerced to 1000.
88 * @opt_param string pageToken Optional. A page token, received from a previous
89 * ListAnalyticsAccountLinks call. Provide this to retrieve the subsequent page.
90 * When paginating, all other parameters provided to `ListAnalyticsAccountLinks`
91 * must match the call that provided the page token.
92 * @return ListAnalyticsAccountLinksResponse
93 * @throws \Google\Service\Exception
94 */
95 public function listOrganizationsAnalyticsAccountLinks($parent, $optParams = [])
96 {
97 $params = ['parent' => $parent];
98 $params = array_merge($params, $optParams);
99 return $this->call('list', [$params], ListAnalyticsAccountLinksResponse::class);
100 }
101 /**
102 * Updates the service level for an Analytics property.
103 * (analyticsAccountLinks.setPropertyServiceLevel)
104 *
105 * @param string $analyticsAccountLink Required. The parent AnalyticsAccountLink
106 * scope where this property is in. Format:
107 * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id}
108 * @param SetPropertyServiceLevelRequest $postBody
109 * @param array $optParams Optional parameters.
110 * @return SetPropertyServiceLevelResponse
111 * @throws \Google\Service\Exception
112 */
113 public function setPropertyServiceLevel($analyticsAccountLink, SetPropertyServiceLevelRequest $postBody, $optParams = [])
114 {
115 $params = ['analyticsAccountLink' => $analyticsAccountLink, 'postBody' => $postBody];
116 $params = array_merge($params, $optParams);
117 return $this->call('setPropertyServiceLevel', [$params], SetPropertyServiceLevelResponse::class);
118 }
119}
120
121// Adding a class alias for backwards compatibility with the previous class name.
122class_alias(OrganizationsAnalyticsAccountLinks::class, 'Google_Service_GoogleMarketingPlatformAdminAPI_Resource_OrganizationsAnalyticsAccountLinks');
Note: See TracBrowser for help on using the repository browser.