Skip to content

Commit

Permalink
feat: [AnalyticsAdmin] add SearchAds360Links methods to the Admin API…
Browse files Browse the repository at this point in the history
… v1alpha (#5860)

* feat: add `GetSearchAds360Link`, `ListSearchAds360Links`, `CreateSearchAds360Link`, `DeleteSearchAds360Link`, `UpdateSearchAds360Link` methods to the Admin API v1alpha
feat: add `SetAutomatedGa4ConfigurationOptOut`, `FetchAutomatedGa4ConfigurationOptOut` methods to the Admin API v1alpha
feat: add `GetBigQueryLink`, `ListBigQueryLinks` methods to the Admin API v1alpha
feat: add `tokens_per_project_per_hour` field to `AccessQuota` type
feat: add `EXPANDED_DATA_SET`, `CHANNEL_GROUP` values to `ChangeHistoryResourceType` enum
feat: add `search_ads_360_link`, `expanded_data_set`, `bigquery_link` values to ChangeHistoryResource.resource oneof field
feat: add `BigQueryLink`, `SearchAds360Link` resource types to the Admin API v1alpha
fix!: remove `LESS_THAN_OR_EQUAL`, `GREATER_THAN_OR_EQUAL` values from NumericFilter.Operation enum
fix!: remove `PARTIAL_REGEXP` value from StringFilter.MatchType enum

PiperOrigin-RevId: 507839187

Source-Link: googleapis/googleapis@b221f5f

Source-Link: googleapis/googleapis-gen@96b7c43
Copy-Tag: eyJwIjoiQW5hbHl0aWNzQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6Ijk2YjdjNDNmYzNkY2E2Yzg3NjdhNmQ3MzFiNTE2ZGFmOWFkNTA2NjgifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Feb 8, 2023
1 parent 127e187 commit 34ca099
Show file tree
Hide file tree
Showing 99 changed files with 6,344 additions and 765 deletions.
Binary file modified AnalyticsAdmin/metadata/V1Alpha/AccessReport.php
Binary file not shown.
58 changes: 53 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/Audience.php
Binary file not shown.
Binary file not shown.
Binary file modified AnalyticsAdmin/metadata/V1Alpha/Resources.php
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
*
* @param string $formattedProperty The property for which to acknowledge user data collection. Please see
* {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field.
* @param string $acknowledgement An acknowledgement that the caller of this method understands the terms
* of user data collection.
* @param string $acknowledgement An acknowledgement that the caller of this method understands the
* terms of user data collection.
*
* This field must contain the exact value:
* "I acknowledge that I have the necessary privacy disclosures and rights
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
* This method is transactional. If any UserLink cannot be created, none of
* the UserLinks will be created.
*
* @param string $formattedParent The account or property that all user links in the request are for.
* This field is required. The parent field in the CreateUserLinkRequest
* @param string $formattedParent The account or property that all user links in the request are
* for. This field is required. The parent field in the CreateUserLinkRequest
* messages must either be empty or match this field.
* Example format: accounts/1234
* Please see {@see AnalyticsAdminServiceClient::accountName()} for help formatting this field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field.
* @param string $audienceDisplayName The display name of the Audience.
* @param string $audienceDescription The description of the Audience.
* @param int $audienceMembershipDurationDays Immutable. The duration a user should stay in an Audience. It cannot be set to more
* than 540 days.
* @param int $audienceMembershipDurationDays Immutable. The duration a user should stay in an Audience. It
* cannot be set to more than 540 days.
* @param int $audienceFilterClausesClauseType Specifies whether this is an include or exclude filter clause.
*/
function create_audience_sample(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
/**
* Creates a conversion event with the specified attributes.
*
* @param string $formattedParent The resource name of the parent property where this conversion event will
* be created. Format: properties/123
* @param string $formattedParent The resource name of the parent property where this conversion
* event will be created. Format: properties/123
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field.
*/
function create_conversion_event_sample(string $formattedParent): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
* May only contain alphanumeric and underscore characters, starting with a
* letter. Max length of 24 characters for user-scoped dimensions, 40
* characters for event-scoped dimensions.
* @param string $customDimensionDisplayName Display name for this custom dimension as shown in the Analytics UI.
* Max length of 82 characters, alphanumeric plus space and underscore
* @param string $customDimensionDisplayName Display name for this custom dimension as shown in the Analytics
* UI. Max length of 82 characters, alphanumeric plus space and underscore
* starting with a letter. Legacy system-generated display names may contain
* square brackets, but updates to this field will never permit square
* brackets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
* @param string $propertyDisplayName Human-readable display name for this property.
*
* The max allowed display name length is 100 UTF-16 code units.
* @param string $propertyTimeZone Reporting Time Zone, used as the day boundary for reports, regardless of
* where the data originates. If the time zone honors DST, Analytics will
* automatically adjust for the changes.
* @param string $propertyTimeZone Reporting Time Zone, used as the day boundary for reports,
* regardless of where the data originates. If the time zone honors DST,
* Analytics will automatically adjust for the changes.
*
* NOTE: Changing the time zone only affects data going forward, and is not
* applied retroactively.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?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_CreateSearchAds360Link_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\Analytics\Admin\V1alpha\SearchAds360Link;
use Google\ApiCore\ApiException;

/**
* Creates a SearchAds360Link.
*
* @param string $formattedParent Example format: properties/1234
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field.
*/
function create_search_ads360_link_sample(string $formattedParent): void
{
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

// Prepare any non-scalar elements to be passed along with the request.
$searchAds360Link = new SearchAds360Link();

// Call the API and handle any network failures.
try {
/** @var SearchAds360Link $response */
$response = $analyticsAdminServiceClient->createSearchAds360Link(
$formattedParent,
$searchAds360Link
);
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]');

create_search_ads360_link_sample($formattedParent);
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSearchAds360Link_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* will be permanently purged.
* https://support.google.com/analytics/answer/6154772
*
* Returns an error if the target is not found, or is not an GA4 Property.
* Returns an error if the target is not found, or is not a GA4 Property.
*
* @param string $formattedName The name of the Property to soft-delete.
* Format: properties/{property_id}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?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_DeleteSearchAds360Link_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\ApiCore\ApiException;

/**
* Deletes a SearchAds360Link on a property.
*
* @param string $formattedName The name of the SearchAds360Link to delete.
* Example format: properties/1234/SearchAds360Links/5678
* Please see {@see AnalyticsAdminServiceClient::searchAds360LinkName()} for help formatting this field.
*/
function delete_search_ads360_link_sample(string $formattedName): void
{
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

// Call the API and handle any network failures.
try {
$analyticsAdminServiceClient->deleteSearchAds360Link($formattedName);
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::searchAds360LinkName(
'[PROPERTY]',
'[SEARCH_ADS_360_LINK]'
);

delete_search_ads360_link_sample($formattedName);
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteSearchAds360Link_sync]
Loading

0 comments on commit 34ca099

Please sign in to comment.