Skip to content

Commit

Permalink
fix!: delete BatchDeleteUserLinks, DeleteUserLink, `BatchUpdateUs…
Browse files Browse the repository at this point in the history
…erLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alph... (#6733)

* fix!: delete `BatchDeleteUserLinks`, `DeleteUserLink`, `BatchUpdateUserLinks`, `UpdateUserLink`, `BatchCreateUserLinks`, `CreateUserLink`, `AuditUserLinks`, `ListUserLinks`, `BatchGetUserLinks`, `GetUserLink` from the Admin API v1 alpha as per the announcement in https://bit.ly/46yBIDt

feat: add `UpdateDataRedactionSettings`, `CreateRollupProperty`, `GetRollupPropertySourceLink`, `ListRollupPropertySourceLinks`, `CreateRollupPropertySourceLink`, `DeleteRollupPropertySourceLink`, `CreateSubproperty`, `CreateSubpropertyEventFilter`, `CreateSubpropertyEventFilter`, `ListSubpropertyEventFilters`, `UpdateSubpropertyEventFilter`, `DeleteSubpropertyEventFilter` methods to the Admin API v1 alpha

feat: add `include_all_users`, `expand_groups` fields to `RunAccessReportRequest`

feat: add `DataRedactionSettings`, `RollupPropertySourceLink`, `SubpropertyEventFilterCondition`, `SubpropertyEventFilterExpression`, `SubpropertyEventFilterExpressionList`, `SubpropertyEventFilterClause`, `SubpropertyEventFilter` types

feat: add the `DATA_REDACTION_SETTINGS` option to the `ChangeHistoryResourceType` enum

feat: add the `data_redaction_settings` field to the `ChangeHistoryResource.resource` oneof field
PiperOrigin-RevId: 574877732
Source-Link: googleapis/googleapis@a3006dd
Source-Link: googleapis/googleapis-gen@4eb740a
Copy-Tag: eyJwIjoiQW5hbHl0aWNzQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjRlYjc0MGE0Y2YyMWMxM2QxMzczN2IzNDg4ZmE0Yzc1MmUxM2I3OWQifQ==
  • Loading branch information
gcf-owl-bot[bot] authored Oct 26, 2023
1 parent d0aa538 commit 5aefad6
Show file tree
Hide file tree
Showing 54 changed files with 5,350 additions and 1,321 deletions.
147 changes: 77 additions & 70 deletions AnalyticsAdmin/metadata/V1Alpha/AnalyticsAdmin.php

Large diffs are not rendered by default.

Binary file modified AnalyticsAdmin/metadata/V1Alpha/Resources.php
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?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_CreateRollupProperty_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\Analytics\Admin\V1alpha\CreateRollupPropertyResponse;
use Google\Analytics\Admin\V1alpha\Property;
use Google\ApiCore\ApiException;

/**
* Create a roll-up property and all roll-up property source links.
*
* @param string $rollupPropertyDisplayName Human-readable display name for this property.
*
* The max allowed display name length is 100 UTF-16 code units.
* @param string $rollupPropertyTimeZone 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.
*
* Format: https://www.iana.org/time-zones
* Example: "America/Los_Angeles"
*/
function create_rollup_property_sample(
string $rollupPropertyDisplayName,
string $rollupPropertyTimeZone
): void {
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

// Prepare any non-scalar elements to be passed along with the request.
$rollupProperty = (new Property())
->setDisplayName($rollupPropertyDisplayName)
->setTimeZone($rollupPropertyTimeZone);

// Call the API and handle any network failures.
try {
/** @var CreateRollupPropertyResponse $response */
$response = $analyticsAdminServiceClient->createRollupProperty($rollupProperty);
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
{
$rollupPropertyDisplayName = '[DISPLAY_NAME]';
$rollupPropertyTimeZone = '[TIME_ZONE]';

create_rollup_property_sample($rollupPropertyDisplayName, $rollupPropertyTimeZone);
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupProperty_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?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_CreateRollupPropertySourceLink_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\Analytics\Admin\V1alpha\RollupPropertySourceLink;
use Google\ApiCore\ApiException;

/**
* Creates a roll-up property source link.
* Only roll-up properties can have source links, so this method will throw an
* error if used on other types of properties.
*
* @param string $formattedParent Format: properties/{property_id}
* Example: properties/1234
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field.
*/
function create_rollup_property_source_link_sample(string $formattedParent): void
{
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

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

// Call the API and handle any network failures.
try {
/** @var RollupPropertySourceLink $response */
$response = $analyticsAdminServiceClient->createRollupPropertySourceLink(
$formattedParent,
$rollupPropertySourceLink
);
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_rollup_property_source_link_sample($formattedParent);
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateRollupPropertySourceLink_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?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_CreateSubproperty_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\Analytics\Admin\V1alpha\CreateSubpropertyResponse;
use Google\Analytics\Admin\V1alpha\Property;
use Google\ApiCore\ApiException;

/**
* Create a subproperty and a subproperty event filter that applies to the
* created subproperty.
*
* @param string $formattedParent The ordinary property for which to create a subproperty.
* Format: properties/property_id
* Example: properties/123
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field.
* @param string $subpropertyDisplayName Human-readable display name for this property.
*
* The max allowed display name length is 100 UTF-16 code units.
* @param string $subpropertyTimeZone 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.
*
* Format: https://www.iana.org/time-zones
* Example: "America/Los_Angeles"
*/
function create_subproperty_sample(
string $formattedParent,
string $subpropertyDisplayName,
string $subpropertyTimeZone
): void {
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

// Prepare any non-scalar elements to be passed along with the request.
$subproperty = (new Property())
->setDisplayName($subpropertyDisplayName)
->setTimeZone($subpropertyTimeZone);

// Call the API and handle any network failures.
try {
/** @var CreateSubpropertyResponse $response */
$response = $analyticsAdminServiceClient->createSubproperty($formattedParent, $subproperty);
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]');
$subpropertyDisplayName = '[DISPLAY_NAME]';
$subpropertyTimeZone = '[TIME_ZONE]';

create_subproperty_sample($formattedParent, $subpropertyDisplayName, $subpropertyTimeZone);
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubproperty_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?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_CreateSubpropertyEventFilter_sync]
use Google\Analytics\Admin\V1alpha\AnalyticsAdminServiceClient;
use Google\Analytics\Admin\V1alpha\SubpropertyEventFilter;
use Google\Analytics\Admin\V1alpha\SubpropertyEventFilterClause;
use Google\Analytics\Admin\V1alpha\SubpropertyEventFilterClause\FilterClauseType;
use Google\Analytics\Admin\V1alpha\SubpropertyEventFilterExpression;
use Google\ApiCore\ApiException;

/**
* Creates a subproperty Event Filter.
*
* @param string $formattedParent The ordinary property for which to create a subproperty event
* filter. Format: properties/property_id Example: properties/123
* Please see {@see AnalyticsAdminServiceClient::propertyName()} for help formatting this field.
* @param int $subpropertyEventFilterFilterClausesFilterClauseType The type for the filter clause.
*/
function create_subproperty_event_filter_sample(
string $formattedParent,
int $subpropertyEventFilterFilterClausesFilterClauseType
): void {
// Create a client.
$analyticsAdminServiceClient = new AnalyticsAdminServiceClient();

// Prepare any non-scalar elements to be passed along with the request.
$subpropertyEventFilterFilterClausesFilterExpression = new SubpropertyEventFilterExpression();
$subpropertyEventFilterClause = (new SubpropertyEventFilterClause())
->setFilterClauseType($subpropertyEventFilterFilterClausesFilterClauseType)
->setFilterExpression($subpropertyEventFilterFilterClausesFilterExpression);
$subpropertyEventFilterFilterClauses = [$subpropertyEventFilterClause,];
$subpropertyEventFilter = (new SubpropertyEventFilter())
->setFilterClauses($subpropertyEventFilterFilterClauses);

// Call the API and handle any network failures.
try {
/** @var SubpropertyEventFilter $response */
$response = $analyticsAdminServiceClient->createSubpropertyEventFilter(
$formattedParent,
$subpropertyEventFilter
);
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]');
$subpropertyEventFilterFilterClausesFilterClauseType = FilterClauseType::FILTER_CLAUSE_TYPE_UNSPECIFIED;

create_subproperty_event_filter_sample(
$formattedParent,
$subpropertyEventFilterFilterClausesFilterClauseType
);
}
// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateSubpropertyEventFilter_sync]
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* If the accounts are not restored before the expiration time, the account
* and all child resources (eg: Properties, GoogleAdsLinks, Streams,
* UserLinks) will be permanently purged.
* AccessBindings) will be permanently purged.
* https://support.google.com/analytics/answer/6154772
*
* Returns an error if the target is not found.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* However, they can be restored using the Trash Can UI.
*
* If the properties are not restored before the expiration time, the Property
* and all child resources (eg: GoogleAdsLinks, Streams, UserLinks)
* and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings)
* will be permanently purged.
* https://support.google.com/analytics/answer/6154772
*
Expand Down
Loading

0 comments on commit 5aefad6

Please sign in to comment.