source: vendor/google/apiclient-services/src/GoogleAnalyticsAdmin/Resource/PropertiesAudiences.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 2 weeks ago

Upload new project files

  • Property mode set to 100644
File size: 5.2 KB
Line 
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\GoogleAnalyticsAdminV1alphaArchiveAudienceRequest;
21use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaAudience;
22use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaListAudiencesResponse;
23use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty;
24
25/**
26 * The "audiences" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...);
30 * $audiences = $analyticsadminService->audiences;
31 * </code>
32 */
33class PropertiesAudiences extends \Google\Service\Resource
34{
35 /**
36 * Archives an Audience on a property. (audiences.archive)
37 *
38 * @param string $name Required. Example format: properties/1234/audiences/5678
39 * @param GoogleAnalyticsAdminV1alphaArchiveAudienceRequest $postBody
40 * @param array $optParams Optional parameters.
41 * @return GoogleProtobufEmpty
42 */
43 public function archive($name, GoogleAnalyticsAdminV1alphaArchiveAudienceRequest $postBody, $optParams = [])
44 {
45 $params = ['name' => $name, 'postBody' => $postBody];
46 $params = array_merge($params, $optParams);
47 return $this->call('archive', [$params], GoogleProtobufEmpty::class);
48 }
49 /**
50 * Creates an Audience. (audiences.create)
51 *
52 * @param string $parent Required. Example format: properties/1234
53 * @param GoogleAnalyticsAdminV1alphaAudience $postBody
54 * @param array $optParams Optional parameters.
55 * @return GoogleAnalyticsAdminV1alphaAudience
56 */
57 public function create($parent, GoogleAnalyticsAdminV1alphaAudience $postBody, $optParams = [])
58 {
59 $params = ['parent' => $parent, 'postBody' => $postBody];
60 $params = array_merge($params, $optParams);
61 return $this->call('create', [$params], GoogleAnalyticsAdminV1alphaAudience::class);
62 }
63 /**
64 * Lookup for a single Audience. Audiences created before 2020 may not be
65 * supported. Default audiences will not show filter definitions.
66 * (audiences.get)
67 *
68 * @param string $name Required. The name of the Audience to get. Example
69 * format: properties/1234/audiences/5678
70 * @param array $optParams Optional parameters.
71 * @return GoogleAnalyticsAdminV1alphaAudience
72 */
73 public function get($name, $optParams = [])
74 {
75 $params = ['name' => $name];
76 $params = array_merge($params, $optParams);
77 return $this->call('get', [$params], GoogleAnalyticsAdminV1alphaAudience::class);
78 }
79 /**
80 * Lists Audiences on a property. Audiences created before 2020 may not be
81 * supported. Default audiences will not show filter definitions.
82 * (audiences.listPropertiesAudiences)
83 *
84 * @param string $parent Required. Example format: properties/1234
85 * @param array $optParams Optional parameters.
86 *
87 * @opt_param int pageSize The maximum number of resources to return. If
88 * unspecified, at most 50 resources will be returned. The maximum value is 200
89 * (higher values will be coerced to the maximum).
90 * @opt_param string pageToken A page token, received from a previous
91 * `ListAudiences` call. Provide this to retrieve the subsequent page. When
92 * paginating, all other parameters provided to `ListAudiences` must match the
93 * call that provided the page token.
94 * @return GoogleAnalyticsAdminV1alphaListAudiencesResponse
95 */
96 public function listPropertiesAudiences($parent, $optParams = [])
97 {
98 $params = ['parent' => $parent];
99 $params = array_merge($params, $optParams);
100 return $this->call('list', [$params], GoogleAnalyticsAdminV1alphaListAudiencesResponse::class);
101 }
102 /**
103 * Updates an Audience on a property. (audiences.patch)
104 *
105 * @param string $name Output only. The resource name for this Audience
106 * resource. Format: properties/{propertyId}/audiences/{audienceId}
107 * @param GoogleAnalyticsAdminV1alphaAudience $postBody
108 * @param array $optParams Optional parameters.
109 *
110 * @opt_param string updateMask Required. The list of fields to be updated.
111 * Field names must be in snake case (e.g., "field_to_update"). Omitted fields
112 * will not be updated. To replace the entire entity, use one path with the
113 * string "*" to match all fields.
114 * @return GoogleAnalyticsAdminV1alphaAudience
115 */
116 public function patch($name, GoogleAnalyticsAdminV1alphaAudience $postBody, $optParams = [])
117 {
118 $params = ['name' => $name, 'postBody' => $postBody];
119 $params = array_merge($params, $optParams);
120 return $this->call('patch', [$params], GoogleAnalyticsAdminV1alphaAudience::class);
121 }
122}
123
124// Adding a class alias for backwards compatibility with the previous class name.
125class_alias(PropertiesAudiences::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesAudiences');
Note: See TracBrowser for help on using the repository browser.