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\Dfareporting\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Dfareporting\PlacementGroup;
|
---|
21 | use Google\Service\Dfareporting\PlacementGroupsListResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "placementGroups" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $dfareportingService = new Google\Service\Dfareporting(...);
|
---|
28 | * $placementGroups = $dfareportingService->placementGroups;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class PlacementGroups extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Gets one placement group by ID. (placementGroups.get)
|
---|
35 | *
|
---|
36 | * @param string $profileId User profile ID associated with this request.
|
---|
37 | * @param string $id Placement group ID.
|
---|
38 | * @param array $optParams Optional parameters.
|
---|
39 | * @return PlacementGroup
|
---|
40 | * @throws \Google\Service\Exception
|
---|
41 | */
|
---|
42 | public function get($profileId, $id, $optParams = [])
|
---|
43 | {
|
---|
44 | $params = ['profileId' => $profileId, 'id' => $id];
|
---|
45 | $params = array_merge($params, $optParams);
|
---|
46 | return $this->call('get', [$params], PlacementGroup::class);
|
---|
47 | }
|
---|
48 | /**
|
---|
49 | * Inserts a new placement group. (placementGroups.insert)
|
---|
50 | *
|
---|
51 | * @param string $profileId User profile ID associated with this request.
|
---|
52 | * @param PlacementGroup $postBody
|
---|
53 | * @param array $optParams Optional parameters.
|
---|
54 | * @return PlacementGroup
|
---|
55 | * @throws \Google\Service\Exception
|
---|
56 | */
|
---|
57 | public function insert($profileId, PlacementGroup $postBody, $optParams = [])
|
---|
58 | {
|
---|
59 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
60 | $params = array_merge($params, $optParams);
|
---|
61 | return $this->call('insert', [$params], PlacementGroup::class);
|
---|
62 | }
|
---|
63 | /**
|
---|
64 | * Retrieves a list of placement groups, possibly filtered. This method supports
|
---|
65 | * paging. (placementGroups.listPlacementGroups)
|
---|
66 | *
|
---|
67 | * @param string $profileId User profile ID associated with this request.
|
---|
68 | * @param array $optParams Optional parameters.
|
---|
69 | *
|
---|
70 | * @opt_param string activeStatus Select only placements with these active
|
---|
71 | * statuses.
|
---|
72 | * @opt_param string advertiserIds Select only placement groups that belong to
|
---|
73 | * these advertisers.
|
---|
74 | * @opt_param string campaignIds Select only placement groups that belong to
|
---|
75 | * these campaigns.
|
---|
76 | * @opt_param string contentCategoryIds Select only placement groups that are
|
---|
77 | * associated with these content categories.
|
---|
78 | * @opt_param string directorySiteIds Select only placement groups that are
|
---|
79 | * associated with these directory sites.
|
---|
80 | * @opt_param string ids Select only placement groups with these IDs.
|
---|
81 | * @opt_param string maxEndDate Select only placements or placement groups whose
|
---|
82 | * end date is on or before the specified maxEndDate. The date should be
|
---|
83 | * formatted as "yyyy-MM-dd".
|
---|
84 | * @opt_param int maxResults Maximum number of results to return.
|
---|
85 | * @opt_param string maxStartDate Select only placements or placement groups
|
---|
86 | * whose start date is on or before the specified maxStartDate. The date should
|
---|
87 | * be formatted as "yyyy-MM-dd".
|
---|
88 | * @opt_param string minEndDate Select only placements or placement groups whose
|
---|
89 | * end date is on or after the specified minEndDate. The date should be
|
---|
90 | * formatted as "yyyy-MM-dd".
|
---|
91 | * @opt_param string minStartDate Select only placements or placement groups
|
---|
92 | * whose start date is on or after the specified minStartDate. The date should
|
---|
93 | * be formatted as "yyyy-MM-dd".
|
---|
94 | * @opt_param string pageToken Value of the nextPageToken from the previous
|
---|
95 | * result page.
|
---|
96 | * @opt_param string placementGroupType Select only placement groups belonging
|
---|
97 | * with this group type. A package is a simple group of placements that acts as
|
---|
98 | * a single pricing point for a group of tags. A roadblock is a group of
|
---|
99 | * placements that not only acts as a single pricing point but also assumes that
|
---|
100 | * all the tags in it will be served at the same time. A roadblock requires one
|
---|
101 | * of its assigned placements to be marked as primary for reporting.
|
---|
102 | * @opt_param string placementStrategyIds Select only placement groups that are
|
---|
103 | * associated with these placement strategies.
|
---|
104 | * @opt_param string pricingTypes Select only placement groups with these
|
---|
105 | * pricing types.
|
---|
106 | * @opt_param string searchString Allows searching for placement groups by name
|
---|
107 | * or ID. Wildcards (*) are allowed. For example, "placement*2015" will return
|
---|
108 | * placement groups with names like "placement group June 2015", "placement
|
---|
109 | * group May 2015", or simply "placements 2015". Most of the searches also add
|
---|
110 | * wildcards implicitly at the start and the end of the search string. For
|
---|
111 | * example, a search string of "placementgroup" will match placement groups with
|
---|
112 | * name "my placementgroup", "placementgroup 2015", or simply "placementgroup".
|
---|
113 | * @opt_param string siteIds Select only placement groups that are associated
|
---|
114 | * with these sites.
|
---|
115 | * @opt_param string sortField Field by which to sort the list.
|
---|
116 | * @opt_param string sortOrder Order of sorted results.
|
---|
117 | * @return PlacementGroupsListResponse
|
---|
118 | * @throws \Google\Service\Exception
|
---|
119 | */
|
---|
120 | public function listPlacementGroups($profileId, $optParams = [])
|
---|
121 | {
|
---|
122 | $params = ['profileId' => $profileId];
|
---|
123 | $params = array_merge($params, $optParams);
|
---|
124 | return $this->call('list', [$params], PlacementGroupsListResponse::class);
|
---|
125 | }
|
---|
126 | /**
|
---|
127 | * Updates an existing placement group. This method supports patch semantics.
|
---|
128 | * (placementGroups.patch)
|
---|
129 | *
|
---|
130 | * @param string $profileId User profile ID associated with this request.
|
---|
131 | * @param string $id Required. Placement ID.
|
---|
132 | * @param PlacementGroup $postBody
|
---|
133 | * @param array $optParams Optional parameters.
|
---|
134 | * @return PlacementGroup
|
---|
135 | * @throws \Google\Service\Exception
|
---|
136 | */
|
---|
137 | public function patch($profileId, $id, PlacementGroup $postBody, $optParams = [])
|
---|
138 | {
|
---|
139 | $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
|
---|
140 | $params = array_merge($params, $optParams);
|
---|
141 | return $this->call('patch', [$params], PlacementGroup::class);
|
---|
142 | }
|
---|
143 | /**
|
---|
144 | * Updates an existing placement group. (placementGroups.update)
|
---|
145 | *
|
---|
146 | * @param string $profileId User profile ID associated with this request.
|
---|
147 | * @param PlacementGroup $postBody
|
---|
148 | * @param array $optParams Optional parameters.
|
---|
149 | * @return PlacementGroup
|
---|
150 | * @throws \Google\Service\Exception
|
---|
151 | */
|
---|
152 | public function update($profileId, PlacementGroup $postBody, $optParams = [])
|
---|
153 | {
|
---|
154 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
155 | $params = array_merge($params, $optParams);
|
---|
156 | return $this->call('update', [$params], PlacementGroup::class);
|
---|
157 | }
|
---|
158 | }
|
---|
159 |
|
---|
160 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
161 | class_alias(PlacementGroups::class, 'Google_Service_Dfareporting_Resource_PlacementGroups');
|
---|