-
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`, `DeleteKeyEvent` methods to the Admin API v1beta (#7533) feat: mark `GetConversionEvent`, `CreateConversionEvent`, `ListConversionEvents`, `UpdateConversionEvent`, `DeleteConversionEvent` methods as deprecated in the Admin API v1beta feat: add the `default_conversion_value` field to the `ConversionEvent` resource in the Admin API v1beta feat: add the `include_all_users` and `expand_groups` fields to the `RunAccessReportRequest` resource in the Admin API v1beta feat: add the `gmp_organization` field to the `Account` resource in the Admin API v1beta chore: update go_package to match open source code docs: change comment for methods `DeleteAccount`, `DeleteProperty`, and `RunAccessReport` in service `AnalyticsAdminService` docs: change comment in fields `account` and `property` in message `SearchChangeHistoryEventsRequest` docs: change comment for field `property_type` in message `Property` PiperOrigin-RevId: 653218190 Source-Link: googleapis/googleapis@b05173c Source-Link: googleapis/googleapis-gen@b2881b6 Copy-Tag: eyJwIjoiQW5hbHl0aWNzQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6ImIyODgxYjY3NGUwMDA2NTI1ZTM3YTE2Njg5NDE1MjNjMGY3ZmQ5MTkifQ== Co-authored-by: Brent Shaffer <[email protected]>
- Loading branch information
1 parent
36dafd7
commit db56239
Showing
48 changed files
with
3,554 additions
and
67 deletions.
There are no files selected for viewing
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
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
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/V1beta/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_v1beta_generated_AnalyticsAdminService_CreateKeyEvent_sync] | ||
use Google\Analytics\Admin\V1beta\Client\AnalyticsAdminServiceClient; | ||
use Google\Analytics\Admin\V1beta\CreateKeyEventRequest; | ||
use Google\Analytics\Admin\V1beta\KeyEvent; | ||
use Google\Analytics\Admin\V1beta\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_v1beta_generated_AnalyticsAdminService_CreateKeyEvent_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
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
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
71 changes: 71 additions & 0 deletions
71
AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/delete_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,71 @@ | ||
<?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_v1beta_generated_AnalyticsAdminService_DeleteKeyEvent_sync] | ||
use Google\Analytics\Admin\V1beta\Client\AnalyticsAdminServiceClient; | ||
use Google\Analytics\Admin\V1beta\DeleteKeyEventRequest; | ||
use Google\ApiCore\ApiException; | ||
|
||
/** | ||
* Deletes a Key Event. | ||
* | ||
* @param string $formattedName The resource name of the Key Event to delete. | ||
* Format: properties/{property}/keyEvents/{key_event} | ||
* Example: "properties/123/keyEvents/456" | ||
* Please see {@see AnalyticsAdminServiceClient::keyEventName()} for help formatting this field. | ||
*/ | ||
function delete_key_event_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new DeleteKeyEventRequest()) | ||
->setName($formattedName); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
$analyticsAdminServiceClient->deleteKeyEvent($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::keyEventName('[PROPERTY]', '[KEY_EVENT]'); | ||
|
||
delete_key_event_sample($formattedName); | ||
} | ||
// [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteKeyEvent_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
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
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.