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\GoogleAnalyticsAdmin\Resource;
19
20use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink;
21use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse;
22use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty;
23
24/**
25 * The "displayVideo360AdvertiserLinks" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
29 *   $displayVideo360AdvertiserLinks = $analyticsadminService->displayVideo360AdvertiserLinks;
30 *  </code>
31 */
32class PropertiesDisplayVideo360AdvertiserLinks extends \Google\Service\Resource
33{
34  /**
35   * Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users
36   * who have proper authorization both on the Google Analytics property and on
37   * the Display & Video 360 advertiser. Users who do not have access to the
38   * Display & Video 360 advertiser should instead seek to create a
39   * DisplayVideo360LinkProposal. (displayVideo360AdvertiserLinks.create)
40   *
41   * @param string $parent Required. Example format: properties/1234
42   * @param GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink $postBody
43   * @param array $optParams Optional parameters.
44   * @return GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink
45   */
46  public function create($parent, GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink $postBody, $optParams = [])
47  {
48    $params = ['parent' => $parent, 'postBody' => $postBody];
49    $params = array_merge($params, $optParams);
50    return $this->call('create', [$params], GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink::class);
51  }
52  /**
53   * Deletes a DisplayVideo360AdvertiserLink on a property.
54   * (displayVideo360AdvertiserLinks.delete)
55   *
56   * @param string $name Required. The name of the DisplayVideo360AdvertiserLink
57   * to delete. Example format:
58   * properties/1234/displayVideo360AdvertiserLinks/5678
59   * @param array $optParams Optional parameters.
60   * @return GoogleProtobufEmpty
61   */
62  public function delete($name, $optParams = [])
63  {
64    $params = ['name' => $name];
65    $params = array_merge($params, $optParams);
66    return $this->call('delete', [$params], GoogleProtobufEmpty::class);
67  }
68  /**
69   * Look up a single DisplayVideo360AdvertiserLink
70   * (displayVideo360AdvertiserLinks.get)
71   *
72   * @param string $name Required. The name of the DisplayVideo360AdvertiserLink
73   * to get. Example format: properties/1234/displayVideo360AdvertiserLink/5678
74   * @param array $optParams Optional parameters.
75   * @return GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink
76   */
77  public function get($name, $optParams = [])
78  {
79    $params = ['name' => $name];
80    $params = array_merge($params, $optParams);
81    return $this->call('get', [$params], GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink::class);
82  }
83  /**
84   * Lists all DisplayVideo360AdvertiserLinks on a property.
85   * (displayVideo360AdvertiserLinks.listPropertiesDisplayVideo360AdvertiserLinks)
86   *
87   * @param string $parent Required. Example format: properties/1234
88   * @param array $optParams Optional parameters.
89   *
90   * @opt_param int pageSize The maximum number of resources to return. If
91   * unspecified, at most 50 resources will be returned. The maximum value is 200
92   * (higher values will be coerced to the maximum).
93   * @opt_param string pageToken A page token, received from a previous
94   * `ListDisplayVideo360AdvertiserLinks` call. Provide this to retrieve the
95   * subsequent page. When paginating, all other parameters provided to
96   * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the
97   * page token.
98   * @return GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse
99   */
100  public function listPropertiesDisplayVideo360AdvertiserLinks($parent, $optParams = [])
101  {
102    $params = ['parent' => $parent];
103    $params = array_merge($params, $optParams);
104    return $this->call('list', [$params], GoogleAnalyticsAdminV1alphaListDisplayVideo360AdvertiserLinksResponse::class);
105  }
106  /**
107   * Updates a DisplayVideo360AdvertiserLink on a property.
108   * (displayVideo360AdvertiserLinks.patch)
109   *
110   * @param string $name Output only. The resource name for this
111   * DisplayVideo360AdvertiserLink resource. Format:
112   * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} Note: linkId
113   * is not the Display & Video 360 Advertiser ID
114   * @param GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink $postBody
115   * @param array $optParams Optional parameters.
116   *
117   * @opt_param string updateMask Required. The list of fields to be updated.
118   * Omitted fields will not be updated. To replace the entire entity, use one
119   * path with the string "*" to match all fields.
120   * @return GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink
121   */
122  public function patch($name, GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink $postBody, $optParams = [])
123  {
124    $params = ['name' => $name, 'postBody' => $postBody];
125    $params = array_merge($params, $optParams);
126    return $this->call('patch', [$params], GoogleAnalyticsAdminV1alphaDisplayVideo360AdvertiserLink::class);
127  }
128}
129
130// Adding a class alias for backwards compatibility with the previous class name.
131class_alias(PropertiesDisplayVideo360AdvertiserLinks::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesDisplayVideo360AdvertiserLinks');
132