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\AdvertiserLandingPagesListResponse;
21use Google\Service\Dfareporting\LandingPage;
22
23/**
24 * The "advertiserLandingPages" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $dfareportingService = new Google\Service\Dfareporting(...);
28 *   $advertiserLandingPages = $dfareportingService->advertiserLandingPages;
29 *  </code>
30 */
31class AdvertiserLandingPages extends \Google\Service\Resource
32{
33  /**
34   * Gets one landing page by ID. (advertiserLandingPages.get)
35   *
36   * @param string $profileId User profile ID associated with this request.
37   * @param string $id Landing page ID.
38   * @param array $optParams Optional parameters.
39   * @return LandingPage
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], LandingPage::class);
46  }
47  /**
48   * Inserts a new landing page. (advertiserLandingPages.insert)
49   *
50   * @param string $profileId User profile ID associated with this request.
51   * @param LandingPage $postBody
52   * @param array $optParams Optional parameters.
53   * @return LandingPage
54   */
55  public function insert($profileId, LandingPage $postBody, $optParams = [])
56  {
57    $params = ['profileId' => $profileId, 'postBody' => $postBody];
58    $params = array_merge($params, $optParams);
59    return $this->call('insert', [$params], LandingPage::class);
60  }
61  /**
62   * Retrieves a list of landing pages.
63   * (advertiserLandingPages.listAdvertiserLandingPages)
64   *
65   * @param string $profileId User profile ID associated with this request.
66   * @param array $optParams Optional parameters.
67   *
68   * @opt_param string advertiserIds Select only landing pages that belong to
69   * these advertisers.
70   * @opt_param bool archived Select only archived landing pages. Don't set this
71   * field to select both archived and non-archived landing pages.
72   * @opt_param string campaignIds Select only landing pages that are associated
73   * with these campaigns.
74   * @opt_param string ids Select only landing pages 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 landing pages by name or
79   * ID. Wildcards (*) are allowed. For example, "landingpage*2017" will return
80   * landing pages with names like "landingpage July 2017", "landingpage March
81   * 2017", or simply "landingpage 2017". Most of the searches also add wildcards
82   * implicitly at the start and the end of the search string. For example, a
83   * search string of "landingpage" will match campaigns with name "my
84   * landingpage", "landingpage 2015", or simply "landingpage".
85   * @opt_param string sortField Field by which to sort the list.
86   * @opt_param string sortOrder Order of sorted results.
87   * @opt_param string subaccountId Select only landing pages that belong to this
88   * subaccount.
89   * @return AdvertiserLandingPagesListResponse
90   */
91  public function listAdvertiserLandingPages($profileId, $optParams = [])
92  {
93    $params = ['profileId' => $profileId];
94    $params = array_merge($params, $optParams);
95    return $this->call('list', [$params], AdvertiserLandingPagesListResponse::class);
96  }
97  /**
98   * Updates an existing advertiser landing page. This method supports patch
99   * semantics. (advertiserLandingPages.patch)
100   *
101   * @param string $profileId User profile ID associated with this request.
102   * @param string $id LandingPage ID.
103   * @param LandingPage $postBody
104   * @param array $optParams Optional parameters.
105   * @return LandingPage
106   */
107  public function patch($profileId, $id, LandingPage $postBody, $optParams = [])
108  {
109    $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
110    $params = array_merge($params, $optParams);
111    return $this->call('patch', [$params], LandingPage::class);
112  }
113  /**
114   * Updates an existing landing page. (advertiserLandingPages.update)
115   *
116   * @param string $profileId User profile ID associated with this request.
117   * @param LandingPage $postBody
118   * @param array $optParams Optional parameters.
119   * @return LandingPage
120   */
121  public function update($profileId, LandingPage $postBody, $optParams = [])
122  {
123    $params = ['profileId' => $profileId, 'postBody' => $postBody];
124    $params = array_merge($params, $optParams);
125    return $this->call('update', [$params], LandingPage::class);
126  }
127}
128
129// Adding a class alias for backwards compatibility with the previous class name.
130class_alias(AdvertiserLandingPages::class, 'Google_Service_Dfareporting_Resource_AdvertiserLandingPages');
131