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\Analytics\Resource; 19 20use Google\Service\Analytics\ProfileFilterLink; 21use Google\Service\Analytics\ProfileFilterLinks; 22 23/** 24 * The "profileFilterLinks" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $analyticsService = new Google\Service\Analytics(...); 28 * $profileFilterLinks = $analyticsService->profileFilterLinks; 29 * </code> 30 */ 31class ManagementProfileFilterLinks extends \Google\Service\Resource 32{ 33 /** 34 * Delete a profile filter link. (profileFilterLinks.delete) 35 * 36 * @param string $accountId Account ID to which the profile filter link belongs. 37 * @param string $webPropertyId Web property Id to which the profile filter link 38 * belongs. 39 * @param string $profileId Profile ID to which the filter link belongs. 40 * @param string $linkId ID of the profile filter link to delete. 41 * @param array $optParams Optional parameters. 42 */ 43 public function delete($accountId, $webPropertyId, $profileId, $linkId, $optParams = []) 44 { 45 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId]; 46 $params = array_merge($params, $optParams); 47 return $this->call('delete', [$params]); 48 } 49 /** 50 * Returns a single profile filter link. (profileFilterLinks.get) 51 * 52 * @param string $accountId Account ID to retrieve profile filter link for. 53 * @param string $webPropertyId Web property Id to retrieve profile filter link 54 * for. 55 * @param string $profileId Profile ID to retrieve filter link for. 56 * @param string $linkId ID of the profile filter link. 57 * @param array $optParams Optional parameters. 58 * @return ProfileFilterLink 59 */ 60 public function get($accountId, $webPropertyId, $profileId, $linkId, $optParams = []) 61 { 62 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId]; 63 $params = array_merge($params, $optParams); 64 return $this->call('get', [$params], ProfileFilterLink::class); 65 } 66 /** 67 * Create a new profile filter link. (profileFilterLinks.insert) 68 * 69 * @param string $accountId Account ID to create profile filter link for. 70 * @param string $webPropertyId Web property Id to create profile filter link 71 * for. 72 * @param string $profileId Profile ID to create filter link for. 73 * @param ProfileFilterLink $postBody 74 * @param array $optParams Optional parameters. 75 * @return ProfileFilterLink 76 */ 77 public function insert($accountId, $webPropertyId, $profileId, ProfileFilterLink $postBody, $optParams = []) 78 { 79 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody]; 80 $params = array_merge($params, $optParams); 81 return $this->call('insert', [$params], ProfileFilterLink::class); 82 } 83 /** 84 * Lists all profile filter links for a profile. 85 * (profileFilterLinks.listManagementProfileFilterLinks) 86 * 87 * @param string $accountId Account ID to retrieve profile filter links for. 88 * @param string $webPropertyId Web property Id for profile filter links for. 89 * Can either be a specific web property ID or '~all', which refers to all the 90 * web properties that user has access to. 91 * @param string $profileId Profile ID to retrieve filter links for. Can either 92 * be a specific profile ID or '~all', which refers to all the profiles that 93 * user has access to. 94 * @param array $optParams Optional parameters. 95 * 96 * @opt_param int max-results The maximum number of profile filter links to 97 * include in this response. 98 * @opt_param int start-index An index of the first entity to retrieve. Use this 99 * parameter as a pagination mechanism along with the max-results parameter. 100 * @return ProfileFilterLinks 101 */ 102 public function listManagementProfileFilterLinks($accountId, $webPropertyId, $profileId, $optParams = []) 103 { 104 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId]; 105 $params = array_merge($params, $optParams); 106 return $this->call('list', [$params], ProfileFilterLinks::class); 107 } 108 /** 109 * Update an existing profile filter link. This method supports patch semantics. 110 * (profileFilterLinks.patch) 111 * 112 * @param string $accountId Account ID to which profile filter link belongs. 113 * @param string $webPropertyId Web property Id to which profile filter link 114 * belongs 115 * @param string $profileId Profile ID to which filter link belongs 116 * @param string $linkId ID of the profile filter link to be updated. 117 * @param ProfileFilterLink $postBody 118 * @param array $optParams Optional parameters. 119 * @return ProfileFilterLink 120 */ 121 public function patch($accountId, $webPropertyId, $profileId, $linkId, ProfileFilterLink $postBody, $optParams = []) 122 { 123 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId, 'postBody' => $postBody]; 124 $params = array_merge($params, $optParams); 125 return $this->call('patch', [$params], ProfileFilterLink::class); 126 } 127 /** 128 * Update an existing profile filter link. (profileFilterLinks.update) 129 * 130 * @param string $accountId Account ID to which profile filter link belongs. 131 * @param string $webPropertyId Web property Id to which profile filter link 132 * belongs 133 * @param string $profileId Profile ID to which filter link belongs 134 * @param string $linkId ID of the profile filter link to be updated. 135 * @param ProfileFilterLink $postBody 136 * @param array $optParams Optional parameters. 137 * @return ProfileFilterLink 138 */ 139 public function update($accountId, $webPropertyId, $profileId, $linkId, ProfileFilterLink $postBody, $optParams = []) 140 { 141 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId, 'postBody' => $postBody]; 142 $params = array_merge($params, $optParams); 143 return $this->call('update', [$params], ProfileFilterLink::class); 144 } 145} 146 147// Adding a class alias for backwards compatibility with the previous class name. 148class_alias(ManagementProfileFilterLinks::class, 'Google_Service_Analytics_Resource_ManagementProfileFilterLinks'); 149