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\CreativeGroup;
|
---|
21 | use Google\Service\Dfareporting\CreativeGroupsListResponse;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "creativeGroups" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $dfareportingService = new Google\Service\Dfareporting(...);
|
---|
28 | * $creativeGroups = $dfareportingService->creativeGroups;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class CreativeGroups extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Gets one creative group by ID. (creativeGroups.get)
|
---|
35 | *
|
---|
36 | * @param string $profileId User profile ID associated with this request.
|
---|
37 | * @param string $id Creative group ID.
|
---|
38 | * @param array $optParams Optional parameters.
|
---|
39 | * @return CreativeGroup
|
---|
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], CreativeGroup::class);
|
---|
47 | }
|
---|
48 | /**
|
---|
49 | * Inserts a new creative group. (creativeGroups.insert)
|
---|
50 | *
|
---|
51 | * @param string $profileId User profile ID associated with this request.
|
---|
52 | * @param CreativeGroup $postBody
|
---|
53 | * @param array $optParams Optional parameters.
|
---|
54 | * @return CreativeGroup
|
---|
55 | * @throws \Google\Service\Exception
|
---|
56 | */
|
---|
57 | public function insert($profileId, CreativeGroup $postBody, $optParams = [])
|
---|
58 | {
|
---|
59 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
60 | $params = array_merge($params, $optParams);
|
---|
61 | return $this->call('insert', [$params], CreativeGroup::class);
|
---|
62 | }
|
---|
63 | /**
|
---|
64 | * Retrieves a list of creative groups, possibly filtered. This method supports
|
---|
65 | * paging. (creativeGroups.listCreativeGroups)
|
---|
66 | *
|
---|
67 | * @param string $profileId User profile ID associated with this request.
|
---|
68 | * @param array $optParams Optional parameters.
|
---|
69 | *
|
---|
70 | * @opt_param string advertiserIds Select only creative groups that belong to
|
---|
71 | * these advertisers.
|
---|
72 | * @opt_param int groupNumber Select only creative groups that belong to this
|
---|
73 | * subgroup.
|
---|
74 | * @opt_param string ids Select only creative groups with these IDs.
|
---|
75 | * @opt_param int maxResults Maximum number of results to return.
|
---|
76 | * @opt_param string pageToken Value of the nextPageToken from the previous
|
---|
77 | * result page.
|
---|
78 | * @opt_param string searchString Allows searching for creative groups by name
|
---|
79 | * or ID. Wildcards (*) are allowed. For example, "creativegroup*2015" will
|
---|
80 | * return creative groups with names like "creativegroup June 2015",
|
---|
81 | * "creativegroup April 2015", or simply "creativegroup 2015". Most of the
|
---|
82 | * searches also add wild-cards implicitly at the start and the end of the
|
---|
83 | * search string. For example, a search string of "creativegroup" will match
|
---|
84 | * creative groups with the name "my creativegroup", "creativegroup 2015", or
|
---|
85 | * simply "creativegroup".
|
---|
86 | * @opt_param string sortField Field by which to sort the list.
|
---|
87 | * @opt_param string sortOrder Order of sorted results.
|
---|
88 | * @return CreativeGroupsListResponse
|
---|
89 | * @throws \Google\Service\Exception
|
---|
90 | */
|
---|
91 | public function listCreativeGroups($profileId, $optParams = [])
|
---|
92 | {
|
---|
93 | $params = ['profileId' => $profileId];
|
---|
94 | $params = array_merge($params, $optParams);
|
---|
95 | return $this->call('list', [$params], CreativeGroupsListResponse::class);
|
---|
96 | }
|
---|
97 | /**
|
---|
98 | * Updates an existing creative group. This method supports patch semantics.
|
---|
99 | * (creativeGroups.patch)
|
---|
100 | *
|
---|
101 | * @param string $profileId User profile ID associated with this request.
|
---|
102 | * @param string $id Required. Creative Group ID.
|
---|
103 | * @param CreativeGroup $postBody
|
---|
104 | * @param array $optParams Optional parameters.
|
---|
105 | * @return CreativeGroup
|
---|
106 | * @throws \Google\Service\Exception
|
---|
107 | */
|
---|
108 | public function patch($profileId, $id, CreativeGroup $postBody, $optParams = [])
|
---|
109 | {
|
---|
110 | $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
|
---|
111 | $params = array_merge($params, $optParams);
|
---|
112 | return $this->call('patch', [$params], CreativeGroup::class);
|
---|
113 | }
|
---|
114 | /**
|
---|
115 | * Updates an existing creative group. (creativeGroups.update)
|
---|
116 | *
|
---|
117 | * @param string $profileId User profile ID associated with this request.
|
---|
118 | * @param CreativeGroup $postBody
|
---|
119 | * @param array $optParams Optional parameters.
|
---|
120 | * @return CreativeGroup
|
---|
121 | * @throws \Google\Service\Exception
|
---|
122 | */
|
---|
123 | public function update($profileId, CreativeGroup $postBody, $optParams = [])
|
---|
124 | {
|
---|
125 | $params = ['profileId' => $profileId, 'postBody' => $postBody];
|
---|
126 | $params = array_merge($params, $optParams);
|
---|
127 | return $this->call('update', [$params], CreativeGroup::class);
|
---|
128 | }
|
---|
129 | }
|
---|
130 |
|
---|
131 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
132 | class_alias(CreativeGroups::class, 'Google_Service_Dfareporting_Resource_CreativeGroups');
|
---|