-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
GetKeyEvent
, CreateKeyEvent
, ListKeyEvents
, `UpdateKe…
…yEvent`, and `DeleteKeyEvent` methods (#7571) feat: mark `GetConversionEvent`, `CreateConversionEvent`, `ListConversionEvents`, `UpdateConversionEvent`, and `DeleteConversionEvent` methods as deprecated docs: add deprecation comment to `GetConversionEvent`, `CreateConversionEvent`, `ListConversionEvents`, `UpdateConversionEvent`, and `DeleteConversionEvent` methods docs: improve comment formatting of the `parent` field in `CreateFirebaseLinkRequest` and `ListFirebaseLinksRequest` docs: improve comment formatting of the `name` field in `DeleteFirebaseLinkRequest`, `GetGlobalSiteTagRequest`, and `GetDataSharingSettingsRequest` docs: improve comment formatting of `account` and `property` fields in `SearchChangeHistoryEventsRequest` feat: add the `create_time` field to the `Audience` resource feat: add the `primary` field to the `ChannelGroup` resource feat: add `CreateBigQueryLink`, `UpdateBigQueryLink`, and `DeleteBigQueryLink` methods feat: add the `dataset_location` field to the `BigQueryLink` resource feat: add the `BIGQUERY_LINK` option to the `ChangeHistoryResourceType` enum feat: add the `gmp_organization` field to the `Account` resource fix!: Rename custom method `CreateSubpropertyRequest` to `ProvisionSubpropertyRequest` feat: add `GetEventEditRule`, `CreateEventEditRule`, `ListEventEditRules`, `UpdateEventEditRule`, `DeleteEventEditRule`, and `ReorderEventEditRules` methods to the Admin API v1 alpha PiperOrigin-RevId: 658468819 Source-Link: googleapis/googleapis@b479bc2 Source-Link: googleapis/googleapis-gen@f7eacec Copy-Tag: eyJwIjoiQW5hbHl0aWNzQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6ImY3ZWFjZWM0MmQzYmYzNjMxNThkMzNkMjQyMjQxNDlhODdlODlmOGMifQ==
- Loading branch information
1 parent
aca00f6
commit 53f9f98
Showing
72 changed files
with
8,734 additions
and
399 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
80 changes: 80 additions & 0 deletions
80
AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_big_query_link.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateBigQueryLink_sync] | ||
use Google\Analytics\Admin\V1alpha\BigQueryLink; | ||
use Google\Analytics\Admin\V1alpha\Client\AnalyticsAdminServiceClient; | ||
use Google\Analytics\Admin\V1alpha\CreateBigQueryLinkRequest; | ||
use Google\ApiCore\ApiException; | ||
|
||
/** | ||
* Creates a BigQueryLink. | ||
* | ||
* @param string $formattedParent Example format: properties/1234 | ||
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field. | ||
* @param string $bigqueryLinkDatasetLocation Immutable. The geographic location where the created BigQuery | ||
* dataset should reside. See https://cloud.google.com/bigquery/docs/locations | ||
* for supported locations. | ||
*/ | ||
function create_big_query_link_sample( | ||
string $formattedParent, | ||
string $bigqueryLinkDatasetLocation | ||
): void { | ||
// Create a client. | ||
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); | ||
|
||
// Prepare the request message. | ||
$bigqueryLink = (new BigQueryLink()) | ||
->setDatasetLocation($bigqueryLinkDatasetLocation); | ||
$request = (new CreateBigQueryLinkRequest()) | ||
->setParent($formattedParent) | ||
->setBigqueryLink($bigqueryLink); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var BigQueryLink $response */ | ||
$response = $analyticsAdminServiceClient->createBigQueryLink($request); | ||
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample has been automatically generated and should be regarded as a code | ||
* template only. It will require modifications to work: | ||
* - It may require correct/in-range values for request initialization. | ||
* - It may require specifying regional endpoints when creating the service client, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$formattedParent = AnalyticsAdminServiceClient::propertyName('[PROPERTY]'); | ||
$bigqueryLinkDatasetLocation = '[DATASET_LOCATION]'; | ||
|
||
create_big_query_link_sample($formattedParent, $bigqueryLinkDatasetLocation); | ||
} | ||
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateBigQueryLink_sync] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_event_edit_rule.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateEventEditRule_sync] | ||
use Google\Analytics\Admin\V1alpha\Client\AnalyticsAdminServiceClient; | ||
use Google\Analytics\Admin\V1alpha\CreateEventEditRuleRequest; | ||
use Google\Analytics\Admin\V1alpha\EventEditRule; | ||
use Google\Analytics\Admin\V1alpha\MatchingCondition; | ||
use Google\Analytics\Admin\V1alpha\MatchingCondition\ComparisonType; | ||
use Google\Analytics\Admin\V1alpha\ParameterMutation; | ||
use Google\ApiCore\ApiException; | ||
|
||
/** | ||
* Creates an EventEditRule. | ||
* | ||
* @param string $formattedParent Example format: properties/123/dataStreams/456 | ||
* Please see {@see AnalyticsAdminServiceClient::dataStreamName()} for help formatting this field. | ||
* @param string $eventEditRuleDisplayName The display name of this event edit rule. Maximum of 255 | ||
* characters. | ||
* @param string $eventEditRuleEventConditionsField The name of the field that is compared against for the condition. | ||
* If 'event_name' is specified this condition will apply to the name of the | ||
* event. Otherwise the condition will apply to a parameter with the | ||
* specified name. | ||
* | ||
* This value cannot contain spaces. | ||
* @param int $eventEditRuleEventConditionsComparisonType The type of comparison to be applied to the value. | ||
* @param string $eventEditRuleEventConditionsValue The value being compared against for this condition. The runtime | ||
* implementation may perform type coercion of this value to evaluate this | ||
* condition based on the type of the parameter value. | ||
* @param string $eventEditRuleParameterMutationsParameter The name of the parameter to mutate. | ||
* This value must: | ||
* * be less than 40 characters. | ||
* * be unique across across all mutations within the rule | ||
* * consist only of letters, digits or _ (underscores) | ||
* For event edit rules, the name may also be set to 'event_name' to modify | ||
* the event_name in place. | ||
* @param string $eventEditRuleParameterMutationsParameterValue The value mutation to perform. | ||
* * Must be less than 100 characters. | ||
* * To specify a constant value for the param, use the value's string. | ||
* * To copy value from another parameter, use syntax like | ||
* "[[other_parameter]]" For more details, see this [help center | ||
* article](https://support.google.com/analytics/answer/10085872#modify-an-event&zippy=%2Cin-this-article%2Cmodify-parameters). | ||
*/ | ||
function create_event_edit_rule_sample( | ||
string $formattedParent, | ||
string $eventEditRuleDisplayName, | ||
string $eventEditRuleEventConditionsField, | ||
int $eventEditRuleEventConditionsComparisonType, | ||
string $eventEditRuleEventConditionsValue, | ||
string $eventEditRuleParameterMutationsParameter, | ||
string $eventEditRuleParameterMutationsParameterValue | ||
): void { | ||
// Create a client. | ||
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); | ||
|
||
// Prepare the request message. | ||
$matchingCondition = (new MatchingCondition()) | ||
->setField($eventEditRuleEventConditionsField) | ||
->setComparisonType($eventEditRuleEventConditionsComparisonType) | ||
->setValue($eventEditRuleEventConditionsValue); | ||
$eventEditRuleEventConditions = [$matchingCondition,]; | ||
$parameterMutation = (new ParameterMutation()) | ||
->setParameter($eventEditRuleParameterMutationsParameter) | ||
->setParameterValue($eventEditRuleParameterMutationsParameterValue); | ||
$eventEditRuleParameterMutations = [$parameterMutation,]; | ||
$eventEditRule = (new EventEditRule()) | ||
->setDisplayName($eventEditRuleDisplayName) | ||
->setEventConditions($eventEditRuleEventConditions) | ||
->setParameterMutations($eventEditRuleParameterMutations); | ||
$request = (new CreateEventEditRuleRequest()) | ||
->setParent($formattedParent) | ||
->setEventEditRule($eventEditRule); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var EventEditRule $response */ | ||
$response = $analyticsAdminServiceClient->createEventEditRule($request); | ||
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample has been automatically generated and should be regarded as a code | ||
* template only. It will require modifications to work: | ||
* - It may require correct/in-range values for request initialization. | ||
* - It may require specifying regional endpoints when creating the service client, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$formattedParent = AnalyticsAdminServiceClient::dataStreamName('[PROPERTY]', '[DATA_STREAM]'); | ||
$eventEditRuleDisplayName = '[DISPLAY_NAME]'; | ||
$eventEditRuleEventConditionsField = '[FIELD]'; | ||
$eventEditRuleEventConditionsComparisonType = ComparisonType::COMPARISON_TYPE_UNSPECIFIED; | ||
$eventEditRuleEventConditionsValue = '[VALUE]'; | ||
$eventEditRuleParameterMutationsParameter = '[PARAMETER]'; | ||
$eventEditRuleParameterMutationsParameterValue = '[PARAMETER_VALUE]'; | ||
|
||
create_event_edit_rule_sample( | ||
$formattedParent, | ||
$eventEditRuleDisplayName, | ||
$eventEditRuleEventConditionsField, | ||
$eventEditRuleEventConditionsComparisonType, | ||
$eventEditRuleEventConditionsValue, | ||
$eventEditRuleParameterMutationsParameter, | ||
$eventEditRuleParameterMutationsParameterValue | ||
); | ||
} | ||
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateEventEditRule_sync] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_key_event.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateKeyEvent_sync] | ||
use Google\Analytics\Admin\V1alpha\Client\AnalyticsAdminServiceClient; | ||
use Google\Analytics\Admin\V1alpha\CreateKeyEventRequest; | ||
use Google\Analytics\Admin\V1alpha\KeyEvent; | ||
use Google\Analytics\Admin\V1alpha\KeyEvent\CountingMethod; | ||
use Google\ApiCore\ApiException; | ||
|
||
/** | ||
* Creates a Key Event. | ||
* | ||
* @param int $keyEventCountingMethod The method by which Key Events will be counted across multiple | ||
* events within a session. | ||
* @param string $formattedParent The resource name of the parent property where this Key Event | ||
* will be created. Format: properties/123 | ||
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field. | ||
*/ | ||
function create_key_event_sample(int $keyEventCountingMethod, string $formattedParent): void | ||
{ | ||
// Create a client. | ||
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); | ||
|
||
// Prepare the request message. | ||
$keyEvent = (new KeyEvent()) | ||
->setCountingMethod($keyEventCountingMethod); | ||
$request = (new CreateKeyEventRequest()) | ||
->setKeyEvent($keyEvent) | ||
->setParent($formattedParent); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var KeyEvent $response */ | ||
$response = $analyticsAdminServiceClient->createKeyEvent($request); | ||
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample has been automatically generated and should be regarded as a code | ||
* template only. It will require modifications to work: | ||
* - It may require correct/in-range values for request initialization. | ||
* - It may require specifying regional endpoints when creating the service client, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$keyEventCountingMethod = CountingMethod::COUNTING_METHOD_UNSPECIFIED; | ||
$formattedParent = AnalyticsAdminServiceClient::propertyName('[PROPERTY]'); | ||
|
||
create_key_event_sample($keyEventCountingMethod, $formattedParent); | ||
} | ||
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateKeyEvent_sync] |
70 changes: 70 additions & 0 deletions
70
AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/delete_big_query_link.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteBigQueryLink_sync] | ||
use Google\Analytics\Admin\V1alpha\Client\AnalyticsAdminServiceClient; | ||
use Google\Analytics\Admin\V1alpha\DeleteBigQueryLinkRequest; | ||
use Google\ApiCore\ApiException; | ||
|
||
/** | ||
* Deletes a BigQueryLink on a property. | ||
* | ||
* @param string $formattedName The BigQueryLink to delete. | ||
* Example format: properties/1234/bigQueryLinks/5678 | ||
* Please see {@see AnalyticsAdminServiceClient::bigQueryLinkName()} for help formatting this field. | ||
*/ | ||
function delete_big_query_link_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new DeleteBigQueryLinkRequest()) | ||
->setName($formattedName); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
$analyticsAdminServiceClient->deleteBigQueryLink($request); | ||
printf('Call completed successfully.' . PHP_EOL); | ||
} catch (ApiException $ex) { | ||
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); | ||
} | ||
} | ||
|
||
/** | ||
* Helper to execute the sample. | ||
* | ||
* This sample has been automatically generated and should be regarded as a code | ||
* template only. It will require modifications to work: | ||
* - It may require correct/in-range values for request initialization. | ||
* - It may require specifying regional endpoints when creating the service client, | ||
* please see the apiEndpoint client configuration option for more details. | ||
*/ | ||
function callSample(): void | ||
{ | ||
$formattedName = AnalyticsAdminServiceClient::bigQueryLinkName('[PROPERTY]', '[BIGQUERY_LINK]'); | ||
|
||
delete_big_query_link_sample($formattedName); | ||
} | ||
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteBigQueryLink_sync] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.