Skip to content

Commit

Permalink
feat: add RunAccessReport method (with bindings for account and pro…
Browse files Browse the repository at this point in the history
…perty resources) to the Admin API v1beta (#5985)

feat: add account-level binding for the`RunAccessReport` method (example: /v1alpha/accounts/1234567:runAccessReport)
feat: add `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettings` methods to the Admin API v1alpha
feat: add `CreateConnectedSiteTag`, `DeleteConnectedSiteTag`, `ListConnectedSiteTags` methods to the Admin API v1alpha
feat: add `EnhancedMeasurementSettings`, `ConnectedSiteTag` resource types to the Admin API v1alpha
feat: add `GetEnhancedMeasurementSettingsRequest`,
`UpdateEnhancedMeasurementSettingsRequest`,`CreateConnectedSiteTagRequest`, `CreateConnectedSiteTagResponse`, `DeleteConnectedSiteTagRequest`, `ListConnectedSiteTagsRequest`, `ListConnectedSiteTagsResponse`
feat: add `ENHANCED_MEASUREMENT_SETTINGS` option to the `ChangeHistoryResourceType` enum
feat: add `enhanced_measurement_settings` option to the `ChangeHistoryResource.resource` oneof field
feat: add `intraday_export_enabled` field to the `BigQueryLink` resource
PiperOrigin-RevId: 518088512
Source-Link: googleapis/googleapis@061a9fb
Source-Link: googleapis/googleapis-gen@c64b9cd
Copy-Tag: eyJwIjoiQW5hbHl0aWNzQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6ImM2NGI5Y2QzODA3M2IyMjAyY2U2ZWIwN2Q1OGM2YThjNTgxZmNlMmMifQ==

feat: add `AccessDimension`, `AccessMetric`, `AccessDateRange`, `AccessFilterExpression`, `AccessFilterExpressionList`, `AccessFilter`, `AccessStringFilter`, `AccessInListFilter`, `AccessNumericFilter`, `AccessBetweenFilter`, `NumericValue`, `AccessOrderBy`, `AccessDimensionHeader`, `AccessMetricHeader`, `AccessRow`, `AccessDimensionValue`, `AccessMetricValue`, `AccessQuota`, `AccessQuotaStatus` types to the Admin API v1beta
PiperOrigin-RevId: 519058583
Source-Link: googleapis/googleapis@71bd02e
Source-Link: googleapis/googleapis-gen@5d4f0f6
Copy-Tag: eyJwIjoiQW5hbHl0aWNzQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjVkNGYwZjZiNDU5MjNkNjJjN2VlYzY1NmJhY2MzZjA2MzNlMDExZjcifQ==
  • Loading branch information
gcf-owl-bot[bot] committed Mar 25, 2023
1 parent 1019bf0 commit 9479f11
Show file tree
Hide file tree
Showing 96 changed files with 6,237 additions and 580 deletions.
32 changes: 27 additions & 5 deletions AnalyticsAdmin/metadata/V1Alpha/AnalyticsAdmin.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified AnalyticsAdmin/metadata/V1Alpha/Resources.php
Binary file not shown.
Binary file added AnalyticsAdmin/metadata/V1Beta/AccessReport.php
Binary file not shown.
30 changes: 26 additions & 4 deletions AnalyticsAdmin/metadata/V1Beta/AnalyticsAdmin.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
* Deletes information about multiple users' links to an account or property.
*
* @param string $formattedParent The account or property that owns the access bindings. The parent
* field in the DeleteAccessBindingRequest messages must either be empty or
* match this field. Formats:
* of all provided values for the 'names' field in DeleteAccessBindingRequest
* messages must match this field. Formats:
* - accounts/{account}
* - properties/{property}
* Please see {@see AnalyticsAdminServiceClient::accountName()} for help formatting this field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
* property.
*
* @param string $formattedParent The account or property that owns the access bindings. The parent
* field in the UpdateAccessBindingRequest messages must either be empty or
* match this field. Formats:
* of all provided AccessBinding in UpdateAccessBindingRequest messages must
* match this field.
* Formats:
* - accounts/{account}
* - properties/{property}
* Please see {@see AnalyticsAdminServiceClient::accountName()} for help formatting this field.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2023 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_CreateConnectedSiteTag_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\Analytics\Admin\V1alpha\ConnectedSiteTag;
use Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagResponse;
use Google\ApiCore\ApiException;

/**
* Creates a connected site tag for a Universal Analytics property. You can
* create a maximum of 20 connected site tags per property.
* Note: This API cannot be used on GA4 properties.
*
* @param string $connectedSiteTagDisplayName User-provided display name for the connected site tag. Must be
* less than 256 characters.
* @param string $connectedSiteTagTagId "Tag ID to forward events to. Also known as the Measurement ID,
* or the "G-ID" (For example: G-12345).
*/
function create_connected_site_tag_sample(
string $connectedSiteTagDisplayName,
string $connectedSiteTagTagId
): void {
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

// Prepare any non-scalar elements to be passed along with the request.
$connectedSiteTag = (new ConnectedSiteTag())
->setDisplayName($connectedSiteTagDisplayName)
->setTagId($connectedSiteTagTagId);

// Call the API and handle any network failures.
try {
/** @var CreateConnectedSiteTagResponse $response */
$response = $analyticsAdminServiceClient->createConnectedSiteTag($connectedSiteTag);
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
{
$connectedSiteTagDisplayName = '[DISPLAY_NAME]';
$connectedSiteTagTagId = '[TAG_ID]';

create_connected_site_tag_sample($connectedSiteTagDisplayName, $connectedSiteTagTagId);
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateConnectedSiteTag_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php
/*
* Copyright 2023 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_DeleteConnectedSiteTag_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\ApiCore\ApiException;

/**
* Deletes a connected site tag for a Universal Analytics property.
* Note: this has no effect on GA4 properties.
*
* 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 delete_connected_site_tag_sample(): void
{
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

// Call the API and handle any network failures.
try {
$analyticsAdminServiceClient->deleteConnectedSiteTag();
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteConnectedSiteTag_sync]
Loading

0 comments on commit 9479f11

Please sign in to comment.