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