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\GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse; 21use Google\Service\GoogleAnalyticsAdmin\GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret; 22use Google\Service\GoogleAnalyticsAdmin\GoogleProtobufEmpty; 23 24/** 25 * The "measurementProtocolSecrets" collection of methods. 26 * Typical usage is: 27 * <code> 28 * $analyticsadminService = new Google\Service\GoogleAnalyticsAdmin(...); 29 * $measurementProtocolSecrets = $analyticsadminService->measurementProtocolSecrets; 30 * </code> 31 */ 32class PropertiesAndroidAppDataStreamsMeasurementProtocolSecrets extends \Google\Service\Resource 33{ 34 /** 35 * Creates a measurement protocol secret. (measurementProtocolSecrets.create) 36 * 37 * @param string $parent Required. The parent resource where this secret will be 38 * created. Any type of stream (WebDataStream, IosAppDataStream, 39 * AndroidAppDataStream) may be a parent. Format: 40 * properties/{property}/webDataStreams/{webDataStream} 41 * @param GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret $postBody 42 * @param array $optParams Optional parameters. 43 * @return GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 44 */ 45 public function create($parent, GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret $postBody, $optParams = []) 46 { 47 $params = ['parent' => $parent, 'postBody' => $postBody]; 48 $params = array_merge($params, $optParams); 49 return $this->call('create', [$params], GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret::class); 50 } 51 /** 52 * Deletes target MeasurementProtocolSecret. (measurementProtocolSecrets.delete) 53 * 54 * @param string $name Required. The name of the MeasurementProtocolSecret to 55 * delete. Format: properties/{property}/webDataStreams/{webDataStream}/measurem 56 * entProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream 57 * (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. 58 * @param array $optParams Optional parameters. 59 * @return GoogleProtobufEmpty 60 */ 61 public function delete($name, $optParams = []) 62 { 63 $params = ['name' => $name]; 64 $params = array_merge($params, $optParams); 65 return $this->call('delete', [$params], GoogleProtobufEmpty::class); 66 } 67 /** 68 * Lookup for a single "GA4" MeasurementProtocolSecret. 69 * (measurementProtocolSecrets.get) 70 * 71 * @param string $name Required. The name of the measurement protocol secret to 72 * lookup. Format: properties/{property}/webDataStreams/{webDataStream}/measurem 73 * entProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream 74 * (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. 75 * @param array $optParams Optional parameters. 76 * @return GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 77 */ 78 public function get($name, $optParams = []) 79 { 80 $params = ['name' => $name]; 81 $params = array_merge($params, $optParams); 82 return $this->call('get', [$params], GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret::class); 83 } 84 /** 85 * Returns child MeasurementProtocolSecrets under the specified parent Property. 86 * (measurementProtocolSecrets.listPropertiesAndroidAppDataStreamsMeasurementPro 87 * tocolSecrets) 88 * 89 * @param string $parent Required. The resource name of the parent stream. Any 90 * type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be 91 * a parent. Format: properties/{property}/webDataStreams/{webDataStream}/measur 92 * ementProtocolSecrets 93 * @param array $optParams Optional parameters. 94 * 95 * @opt_param int pageSize The maximum number of resources to return. If 96 * unspecified, at most 10 resources will be returned. The maximum value is 10. 97 * Higher values will be coerced to the maximum. 98 * @opt_param string pageToken A page token, received from a previous 99 * `ListMeasurementProtocolSecrets` call. Provide this to retrieve the 100 * subsequent page. When paginating, all other parameters provided to 101 * `ListMeasurementProtocolSecrets` must match the call that provided the page 102 * token. 103 * @return GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse 104 */ 105 public function listPropertiesAndroidAppDataStreamsMeasurementProtocolSecrets($parent, $optParams = []) 106 { 107 $params = ['parent' => $parent]; 108 $params = array_merge($params, $optParams); 109 return $this->call('list', [$params], GoogleAnalyticsAdminV1alphaListMeasurementProtocolSecretsResponse::class); 110 } 111 /** 112 * Updates a measurement protocol secret. (measurementProtocolSecrets.patch) 113 * 114 * @param string $name Output only. Resource name of this secret. This secret 115 * may be a child of any type of stream. Format: properties/{property}/webDataSt 116 * reams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} 117 * @param GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret $postBody 118 * @param array $optParams Optional parameters. 119 * 120 * @opt_param string updateMask The list of fields to be updated. Omitted fields 121 * will not be updated. 122 * @return GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret 123 */ 124 public function patch($name, GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret $postBody, $optParams = []) 125 { 126 $params = ['name' => $name, 'postBody' => $postBody]; 127 $params = array_merge($params, $optParams); 128 return $this->call('patch', [$params], GoogleAnalyticsAdminV1alphaMeasurementProtocolSecret::class); 129 } 130} 131 132// Adding a class alias for backwards compatibility with the previous class name. 133class_alias(PropertiesAndroidAppDataStreamsMeasurementProtocolSecrets::class, 'Google_Service_GoogleAnalyticsAdmin_Resource_PropertiesAndroidAppDataStreamsMeasurementProtocolSecrets'); 134