-
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.
fix!: delete
BatchDeleteUserLinks
, DeleteUserLink
, `BatchUpdateUs…
…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
1 parent
d0aa538
commit 5aefad6
Showing
54 changed files
with
5,350 additions
and
1,321 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.
85 changes: 85 additions & 0 deletions
85
AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_rollup_property.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,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] |
75 changes: 75 additions & 0 deletions
75
...sAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_rollup_property_source_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,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] |
92 changes: 92 additions & 0 deletions
92
AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_subproperty.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,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] |
89 changes: 89 additions & 0 deletions
89
...ticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_subproperty_event_filter.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,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] |
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.