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\RemarketingAudience; 21use Google\Service\Analytics\RemarketingAudiences; 22 23/** 24 * The "remarketingAudience" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $analyticsService = new Google\Service\Analytics(...); 28 * $remarketingAudience = $analyticsService->remarketingAudience; 29 * </code> 30 */ 31class ManagementRemarketingAudience extends \Google\Service\Resource 32{ 33 /** 34 * Delete a remarketing audience. (remarketingAudience.delete) 35 * 36 * @param string $accountId Account ID to which the remarketing audience 37 * belongs. 38 * @param string $webPropertyId Web property ID to which the remarketing 39 * audience belongs. 40 * @param string $remarketingAudienceId The ID of the remarketing audience to 41 * delete. 42 * @param array $optParams Optional parameters. 43 */ 44 public function delete($accountId, $webPropertyId, $remarketingAudienceId, $optParams = []) 45 { 46 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'remarketingAudienceId' => $remarketingAudienceId]; 47 $params = array_merge($params, $optParams); 48 return $this->call('delete', [$params]); 49 } 50 /** 51 * Gets a remarketing audience to which the user has access. 52 * (remarketingAudience.get) 53 * 54 * @param string $accountId The account ID of the remarketing audience to 55 * retrieve. 56 * @param string $webPropertyId The web property ID of the remarketing audience 57 * to retrieve. 58 * @param string $remarketingAudienceId The ID of the remarketing audience to 59 * retrieve. 60 * @param array $optParams Optional parameters. 61 * @return RemarketingAudience 62 */ 63 public function get($accountId, $webPropertyId, $remarketingAudienceId, $optParams = []) 64 { 65 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'remarketingAudienceId' => $remarketingAudienceId]; 66 $params = array_merge($params, $optParams); 67 return $this->call('get', [$params], RemarketingAudience::class); 68 } 69 /** 70 * Creates a new remarketing audience. (remarketingAudience.insert) 71 * 72 * @param string $accountId The account ID for which to create the remarketing 73 * audience. 74 * @param string $webPropertyId Web property ID for which to create the 75 * remarketing audience. 76 * @param RemarketingAudience $postBody 77 * @param array $optParams Optional parameters. 78 * @return RemarketingAudience 79 */ 80 public function insert($accountId, $webPropertyId, RemarketingAudience $postBody, $optParams = []) 81 { 82 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody]; 83 $params = array_merge($params, $optParams); 84 return $this->call('insert', [$params], RemarketingAudience::class); 85 } 86 /** 87 * Lists remarketing audiences to which the user has access. 88 * (remarketingAudience.listManagementRemarketingAudience) 89 * 90 * @param string $accountId The account ID of the remarketing audiences to 91 * retrieve. 92 * @param string $webPropertyId The web property ID of the remarketing audiences 93 * to retrieve. 94 * @param array $optParams Optional parameters. 95 * 96 * @opt_param int max-results The maximum number of remarketing audiences 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 * @opt_param string type 101 * @return RemarketingAudiences 102 */ 103 public function listManagementRemarketingAudience($accountId, $webPropertyId, $optParams = []) 104 { 105 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId]; 106 $params = array_merge($params, $optParams); 107 return $this->call('list', [$params], RemarketingAudiences::class); 108 } 109 /** 110 * Updates an existing remarketing audience. This method supports patch 111 * semantics. (remarketingAudience.patch) 112 * 113 * @param string $accountId The account ID of the remarketing audience to 114 * update. 115 * @param string $webPropertyId The web property ID of the remarketing audience 116 * to update. 117 * @param string $remarketingAudienceId The ID of the remarketing audience to 118 * update. 119 * @param RemarketingAudience $postBody 120 * @param array $optParams Optional parameters. 121 * @return RemarketingAudience 122 */ 123 public function patch($accountId, $webPropertyId, $remarketingAudienceId, RemarketingAudience $postBody, $optParams = []) 124 { 125 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'remarketingAudienceId' => $remarketingAudienceId, 'postBody' => $postBody]; 126 $params = array_merge($params, $optParams); 127 return $this->call('patch', [$params], RemarketingAudience::class); 128 } 129 /** 130 * Updates an existing remarketing audience. (remarketingAudience.update) 131 * 132 * @param string $accountId The account ID of the remarketing audience to 133 * update. 134 * @param string $webPropertyId The web property ID of the remarketing audience 135 * to update. 136 * @param string $remarketingAudienceId The ID of the remarketing audience to 137 * update. 138 * @param RemarketingAudience $postBody 139 * @param array $optParams Optional parameters. 140 * @return RemarketingAudience 141 */ 142 public function update($accountId, $webPropertyId, $remarketingAudienceId, RemarketingAudience $postBody, $optParams = []) 143 { 144 $params = ['accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'remarketingAudienceId' => $remarketingAudienceId, 'postBody' => $postBody]; 145 $params = array_merge($params, $optParams); 146 return $this->call('update', [$params], RemarketingAudience::class); 147 } 148} 149 150// Adding a class alias for backwards compatibility with the previous class name. 151class_alias(ManagementRemarketingAudience::class, 'Google_Service_Analytics_Resource_ManagementRemarketingAudience'); 152