diff --git a/AnalyticsAdmin/metadata/V1Alpha/AnalyticsAdmin.php b/AnalyticsAdmin/metadata/V1Alpha/AnalyticsAdmin.php index 51b0e4b0a14..c1c3637a397 100644 --- a/AnalyticsAdmin/metadata/V1Alpha/AnalyticsAdmin.php +++ b/AnalyticsAdmin/metadata/V1Alpha/AnalyticsAdmin.php @@ -27,7 +27,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' - + 4google/analytics/admin/v1alpha/analytics_admin.protogoogle.analytics.admin.v1alpha-google/analytics/admin/v1alpha/audience.proto6google/analytics/admin/v1alpha/expanded_data_set.proto.google/analytics/admin/v1alpha/resources.protogoogle/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto" RunAccessReportRequest entity ( C @@ -485,7 +485,24 @@ public static function initOnce() { page_token ( "z ListBigQueryLinksResponseD bigquery_links ( 2,.google.analytics.admin.v1alpha.BigQueryLink -next_page_token ( 2 +next_page_token ( "x +%GetEnhancedMeasurementSettingsRequestO +name ( BAAA; +9analyticsadmin.googleapis.com/EnhancedMeasurementSettings" +(UpdateEnhancedMeasurementSettingsRequestg +enhanced_measurement_settings ( 2;.google.analytics.admin.v1alpha.EnhancedMeasurementSettingsBA4 + update_mask ( 2.google.protobuf.FieldMaskBA" +CreateConnectedSiteTagRequest +property ( Q +connected_site_tag ( 20.google.analytics.admin.v1alpha.ConnectedSiteTagBA" +CreateConnectedSiteTagResponse"A +DeleteConnectedSiteTagRequest +property (  +tag_id ( "0 +ListConnectedSiteTagsRequest +property ( "n +ListConnectedSiteTagsResponseM +connected_site_tags ( 20.google.analytics.admin.v1alpha.ConnectedSiteTag2 AnalyticsAdminService GetAccount1.google.analytics.admin.v1alpha.GetAccountRequest\'.google.analytics.admin.v1alpha.Account")/v1alpha/{name=accounts/*}Aname @@ -570,8 +587,8 @@ public static function initOnce() { DeleteSearchAds360Link=.google.analytics.admin.v1alpha.DeleteSearchAds360LinkRequest.google.protobuf.Empty"?2*0/v1alpha/{name=properties/*/searchAds360Links/*}Aname UpdateSearchAds360Link=.google.analytics.admin.v1alpha.UpdateSearchAds360LinkRequest0.google.analytics.admin.v1alpha.SearchAds360Link"[2D/v1alpha/{search_ads_360_link.name=properties/*/searchAds360Links/*}:search_ads_360_linkAsearch_ads_360_link,update_mask GetAttributionSettings=.google.analytics.admin.v1alpha.GetAttributionSettingsRequest3.google.analytics.admin.v1alpha.AttributionSettings"?20/v1alpha/{name=properties/*/attributionSettings}Aname -UpdateAttributionSettings@.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest3.google.analytics.admin.v1alpha.AttributionSettings"]2E/v1alpha/{attribution_settings.name=properties/*/attributionSettings}:attribution_settingsA attribution_settings,update_mask -RunAccessReport6.google.analytics.admin.v1alpha.RunAccessReportRequest7.google.analytics.admin.v1alpha.RunAccessReportResponse"93"./v1alpha/{entity=properties/*}:runAccessReport:* +UpdateAttributionSettings@.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest3.google.analytics.admin.v1alpha.AttributionSettings"]2E/v1alpha/{attribution_settings.name=properties/*/attributionSettings}:attribution_settingsA attribution_settings,update_mask +RunAccessReport6.google.analytics.admin.v1alpha.RunAccessReportRequest7.google.analytics.admin.v1alpha.RunAccessReportResponse"lf"./v1alpha/{entity=properties/*}:runAccessReport:*Z1",/v1alpha/{entity=accounts/*}:runAccessReport:* CreateAccessBinding:.google.analytics.admin.v1alpha.CreateAccessBindingRequest-.google.analytics.admin.v1alpha.AccessBinding"~"+/v1alpha/{parent=accounts/*}/accessBindings:access_bindingZ?"-/v1alpha/{parent=properties/*}/accessBindings:access_bindingAparent,access_binding GetAccessBinding7.google.analytics.admin.v1alpha.GetAccessBindingRequest-.google.analytics.admin.v1alpha.AccessBinding"k^+/v1alpha/{name=accounts/*/accessBindings/*}Z/-/v1alpha/{name=properties/*/accessBindings/*}Aname UpdateAccessBinding:.google.analytics.admin.v1alpha.UpdateAccessBindingRequest-.google.analytics.admin.v1alpha.AccessBinding"2:/v1alpha/{access_binding.name=accounts/*/accessBindings/*}:access_bindingZN2.google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse"5/"*/v1alpha/properties:createConnectedSiteTag:* +DeleteConnectedSiteTag=.google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest.google.protobuf.Empty"5/"*/v1alpha/properties:deleteConnectedSiteTag:* +ListConnectedSiteTags<.google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest=.google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse"4.")/v1alpha/properties:listConnectedSiteTags:*Aanalyticsadmin.googleapis.comAhttps://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/analytics.manage.users,https://www.googleapis.com/auth/analytics.manage.users.readonly,https://www.googleapis.com/auth/analytics.readonlyB "com.google.analytics.admin.v1alphaBAnalyticsAdminProtoPZCgoogle.golang.org/genproto/googleapis/analytics/admin/v1alpha;adminbproto3' , true); diff --git a/AnalyticsAdmin/metadata/V1Alpha/Resources.php b/AnalyticsAdmin/metadata/V1Alpha/Resources.php index f1d16beb515..f50f9f8a633 100644 Binary files a/AnalyticsAdmin/metadata/V1Alpha/Resources.php and b/AnalyticsAdmin/metadata/V1Alpha/Resources.php differ diff --git a/AnalyticsAdmin/metadata/V1Beta/AccessReport.php b/AnalyticsAdmin/metadata/V1Beta/AccessReport.php new file mode 100644 index 00000000000..bc7f5852760 Binary files /dev/null and b/AnalyticsAdmin/metadata/V1Beta/AccessReport.php differ diff --git a/AnalyticsAdmin/metadata/V1Beta/AnalyticsAdmin.php b/AnalyticsAdmin/metadata/V1Beta/AnalyticsAdmin.php index b7a9efe651c..7c565dc6929 100644 --- a/AnalyticsAdmin/metadata/V1Beta/AnalyticsAdmin.php +++ b/AnalyticsAdmin/metadata/V1Beta/AnalyticsAdmin.php @@ -14,6 +14,7 @@ public static function initOnce() { if (static::$is_initialized == true) { return; } + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); \GPBMetadata\Google\Analytics\Admin\V1Beta\Resources::initOnce(); \GPBMetadata\Google\Api\Annotations::initOnce(); \GPBMetadata\Google\Api\Client::initOnce(); @@ -24,8 +25,28 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' - -3google/analytics/admin/v1beta/analytics_admin.protogoogle.analytics.admin.v1betagoogle/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"P + +3google/analytics/admin/v1beta/analytics_admin.protogoogle.analytics.admin.v1beta-google/analytics/admin/v1beta/resources.protogoogle/api/annotations.protogoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto" +RunAccessReportRequest +entity ( B + +dimensions ( 2..google.analytics.admin.v1beta.AccessDimension< +metrics ( 2+.google.analytics.admin.v1beta.AccessMetricC + date_ranges ( 2..google.analytics.admin.v1beta.AccessDateRangeO +dimension_filter ( 25.google.analytics.admin.v1beta.AccessFilterExpressionL + metric_filter ( 25.google.analytics.admin.v1beta.AccessFilterExpression +offset ( +limit ( + time_zone ( ? + order_bys + ( 2,.google.analytics.admin.v1beta.AccessOrderBy +return_entity_quota (" +RunAccessReportResponseO +dimension_headers ( 24.google.analytics.admin.v1beta.AccessDimensionHeaderI +metric_headers ( 21.google.analytics.admin.v1beta.AccessMetricHeader6 +rows ( 2(.google.analytics.admin.v1beta.AccessRow + row_count (9 +quota ( 2*.google.analytics.admin.v1beta.AccessQuota"P GetAccountRequest; name ( B-AA\' %analyticsadmin.googleapis.com/Account"R @@ -233,7 +254,7 @@ public static function initOnce() { next_page_token ( "V GetDataStreamRequest> name ( B0AA* -(analyticsadmin.googleapis.com/DataStream2L +(analyticsadmin.googleapis.com/DataStream2N AnalyticsAdminService GetAccount0.google.analytics.admin.v1beta.GetAccountRequest&.google.analytics.admin.v1beta.Account"(/v1beta/{name=accounts/*}Aname @@ -282,7 +303,8 @@ public static function initOnce() { DeleteDataStream6.google.analytics.admin.v1beta.DeleteDataStreamRequest.google.protobuf.Empty"8+*)/v1beta/{name=properties/*/dataStreams/*}Aname UpdateDataStream6.google.analytics.admin.v1beta.UpdateDataStreamRequest).google.analytics.admin.v1beta.DataStream"dD25/v1beta/{data_stream.name=properties/*/dataStreams/*}: data_streamAdata_stream,update_mask ListDataStreams5.google.analytics.admin.v1beta.ListDataStreamsRequest6.google.analytics.admin.v1beta.ListDataStreamsResponse":+)/v1beta/{parent=properties/*}/dataStreamsAparent - GetDataStream3.google.analytics.admin.v1beta.GetDataStreamRequest).google.analytics.admin.v1beta.DataStream"8+)/v1beta/{name=properties/*/dataStreams/*}AnameAanalyticsadmin.googleapis.comAahttps://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/analytics.readonlyB~ + GetDataStream3.google.analytics.admin.v1beta.GetDataStreamRequest).google.analytics.admin.v1beta.DataStream"8+)/v1beta/{name=properties/*/dataStreams/*}Aname +RunAccessReport5.google.analytics.admin.v1beta.RunAccessReportRequest6.google.analytics.admin.v1beta.RunAccessReportResponse"jd"-/v1beta/{entity=properties/*}:runAccessReport:*Z0"+/v1beta/{entity=accounts/*}:runAccessReport:*Aanalyticsadmin.googleapis.comAahttps://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/analytics.readonlyB~ !com.google.analytics.admin.v1betaBAnalyticsAdminProtoPZBgoogle.golang.org/genproto/googleapis/analytics/admin/v1beta;adminbproto3' , true); diff --git a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_delete_access_bindings.php b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_delete_access_bindings.php index 2fc083eea2c..e2872ee76c9 100644 --- a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_delete_access_bindings.php +++ b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_delete_access_bindings.php @@ -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. diff --git a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_update_access_bindings.php b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_update_access_bindings.php index d9ecff964ae..dec3209e83b 100644 --- a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_update_access_bindings.php +++ b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/batch_update_access_bindings.php @@ -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. diff --git a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_connected_site_tag.php b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_connected_site_tag.php new file mode 100644 index 00000000000..b5dc7704193 --- /dev/null +++ b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/create_connected_site_tag.php @@ -0,0 +1,79 @@ +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] diff --git a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/delete_connected_site_tag.php b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/delete_connected_site_tag.php new file mode 100644 index 00000000000..26b2ab4ce47 --- /dev/null +++ b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/delete_connected_site_tag.php @@ -0,0 +1,52 @@ +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] diff --git a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/get_enhanced_measurement_settings.php b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/get_enhanced_measurement_settings.php new file mode 100644 index 00000000000..4a03648889f --- /dev/null +++ b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/get_enhanced_measurement_settings.php @@ -0,0 +1,74 @@ +getEnhancedMeasurementSettings($formattedName); + 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 +{ + $formattedName = AnalyticsAdminServiceClient::enhancedMeasurementSettingsName( + '[PROPERTY]', + '[DATA_STREAM]' + ); + + get_enhanced_measurement_settings_sample($formattedName); +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEnhancedMeasurementSettings_sync] diff --git a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/list_connected_site_tags.php b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/list_connected_site_tags.php new file mode 100644 index 00000000000..05523c46073 --- /dev/null +++ b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/list_connected_site_tags.php @@ -0,0 +1,55 @@ +listConnectedSiteTags(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConnectedSiteTags_sync] diff --git a/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/update_enhanced_measurement_settings.php b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/update_enhanced_measurement_settings.php new file mode 100644 index 00000000000..6ff580b6b50 --- /dev/null +++ b/AnalyticsAdmin/samples/V1alpha/AnalyticsAdminServiceClient/update_enhanced_measurement_settings.php @@ -0,0 +1,78 @@ +setSearchQueryParameter($enhancedMeasurementSettingsSearchQueryParameter); + $updateMask = new FieldMask(); + + // Call the API and handle any network failures. + try { + /** @var EnhancedMeasurementSettings $response */ + $response = $analyticsAdminServiceClient->updateEnhancedMeasurementSettings( + $enhancedMeasurementSettings, + $updateMask + ); + 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 +{ + $enhancedMeasurementSettingsSearchQueryParameter = '[SEARCH_QUERY_PARAMETER]'; + + update_enhanced_measurement_settings_sample($enhancedMeasurementSettingsSearchQueryParameter); +} +// [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEnhancedMeasurementSettings_sync] diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/acknowledge_user_data_collection.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/acknowledge_user_data_collection.php index 1a0c49bc59a..55579af58ff 100644 --- a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/acknowledge_user_data_collection.php +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/acknowledge_user_data_collection.php @@ -31,12 +31,13 @@ * Acknowledges the terms of user data collection for the specified property. * * This acknowledgement must be completed (either in the Google Analytics UI - * or via this API) before MeasurementProtocolSecret resources may be created. + * or through this API) before MeasurementProtocolSecret resources may be + * created. * * @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 diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_conversion_event.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_conversion_event.php index e87730dc20c..a7633888ccd 100644 --- a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_conversion_event.php +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_conversion_event.php @@ -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 diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_custom_dimension.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_custom_dimension.php index 89bc041c625..43173bd1055 100644 --- a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_custom_dimension.php +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_custom_dimension.php @@ -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. diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_property.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_property.php index 8ece36e5836..73ef1089ce4 100644 --- a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_property.php +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/create_property.php @@ -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. diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/delete_property.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/delete_property.php index 7af8eb52c8b..0826e09f2b9 100644 --- a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/delete_property.php +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/delete_property.php @@ -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} diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/run_access_report.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/run_access_report.php new file mode 100644 index 00000000000..ed1d4e0b843 --- /dev/null +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/run_access_report.php @@ -0,0 +1,65 @@ +runAccessReport(); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END analyticsadmin_v1beta_generated_AnalyticsAdminService_RunAccessReport_sync] diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/search_change_history_events.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/search_change_history_events.php index 69f77faacf3..2d00e95f038 100644 --- a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/search_change_history_events.php +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/search_change_history_events.php @@ -32,7 +32,8 @@ * Searches through all changes to an account or its children given the * specified set of filters. * - * @param string $formattedAccount The account resource for which to return change history resources. Please see + * @param string $formattedAccount The account resource for which to return change history + * resources. Please see * {@see AnalyticsAdminServiceClient::accountName()} for help formatting this field. */ function search_change_history_events_sample(string $formattedAccount): void diff --git a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/update_property.php b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/update_property.php index a2d09cc6d56..9a21d149121 100644 --- a/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/update_property.php +++ b/AnalyticsAdmin/samples/V1beta/AnalyticsAdminServiceClient/update_property.php @@ -34,9 +34,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. diff --git a/AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceGrpcClient.php b/AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceGrpcClient.php index f3ed4f5bda7..9d7fc65e6f9 100644 --- a/AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceGrpcClient.php +++ b/AnalyticsAdmin/src/V1alpha/AnalyticsAdminServiceGrpcClient.php @@ -1655,4 +1655,88 @@ public function ListBigQueryLinks(\Google\Analytics\Admin\V1alpha\ListBigQueryLi $metadata, $options); } + /** + * Returns the enhanced measurement settings for this data stream. + * Note that the stream must enable enhanced measurement for these settings to + * take effect. + * @param \Google\Analytics\Admin\V1alpha\GetEnhancedMeasurementSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function GetEnhancedMeasurementSettings(\Google\Analytics\Admin\V1alpha\GetEnhancedMeasurementSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings', + $argument, + ['\Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings', 'decode'], + $metadata, $options); + } + + /** + * Updates the enhanced measurement settings for this data stream. + * Note that the stream must enable enhanced measurement for these settings to + * take effect. + * @param \Google\Analytics\Admin\V1alpha\UpdateEnhancedMeasurementSettingsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function UpdateEnhancedMeasurementSettings(\Google\Analytics\Admin\V1alpha\UpdateEnhancedMeasurementSettingsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings', + $argument, + ['\Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings', 'decode'], + $metadata, $options); + } + + /** + * 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 \Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function CreateConnectedSiteTag(\Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag', + $argument, + ['\Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagResponse', 'decode'], + $metadata, $options); + } + + /** + * Deletes a connected site tag for a Universal Analytics property. + * Note: this has no effect on GA4 properties. + * @param \Google\Analytics\Admin\V1alpha\DeleteConnectedSiteTagRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function DeleteConnectedSiteTag(\Google\Analytics\Admin\V1alpha\DeleteConnectedSiteTagRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag', + $argument, + ['\Google\Protobuf\GPBEmpty', 'decode'], + $metadata, $options); + } + + /** + * Lists the connected site tags for a Universal Analytics property. A maximum + * of 20 connected site tags will be returned. Note: this has no effect on GA4 + * property. + * @param \Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsRequest $argument input argument + * @param array $metadata metadata + * @param array $options call options + * @return \Grpc\UnaryCall + */ + public function ListConnectedSiteTags(\Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsRequest $argument, + $metadata = [], $options = []) { + return $this->_simpleRequest('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags', + $argument, + ['\Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsResponse', 'decode'], + $metadata, $options); + } + } diff --git a/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php b/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php index cfab205bc33..a7dfe0bdd48 100644 --- a/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/BatchDeleteAccessBindingsRequest.php @@ -17,8 +17,8 @@ class BatchDeleteAccessBindingsRequest extends \Google\Protobuf\Internal\Message { /** * Required. 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} * @@ -41,8 +41,8 @@ class BatchDeleteAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * @type string $parent * Required. 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} * @type array<\Google\Analytics\Admin\V1alpha\DeleteAccessBindingRequest>|\Google\Protobuf\Internal\RepeatedField $requests @@ -57,8 +57,8 @@ public function __construct($data = NULL) { /** * Required. 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} * @@ -72,8 +72,8 @@ public function getParent() /** * Required. 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} * diff --git a/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php b/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php index 15496ada842..d04a6bb25cc 100644 --- a/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/BatchUpdateAccessBindingsRequest.php @@ -17,8 +17,9 @@ class BatchUpdateAccessBindingsRequest extends \Google\Protobuf\Internal\Message { /** * Required. 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} * @@ -41,8 +42,9 @@ class BatchUpdateAccessBindingsRequest extends \Google\Protobuf\Internal\Message * * @type string $parent * Required. 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} * @type array<\Google\Analytics\Admin\V1alpha\UpdateAccessBindingRequest>|\Google\Protobuf\Internal\RepeatedField $requests @@ -57,8 +59,9 @@ public function __construct($data = NULL) { /** * Required. 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} * @@ -72,8 +75,9 @@ public function getParent() /** * Required. 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} * diff --git a/AnalyticsAdmin/src/V1alpha/BigQueryLink.php b/AnalyticsAdmin/src/V1alpha/BigQueryLink.php index 28e73a038f8..ed798e073c5 100644 --- a/AnalyticsAdmin/src/V1alpha/BigQueryLink.php +++ b/AnalyticsAdmin/src/V1alpha/BigQueryLink.php @@ -52,6 +52,12 @@ class BigQueryLink extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool streaming_export_enabled = 5; */ private $streaming_export_enabled = false; + /** + * If set true, enables intraday export to the linked Google Cloud project. + * + * Generated from protobuf field bool intraday_export_enabled = 9; + */ + private $intraday_export_enabled = false; /** * If set true, exported data will include advertising identifiers for mobile * app streams. @@ -98,6 +104,8 @@ class BigQueryLink extends \Google\Protobuf\Internal\Message * If set true, enables daily data export to the linked Google Cloud project. * @type bool $streaming_export_enabled * If set true, enables streaming export to the linked Google Cloud project. + * @type bool $intraday_export_enabled + * If set true, enables intraday export to the linked Google Cloud project. * @type bool $include_advertising_id * If set true, exported data will include advertising identifiers for mobile * app streams. @@ -269,6 +277,32 @@ public function setStreamingExportEnabled($var) return $this; } + /** + * If set true, enables intraday export to the linked Google Cloud project. + * + * Generated from protobuf field bool intraday_export_enabled = 9; + * @return bool + */ + public function getIntradayExportEnabled() + { + return $this->intraday_export_enabled; + } + + /** + * If set true, enables intraday export to the linked Google Cloud project. + * + * Generated from protobuf field bool intraday_export_enabled = 9; + * @param bool $var + * @return $this + */ + public function setIntradayExportEnabled($var) + { + GPBUtil::checkBool($var); + $this->intraday_export_enabled = $var; + + return $this; + } + /** * If set true, exported data will include advertising identifiers for mobile * app streams. diff --git a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php b/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php index 72d07549d65..72f8a9cf524 100644 --- a/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php +++ b/AnalyticsAdmin/src/V1alpha/ChangeHistoryChange/ChangeHistoryResource.php @@ -60,6 +60,8 @@ class ChangeHistoryResource extends \Google\Protobuf\Internal\Message * A snapshot of an ExpandedDataSet resource in change history. * @type \Google\Analytics\Admin\V1alpha\BigQueryLink $bigquery_link * A snapshot of a BigQuery link resource in change history. + * @type \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings $enhanced_measurement_settings + * A snapshot of EnhancedMeasurementSettings resource in change history. * } */ public function __construct($data = NULL) { @@ -598,6 +600,37 @@ public function setBigqueryLink($var) return $this; } + /** + * A snapshot of EnhancedMeasurementSettings resource in change history. + * + * Generated from protobuf field .google.analytics.admin.v1alpha.EnhancedMeasurementSettings enhanced_measurement_settings = 24; + * @return \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings|null + */ + public function getEnhancedMeasurementSettings() + { + return $this->readOneof(24); + } + + public function hasEnhancedMeasurementSettings() + { + return $this->hasOneof(24); + } + + /** + * A snapshot of EnhancedMeasurementSettings resource in change history. + * + * Generated from protobuf field .google.analytics.admin.v1alpha.EnhancedMeasurementSettings enhanced_measurement_settings = 24; + * @param \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings $var + * @return $this + */ + public function setEnhancedMeasurementSettings($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings::class); + $this->writeOneof(24, $var); + + return $this; + } + /** * @return string */ diff --git a/AnalyticsAdmin/src/V1alpha/ChangeHistoryResourceType.php b/AnalyticsAdmin/src/V1alpha/ChangeHistoryResourceType.php index 9cbc0dfc993..e3b5efeb2e9 100644 --- a/AnalyticsAdmin/src/V1alpha/ChangeHistoryResourceType.php +++ b/AnalyticsAdmin/src/V1alpha/ChangeHistoryResourceType.php @@ -121,6 +121,12 @@ class ChangeHistoryResourceType * Generated from protobuf enum CHANNEL_GROUP = 22; */ const CHANNEL_GROUP = 22; + /** + * EnhancedMeasurementSettings resource + * + * Generated from protobuf enum ENHANCED_MEASUREMENT_SETTINGS = 24; + */ + const ENHANCED_MEASUREMENT_SETTINGS = 24; private static $valueToName = [ self::CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED => 'CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED', @@ -141,6 +147,7 @@ class ChangeHistoryResourceType self::ATTRIBUTION_SETTINGS => 'ATTRIBUTION_SETTINGS', self::EXPANDED_DATA_SET => 'EXPANDED_DATA_SET', self::CHANNEL_GROUP => 'CHANNEL_GROUP', + self::ENHANCED_MEASUREMENT_SETTINGS => 'ENHANCED_MEASUREMENT_SETTINGS', ]; public static function name($value) diff --git a/AnalyticsAdmin/src/V1alpha/ConnectedSiteTag.php b/AnalyticsAdmin/src/V1alpha/ConnectedSiteTag.php new file mode 100644 index 00000000000..ade62deeb5b --- /dev/null +++ b/AnalyticsAdmin/src/V1alpha/ConnectedSiteTag.php @@ -0,0 +1,109 @@ +google.analytics.admin.v1alpha.ConnectedSiteTag + */ +class ConnectedSiteTag extends \Google\Protobuf\Internal\Message +{ + /** + * Required. User-provided display name for the connected site tag. Must be + * less than 256 characters. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $display_name = ''; + /** + * Required. "Tag ID to forward events to. Also known as the Measurement ID, + * or the "G-ID" (For example: G-12345). + * + * Generated from protobuf field string tag_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $tag_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Required. User-provided display name for the connected site tag. Must be + * less than 256 characters. + * @type string $tag_id + * Required. "Tag ID to forward events to. Also known as the Measurement ID, + * or the "G-ID" (For example: G-12345). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Alpha\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. User-provided display name for the connected site tag. Must be + * less than 256 characters. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. User-provided display name for the connected site tag. Must be + * less than 256 characters. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. "Tag ID to forward events to. Also known as the Measurement ID, + * or the "G-ID" (For example: G-12345). + * + * Generated from protobuf field string tag_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTagId() + { + return $this->tag_id; + } + + /** + * Required. "Tag ID to forward events to. Also known as the Measurement ID, + * or the "G-ID" (For example: G-12345). + * + * Generated from protobuf field string tag_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTagId($var) + { + GPBUtil::checkString($var, True); + $this->tag_id = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1alpha/ConversionEvent.php b/AnalyticsAdmin/src/V1alpha/ConversionEvent.php index d4370b24788..2676647cfe6 100644 --- a/AnalyticsAdmin/src/V1alpha/ConversionEvent.php +++ b/AnalyticsAdmin/src/V1alpha/ConversionEvent.php @@ -36,7 +36,7 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message */ private $create_time = null; /** - * Output only. If set, this event can currently be deleted via + * Output only. If set, this event can currently be deleted with * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -69,7 +69,7 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Timestamp $create_time * Output only. Time when this conversion event was created in the property. * @type bool $deletable - * Output only. If set, this event can currently be deleted via + * Output only. If set, this event can currently be deleted with * DeleteConversionEvent. * @type bool $custom * Output only. If set to true, this conversion event refers to a custom @@ -178,7 +178,7 @@ public function setCreateTime($var) } /** - * Output only. If set, this event can currently be deleted via + * Output only. If set, this event can currently be deleted with * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -190,7 +190,7 @@ public function getDeletable() } /** - * Output only. If set, this event can currently be deleted via + * Output only. If set, this event can currently be deleted with * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagRequest.php b/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagRequest.php new file mode 100644 index 00000000000..bee5ebdc625 --- /dev/null +++ b/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagRequest.php @@ -0,0 +1,123 @@ +google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest + */ +class CreateConnectedSiteTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The Universal Analytics property to create connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * + * Generated from protobuf field string property = 1; + */ + private $property = ''; + /** + * Required. The tag to add to the Universal Analytics property + * + * Generated from protobuf field .google.analytics.admin.v1alpha.ConnectedSiteTag connected_site_tag = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $connected_site_tag = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $property + * The Universal Analytics property to create connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * @type \Google\Analytics\Admin\V1alpha\ConnectedSiteTag $connected_site_tag + * Required. The tag to add to the Universal Analytics property + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The Universal Analytics property to create connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * + * Generated from protobuf field string property = 1; + * @return string + */ + public function getProperty() + { + return $this->property; + } + + /** + * The Universal Analytics property to create connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * + * Generated from protobuf field string property = 1; + * @param string $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkString($var, True); + $this->property = $var; + + return $this; + } + + /** + * Required. The tag to add to the Universal Analytics property + * + * Generated from protobuf field .google.analytics.admin.v1alpha.ConnectedSiteTag connected_site_tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Analytics\Admin\V1alpha\ConnectedSiteTag|null + */ + public function getConnectedSiteTag() + { + return $this->connected_site_tag; + } + + public function hasConnectedSiteTag() + { + return isset($this->connected_site_tag); + } + + public function clearConnectedSiteTag() + { + unset($this->connected_site_tag); + } + + /** + * Required. The tag to add to the Universal Analytics property + * + * Generated from protobuf field .google.analytics.admin.v1alpha.ConnectedSiteTag connected_site_tag = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Analytics\Admin\V1alpha\ConnectedSiteTag $var + * @return $this + */ + public function setConnectedSiteTag($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1alpha\ConnectedSiteTag::class); + $this->connected_site_tag = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagResponse.php b/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagResponse.php new file mode 100644 index 00000000000..b3f4637fa86 --- /dev/null +++ b/AnalyticsAdmin/src/V1alpha/CreateConnectedSiteTagResponse.php @@ -0,0 +1,33 @@ +google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse + */ +class CreateConnectedSiteTagResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AnalyticsAdmin/src/V1alpha/DeleteConnectedSiteTagRequest.php b/AnalyticsAdmin/src/V1alpha/DeleteConnectedSiteTagRequest.php new file mode 100644 index 00000000000..dd6bb1f919f --- /dev/null +++ b/AnalyticsAdmin/src/V1alpha/DeleteConnectedSiteTagRequest.php @@ -0,0 +1,117 @@ +google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest + */ +class DeleteConnectedSiteTagRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The Universal Analytics property to delete connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * + * Generated from protobuf field string property = 1; + */ + private $property = ''; + /** + * Tag ID to forward events to. Also known as the Measurement ID, or the + * "G-ID" (For example: G-12345). + * + * Generated from protobuf field string tag_id = 2; + */ + private $tag_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $property + * The Universal Analytics property to delete connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * @type string $tag_id + * Tag ID to forward events to. Also known as the Measurement ID, or the + * "G-ID" (For example: G-12345). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The Universal Analytics property to delete connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * + * Generated from protobuf field string property = 1; + * @return string + */ + public function getProperty() + { + return $this->property; + } + + /** + * The Universal Analytics property to delete connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * + * Generated from protobuf field string property = 1; + * @param string $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkString($var, True); + $this->property = $var; + + return $this; + } + + /** + * Tag ID to forward events to. Also known as the Measurement ID, or the + * "G-ID" (For example: G-12345). + * + * Generated from protobuf field string tag_id = 2; + * @return string + */ + public function getTagId() + { + return $this->tag_id; + } + + /** + * Tag ID to forward events to. Also known as the Measurement ID, or the + * "G-ID" (For example: G-12345). + * + * Generated from protobuf field string tag_id = 2; + * @param string $var + * @return $this + */ + public function setTagId($var) + { + GPBUtil::checkString($var, True); + $this->tag_id = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php b/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php index 88a906351ac..21efe7da458 100644 --- a/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php +++ b/AnalyticsAdmin/src/V1alpha/EnhancedMeasurementSettings.php @@ -17,10 +17,10 @@ class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message { /** - * Output only. Resource name of this Data Stream. + * Output only. Resource name of the Enhanced Measurement Settings. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property_id}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -34,73 +34,68 @@ class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool stream_enabled = 2; */ private $stream_enabled = false; - /** - * Output only. If enabled, capture a page view event each time a page loads or the - * website changes the browser history state. - * - * Generated from protobuf field bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $page_views_enabled = false; /** * If enabled, capture scroll events each time a visitor gets to the bottom of * a page. * - * Generated from protobuf field bool scrolls_enabled = 4; + * Generated from protobuf field bool scrolls_enabled = 3; */ private $scrolls_enabled = false; /** * If enabled, capture an outbound click event each time a visitor clicks a * link that leads them away from your domain. * - * Generated from protobuf field bool outbound_clicks_enabled = 5; + * Generated from protobuf field bool outbound_clicks_enabled = 4; */ private $outbound_clicks_enabled = false; /** * If enabled, capture a view search results event each time a visitor * performs a search on your site (based on a query parameter). * - * Generated from protobuf field bool site_search_enabled = 7; + * Generated from protobuf field bool site_search_enabled = 5; */ private $site_search_enabled = false; /** * If enabled, capture video play, progress, and complete events as visitors * view embedded videos on your site. * - * Generated from protobuf field bool video_engagement_enabled = 9; + * Generated from protobuf field bool video_engagement_enabled = 6; */ private $video_engagement_enabled = false; /** * If enabled, capture a file download event each time a link is clicked with * a common document, compressed file, application, video, or audio extension. * - * Generated from protobuf field bool file_downloads_enabled = 10; + * Generated from protobuf field bool file_downloads_enabled = 7; */ private $file_downloads_enabled = false; - /** - * Output only. If enabled, capture a page view event each time a page loads. - * - * Generated from protobuf field bool page_loads_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $page_loads_enabled = false; /** * If enabled, capture a page view event each time the website changes the * browser history state. * - * Generated from protobuf field bool page_changes_enabled = 13; + * Generated from protobuf field bool page_changes_enabled = 8; */ private $page_changes_enabled = false; + /** + * If enabled, capture a form interaction event each time a visitor interacts + * with a form on your website. + * False by default. + * + * Generated from protobuf field bool form_interactions_enabled = 9; + */ + private $form_interactions_enabled = false; /** * Required. URL query parameters to interpret as site search parameters. * Max length is 1024 characters. Must not be empty. * - * Generated from protobuf field string search_query_parameter = 16 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string search_query_parameter = 10 [(.google.api.field_behavior) = REQUIRED]; */ private $search_query_parameter = ''; /** * Additional URL query parameters. * Max length is 1024 characters. * - * Generated from protobuf field string uri_query_parameter = 17; + * Generated from protobuf field string uri_query_parameter = 11; */ private $uri_query_parameter = ''; @@ -111,18 +106,15 @@ class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Output only. Resource name of this Data Stream. + * Output only. Resource name of the Enhanced Measurement Settings. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property_id}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * @type bool $stream_enabled * Indicates whether Enhanced Measurement Settings will be used to * automatically measure interactions and content on this web stream. * Changing this value does not affect the settings themselves, but determines * whether they are respected. - * @type bool $page_views_enabled - * Output only. If enabled, capture a page view event each time a page loads or the - * website changes the browser history state. * @type bool $scrolls_enabled * If enabled, capture scroll events each time a visitor gets to the bottom of * a page. @@ -138,11 +130,13 @@ class EnhancedMeasurementSettings extends \Google\Protobuf\Internal\Message * @type bool $file_downloads_enabled * If enabled, capture a file download event each time a link is clicked with * a common document, compressed file, application, video, or audio extension. - * @type bool $page_loads_enabled - * Output only. If enabled, capture a page view event each time a page loads. * @type bool $page_changes_enabled * If enabled, capture a page view event each time the website changes the * browser history state. + * @type bool $form_interactions_enabled + * If enabled, capture a form interaction event each time a visitor interacts + * with a form on your website. + * False by default. * @type string $search_query_parameter * Required. URL query parameters to interpret as site search parameters. * Max length is 1024 characters. Must not be empty. @@ -157,10 +151,10 @@ public function __construct($data = NULL) { } /** - * Output only. Resource name of this Data Stream. + * Output only. Resource name of the Enhanced Measurement Settings. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property_id}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -171,10 +165,10 @@ public function getName() } /** - * Output only. Resource name of this Data Stream. + * Output only. Resource name of the Enhanced Measurement Settings. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property_id}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var @@ -220,39 +214,11 @@ public function setStreamEnabled($var) return $this; } - /** - * Output only. If enabled, capture a page view event each time a page loads or the - * website changes the browser history state. - * - * Generated from protobuf field bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getPageViewsEnabled() - { - return $this->page_views_enabled; - } - - /** - * Output only. If enabled, capture a page view event each time a page loads or the - * website changes the browser history state. - * - * Generated from protobuf field bool page_views_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setPageViewsEnabled($var) - { - GPBUtil::checkBool($var); - $this->page_views_enabled = $var; - - return $this; - } - /** * If enabled, capture scroll events each time a visitor gets to the bottom of * a page. * - * Generated from protobuf field bool scrolls_enabled = 4; + * Generated from protobuf field bool scrolls_enabled = 3; * @return bool */ public function getScrollsEnabled() @@ -264,7 +230,7 @@ public function getScrollsEnabled() * If enabled, capture scroll events each time a visitor gets to the bottom of * a page. * - * Generated from protobuf field bool scrolls_enabled = 4; + * Generated from protobuf field bool scrolls_enabled = 3; * @param bool $var * @return $this */ @@ -280,7 +246,7 @@ public function setScrollsEnabled($var) * If enabled, capture an outbound click event each time a visitor clicks a * link that leads them away from your domain. * - * Generated from protobuf field bool outbound_clicks_enabled = 5; + * Generated from protobuf field bool outbound_clicks_enabled = 4; * @return bool */ public function getOutboundClicksEnabled() @@ -292,7 +258,7 @@ public function getOutboundClicksEnabled() * If enabled, capture an outbound click event each time a visitor clicks a * link that leads them away from your domain. * - * Generated from protobuf field bool outbound_clicks_enabled = 5; + * Generated from protobuf field bool outbound_clicks_enabled = 4; * @param bool $var * @return $this */ @@ -308,7 +274,7 @@ public function setOutboundClicksEnabled($var) * If enabled, capture a view search results event each time a visitor * performs a search on your site (based on a query parameter). * - * Generated from protobuf field bool site_search_enabled = 7; + * Generated from protobuf field bool site_search_enabled = 5; * @return bool */ public function getSiteSearchEnabled() @@ -320,7 +286,7 @@ public function getSiteSearchEnabled() * If enabled, capture a view search results event each time a visitor * performs a search on your site (based on a query parameter). * - * Generated from protobuf field bool site_search_enabled = 7; + * Generated from protobuf field bool site_search_enabled = 5; * @param bool $var * @return $this */ @@ -336,7 +302,7 @@ public function setSiteSearchEnabled($var) * If enabled, capture video play, progress, and complete events as visitors * view embedded videos on your site. * - * Generated from protobuf field bool video_engagement_enabled = 9; + * Generated from protobuf field bool video_engagement_enabled = 6; * @return bool */ public function getVideoEngagementEnabled() @@ -348,7 +314,7 @@ public function getVideoEngagementEnabled() * If enabled, capture video play, progress, and complete events as visitors * view embedded videos on your site. * - * Generated from protobuf field bool video_engagement_enabled = 9; + * Generated from protobuf field bool video_engagement_enabled = 6; * @param bool $var * @return $this */ @@ -364,7 +330,7 @@ public function setVideoEngagementEnabled($var) * If enabled, capture a file download event each time a link is clicked with * a common document, compressed file, application, video, or audio extension. * - * Generated from protobuf field bool file_downloads_enabled = 10; + * Generated from protobuf field bool file_downloads_enabled = 7; * @return bool */ public function getFileDownloadsEnabled() @@ -376,7 +342,7 @@ public function getFileDownloadsEnabled() * If enabled, capture a file download event each time a link is clicked with * a common document, compressed file, application, video, or audio extension. * - * Generated from protobuf field bool file_downloads_enabled = 10; + * Generated from protobuf field bool file_downloads_enabled = 7; * @param bool $var * @return $this */ @@ -389,55 +355,59 @@ public function setFileDownloadsEnabled($var) } /** - * Output only. If enabled, capture a page view event each time a page loads. + * If enabled, capture a page view event each time the website changes the + * browser history state. * - * Generated from protobuf field bool page_loads_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field bool page_changes_enabled = 8; * @return bool */ - public function getPageLoadsEnabled() + public function getPageChangesEnabled() { - return $this->page_loads_enabled; + return $this->page_changes_enabled; } /** - * Output only. If enabled, capture a page view event each time a page loads. + * If enabled, capture a page view event each time the website changes the + * browser history state. * - * Generated from protobuf field bool page_loads_enabled = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field bool page_changes_enabled = 8; * @param bool $var * @return $this */ - public function setPageLoadsEnabled($var) + public function setPageChangesEnabled($var) { GPBUtil::checkBool($var); - $this->page_loads_enabled = $var; + $this->page_changes_enabled = $var; return $this; } /** - * If enabled, capture a page view event each time the website changes the - * browser history state. + * If enabled, capture a form interaction event each time a visitor interacts + * with a form on your website. + * False by default. * - * Generated from protobuf field bool page_changes_enabled = 13; + * Generated from protobuf field bool form_interactions_enabled = 9; * @return bool */ - public function getPageChangesEnabled() + public function getFormInteractionsEnabled() { - return $this->page_changes_enabled; + return $this->form_interactions_enabled; } /** - * If enabled, capture a page view event each time the website changes the - * browser history state. + * If enabled, capture a form interaction event each time a visitor interacts + * with a form on your website. + * False by default. * - * Generated from protobuf field bool page_changes_enabled = 13; + * Generated from protobuf field bool form_interactions_enabled = 9; * @param bool $var * @return $this */ - public function setPageChangesEnabled($var) + public function setFormInteractionsEnabled($var) { GPBUtil::checkBool($var); - $this->page_changes_enabled = $var; + $this->form_interactions_enabled = $var; return $this; } @@ -446,7 +416,7 @@ public function setPageChangesEnabled($var) * Required. URL query parameters to interpret as site search parameters. * Max length is 1024 characters. Must not be empty. * - * Generated from protobuf field string search_query_parameter = 16 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string search_query_parameter = 10 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getSearchQueryParameter() @@ -458,7 +428,7 @@ public function getSearchQueryParameter() * Required. URL query parameters to interpret as site search parameters. * Max length is 1024 characters. Must not be empty. * - * Generated from protobuf field string search_query_parameter = 16 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string search_query_parameter = 10 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ @@ -474,7 +444,7 @@ public function setSearchQueryParameter($var) * Additional URL query parameters. * Max length is 1024 characters. * - * Generated from protobuf field string uri_query_parameter = 17; + * Generated from protobuf field string uri_query_parameter = 11; * @return string */ public function getUriQueryParameter() @@ -486,7 +456,7 @@ public function getUriQueryParameter() * Additional URL query parameters. * Max length is 1024 characters. * - * Generated from protobuf field string uri_query_parameter = 17; + * Generated from protobuf field string uri_query_parameter = 11; * @param string $var * @return $this */ diff --git a/AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php b/AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php index fe3d252313b..12affbbdfcb 100644 --- a/AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php +++ b/AnalyticsAdmin/src/V1alpha/Gapic/AnalyticsAdminServiceGapicClient.php @@ -60,9 +60,12 @@ use Google\Analytics\Admin\V1alpha\BatchUpdateUserLinksResponse; use Google\Analytics\Admin\V1alpha\BigQueryLink; use Google\Analytics\Admin\V1alpha\CancelDisplayVideo360AdvertiserLinkProposalRequest; +use Google\Analytics\Admin\V1alpha\ConnectedSiteTag; use Google\Analytics\Admin\V1alpha\ConversionEvent; use Google\Analytics\Admin\V1alpha\CreateAccessBindingRequest; use Google\Analytics\Admin\V1alpha\CreateAudienceRequest; +use Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagRequest; +use Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagResponse; use Google\Analytics\Admin\V1alpha\CreateConversionEventRequest; use Google\Analytics\Admin\V1alpha\CreateCustomDimensionRequest; use Google\Analytics\Admin\V1alpha\CreateCustomMetricRequest; @@ -83,6 +86,7 @@ use Google\Analytics\Admin\V1alpha\DataStream; use Google\Analytics\Admin\V1alpha\DeleteAccessBindingRequest; use Google\Analytics\Admin\V1alpha\DeleteAccountRequest; +use Google\Analytics\Admin\V1alpha\DeleteConnectedSiteTagRequest; use Google\Analytics\Admin\V1alpha\DeleteConversionEventRequest; use Google\Analytics\Admin\V1alpha\DeleteDataStreamRequest; use Google\Analytics\Admin\V1alpha\DeleteDisplayVideo360AdvertiserLinkProposalRequest; @@ -96,6 +100,7 @@ use Google\Analytics\Admin\V1alpha\DeleteUserLinkRequest; use Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink; use Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal; +use Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings; use Google\Analytics\Admin\V1alpha\ExpandedDataSet; use Google\Analytics\Admin\V1alpha\FetchAutomatedGa4ConfigurationOptOutRequest; use Google\Analytics\Admin\V1alpha\FetchAutomatedGa4ConfigurationOptOutResponse; @@ -113,6 +118,7 @@ use Google\Analytics\Admin\V1alpha\GetDataStreamRequest; use Google\Analytics\Admin\V1alpha\GetDisplayVideo360AdvertiserLinkProposalRequest; use Google\Analytics\Admin\V1alpha\GetDisplayVideo360AdvertiserLinkRequest; +use Google\Analytics\Admin\V1alpha\GetEnhancedMeasurementSettingsRequest; use Google\Analytics\Admin\V1alpha\GetExpandedDataSetRequest; use Google\Analytics\Admin\V1alpha\GetGlobalSiteTagRequest; use Google\Analytics\Admin\V1alpha\GetGoogleSignalsSettingsRequest; @@ -133,6 +139,8 @@ use Google\Analytics\Admin\V1alpha\ListAudiencesResponse; use Google\Analytics\Admin\V1alpha\ListBigQueryLinksRequest; use Google\Analytics\Admin\V1alpha\ListBigQueryLinksResponse; +use Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsRequest; +use Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsResponse; use Google\Analytics\Admin\V1alpha\ListConversionEventsRequest; use Google\Analytics\Admin\V1alpha\ListConversionEventsResponse; use Google\Analytics\Admin\V1alpha\ListCustomDimensionsRequest; @@ -179,6 +187,7 @@ use Google\Analytics\Admin\V1alpha\UpdateDataRetentionSettingsRequest; use Google\Analytics\Admin\V1alpha\UpdateDataStreamRequest; use Google\Analytics\Admin\V1alpha\UpdateDisplayVideo360AdvertiserLinkRequest; +use Google\Analytics\Admin\V1alpha\UpdateEnhancedMeasurementSettingsRequest; use Google\Analytics\Admin\V1alpha\UpdateExpandedDataSetRequest; use Google\Analytics\Admin\V1alpha\UpdateGoogleAdsLinkRequest; use Google\Analytics\Admin\V1alpha\UpdateGoogleSignalsSettingsRequest; @@ -278,6 +287,8 @@ class AnalyticsAdminServiceGapicClient private static $displayVideo360AdvertiserLinkProposalNameTemplate; + private static $enhancedMeasurementSettingsNameTemplate; + private static $expandedDataSetNameTemplate; private static $firebaseLinkNameTemplate; @@ -456,6 +467,15 @@ private static function getDisplayVideo360AdvertiserLinkProposalNameTemplate() return self::$displayVideo360AdvertiserLinkProposalNameTemplate; } + private static function getEnhancedMeasurementSettingsNameTemplate() + { + if (self::$enhancedMeasurementSettingsNameTemplate == null) { + self::$enhancedMeasurementSettingsNameTemplate = new PathTemplate('properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings'); + } + + return self::$enhancedMeasurementSettingsNameTemplate; + } + private static function getExpandedDataSetNameTemplate() { if (self::$expandedDataSetNameTemplate == null) { @@ -574,6 +594,7 @@ private static function getPathTemplateMap() 'dataStream' => self::getDataStreamNameTemplate(), 'displayVideo360AdvertiserLink' => self::getDisplayVideo360AdvertiserLinkNameTemplate(), 'displayVideo360AdvertiserLinkProposal' => self::getDisplayVideo360AdvertiserLinkProposalNameTemplate(), + 'enhancedMeasurementSettings' => self::getEnhancedMeasurementSettingsNameTemplate(), 'expandedDataSet' => self::getExpandedDataSetNameTemplate(), 'firebaseLink' => self::getFirebaseLinkNameTemplate(), 'globalSiteTag' => self::getGlobalSiteTagNameTemplate(), @@ -868,6 +889,25 @@ public static function displayVideo360AdvertiserLinkProposalName($property, $dis ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * enhanced_measurement_settings resource. + * + * @param string $property + * @param string $dataStream + * + * @return string The formatted enhanced_measurement_settings resource. + * + * @experimental + */ + public static function enhancedMeasurementSettingsName($property, $dataStream) + { + return self::getEnhancedMeasurementSettingsNameTemplate()->render([ + 'property' => $property, + 'data_stream' => $dataStream, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * expanded_data_set resource. @@ -1094,6 +1134,7 @@ public static function userLinkName($account, $userLink) * - dataStream: properties/{property}/dataStreams/{data_stream} * - displayVideo360AdvertiserLink: properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link} * - displayVideo360AdvertiserLinkProposal: properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal} + * - enhancedMeasurementSettings: properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings * - expandedDataSet: properties/{property}/expandedDataSets/{expanded_data_set} * - firebaseLink: properties/{property}/firebaseLinks/{firebase_link} * - globalSiteTag: properties/{property}/dataStreams/{data_stream}/globalSiteTag @@ -1629,8 +1670,8 @@ public function batchCreateUserLinks($parent, $requests, array $optionalArgs = [ * ``` * * @param string $parent Required. 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} * @param DeleteAccessBindingRequest[] $requests Required. The requests specifying the access bindings to delete. @@ -1828,8 +1869,9 @@ public function batchGetUserLinks($parent, $names, array $optionalArgs = []) * ``` * * @param string $parent Required. 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} * @param UpdateAccessBindingRequest[] $requests Required. The requests specifying the access bindings to update. @@ -2045,6 +2087,54 @@ public function createAudience($parent, $audience, array $optionalArgs = []) return $this->startCall('CreateAudience', Audience::class, $optionalArgs, $request)->wait(); } + /** + * 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. + * + * Sample code: + * ``` + * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); + * try { + * $connectedSiteTag = new ConnectedSiteTag(); + * $response = $analyticsAdminServiceClient->createConnectedSiteTag($connectedSiteTag); + * } finally { + * $analyticsAdminServiceClient->close(); + * } + * ``` + * + * @param ConnectedSiteTag $connectedSiteTag Required. The tag to add to the Universal Analytics property + * @param array $optionalArgs { + * Optional. + * + * @type string $property + * The Universal Analytics property to create connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function createConnectedSiteTag($connectedSiteTag, array $optionalArgs = []) + { + $request = new CreateConnectedSiteTagRequest(); + $request->setConnectedSiteTag($connectedSiteTag); + if (isset($optionalArgs['property'])) { + $request->setProperty($optionalArgs['property']); + } + + return $this->startCall('CreateConnectedSiteTag', CreateConnectedSiteTagResponse::class, $optionalArgs, $request)->wait(); + } + /** * Creates a conversion event with the specified attributes. * @@ -2723,6 +2813,55 @@ public function deleteAccount($name, array $optionalArgs = []) return $this->startCall('DeleteAccount', GPBEmpty::class, $optionalArgs, $request)->wait(); } + /** + * Deletes a connected site tag for a Universal Analytics property. + * Note: this has no effect on GA4 properties. + * + * Sample code: + * ``` + * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); + * try { + * $analyticsAdminServiceClient->deleteConnectedSiteTag(); + * } finally { + * $analyticsAdminServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $property + * The Universal Analytics property to delete connected site tags for. + * This API does not support GA4 properties. + * Format: properties/{universalAnalyticsPropertyId} + * Example: properties/1234 + * @type string $tagId + * Tag ID to forward events to. Also known as the Measurement ID, or the + * "G-ID" (For example: G-12345). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function deleteConnectedSiteTag(array $optionalArgs = []) + { + $request = new DeleteConnectedSiteTagRequest(); + if (isset($optionalArgs['property'])) { + $request->setProperty($optionalArgs['property']); + } + + if (isset($optionalArgs['tagId'])) { + $request->setTagId($optionalArgs['tagId']); + } + + return $this->startCall('DeleteConnectedSiteTag', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + /** * Deletes a conversion event in a property. * @@ -3775,6 +3914,52 @@ public function getDisplayVideo360AdvertiserLinkProposal($name, array $optionalA return $this->startCall('GetDisplayVideo360AdvertiserLinkProposal', DisplayVideo360AdvertiserLinkProposal::class, $optionalArgs, $request)->wait(); } + /** + * Returns the enhanced measurement settings for this data stream. + * Note that the stream must enable enhanced measurement for these settings to + * take effect. + * + * Sample code: + * ``` + * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); + * try { + * $formattedName = $analyticsAdminServiceClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); + * $response = $analyticsAdminServiceClient->getEnhancedMeasurementSettings($formattedName); + * } finally { + * $analyticsAdminServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the settings to lookup. + * Format: + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function getEnhancedMeasurementSettings($name, array $optionalArgs = []) + { + $request = new GetEnhancedMeasurementSettingsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetEnhancedMeasurementSettings', EnhancedMeasurementSettings::class, $optionalArgs, $request)->wait(); + } + /** * Lookup for a single ExpandedDataSet. * @@ -4427,6 +4612,51 @@ public function listBigQueryLinks($parent, array $optionalArgs = []) return $this->getPagedListResponse('ListBigQueryLinks', $optionalArgs, ListBigQueryLinksResponse::class, $request); } + /** + * Lists the connected site tags for a Universal Analytics property. A maximum + * of 20 connected site tags will be returned. Note: this has no effect on GA4 + * property. + * + * Sample code: + * ``` + * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); + * try { + * $response = $analyticsAdminServiceClient->listConnectedSiteTags(); + * } finally { + * $analyticsAdminServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $property + * The Universal Analytics property to fetch connected site tags for. + * This does not work on GA4 properties. A maximum of 20 connected site tags + * will be returned. + * Example Format: `properties/1234` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function listConnectedSiteTags(array $optionalArgs = []) + { + $request = new ListConnectedSiteTagsRequest(); + if (isset($optionalArgs['property'])) { + $request->setProperty($optionalArgs['property']); + } + + return $this->startCall('ListConnectedSiteTags', ListConnectedSiteTagsResponse::class, $optionalArgs, $request)->wait(); + } + /** * Returns a list of conversion events in the specified parent property. * @@ -5389,7 +5619,7 @@ public function listUserLinks($parent, array $optionalArgs = []) * The account to create. * @type string $redirectUri * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI. + * Must be configured in Cloud Console as a Redirect URI. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -5445,9 +5675,14 @@ public function provisionAccountTicket(array $optionalArgs = []) * Optional. * * @type string $entity - * The Data Access Report is requested for this property. - * For example if "123" is your GA4 property ID, then entity should be - * "properties/123". + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. * @type AccessDimension[] $dimensions * The dimensions requested and displayed in the response. Requests are * allowed up to 9 dimensions. @@ -5503,7 +5738,8 @@ public function provisionAccountTicket(array $optionalArgs = []) * Specifies how rows are ordered in the response. * @type bool $returnEntityQuota * Toggles whether to return the current state of this Analytics Property's - * quota. Quota is returned in [AccessQuota](#AccessQuota). + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -6157,6 +6393,56 @@ public function updateDisplayVideo360AdvertiserLink($updateMask, array $optional return $this->startCall('UpdateDisplayVideo360AdvertiserLink', DisplayVideo360AdvertiserLink::class, $optionalArgs, $request)->wait(); } + /** + * Updates the enhanced measurement settings for this data stream. + * Note that the stream must enable enhanced measurement for these settings to + * take effect. + * + * Sample code: + * ``` + * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); + * try { + * $enhancedMeasurementSettings = new EnhancedMeasurementSettings(); + * $updateMask = new FieldMask(); + * $response = $analyticsAdminServiceClient->updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask); + * } finally { + * $analyticsAdminServiceClient->close(); + * } + * ``` + * + * @param EnhancedMeasurementSettings $enhancedMeasurementSettings Required. The settings to update. + * The `name` field is used to identify the settings to be updated. + * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask, array $optionalArgs = []) + { + $request = new UpdateEnhancedMeasurementSettingsRequest(); + $requestParamHeaders = []; + $request->setEnhancedMeasurementSettings($enhancedMeasurementSettings); + $request->setUpdateMask($updateMask); + $requestParamHeaders['enhanced_measurement_settings.name'] = $enhancedMeasurementSettings->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateEnhancedMeasurementSettings', EnhancedMeasurementSettings::class, $optionalArgs, $request)->wait(); + } + /** * Updates a ExpandedDataSet on a property. * diff --git a/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php index d5ece4c6e7e..87dbb7592e1 100644 --- a/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/GetEnhancedMeasurementSettingsRequest.php @@ -18,8 +18,8 @@ class GetEnhancedMeasurementSettingsRequest extends \Google\Protobuf\Internal\Me /** * Required. The name of the settings to lookup. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -34,8 +34,8 @@ class GetEnhancedMeasurementSettingsRequest extends \Google\Protobuf\Internal\Me * @type string $name * Required. The name of the settings to lookup. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * } */ public function __construct($data = NULL) { @@ -46,8 +46,8 @@ public function __construct($data = NULL) { /** * Required. The name of the settings to lookup. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -60,8 +60,8 @@ public function getName() /** * Required. The name of the settings to lookup. * Format: - * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings - * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + * properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings + * Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings" * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AnalyticsAdmin/src/V1alpha/GoogleSignalsConsent.php b/AnalyticsAdmin/src/V1alpha/GoogleSignalsConsent.php index 0b0b307b0fa..025db193870 100644 --- a/AnalyticsAdmin/src/V1alpha/GoogleSignalsConsent.php +++ b/AnalyticsAdmin/src/V1alpha/GoogleSignalsConsent.php @@ -7,8 +7,7 @@ use UnexpectedValueException; /** - * Consent field of the Google Signals settings (i.e., whether the user has - * consented to the Google Signals terms of service.) + * Consent field of the Google Signals settings. * * Protobuf type google.analytics.admin.v1alpha.GoogleSignalsConsent */ diff --git a/AnalyticsAdmin/src/V1alpha/GoogleSignalsState.php b/AnalyticsAdmin/src/V1alpha/GoogleSignalsState.php index dfd2291034b..1e9442bfdf8 100644 --- a/AnalyticsAdmin/src/V1alpha/GoogleSignalsState.php +++ b/AnalyticsAdmin/src/V1alpha/GoogleSignalsState.php @@ -7,8 +7,7 @@ use UnexpectedValueException; /** - * Status of the Google Signals settings (i.e., whether this feature has been - * enabled for the property). + * Status of the Google Signals settings. * * Protobuf type google.analytics.admin.v1alpha.GoogleSignalsState */ diff --git a/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsRequest.php b/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsRequest.php new file mode 100644 index 00000000000..777d744d122 --- /dev/null +++ b/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsRequest.php @@ -0,0 +1,79 @@ +google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest + */ +class ListConnectedSiteTagsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The Universal Analytics property to fetch connected site tags for. + * This does not work on GA4 properties. A maximum of 20 connected site tags + * will be returned. + * Example Format: `properties/1234` + * + * Generated from protobuf field string property = 1; + */ + private $property = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $property + * The Universal Analytics property to fetch connected site tags for. + * This does not work on GA4 properties. A maximum of 20 connected site tags + * will be returned. + * Example Format: `properties/1234` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The Universal Analytics property to fetch connected site tags for. + * This does not work on GA4 properties. A maximum of 20 connected site tags + * will be returned. + * Example Format: `properties/1234` + * + * Generated from protobuf field string property = 1; + * @return string + */ + public function getProperty() + { + return $this->property; + } + + /** + * The Universal Analytics property to fetch connected site tags for. + * This does not work on GA4 properties. A maximum of 20 connected site tags + * will be returned. + * Example Format: `properties/1234` + * + * Generated from protobuf field string property = 1; + * @param string $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkString($var, True); + $this->property = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsResponse.php b/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsResponse.php new file mode 100644 index 00000000000..3d0778010cb --- /dev/null +++ b/AnalyticsAdmin/src/V1alpha/ListConnectedSiteTagsResponse.php @@ -0,0 +1,71 @@ +google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse + */ +class ListConnectedSiteTagsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The site tags for the Universal Analytics property. A maximum of 20 + * connected site tags will be returned. + * + * Generated from protobuf field repeated .google.analytics.admin.v1alpha.ConnectedSiteTag connected_site_tags = 1; + */ + private $connected_site_tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Analytics\Admin\V1alpha\ConnectedSiteTag>|\Google\Protobuf\Internal\RepeatedField $connected_site_tags + * The site tags for the Universal Analytics property. A maximum of 20 + * connected site tags will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Alpha\AnalyticsAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The site tags for the Universal Analytics property. A maximum of 20 + * connected site tags will be returned. + * + * Generated from protobuf field repeated .google.analytics.admin.v1alpha.ConnectedSiteTag connected_site_tags = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConnectedSiteTags() + { + return $this->connected_site_tags; + } + + /** + * The site tags for the Universal Analytics property. A maximum of 20 + * connected site tags will be returned. + * + * Generated from protobuf field repeated .google.analytics.admin.v1alpha.ConnectedSiteTag connected_site_tags = 1; + * @param array<\Google\Analytics\Admin\V1alpha\ConnectedSiteTag>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConnectedSiteTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1alpha\ConnectedSiteTag::class); + $this->connected_site_tags = $arr; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1alpha/Property.php b/AnalyticsAdmin/src/V1alpha/Property.php index 7242f7ebc57..879f0b78a0e 100644 --- a/AnalyticsAdmin/src/V1alpha/Property.php +++ b/AnalyticsAdmin/src/V1alpha/Property.php @@ -27,7 +27,7 @@ class Property extends \Google\Protobuf\Internal\Message * Immutable. The property type for this Property resource. When creating a * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" - * types cannot yet be created via Google Analytics Admin API. + * types cannot yet be created with the Google Analytics Admin API. * * Generated from protobuf field .google.analytics.admin.v1alpha.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; */ @@ -132,7 +132,7 @@ class Property extends \Google\Protobuf\Internal\Message * Immutable. The property type for this Property resource. When creating a * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" - * types cannot yet be created via Google Analytics Admin API. + * types cannot yet be created with the Google Analytics Admin API. * @type \Google\Protobuf\Timestamp $create_time * Output only. Time when the entity was originally created. * @type \Google\Protobuf\Timestamp $update_time @@ -215,7 +215,7 @@ public function setName($var) * Immutable. The property type for this Property resource. When creating a * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" - * types cannot yet be created via Google Analytics Admin API. + * types cannot yet be created with the Google Analytics Admin API. * * Generated from protobuf field .google.analytics.admin.v1alpha.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; * @return int @@ -229,7 +229,7 @@ public function getPropertyType() * Immutable. The property type for this Property resource. When creating a * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" - * types cannot yet be created via Google Analytics Admin API. + * types cannot yet be created with the Google Analytics Admin API. * * Generated from protobuf field .google.analytics.admin.v1alpha.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; * @param int $var diff --git a/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php b/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php index 1eb2df6d393..e6c51c6e332 100644 --- a/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php +++ b/AnalyticsAdmin/src/V1alpha/ProvisionAccountTicketRequest.php @@ -23,7 +23,7 @@ class ProvisionAccountTicketRequest extends \Google\Protobuf\Internal\Message private $account = null; /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI. + * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; */ @@ -39,7 +39,7 @@ class ProvisionAccountTicketRequest extends \Google\Protobuf\Internal\Message * The account to create. * @type string $redirect_uri * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI. + * Must be configured in Cloud Console as a Redirect URI. * } */ public function __construct($data = NULL) { @@ -85,7 +85,7 @@ public function setAccount($var) /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI. + * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; * @return string @@ -97,7 +97,7 @@ public function getRedirectUri() /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI. + * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; * @param string $var diff --git a/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php b/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php index 845cc128182..81e46c695e4 100644 --- a/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php +++ b/AnalyticsAdmin/src/V1alpha/RunAccessReportRequest.php @@ -16,9 +16,13 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message { /** - * The Data Access Report is requested for this property. - * For example if "123" is your GA4 property ID, then entity should be - * "properties/123". + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. * * Generated from protobuf field string entity = 1; */ @@ -110,7 +114,8 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message private $order_bys; /** * Toggles whether to return the current state of this Analytics Property's - * quota. Quota is returned in [AccessQuota](#AccessQuota). + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. * * Generated from protobuf field bool return_entity_quota = 11; */ @@ -123,9 +128,13 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $entity - * The Data Access Report is requested for this property. - * For example if "123" is your GA4 property ID, then entity should be - * "properties/123". + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. * @type array<\Google\Analytics\Admin\V1alpha\AccessDimension>|\Google\Protobuf\Internal\RepeatedField $dimensions * The dimensions requested and displayed in the response. Requests are * allowed up to 9 dimensions. @@ -177,7 +186,8 @@ class RunAccessReportRequest extends \Google\Protobuf\Internal\Message * Specifies how rows are ordered in the response. * @type bool $return_entity_quota * Toggles whether to return the current state of this Analytics Property's - * quota. Quota is returned in [AccessQuota](#AccessQuota). + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. * } */ public function __construct($data = NULL) { @@ -186,9 +196,13 @@ public function __construct($data = NULL) { } /** - * The Data Access Report is requested for this property. - * For example if "123" is your GA4 property ID, then entity should be - * "properties/123". + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. * * Generated from protobuf field string entity = 1; * @return string @@ -199,9 +213,13 @@ public function getEntity() } /** - * The Data Access Report is requested for this property. - * For example if "123" is your GA4 property ID, then entity should be - * "properties/123". + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. * * Generated from protobuf field string entity = 1; * @param string $var @@ -533,7 +551,8 @@ public function setOrderBys($var) /** * Toggles whether to return the current state of this Analytics Property's - * quota. Quota is returned in [AccessQuota](#AccessQuota). + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. * * Generated from protobuf field bool return_entity_quota = 11; * @return bool @@ -545,7 +564,8 @@ public function getReturnEntityQuota() /** * Toggles whether to return the current state of this Analytics Property's - * quota. Quota is returned in [AccessQuota](#AccessQuota). + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. * * Generated from protobuf field bool return_entity_quota = 11; * @param bool $var diff --git a/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php b/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php index 37ab321362d..d957fc761ac 100644 --- a/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php +++ b/AnalyticsAdmin/src/V1alpha/RunAccessReportResponse.php @@ -50,7 +50,8 @@ class RunAccessReportResponse extends \Google\Protobuf\Internal\Message */ private $row_count = 0; /** - * The quota state for this Analytics property including this request. + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuota quota = 5; */ @@ -81,7 +82,8 @@ class RunAccessReportResponse extends \Google\Protobuf\Internal\Message * To learn more about this pagination parameter, see * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). * @type \Google\Analytics\Admin\V1alpha\AccessQuota $quota - * The quota state for this Analytics property including this request. + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. * } */ public function __construct($data = NULL) { @@ -214,7 +216,8 @@ public function setRowCount($var) } /** - * The quota state for this Analytics property including this request. + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuota quota = 5; * @return \Google\Analytics\Admin\V1alpha\AccessQuota|null @@ -235,7 +238,8 @@ public function clearQuota() } /** - * The quota state for this Analytics property including this request. + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. * * Generated from protobuf field .google.analytics.admin.v1alpha.AccessQuota quota = 5; * @param \Google\Analytics\Admin\V1alpha\AccessQuota $var diff --git a/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php b/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php index 9c255ccaf18..eb054dd44e3 100644 --- a/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php +++ b/AnalyticsAdmin/src/V1alpha/UpdateEnhancedMeasurementSettingsRequest.php @@ -23,9 +23,10 @@ class UpdateEnhancedMeasurementSettingsRequest extends \Google\Protobuf\Internal */ private $enhanced_measurement_settings = null; /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -41,9 +42,10 @@ class UpdateEnhancedMeasurementSettingsRequest extends \Google\Protobuf\Internal * Required. The settings to update. * The `name` field is used to identify the settings to be updated. * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * } */ public function __construct($data = NULL) { @@ -60,7 +62,7 @@ public function __construct($data = NULL) { */ public function getEnhancedMeasurementSettings() { - return isset($this->enhanced_measurement_settings) ? $this->enhanced_measurement_settings : null; + return $this->enhanced_measurement_settings; } public function hasEnhancedMeasurementSettings() @@ -90,16 +92,17 @@ public function setEnhancedMeasurementSettings($var) } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null */ public function getUpdateMask() { - return isset($this->update_mask) ? $this->update_mask : null; + return $this->update_mask; } public function hasUpdateMask() @@ -113,9 +116,10 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1alpha/gapic_metadata.json b/AnalyticsAdmin/src/V1alpha/gapic_metadata.json index bacf817ae7b..dfef2663263 100644 --- a/AnalyticsAdmin/src/V1alpha/gapic_metadata.json +++ b/AnalyticsAdmin/src/V1alpha/gapic_metadata.json @@ -95,6 +95,11 @@ "createAudience" ] }, + "CreateConnectedSiteTag": { + "methods": [ + "createConnectedSiteTag" + ] + }, "CreateConversionEvent": { "methods": [ "createConversionEvent" @@ -170,6 +175,11 @@ "deleteAccount" ] }, + "DeleteConnectedSiteTag": { + "methods": [ + "deleteConnectedSiteTag" + ] + }, "DeleteConversionEvent": { "methods": [ "deleteConversionEvent" @@ -295,6 +305,11 @@ "getDisplayVideo360AdvertiserLinkProposal" ] }, + "GetEnhancedMeasurementSettings": { + "methods": [ + "getEnhancedMeasurementSettings" + ] + }, "GetExpandedDataSet": { "methods": [ "getExpandedDataSet" @@ -355,6 +370,11 @@ "listBigQueryLinks" ] }, + "ListConnectedSiteTags": { + "methods": [ + "listConnectedSiteTags" + ] + }, "ListConversionEvents": { "methods": [ "listConversionEvents" @@ -485,6 +505,11 @@ "updateDisplayVideo360AdvertiserLink" ] }, + "UpdateEnhancedMeasurementSettings": { + "methods": [ + "updateEnhancedMeasurementSettings" + ] + }, "UpdateExpandedDataSet": { "methods": [ "updateExpandedDataSet" diff --git a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_client_config.json b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_client_config.json index 62fe65c721c..7abccf9427e 100644 --- a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_client_config.json +++ b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_client_config.json @@ -124,6 +124,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "CreateConnectedSiteTag": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "CreateConversionEvent": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", @@ -199,6 +204,11 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "DeleteConnectedSiteTag": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "DeleteConversionEvent": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", @@ -324,6 +334,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetEnhancedMeasurementSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "GetExpandedDataSet": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", @@ -384,6 +399,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "ListConnectedSiteTags": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "ListConversionEvents": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", @@ -514,6 +534,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "UpdateEnhancedMeasurementSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "UpdateExpandedDataSet": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php index f4f45d6e666..461a9d809f2 100644 --- a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php +++ b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php @@ -273,6 +273,11 @@ ], ], ], + 'CreateConnectedSiteTag' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/properties:createConnectedSiteTag', + 'body' => '*', + ], 'CreateConversionEvent' => [ 'method' => 'post', 'uriTemplate' => '/v1alpha/{parent=properties/*}/conversionEvents', @@ -457,6 +462,11 @@ ], ], ], + 'DeleteConnectedSiteTag' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/properties:deleteConnectedSiteTag', + 'body' => '*', + ], 'DeleteConversionEvent' => [ 'method' => 'delete', 'uriTemplate' => '/v1alpha/{name=properties/*/conversionEvents/*}', @@ -738,6 +748,17 @@ ], ], ], + 'GetEnhancedMeasurementSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1alpha/{name=properties/*/dataStreams/*/enhancedMeasurementSettings}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetExpandedDataSet' => [ 'method' => 'get', 'uriTemplate' => '/v1alpha/{name=properties/*/expandedDataSets/*}', @@ -868,6 +889,11 @@ ], ], ], + 'ListConnectedSiteTags' => [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/properties:listConnectedSiteTags', + 'body' => '*', + ], 'ListConversionEvents' => [ 'method' => 'get', 'uriTemplate' => '/v1alpha/{parent=properties/*}/conversionEvents', @@ -1022,6 +1048,13 @@ 'method' => 'post', 'uriTemplate' => '/v1alpha/{entity=properties/*}:runAccessReport', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1alpha/{entity=accounts/*}:runAccessReport', + 'body' => '*', + ], + ], 'placeholders' => [ 'entity' => [ 'getters' => [ @@ -1195,6 +1228,22 @@ 'update_mask', ], ], + 'UpdateEnhancedMeasurementSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1alpha/{enhanced_measurement_settings.name=properties/*/dataStreams/*/enhancedMeasurementSettings}', + 'body' => 'enhanced_measurement_settings', + 'placeholders' => [ + 'enhanced_measurement_settings.name' => [ + 'getters' => [ + 'getEnhancedMeasurementSettings', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], 'UpdateExpandedDataSet' => [ 'method' => 'patch', 'uriTemplate' => '/v1alpha/{expanded_data_set.name=properties/*/expandedDataSets/*}', diff --git a/AnalyticsAdmin/src/V1beta/AccessBetweenFilter.php b/AnalyticsAdmin/src/V1beta/AccessBetweenFilter.php new file mode 100644 index 00000000000..98de8d7c7a6 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessBetweenFilter.php @@ -0,0 +1,121 @@ +google.analytics.admin.v1beta.AccessBetweenFilter + */ +class AccessBetweenFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Begins with this number. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue from_value = 1; + */ + private $from_value = null; + /** + * Ends with this number. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue to_value = 2; + */ + private $to_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Analytics\Admin\V1beta\NumericValue $from_value + * Begins with this number. + * @type \Google\Analytics\Admin\V1beta\NumericValue $to_value + * Ends with this number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * Begins with this number. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue from_value = 1; + * @return \Google\Analytics\Admin\V1beta\NumericValue|null + */ + public function getFromValue() + { + return $this->from_value; + } + + public function hasFromValue() + { + return isset($this->from_value); + } + + public function clearFromValue() + { + unset($this->from_value); + } + + /** + * Begins with this number. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue from_value = 1; + * @param \Google\Analytics\Admin\V1beta\NumericValue $var + * @return $this + */ + public function setFromValue($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\NumericValue::class); + $this->from_value = $var; + + return $this; + } + + /** + * Ends with this number. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue to_value = 2; + * @return \Google\Analytics\Admin\V1beta\NumericValue|null + */ + public function getToValue() + { + return $this->to_value; + } + + public function hasToValue() + { + return isset($this->to_value); + } + + public function clearToValue() + { + unset($this->to_value); + } + + /** + * Ends with this number. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue to_value = 2; + * @param \Google\Analytics\Admin\V1beta\NumericValue $var + * @return $this + */ + public function setToValue($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\NumericValue::class); + $this->to_value = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessDateRange.php b/AnalyticsAdmin/src/V1beta/AccessDateRange.php new file mode 100644 index 00000000000..578736ddd92 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessDateRange.php @@ -0,0 +1,125 @@ +google.analytics.admin.v1beta.AccessDateRange + */ +class AccessDateRange extends \Google\Protobuf\Internal\Message +{ + /** + * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + * be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also + * accepted, and in that case, the date is inferred based on the current time + * in the request's time zone. + * + * Generated from protobuf field string start_date = 1; + */ + private $start_date = ''; + /** + * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + * be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is + * also accepted, and in that case, the date is inferred based on the current + * time in the request's time zone. + * + * Generated from protobuf field string end_date = 2; + */ + private $end_date = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $start_date + * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + * be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also + * accepted, and in that case, the date is inferred based on the current time + * in the request's time zone. + * @type string $end_date + * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + * be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is + * also accepted, and in that case, the date is inferred based on the current + * time in the request's time zone. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + * be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also + * accepted, and in that case, the date is inferred based on the current time + * in the request's time zone. + * + * Generated from protobuf field string start_date = 1; + * @return string + */ + public function getStartDate() + { + return $this->start_date; + } + + /** + * The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + * be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also + * accepted, and in that case, the date is inferred based on the current time + * in the request's time zone. + * + * Generated from protobuf field string start_date = 1; + * @param string $var + * @return $this + */ + public function setStartDate($var) + { + GPBUtil::checkString($var, True); + $this->start_date = $var; + + return $this; + } + + /** + * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + * be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is + * also accepted, and in that case, the date is inferred based on the current + * time in the request's time zone. + * + * Generated from protobuf field string end_date = 2; + * @return string + */ + public function getEndDate() + { + return $this->end_date; + } + + /** + * The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + * be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is + * also accepted, and in that case, the date is inferred based on the current + * time in the request's time zone. + * + * Generated from protobuf field string end_date = 2; + * @param string $var + * @return $this + */ + public function setEndDate($var) + { + GPBUtil::checkString($var, True); + $this->end_date = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessDimension.php b/AnalyticsAdmin/src/V1beta/AccessDimension.php new file mode 100644 index 00000000000..1bff140fc51 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessDimension.php @@ -0,0 +1,81 @@ +google.analytics.admin.v1beta.AccessDimension + */ +class AccessDimension extends \Google\Protobuf\Internal\Message +{ + /** + * The API name of the dimension. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of dimensions supported in this API. + * Dimensions are referenced by name in `dimensionFilter` and `orderBys`. + * + * Generated from protobuf field string dimension_name = 1; + */ + private $dimension_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dimension_name + * The API name of the dimension. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of dimensions supported in this API. + * Dimensions are referenced by name in `dimensionFilter` and `orderBys`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The API name of the dimension. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of dimensions supported in this API. + * Dimensions are referenced by name in `dimensionFilter` and `orderBys`. + * + * Generated from protobuf field string dimension_name = 1; + * @return string + */ + public function getDimensionName() + { + return $this->dimension_name; + } + + /** + * The API name of the dimension. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of dimensions supported in this API. + * Dimensions are referenced by name in `dimensionFilter` and `orderBys`. + * + * Generated from protobuf field string dimension_name = 1; + * @param string $var + * @return $this + */ + public function setDimensionName($var) + { + GPBUtil::checkString($var, True); + $this->dimension_name = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessDimensionHeader.php b/AnalyticsAdmin/src/V1beta/AccessDimensionHeader.php new file mode 100644 index 00000000000..2706b0d86c1 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessDimensionHeader.php @@ -0,0 +1,70 @@ +google.analytics.admin.v1beta.AccessDimensionHeader + */ +class AccessDimensionHeader extends \Google\Protobuf\Internal\Message +{ + /** + * The dimension's name; for example 'userEmail'. + * + * Generated from protobuf field string dimension_name = 1; + */ + private $dimension_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dimension_name + * The dimension's name; for example 'userEmail'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The dimension's name; for example 'userEmail'. + * + * Generated from protobuf field string dimension_name = 1; + * @return string + */ + public function getDimensionName() + { + return $this->dimension_name; + } + + /** + * The dimension's name; for example 'userEmail'. + * + * Generated from protobuf field string dimension_name = 1; + * @param string $var + * @return $this + */ + public function setDimensionName($var) + { + GPBUtil::checkString($var, True); + $this->dimension_name = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessDimensionValue.php b/AnalyticsAdmin/src/V1beta/AccessDimensionValue.php new file mode 100644 index 00000000000..80bb42bc8de --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessDimensionValue.php @@ -0,0 +1,71 @@ +google.analytics.admin.v1beta.AccessDimensionValue + */ +class AccessDimensionValue extends \Google\Protobuf\Internal\Message +{ + /** + * The dimension value. For example, this value may be 'France' for the + * 'country' dimension. + * + * Generated from protobuf field string value = 1; + */ + private $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * The dimension value. For example, this value may be 'France' for the + * 'country' dimension. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The dimension value. For example, this value may be 'France' for the + * 'country' dimension. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The dimension value. For example, this value may be 'France' for the + * 'country' dimension. + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessFilter.php b/AnalyticsAdmin/src/V1beta/AccessFilter.php new file mode 100644 index 00000000000..941e0b518b6 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessFilter.php @@ -0,0 +1,208 @@ +google.analytics.admin.v1beta.AccessFilter + */ +class AccessFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The dimension name or metric name. + * + * Generated from protobuf field string field_name = 1; + */ + private $field_name = ''; + protected $one_filter; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Analytics\Admin\V1beta\AccessStringFilter $string_filter + * Strings related filter. + * @type \Google\Analytics\Admin\V1beta\AccessInListFilter $in_list_filter + * A filter for in list values. + * @type \Google\Analytics\Admin\V1beta\AccessNumericFilter $numeric_filter + * A filter for numeric or date values. + * @type \Google\Analytics\Admin\V1beta\AccessBetweenFilter $between_filter + * A filter for two values. + * @type string $field_name + * The dimension name or metric name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * Strings related filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessStringFilter string_filter = 2; + * @return \Google\Analytics\Admin\V1beta\AccessStringFilter|null + */ + public function getStringFilter() + { + return $this->readOneof(2); + } + + public function hasStringFilter() + { + return $this->hasOneof(2); + } + + /** + * Strings related filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessStringFilter string_filter = 2; + * @param \Google\Analytics\Admin\V1beta\AccessStringFilter $var + * @return $this + */ + public function setStringFilter($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessStringFilter::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A filter for in list values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessInListFilter in_list_filter = 3; + * @return \Google\Analytics\Admin\V1beta\AccessInListFilter|null + */ + public function getInListFilter() + { + return $this->readOneof(3); + } + + public function hasInListFilter() + { + return $this->hasOneof(3); + } + + /** + * A filter for in list values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessInListFilter in_list_filter = 3; + * @param \Google\Analytics\Admin\V1beta\AccessInListFilter $var + * @return $this + */ + public function setInListFilter($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessInListFilter::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A filter for numeric or date values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessNumericFilter numeric_filter = 4; + * @return \Google\Analytics\Admin\V1beta\AccessNumericFilter|null + */ + public function getNumericFilter() + { + return $this->readOneof(4); + } + + public function hasNumericFilter() + { + return $this->hasOneof(4); + } + + /** + * A filter for numeric or date values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessNumericFilter numeric_filter = 4; + * @param \Google\Analytics\Admin\V1beta\AccessNumericFilter $var + * @return $this + */ + public function setNumericFilter($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessNumericFilter::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A filter for two values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessBetweenFilter between_filter = 5; + * @return \Google\Analytics\Admin\V1beta\AccessBetweenFilter|null + */ + public function getBetweenFilter() + { + return $this->readOneof(5); + } + + public function hasBetweenFilter() + { + return $this->hasOneof(5); + } + + /** + * A filter for two values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessBetweenFilter between_filter = 5; + * @param \Google\Analytics\Admin\V1beta\AccessBetweenFilter $var + * @return $this + */ + public function setBetweenFilter($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessBetweenFilter::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The dimension name or metric name. + * + * Generated from protobuf field string field_name = 1; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The dimension name or metric name. + * + * Generated from protobuf field string field_name = 1; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getOneFilter() + { + return $this->whichOneof("one_filter"); + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessFilterExpression.php b/AnalyticsAdmin/src/V1beta/AccessFilterExpression.php new file mode 100644 index 00000000000..60c37583b95 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessFilterExpression.php @@ -0,0 +1,178 @@ +google.analytics.admin.v1beta.AccessFilterExpression + */ +class AccessFilterExpression extends \Google\Protobuf\Internal\Message +{ + protected $one_expression; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Analytics\Admin\V1beta\AccessFilterExpressionList $and_group + * Each of the FilterExpressions in the and_group has an AND relationship. + * @type \Google\Analytics\Admin\V1beta\AccessFilterExpressionList $or_group + * Each of the FilterExpressions in the or_group has an OR relationship. + * @type \Google\Analytics\Admin\V1beta\AccessFilterExpression $not_expression + * The FilterExpression is NOT of not_expression. + * @type \Google\Analytics\Admin\V1beta\AccessFilter $access_filter + * A primitive filter. In the same FilterExpression, all of the filter's + * field names need to be either all dimensions or all metrics. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * Each of the FilterExpressions in the and_group has an AND relationship. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpressionList and_group = 1; + * @return \Google\Analytics\Admin\V1beta\AccessFilterExpressionList|null + */ + public function getAndGroup() + { + return $this->readOneof(1); + } + + public function hasAndGroup() + { + return $this->hasOneof(1); + } + + /** + * Each of the FilterExpressions in the and_group has an AND relationship. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpressionList and_group = 1; + * @param \Google\Analytics\Admin\V1beta\AccessFilterExpressionList $var + * @return $this + */ + public function setAndGroup($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessFilterExpressionList::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Each of the FilterExpressions in the or_group has an OR relationship. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpressionList or_group = 2; + * @return \Google\Analytics\Admin\V1beta\AccessFilterExpressionList|null + */ + public function getOrGroup() + { + return $this->readOneof(2); + } + + public function hasOrGroup() + { + return $this->hasOneof(2); + } + + /** + * Each of the FilterExpressions in the or_group has an OR relationship. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpressionList or_group = 2; + * @param \Google\Analytics\Admin\V1beta\AccessFilterExpressionList $var + * @return $this + */ + public function setOrGroup($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessFilterExpressionList::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The FilterExpression is NOT of not_expression. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression not_expression = 3; + * @return \Google\Analytics\Admin\V1beta\AccessFilterExpression|null + */ + public function getNotExpression() + { + return $this->readOneof(3); + } + + public function hasNotExpression() + { + return $this->hasOneof(3); + } + + /** + * The FilterExpression is NOT of not_expression. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression not_expression = 3; + * @param \Google\Analytics\Admin\V1beta\AccessFilterExpression $var + * @return $this + */ + public function setNotExpression($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessFilterExpression::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A primitive filter. In the same FilterExpression, all of the filter's + * field names need to be either all dimensions or all metrics. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilter access_filter = 4; + * @return \Google\Analytics\Admin\V1beta\AccessFilter|null + */ + public function getAccessFilter() + { + return $this->readOneof(4); + } + + public function hasAccessFilter() + { + return $this->hasOneof(4); + } + + /** + * A primitive filter. In the same FilterExpression, all of the filter's + * field names need to be either all dimensions or all metrics. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilter access_filter = 4; + * @param \Google\Analytics\Admin\V1beta\AccessFilter $var + * @return $this + */ + public function setAccessFilter($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessFilter::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getOneExpression() + { + return $this->whichOneof("one_expression"); + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessFilterExpressionList.php b/AnalyticsAdmin/src/V1beta/AccessFilterExpressionList.php new file mode 100644 index 00000000000..dc507c8ce06 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessFilterExpressionList.php @@ -0,0 +1,67 @@ +google.analytics.admin.v1beta.AccessFilterExpressionList + */ +class AccessFilterExpressionList extends \Google\Protobuf\Internal\Message +{ + /** + * A list of filter expressions. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessFilterExpression expressions = 1; + */ + private $expressions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Analytics\Admin\V1beta\AccessFilterExpression>|\Google\Protobuf\Internal\RepeatedField $expressions + * A list of filter expressions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * A list of filter expressions. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessFilterExpression expressions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExpressions() + { + return $this->expressions; + } + + /** + * A list of filter expressions. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessFilterExpression expressions = 1; + * @param array<\Google\Analytics\Admin\V1beta\AccessFilterExpression>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExpressions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessFilterExpression::class); + $this->expressions = $arr; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessInListFilter.php b/AnalyticsAdmin/src/V1beta/AccessInListFilter.php new file mode 100644 index 00000000000..b6fcbf4de1f --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessInListFilter.php @@ -0,0 +1,101 @@ +google.analytics.admin.v1beta.AccessInListFilter + */ +class AccessInListFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The list of string values. Must be non-empty. + * + * Generated from protobuf field repeated string values = 1; + */ + private $values; + /** + * If true, the string value is case sensitive. + * + * Generated from protobuf field bool case_sensitive = 2; + */ + private $case_sensitive = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * The list of string values. Must be non-empty. + * @type bool $case_sensitive + * If true, the string value is case sensitive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The list of string values. Must be non-empty. + * + * Generated from protobuf field repeated string values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The list of string values. Must be non-empty. + * + * Generated from protobuf field repeated string values = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + + /** + * If true, the string value is case sensitive. + * + * Generated from protobuf field bool case_sensitive = 2; + * @return bool + */ + public function getCaseSensitive() + { + return $this->case_sensitive; + } + + /** + * If true, the string value is case sensitive. + * + * Generated from protobuf field bool case_sensitive = 2; + * @param bool $var + * @return $this + */ + public function setCaseSensitive($var) + { + GPBUtil::checkBool($var); + $this->case_sensitive = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessMetric.php b/AnalyticsAdmin/src/V1beta/AccessMetric.php new file mode 100644 index 00000000000..d074b188f73 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessMetric.php @@ -0,0 +1,80 @@ +google.analytics.admin.v1beta.AccessMetric + */ +class AccessMetric extends \Google\Protobuf\Internal\Message +{ + /** + * The API name of the metric. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of metrics supported in this API. + * Metrics are referenced by name in `metricFilter` & `orderBys`. + * + * Generated from protobuf field string metric_name = 1; + */ + private $metric_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_name + * The API name of the metric. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of metrics supported in this API. + * Metrics are referenced by name in `metricFilter` & `orderBys`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The API name of the metric. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of metrics supported in this API. + * Metrics are referenced by name in `metricFilter` & `orderBys`. + * + * Generated from protobuf field string metric_name = 1; + * @return string + */ + public function getMetricName() + { + return $this->metric_name; + } + + /** + * The API name of the metric. See [Data Access + * Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + * for the list of metrics supported in this API. + * Metrics are referenced by name in `metricFilter` & `orderBys`. + * + * Generated from protobuf field string metric_name = 1; + * @param string $var + * @return $this + */ + public function setMetricName($var) + { + GPBUtil::checkString($var, True); + $this->metric_name = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessMetricHeader.php b/AnalyticsAdmin/src/V1beta/AccessMetricHeader.php new file mode 100644 index 00000000000..38ab2c4ccbc --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessMetricHeader.php @@ -0,0 +1,70 @@ +google.analytics.admin.v1beta.AccessMetricHeader + */ +class AccessMetricHeader extends \Google\Protobuf\Internal\Message +{ + /** + * The metric's name; for example 'accessCount'. + * + * Generated from protobuf field string metric_name = 1; + */ + private $metric_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_name + * The metric's name; for example 'accessCount'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The metric's name; for example 'accessCount'. + * + * Generated from protobuf field string metric_name = 1; + * @return string + */ + public function getMetricName() + { + return $this->metric_name; + } + + /** + * The metric's name; for example 'accessCount'. + * + * Generated from protobuf field string metric_name = 1; + * @param string $var + * @return $this + */ + public function setMetricName($var) + { + GPBUtil::checkString($var, True); + $this->metric_name = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessMetricValue.php b/AnalyticsAdmin/src/V1beta/AccessMetricValue.php new file mode 100644 index 00000000000..fffb52ed754 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessMetricValue.php @@ -0,0 +1,67 @@ +google.analytics.admin.v1beta.AccessMetricValue + */ +class AccessMetricValue extends \Google\Protobuf\Internal\Message +{ + /** + * The measurement value. For example, this value may be '13'. + * + * Generated from protobuf field string value = 1; + */ + private $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * The measurement value. For example, this value may be '13'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The measurement value. For example, this value may be '13'. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The measurement value. For example, this value may be '13'. + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessNumericFilter.php b/AnalyticsAdmin/src/V1beta/AccessNumericFilter.php new file mode 100644 index 00000000000..956cd2aea5c --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessNumericFilter.php @@ -0,0 +1,111 @@ +google.analytics.admin.v1beta.AccessNumericFilter + */ +class AccessNumericFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The operation type for this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessNumericFilter.Operation operation = 1; + */ + private $operation = 0; + /** + * A numeric value or a date value. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue value = 2; + */ + private $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $operation + * The operation type for this filter. + * @type \Google\Analytics\Admin\V1beta\NumericValue $value + * A numeric value or a date value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The operation type for this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessNumericFilter.Operation operation = 1; + * @return int + */ + public function getOperation() + { + return $this->operation; + } + + /** + * The operation type for this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessNumericFilter.Operation operation = 1; + * @param int $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkEnum($var, \Google\Analytics\Admin\V1beta\AccessNumericFilter\Operation::class); + $this->operation = $var; + + return $this; + } + + /** + * A numeric value or a date value. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue value = 2; + * @return \Google\Analytics\Admin\V1beta\NumericValue|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * A numeric value or a date value. + * + * Generated from protobuf field .google.analytics.admin.v1beta.NumericValue value = 2; + * @param \Google\Analytics\Admin\V1beta\NumericValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\NumericValue::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessNumericFilter/Operation.php b/AnalyticsAdmin/src/V1beta/AccessNumericFilter/Operation.php new file mode 100644 index 00000000000..bb570ffb41c --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessNumericFilter/Operation.php @@ -0,0 +1,85 @@ +google.analytics.admin.v1beta.AccessNumericFilter.Operation + */ +class Operation +{ + /** + * Unspecified. + * + * Generated from protobuf enum OPERATION_UNSPECIFIED = 0; + */ + const OPERATION_UNSPECIFIED = 0; + /** + * Equal + * + * Generated from protobuf enum EQUAL = 1; + */ + const EQUAL = 1; + /** + * Less than + * + * Generated from protobuf enum LESS_THAN = 2; + */ + const LESS_THAN = 2; + /** + * Less than or equal + * + * Generated from protobuf enum LESS_THAN_OR_EQUAL = 3; + */ + const LESS_THAN_OR_EQUAL = 3; + /** + * Greater than + * + * Generated from protobuf enum GREATER_THAN = 4; + */ + const GREATER_THAN = 4; + /** + * Greater than or equal + * + * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 5; + */ + const GREATER_THAN_OR_EQUAL = 5; + + private static $valueToName = [ + self::OPERATION_UNSPECIFIED => 'OPERATION_UNSPECIFIED', + self::EQUAL => 'EQUAL', + self::LESS_THAN => 'LESS_THAN', + self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', + self::GREATER_THAN => 'GREATER_THAN', + self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Operation::class, \Google\Analytics\Admin\V1beta\AccessNumericFilter_Operation::class); + diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy.php new file mode 100644 index 00000000000..8d563bca144 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy.php @@ -0,0 +1,148 @@ +google.analytics.admin.v1beta.AccessOrderBy + */ +class AccessOrderBy extends \Google\Protobuf\Internal\Message +{ + /** + * If true, sorts by descending order. If false or unspecified, sorts in + * ascending order. + * + * Generated from protobuf field bool desc = 3; + */ + private $desc = false; + protected $one_order_by; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Analytics\Admin\V1beta\AccessOrderBy\MetricOrderBy $metric + * Sorts results by a metric's values. + * @type \Google\Analytics\Admin\V1beta\AccessOrderBy\DimensionOrderBy $dimension + * Sorts results by a dimension's values. + * @type bool $desc + * If true, sorts by descending order. If false or unspecified, sorts in + * ascending order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * Sorts results by a metric's values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy metric = 1; + * @return \Google\Analytics\Admin\V1beta\AccessOrderBy\MetricOrderBy|null + */ + public function getMetric() + { + return $this->readOneof(1); + } + + public function hasMetric() + { + return $this->hasOneof(1); + } + + /** + * Sorts results by a metric's values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy metric = 1; + * @param \Google\Analytics\Admin\V1beta\AccessOrderBy\MetricOrderBy $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessOrderBy\MetricOrderBy::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Sorts results by a dimension's values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy dimension = 2; + * @return \Google\Analytics\Admin\V1beta\AccessOrderBy\DimensionOrderBy|null + */ + public function getDimension() + { + return $this->readOneof(2); + } + + public function hasDimension() + { + return $this->hasOneof(2); + } + + /** + * Sorts results by a dimension's values. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy dimension = 2; + * @param \Google\Analytics\Admin\V1beta\AccessOrderBy\DimensionOrderBy $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessOrderBy\DimensionOrderBy::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If true, sorts by descending order. If false or unspecified, sorts in + * ascending order. + * + * Generated from protobuf field bool desc = 3; + * @return bool + */ + public function getDesc() + { + return $this->desc; + } + + /** + * If true, sorts by descending order. If false or unspecified, sorts in + * ascending order. + * + * Generated from protobuf field bool desc = 3; + * @param bool $var + * @return $this + */ + public function setDesc($var) + { + GPBUtil::checkBool($var); + $this->desc = $var; + + return $this; + } + + /** + * @return string + */ + public function getOneOrderBy() + { + return $this->whichOneof("one_order_by"); + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy.php new file mode 100644 index 00000000000..cd5ea2be7ab --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy.php @@ -0,0 +1,104 @@ +google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy + */ +class DimensionOrderBy extends \Google\Protobuf\Internal\Message +{ + /** + * A dimension name in the request to order by. + * + * Generated from protobuf field string dimension_name = 1; + */ + private $dimension_name = ''; + /** + * Controls the rule for dimension value ordering. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType order_type = 2; + */ + private $order_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dimension_name + * A dimension name in the request to order by. + * @type int $order_type + * Controls the rule for dimension value ordering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * A dimension name in the request to order by. + * + * Generated from protobuf field string dimension_name = 1; + * @return string + */ + public function getDimensionName() + { + return $this->dimension_name; + } + + /** + * A dimension name in the request to order by. + * + * Generated from protobuf field string dimension_name = 1; + * @param string $var + * @return $this + */ + public function setDimensionName($var) + { + GPBUtil::checkString($var, True); + $this->dimension_name = $var; + + return $this; + } + + /** + * Controls the rule for dimension value ordering. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType order_type = 2; + * @return int + */ + public function getOrderType() + { + return $this->order_type; + } + + /** + * Controls the rule for dimension value ordering. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType order_type = 2; + * @param int $var + * @return $this + */ + public function setOrderType($var) + { + GPBUtil::checkEnum($var, \Google\Analytics\Admin\V1beta\AccessOrderBy\DimensionOrderBy\OrderType::class); + $this->order_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DimensionOrderBy::class, \Google\Analytics\Admin\V1beta\AccessOrderBy_DimensionOrderBy::class); + diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy/OrderType.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy/OrderType.php new file mode 100644 index 00000000000..b0fbddbb0c0 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy/DimensionOrderBy/OrderType.php @@ -0,0 +1,76 @@ +google.analytics.admin.v1beta.AccessOrderBy.DimensionOrderBy.OrderType + */ +class OrderType +{ + /** + * Unspecified. + * + * Generated from protobuf enum ORDER_TYPE_UNSPECIFIED = 0; + */ + const ORDER_TYPE_UNSPECIFIED = 0; + /** + * Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + * "b" < "z". + * + * Generated from protobuf enum ALPHANUMERIC = 1; + */ + const ALPHANUMERIC = 1; + /** + * Case insensitive alphanumeric sort by lower case Unicode code point. + * For example, "2" < "A" < "b" < "X" < "z". + * + * Generated from protobuf enum CASE_INSENSITIVE_ALPHANUMERIC = 2; + */ + const CASE_INSENSITIVE_ALPHANUMERIC = 2; + /** + * Dimension values are converted to numbers before sorting. For example + * in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + * "25". Non-numeric dimension values all have equal ordering value below + * all numeric values. + * + * Generated from protobuf enum NUMERIC = 3; + */ + const NUMERIC = 3; + + private static $valueToName = [ + self::ORDER_TYPE_UNSPECIFIED => 'ORDER_TYPE_UNSPECIFIED', + self::ALPHANUMERIC => 'ALPHANUMERIC', + self::CASE_INSENSITIVE_ALPHANUMERIC => 'CASE_INSENSITIVE_ALPHANUMERIC', + self::NUMERIC => 'NUMERIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OrderType::class, \Google\Analytics\Admin\V1beta\AccessOrderBy_DimensionOrderBy_OrderType::class); + diff --git a/AnalyticsAdmin/src/V1beta/AccessOrderBy/MetricOrderBy.php b/AnalyticsAdmin/src/V1beta/AccessOrderBy/MetricOrderBy.php new file mode 100644 index 00000000000..0019d3c25da --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessOrderBy/MetricOrderBy.php @@ -0,0 +1,70 @@ +google.analytics.admin.v1beta.AccessOrderBy.MetricOrderBy + */ +class MetricOrderBy extends \Google\Protobuf\Internal\Message +{ + /** + * A metric name in the request to order by. + * + * Generated from protobuf field string metric_name = 1; + */ + private $metric_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_name + * A metric name in the request to order by. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * A metric name in the request to order by. + * + * Generated from protobuf field string metric_name = 1; + * @return string + */ + public function getMetricName() + { + return $this->metric_name; + } + + /** + * A metric name in the request to order by. + * + * Generated from protobuf field string metric_name = 1; + * @param string $var + * @return $this + */ + public function setMetricName($var) + { + GPBUtil::checkString($var, True); + $this->metric_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetricOrderBy::class, \Google\Analytics\Admin\V1beta\AccessOrderBy_MetricOrderBy::class); + diff --git a/AnalyticsAdmin/src/V1beta/AccessQuota.php b/AnalyticsAdmin/src/V1beta/AccessQuota.php new file mode 100644 index 00000000000..a0c5b959335 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessQuota.php @@ -0,0 +1,283 @@ +google.analytics.admin.v1beta.AccessQuota + */ +class AccessQuota extends \Google\Protobuf\Internal\Message +{ + /** + * Properties can use 250,000 tokens per day. Most requests consume fewer than + * 10 tokens. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_day = 1; + */ + private $tokens_per_day = null; + /** + * Properties can use 50,000 tokens per hour. An API request consumes a single + * number of tokens, and that number is deducted from all of the hourly, + * daily, and per project hourly quotas. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_hour = 2; + */ + private $tokens_per_hour = null; + /** + * Properties can use up to 50 concurrent requests. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus concurrent_requests = 3; + */ + private $concurrent_requests = null; + /** + * Properties and cloud project pairs can have up to 50 server errors per + * hour. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus server_errors_per_project_per_hour = 4; + */ + private $server_errors_per_project_per_hour = null; + /** + * Properties can use up to 25% of their tokens per project per hour. This + * amounts to Analytics 360 Properties can use 12,500 tokens per project per + * hour. An API request consumes a single number of tokens, and that number is + * deducted from all of the hourly, daily, and per project hourly quotas. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_project_per_hour = 5; + */ + private $tokens_per_project_per_hour = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Analytics\Admin\V1beta\AccessQuotaStatus $tokens_per_day + * Properties can use 250,000 tokens per day. Most requests consume fewer than + * 10 tokens. + * @type \Google\Analytics\Admin\V1beta\AccessQuotaStatus $tokens_per_hour + * Properties can use 50,000 tokens per hour. An API request consumes a single + * number of tokens, and that number is deducted from all of the hourly, + * daily, and per project hourly quotas. + * @type \Google\Analytics\Admin\V1beta\AccessQuotaStatus $concurrent_requests + * Properties can use up to 50 concurrent requests. + * @type \Google\Analytics\Admin\V1beta\AccessQuotaStatus $server_errors_per_project_per_hour + * Properties and cloud project pairs can have up to 50 server errors per + * hour. + * @type \Google\Analytics\Admin\V1beta\AccessQuotaStatus $tokens_per_project_per_hour + * Properties can use up to 25% of their tokens per project per hour. This + * amounts to Analytics 360 Properties can use 12,500 tokens per project per + * hour. An API request consumes a single number of tokens, and that number is + * deducted from all of the hourly, daily, and per project hourly quotas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * Properties can use 250,000 tokens per day. Most requests consume fewer than + * 10 tokens. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_day = 1; + * @return \Google\Analytics\Admin\V1beta\AccessQuotaStatus|null + */ + public function getTokensPerDay() + { + return $this->tokens_per_day; + } + + public function hasTokensPerDay() + { + return isset($this->tokens_per_day); + } + + public function clearTokensPerDay() + { + unset($this->tokens_per_day); + } + + /** + * Properties can use 250,000 tokens per day. Most requests consume fewer than + * 10 tokens. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_day = 1; + * @param \Google\Analytics\Admin\V1beta\AccessQuotaStatus $var + * @return $this + */ + public function setTokensPerDay($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessQuotaStatus::class); + $this->tokens_per_day = $var; + + return $this; + } + + /** + * Properties can use 50,000 tokens per hour. An API request consumes a single + * number of tokens, and that number is deducted from all of the hourly, + * daily, and per project hourly quotas. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_hour = 2; + * @return \Google\Analytics\Admin\V1beta\AccessQuotaStatus|null + */ + public function getTokensPerHour() + { + return $this->tokens_per_hour; + } + + public function hasTokensPerHour() + { + return isset($this->tokens_per_hour); + } + + public function clearTokensPerHour() + { + unset($this->tokens_per_hour); + } + + /** + * Properties can use 50,000 tokens per hour. An API request consumes a single + * number of tokens, and that number is deducted from all of the hourly, + * daily, and per project hourly quotas. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_hour = 2; + * @param \Google\Analytics\Admin\V1beta\AccessQuotaStatus $var + * @return $this + */ + public function setTokensPerHour($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessQuotaStatus::class); + $this->tokens_per_hour = $var; + + return $this; + } + + /** + * Properties can use up to 50 concurrent requests. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus concurrent_requests = 3; + * @return \Google\Analytics\Admin\V1beta\AccessQuotaStatus|null + */ + public function getConcurrentRequests() + { + return $this->concurrent_requests; + } + + public function hasConcurrentRequests() + { + return isset($this->concurrent_requests); + } + + public function clearConcurrentRequests() + { + unset($this->concurrent_requests); + } + + /** + * Properties can use up to 50 concurrent requests. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus concurrent_requests = 3; + * @param \Google\Analytics\Admin\V1beta\AccessQuotaStatus $var + * @return $this + */ + public function setConcurrentRequests($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessQuotaStatus::class); + $this->concurrent_requests = $var; + + return $this; + } + + /** + * Properties and cloud project pairs can have up to 50 server errors per + * hour. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus server_errors_per_project_per_hour = 4; + * @return \Google\Analytics\Admin\V1beta\AccessQuotaStatus|null + */ + public function getServerErrorsPerProjectPerHour() + { + return $this->server_errors_per_project_per_hour; + } + + public function hasServerErrorsPerProjectPerHour() + { + return isset($this->server_errors_per_project_per_hour); + } + + public function clearServerErrorsPerProjectPerHour() + { + unset($this->server_errors_per_project_per_hour); + } + + /** + * Properties and cloud project pairs can have up to 50 server errors per + * hour. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus server_errors_per_project_per_hour = 4; + * @param \Google\Analytics\Admin\V1beta\AccessQuotaStatus $var + * @return $this + */ + public function setServerErrorsPerProjectPerHour($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessQuotaStatus::class); + $this->server_errors_per_project_per_hour = $var; + + return $this; + } + + /** + * Properties can use up to 25% of their tokens per project per hour. This + * amounts to Analytics 360 Properties can use 12,500 tokens per project per + * hour. An API request consumes a single number of tokens, and that number is + * deducted from all of the hourly, daily, and per project hourly quotas. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_project_per_hour = 5; + * @return \Google\Analytics\Admin\V1beta\AccessQuotaStatus|null + */ + public function getTokensPerProjectPerHour() + { + return $this->tokens_per_project_per_hour; + } + + public function hasTokensPerProjectPerHour() + { + return isset($this->tokens_per_project_per_hour); + } + + public function clearTokensPerProjectPerHour() + { + unset($this->tokens_per_project_per_hour); + } + + /** + * Properties can use up to 25% of their tokens per project per hour. This + * amounts to Analytics 360 Properties can use 12,500 tokens per project per + * hour. An API request consumes a single number of tokens, and that number is + * deducted from all of the hourly, daily, and per project hourly quotas. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuotaStatus tokens_per_project_per_hour = 5; + * @param \Google\Analytics\Admin\V1beta\AccessQuotaStatus $var + * @return $this + */ + public function setTokensPerProjectPerHour($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessQuotaStatus::class); + $this->tokens_per_project_per_hour = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessQuotaStatus.php b/AnalyticsAdmin/src/V1beta/AccessQuotaStatus.php new file mode 100644 index 00000000000..8035178d2d5 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessQuotaStatus.php @@ -0,0 +1,101 @@ +google.analytics.admin.v1beta.AccessQuotaStatus + */ +class AccessQuotaStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Quota consumed by this request. + * + * Generated from protobuf field int32 consumed = 1; + */ + private $consumed = 0; + /** + * Quota remaining after this request. + * + * Generated from protobuf field int32 remaining = 2; + */ + private $remaining = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $consumed + * Quota consumed by this request. + * @type int $remaining + * Quota remaining after this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * Quota consumed by this request. + * + * Generated from protobuf field int32 consumed = 1; + * @return int + */ + public function getConsumed() + { + return $this->consumed; + } + + /** + * Quota consumed by this request. + * + * Generated from protobuf field int32 consumed = 1; + * @param int $var + * @return $this + */ + public function setConsumed($var) + { + GPBUtil::checkInt32($var); + $this->consumed = $var; + + return $this; + } + + /** + * Quota remaining after this request. + * + * Generated from protobuf field int32 remaining = 2; + * @return int + */ + public function getRemaining() + { + return $this->remaining; + } + + /** + * Quota remaining after this request. + * + * Generated from protobuf field int32 remaining = 2; + * @param int $var + * @return $this + */ + public function setRemaining($var) + { + GPBUtil::checkInt32($var); + $this->remaining = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessRow.php b/AnalyticsAdmin/src/V1beta/AccessRow.php new file mode 100644 index 00000000000..2f6666df4c0 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessRow.php @@ -0,0 +1,109 @@ +google.analytics.admin.v1beta.AccessRow + */ +class AccessRow extends \Google\Protobuf\Internal\Message +{ + /** + * List of dimension values. These values are in the same order as specified + * in the request. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimensionValue dimension_values = 1; + */ + private $dimension_values; + /** + * List of metric values. These values are in the same order as specified + * in the request. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetricValue metric_values = 2; + */ + private $metric_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Analytics\Admin\V1beta\AccessDimensionValue>|\Google\Protobuf\Internal\RepeatedField $dimension_values + * List of dimension values. These values are in the same order as specified + * in the request. + * @type array<\Google\Analytics\Admin\V1beta\AccessMetricValue>|\Google\Protobuf\Internal\RepeatedField $metric_values + * List of metric values. These values are in the same order as specified + * in the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * List of dimension values. These values are in the same order as specified + * in the request. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimensionValue dimension_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDimensionValues() + { + return $this->dimension_values; + } + + /** + * List of dimension values. These values are in the same order as specified + * in the request. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimensionValue dimension_values = 1; + * @param array<\Google\Analytics\Admin\V1beta\AccessDimensionValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDimensionValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessDimensionValue::class); + $this->dimension_values = $arr; + + return $this; + } + + /** + * List of metric values. These values are in the same order as specified + * in the request. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetricValue metric_values = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetricValues() + { + return $this->metric_values; + } + + /** + * List of metric values. These values are in the same order as specified + * in the request. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetricValue metric_values = 2; + * @param array<\Google\Analytics\Admin\V1beta\AccessMetricValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetricValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessMetricValue::class); + $this->metric_values = $arr; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessStringFilter.php b/AnalyticsAdmin/src/V1beta/AccessStringFilter.php new file mode 100644 index 00000000000..33da913c46d --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessStringFilter.php @@ -0,0 +1,135 @@ +google.analytics.admin.v1beta.AccessStringFilter + */ +class AccessStringFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The match type for this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessStringFilter.MatchType match_type = 1; + */ + private $match_type = 0; + /** + * The string value used for the matching. + * + * Generated from protobuf field string value = 2; + */ + private $value = ''; + /** + * If true, the string value is case sensitive. + * + * Generated from protobuf field bool case_sensitive = 3; + */ + private $case_sensitive = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $match_type + * The match type for this filter. + * @type string $value + * The string value used for the matching. + * @type bool $case_sensitive + * If true, the string value is case sensitive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * The match type for this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessStringFilter.MatchType match_type = 1; + * @return int + */ + public function getMatchType() + { + return $this->match_type; + } + + /** + * The match type for this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessStringFilter.MatchType match_type = 1; + * @param int $var + * @return $this + */ + public function setMatchType($var) + { + GPBUtil::checkEnum($var, \Google\Analytics\Admin\V1beta\AccessStringFilter\MatchType::class); + $this->match_type = $var; + + return $this; + } + + /** + * The string value used for the matching. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The string value used for the matching. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * If true, the string value is case sensitive. + * + * Generated from protobuf field bool case_sensitive = 3; + * @return bool + */ + public function getCaseSensitive() + { + return $this->case_sensitive; + } + + /** + * If true, the string value is case sensitive. + * + * Generated from protobuf field bool case_sensitive = 3; + * @param bool $var + * @return $this + */ + public function setCaseSensitive($var) + { + GPBUtil::checkBool($var); + $this->case_sensitive = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/AccessStringFilter/MatchType.php b/AnalyticsAdmin/src/V1beta/AccessStringFilter/MatchType.php new file mode 100644 index 00000000000..1160ce4dab8 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/AccessStringFilter/MatchType.php @@ -0,0 +1,92 @@ +google.analytics.admin.v1beta.AccessStringFilter.MatchType + */ +class MatchType +{ + /** + * Unspecified + * + * Generated from protobuf enum MATCH_TYPE_UNSPECIFIED = 0; + */ + const MATCH_TYPE_UNSPECIFIED = 0; + /** + * Exact match of the string value. + * + * Generated from protobuf enum EXACT = 1; + */ + const EXACT = 1; + /** + * Begins with the string value. + * + * Generated from protobuf enum BEGINS_WITH = 2; + */ + const BEGINS_WITH = 2; + /** + * Ends with the string value. + * + * Generated from protobuf enum ENDS_WITH = 3; + */ + const ENDS_WITH = 3; + /** + * Contains the string value. + * + * Generated from protobuf enum CONTAINS = 4; + */ + const CONTAINS = 4; + /** + * Full match for the regular expression with the string value. + * + * Generated from protobuf enum FULL_REGEXP = 5; + */ + const FULL_REGEXP = 5; + /** + * Partial match for the regular expression with the string value. + * + * Generated from protobuf enum PARTIAL_REGEXP = 6; + */ + const PARTIAL_REGEXP = 6; + + private static $valueToName = [ + self::MATCH_TYPE_UNSPECIFIED => 'MATCH_TYPE_UNSPECIFIED', + self::EXACT => 'EXACT', + self::BEGINS_WITH => 'BEGINS_WITH', + self::ENDS_WITH => 'ENDS_WITH', + self::CONTAINS => 'CONTAINS', + self::FULL_REGEXP => 'FULL_REGEXP', + self::PARTIAL_REGEXP => 'PARTIAL_REGEXP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MatchType::class, \Google\Analytics\Admin\V1beta\AccessStringFilter_MatchType::class); + diff --git a/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php b/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php index 70ba31edf17..2c435f3b7ff 100644 --- a/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php +++ b/AnalyticsAdmin/src/V1beta/AcknowledgeUserDataCollectionRequest.php @@ -22,8 +22,8 @@ class AcknowledgeUserDataCollectionRequest extends \Google\Protobuf\Internal\Mes */ private $property = ''; /** - * Required. An acknowledgement that the caller of this method understands the terms - * of user data collection. + * Required. 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 * from my end users for the collection and processing of their data, @@ -43,8 +43,8 @@ class AcknowledgeUserDataCollectionRequest extends \Google\Protobuf\Internal\Mes * @type string $property * Required. The property for which to acknowledge user data collection. * @type string $acknowledgement - * Required. An acknowledgement that the caller of this method understands the terms - * of user data collection. + * Required. 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 * from my end users for the collection and processing of their data, @@ -84,8 +84,8 @@ public function setProperty($var) } /** - * Required. An acknowledgement that the caller of this method understands the terms - * of user data collection. + * Required. 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 * from my end users for the collection and processing of their data, @@ -101,8 +101,8 @@ public function getAcknowledgement() } /** - * Required. An acknowledgement that the caller of this method understands the terms - * of user data collection. + * Required. 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 * from my end users for the collection and processing of their data, diff --git a/AnalyticsAdmin/src/V1beta/ConversionEvent.php b/AnalyticsAdmin/src/V1beta/ConversionEvent.php index c7876582a8e..a5e7eb56624 100644 --- a/AnalyticsAdmin/src/V1beta/ConversionEvent.php +++ b/AnalyticsAdmin/src/V1beta/ConversionEvent.php @@ -36,17 +36,18 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message */ private $create_time = null; /** - * Output only. If set, this event can currently be deleted via DeleteConversionEvent. + * Output only. If set, this event can currently be deleted with + * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $deletable = false; /** - * Output only. If set to true, this conversion event refers to a custom event. If set to - * false, this conversion event refers to a default event in GA. Default - * events typically have special meaning in GA. Default events are usually - * created for you by the GA system, but in some cases can be created by - * property admins. Custom events count towards the maximum number of + * Output only. If set to true, this conversion event refers to a custom + * event. If set to false, this conversion event refers to a default event in + * GA. Default events typically have special meaning in GA. Default events are + * usually created for you by the GA system, but in some cases can be created + * by property admins. Custom events count towards the maximum number of * custom conversion events that may be created per property. * * Generated from protobuf field bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -68,13 +69,14 @@ class ConversionEvent extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Timestamp $create_time * Output only. Time when this conversion event was created in the property. * @type bool $deletable - * Output only. If set, this event can currently be deleted via DeleteConversionEvent. + * Output only. If set, this event can currently be deleted with + * DeleteConversionEvent. * @type bool $custom - * Output only. If set to true, this conversion event refers to a custom event. If set to - * false, this conversion event refers to a default event in GA. Default - * events typically have special meaning in GA. Default events are usually - * created for you by the GA system, but in some cases can be created by - * property admins. Custom events count towards the maximum number of + * Output only. If set to true, this conversion event refers to a custom + * event. If set to false, this conversion event refers to a default event in + * GA. Default events typically have special meaning in GA. Default events are + * usually created for you by the GA system, but in some cases can be created + * by property admins. Custom events count towards the maximum number of * custom conversion events that may be created per property. * } */ @@ -176,7 +178,8 @@ public function setCreateTime($var) } /** - * Output only. If set, this event can currently be deleted via DeleteConversionEvent. + * Output only. If set, this event can currently be deleted with + * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return bool @@ -187,7 +190,8 @@ public function getDeletable() } /** - * Output only. If set, this event can currently be deleted via DeleteConversionEvent. + * Output only. If set, this event can currently be deleted with + * DeleteConversionEvent. * * Generated from protobuf field bool deletable = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param bool $var @@ -202,11 +206,11 @@ public function setDeletable($var) } /** - * Output only. If set to true, this conversion event refers to a custom event. If set to - * false, this conversion event refers to a default event in GA. Default - * events typically have special meaning in GA. Default events are usually - * created for you by the GA system, but in some cases can be created by - * property admins. Custom events count towards the maximum number of + * Output only. If set to true, this conversion event refers to a custom + * event. If set to false, this conversion event refers to a default event in + * GA. Default events typically have special meaning in GA. Default events are + * usually created for you by the GA system, but in some cases can be created + * by property admins. Custom events count towards the maximum number of * custom conversion events that may be created per property. * * Generated from protobuf field bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -218,11 +222,11 @@ public function getCustom() } /** - * Output only. If set to true, this conversion event refers to a custom event. If set to - * false, this conversion event refers to a default event in GA. Default - * events typically have special meaning in GA. Default events are usually - * created for you by the GA system, but in some cases can be created by - * property admins. Custom events count towards the maximum number of + * Output only. If set to true, this conversion event refers to a custom + * event. If set to false, this conversion event refers to a default event in + * GA. Default events typically have special meaning in GA. Default events are + * usually created for you by the GA system, but in some cases can be created + * by property admins. Custom events count towards the maximum number of * custom conversion events that may be created per property. * * Generated from protobuf field bool custom = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php b/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php index 71f295d6228..c49752dfb32 100644 --- a/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php +++ b/AnalyticsAdmin/src/V1beta/CreateConversionEventRequest.php @@ -22,8 +22,8 @@ class CreateConversionEventRequest extends \Google\Protobuf\Internal\Message */ private $conversion_event = null; /** - * Required. The resource name of the parent property where this conversion event will - * be created. Format: properties/123 + * Required. The resource name of the parent property where this conversion + * event will be created. Format: properties/123 * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -38,8 +38,8 @@ class CreateConversionEventRequest extends \Google\Protobuf\Internal\Message * @type \Google\Analytics\Admin\V1beta\ConversionEvent $conversion_event * Required. The conversion event to create. * @type string $parent - * Required. The resource name of the parent property where this conversion event will - * be created. Format: properties/123 + * Required. The resource name of the parent property where this conversion + * event will be created. Format: properties/123 * } */ public function __construct($data = NULL) { @@ -84,8 +84,8 @@ public function setConversionEvent($var) } /** - * Required. The resource name of the parent property where this conversion event will - * be created. Format: properties/123 + * Required. The resource name of the parent property where this conversion + * event will be created. Format: properties/123 * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -96,8 +96,8 @@ public function getParent() } /** - * Required. The resource name of the parent property where this conversion event will - * be created. Format: properties/123 + * Required. The resource name of the parent property where this conversion + * event will be created. Format: properties/123 * * Generated from protobuf field string parent = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AnalyticsAdmin/src/V1beta/CustomDimension.php b/AnalyticsAdmin/src/V1beta/CustomDimension.php index 6daab94e0ab..1c96342321a 100644 --- a/AnalyticsAdmin/src/V1beta/CustomDimension.php +++ b/AnalyticsAdmin/src/V1beta/CustomDimension.php @@ -35,8 +35,8 @@ class CustomDimension extends \Google\Protobuf\Internal\Message */ private $parameter_name = ''; /** - * Required. Display name for this custom dimension as shown in the Analytics UI. - * Max length of 82 characters, alphanumeric plus space and underscore + * Required. 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. @@ -45,7 +45,8 @@ class CustomDimension extends \Google\Protobuf\Internal\Message */ private $display_name = ''; /** - * Optional. Description for this custom dimension. Max length of 150 characters. + * Optional. Description for this custom dimension. Max length of 150 + * characters. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -57,8 +58,8 @@ class CustomDimension extends \Google\Protobuf\Internal\Message */ private $scope = 0; /** - * Optional. If set to true, sets this dimension as NPA and excludes it from ads - * personalization. + * Optional. If set to true, sets this dimension as NPA and excludes it from + * ads personalization. * This is currently only supported by user-scoped custom dimensions. * * Generated from protobuf field bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -83,18 +84,19 @@ class CustomDimension extends \Google\Protobuf\Internal\Message * letter. Max length of 24 characters for user-scoped dimensions, 40 * characters for event-scoped dimensions. * @type string $display_name - * Required. Display name for this custom dimension as shown in the Analytics UI. - * Max length of 82 characters, alphanumeric plus space and underscore + * Required. 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. * @type string $description - * Optional. Description for this custom dimension. Max length of 150 characters. + * Optional. Description for this custom dimension. Max length of 150 + * characters. * @type int $scope * Required. Immutable. The scope of this dimension. * @type bool $disallow_ads_personalization - * Optional. If set to true, sets this dimension as NPA and excludes it from ads - * personalization. + * Optional. If set to true, sets this dimension as NPA and excludes it from + * ads personalization. * This is currently only supported by user-scoped custom dimensions. * } */ @@ -170,8 +172,8 @@ public function setParameterName($var) } /** - * Required. Display name for this custom dimension as shown in the Analytics UI. - * Max length of 82 characters, alphanumeric plus space and underscore + * Required. 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. @@ -185,8 +187,8 @@ public function getDisplayName() } /** - * Required. Display name for this custom dimension as shown in the Analytics UI. - * Max length of 82 characters, alphanumeric plus space and underscore + * Required. 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. @@ -204,7 +206,8 @@ public function setDisplayName($var) } /** - * Optional. Description for this custom dimension. Max length of 150 characters. + * Optional. Description for this custom dimension. Max length of 150 + * characters. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -215,7 +218,8 @@ public function getDescription() } /** - * Optional. Description for this custom dimension. Max length of 150 characters. + * Optional. Description for this custom dimension. Max length of 150 + * characters. * * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -256,8 +260,8 @@ public function setScope($var) } /** - * Optional. If set to true, sets this dimension as NPA and excludes it from ads - * personalization. + * Optional. If set to true, sets this dimension as NPA and excludes it from + * ads personalization. * This is currently only supported by user-scoped custom dimensions. * * Generated from protobuf field bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -269,8 +273,8 @@ public function getDisallowAdsPersonalization() } /** - * Optional. If set to true, sets this dimension as NPA and excludes it from ads - * personalization. + * Optional. If set to true, sets this dimension as NPA and excludes it from + * ads personalization. * This is currently only supported by user-scoped custom dimensions. * * Generated from protobuf field bool disallow_ads_personalization = 6 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/AnalyticsAdmin/src/V1beta/CustomMetric.php b/AnalyticsAdmin/src/V1beta/CustomMetric.php index 39c0dad0952..c2635d667f9 100644 --- a/AnalyticsAdmin/src/V1beta/CustomMetric.php +++ b/AnalyticsAdmin/src/V1beta/CustomMetric.php @@ -62,9 +62,9 @@ class CustomMetric extends \Google\Protobuf\Internal\Message */ private $scope = 0; /** - * Optional. Types of restricted data that this metric may contain. Required for metrics - * with CURRENCY measurement unit. Must be empty for metrics with a - * non-CURRENCY measurement unit. + * Optional. Types of restricted data that this metric may contain. Required + * for metrics with CURRENCY measurement unit. Must be empty for metrics with + * a non-CURRENCY measurement unit. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -99,9 +99,9 @@ class CustomMetric extends \Google\Protobuf\Internal\Message * @type int $scope * Required. Immutable. The scope of this custom metric. * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_metric_type - * Optional. Types of restricted data that this metric may contain. Required for metrics - * with CURRENCY measurement unit. Must be empty for metrics with a - * non-CURRENCY measurement unit. + * Optional. Types of restricted data that this metric may contain. Required + * for metrics with CURRENCY measurement unit. Must be empty for metrics with + * a non-CURRENCY measurement unit. * } */ public function __construct($data = NULL) { @@ -286,9 +286,9 @@ public function setScope($var) } /** - * Optional. Types of restricted data that this metric may contain. Required for metrics - * with CURRENCY measurement unit. Must be empty for metrics with a - * non-CURRENCY measurement unit. + * Optional. Types of restricted data that this metric may contain. Required + * for metrics with CURRENCY measurement unit. Must be empty for metrics with + * a non-CURRENCY measurement unit. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField @@ -299,9 +299,9 @@ public function getRestrictedMetricType() } /** - * Optional. Types of restricted data that this metric may contain. Required for metrics - * with CURRENCY measurement unit. Must be empty for metrics with a - * non-CURRENCY measurement unit. + * Optional. Types of restricted data that this metric may contain. Required + * for metrics with CURRENCY measurement unit. Must be empty for metrics with + * a non-CURRENCY measurement unit. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType restricted_metric_type = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var diff --git a/AnalyticsAdmin/src/V1beta/FirebaseLink.php b/AnalyticsAdmin/src/V1beta/FirebaseLink.php index 24b629d30cc..645e82c3801 100644 --- a/AnalyticsAdmin/src/V1beta/FirebaseLink.php +++ b/AnalyticsAdmin/src/V1beta/FirebaseLink.php @@ -22,9 +22,9 @@ class FirebaseLink extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Immutable. Firebase project resource name. When creating a FirebaseLink, you may - * provide this resource name using either a project number or project ID. - * Once this resource has been created, returned FirebaseLinks will always + * Immutable. Firebase project resource name. When creating a FirebaseLink, + * you may provide this resource name using either a project number or project + * ID. Once this resource has been created, returned FirebaseLinks will always * have a project_name that contains a project number. * Format: 'projects/{project number}' * Example: 'projects/1234' @@ -48,9 +48,9 @@ class FirebaseLink extends \Google\Protobuf\Internal\Message * @type string $name * Output only. Example format: properties/1234/firebaseLinks/5678 * @type string $project - * Immutable. Firebase project resource name. When creating a FirebaseLink, you may - * provide this resource name using either a project number or project ID. - * Once this resource has been created, returned FirebaseLinks will always + * Immutable. Firebase project resource name. When creating a FirebaseLink, + * you may provide this resource name using either a project number or project + * ID. Once this resource has been created, returned FirebaseLinks will always * have a project_name that contains a project number. * Format: 'projects/{project number}' * Example: 'projects/1234' @@ -90,9 +90,9 @@ public function setName($var) } /** - * Immutable. Firebase project resource name. When creating a FirebaseLink, you may - * provide this resource name using either a project number or project ID. - * Once this resource has been created, returned FirebaseLinks will always + * Immutable. Firebase project resource name. When creating a FirebaseLink, + * you may provide this resource name using either a project number or project + * ID. Once this resource has been created, returned FirebaseLinks will always * have a project_name that contains a project number. * Format: 'projects/{project number}' * Example: 'projects/1234' @@ -106,9 +106,9 @@ public function getProject() } /** - * Immutable. Firebase project resource name. When creating a FirebaseLink, you may - * provide this resource name using either a project number or project ID. - * Once this resource has been created, returned FirebaseLinks will always + * Immutable. Firebase project resource name. When creating a FirebaseLink, + * you may provide this resource name using either a project number or project + * ID. Once this resource has been created, returned FirebaseLinks will always * have a project_name that contains a project number. * Format: 'projects/{project number}' * Example: 'projects/1234' diff --git a/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php b/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php index 757397b2645..f7607236cec 100644 --- a/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php +++ b/AnalyticsAdmin/src/V1beta/Gapic/AnalyticsAdminServiceGapicClient.php @@ -26,6 +26,11 @@ namespace Google\Analytics\Admin\V1beta\Gapic; +use Google\Analytics\Admin\V1beta\AccessDateRange; +use Google\Analytics\Admin\V1beta\AccessDimension; +use Google\Analytics\Admin\V1beta\AccessFilterExpression; +use Google\Analytics\Admin\V1beta\AccessMetric; +use Google\Analytics\Admin\V1beta\AccessOrderBy; use Google\Analytics\Admin\V1beta\Account; use Google\Analytics\Admin\V1beta\AcknowledgeUserDataCollectionRequest; use Google\Analytics\Admin\V1beta\AcknowledgeUserDataCollectionResponse; @@ -87,6 +92,8 @@ use Google\Analytics\Admin\V1beta\Property; use Google\Analytics\Admin\V1beta\ProvisionAccountTicketRequest; use Google\Analytics\Admin\V1beta\ProvisionAccountTicketResponse; +use Google\Analytics\Admin\V1beta\RunAccessReportRequest; +use Google\Analytics\Admin\V1beta\RunAccessReportResponse; use Google\Analytics\Admin\V1beta\SearchChangeHistoryEventsRequest; use Google\Analytics\Admin\V1beta\SearchChangeHistoryEventsResponse; use Google\Analytics\Admin\V1beta\UpdateAccountRequest; @@ -641,7 +648,8 @@ public function __construct(array $options = []) * Acknowledges the terms of user data collection for the specified property. * * This acknowledgement must be completed (either in the Google Analytics UI - * or via this API) before MeasurementProtocolSecret resources may be created. + * or through this API) before MeasurementProtocolSecret resources may be + * created. * * Sample code: * ``` @@ -656,8 +664,8 @@ public function __construct(array $options = []) * ``` * * @param string $property Required. The property for which to acknowledge user data collection. - * @param string $acknowledgement Required. An acknowledgement that the caller of this method understands the terms - * of user data collection. + * @param string $acknowledgement Required. 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 @@ -787,8 +795,8 @@ public function archiveCustomMetric($name, array $optionalArgs = []) * ``` * * @param ConversionEvent $conversionEvent Required. The conversion event to create. - * @param string $parent Required. The resource name of the parent property where this conversion event will - * be created. Format: properties/123 + * @param string $parent Required. The resource name of the parent property where this conversion + * event will be created. Format: properties/123 * @param array $optionalArgs { * Optional. * @@ -1385,7 +1393,7 @@ public function deleteMeasurementProtocolSecret($name, array $optionalArgs = []) * 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. * * Sample code: * ``` @@ -2563,7 +2571,7 @@ public function listProperties($filter, array $optionalArgs = []) * The account to create. * @type string $redirectUri * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Cloud Console as a Redirect URI. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -2590,6 +2598,166 @@ public function provisionAccountTicket(array $optionalArgs = []) return $this->startCall('ProvisionAccountTicket', ProvisionAccountTicketResponse::class, $optionalArgs, $request)->wait(); } + /** + * Returns a customized report of data access records. The report provides + * records of each time a user reads Google Analytics reporting data. Access + * records are retained for up to 2 years. + * + * Data Access Reports can be requested for a property. The property must be + * in Google Analytics 360. This method is only available to Administrators. + * + * These data access records include GA4 UI Reporting, GA4 UI Explorations, + * GA4 Data API, and other products like Firebase & Admob that can retrieve + * data from Google Analytics through a linkage. These records don't include + * property configuration changes like adding a stream or changing a + * property's time zone. For configuration change history, see + * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + * + * Sample code: + * ``` + * $analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); + * try { + * $response = $analyticsAdminServiceClient->runAccessReport(); + * } finally { + * $analyticsAdminServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $entity + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. + * @type AccessDimension[] $dimensions + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + * @type AccessMetric[] $metrics + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + * @type AccessDateRange[] $dateRanges + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + * @type AccessFilterExpression $dimensionFilter + * Dimension filters let you restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @type AccessFilterExpression $metricFilter + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + * @type int $offset + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @type int $limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @type string $timeZone + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + * @type AccessOrderBy[] $orderBys + * Specifies how rows are ordered in the response. + * @type bool $returnEntityQuota + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Analytics\Admin\V1beta\RunAccessReportResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function runAccessReport(array $optionalArgs = []) + { + $request = new RunAccessReportRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['entity'])) { + $request->setEntity($optionalArgs['entity']); + $requestParamHeaders['entity'] = $optionalArgs['entity']; + } + + if (isset($optionalArgs['dimensions'])) { + $request->setDimensions($optionalArgs['dimensions']); + } + + if (isset($optionalArgs['metrics'])) { + $request->setMetrics($optionalArgs['metrics']); + } + + if (isset($optionalArgs['dateRanges'])) { + $request->setDateRanges($optionalArgs['dateRanges']); + } + + if (isset($optionalArgs['dimensionFilter'])) { + $request->setDimensionFilter($optionalArgs['dimensionFilter']); + } + + if (isset($optionalArgs['metricFilter'])) { + $request->setMetricFilter($optionalArgs['metricFilter']); + } + + if (isset($optionalArgs['offset'])) { + $request->setOffset($optionalArgs['offset']); + } + + if (isset($optionalArgs['limit'])) { + $request->setLimit($optionalArgs['limit']); + } + + if (isset($optionalArgs['timeZone'])) { + $request->setTimeZone($optionalArgs['timeZone']); + } + + if (isset($optionalArgs['orderBys'])) { + $request->setOrderBys($optionalArgs['orderBys']); + } + + if (isset($optionalArgs['returnEntityQuota'])) { + $request->setReturnEntityQuota($optionalArgs['returnEntityQuota']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('RunAccessReport', RunAccessReportResponse::class, $optionalArgs, $request)->wait(); + } + /** * Searches through all changes to an account or its children given the * specified set of filters. @@ -2617,7 +2785,8 @@ public function provisionAccountTicket(array $optionalArgs = []) * } * ``` * - * @param string $account Required. The account resource for which to return change history resources. + * @param string $account Required. The account resource for which to return change history + * resources. * @param array $optionalArgs { * Optional. * @@ -2625,15 +2794,16 @@ public function provisionAccountTicket(array $optionalArgs = []) * Optional. Resource name for a child property. If set, only return changes * made to this property or its child resources. * @type int[] $resourceType - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * For allowed values, use constants defined on {@see \Google\Analytics\Admin\V1beta\ChangeHistoryResourceType} * @type int[] $action - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * For allowed values, use constants defined on {@see \Google\Analytics\Admin\V1beta\ActionType} * @type string[] $actorEmail - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * @type Timestamp $earliestChangeTime * Optional. If set, only return changes made after this time (inclusive). * @type Timestamp $latestChangeTime @@ -2719,9 +2889,10 @@ public function searchChangeHistoryEvents($account, array $optionalArgs = []) * * @param Account $account Required. The account to update. * The account's `name` field is used to identify the account. - * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all + * fields. * @param array $optionalArgs { * Optional. * @@ -2763,9 +2934,9 @@ public function updateAccount($account, $updateMask, array $optionalArgs = []) * } * ``` * - * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * @param array $optionalArgs { * Optional. * @@ -2811,9 +2982,9 @@ public function updateCustomDimension($updateMask, array $optionalArgs = []) * } * ``` * - * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * @param array $optionalArgs { * Optional. * @@ -2862,9 +3033,10 @@ public function updateCustomMetric($updateMask, array $optionalArgs = []) * * @param DataRetentionSettings $dataRetentionSettings Required. The settings to update. * The `name` field is used to identify the settings to be updated. - * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @param array $optionalArgs { * Optional. * @@ -2906,9 +3078,9 @@ public function updateDataRetentionSettings($dataRetentionSettings, $updateMask, * } * ``` * - * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * @param FieldMask $updateMask Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * @param array $optionalArgs { * Optional. * @@ -2954,9 +3126,10 @@ public function updateDataStream($updateMask, array $optionalArgs = []) * } * ``` * - * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @param array $optionalArgs { * Optional. * @@ -3053,9 +3226,10 @@ public function updateMeasurementProtocolSecret($measurementProtocolSecret, arra * @param Property $property Required. The property to update. * The property's `name` field is used to identify the property to be * updated. - * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * @param FieldMask $updateMask Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * @param array $optionalArgs { * Optional. * diff --git a/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php b/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php index c7be9c87811..9c9b51d840e 100644 --- a/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php +++ b/AnalyticsAdmin/src/V1beta/GoogleAdsLink.php @@ -16,7 +16,8 @@ class GoogleAdsLink extends \Google\Protobuf\Internal\Message { /** - * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + * Output only. Format: + * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} * Note: googleAdsLinkId is not the Google Ads customer ID. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -70,7 +71,8 @@ class GoogleAdsLink extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + * Output only. Format: + * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} * Note: googleAdsLinkId is not the Google Ads customer ID. * @type string $customer_id * Immutable. Google Ads customer ID. @@ -96,7 +98,8 @@ public function __construct($data = NULL) { } /** - * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + * Output only. Format: + * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} * Note: googleAdsLinkId is not the Google Ads customer ID. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -108,7 +111,8 @@ public function getName() } /** - * Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + * Output only. Format: + * properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} * Note: googleAdsLinkId is not the Google Ads customer ID. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php b/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php index 4e5bc294812..f4b2fbb9bae 100644 --- a/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php +++ b/AnalyticsAdmin/src/V1beta/ListFirebaseLinksRequest.php @@ -34,7 +34,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message /** * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * * Generated from protobuf field string page_token = 3; @@ -58,7 +58,7 @@ class ListFirebaseLinksRequest extends \Google\Protobuf\Internal\Message * @type string $page_token * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * } */ @@ -130,7 +130,7 @@ public function setPageSize($var) /** * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * * Generated from protobuf field string page_token = 3; @@ -144,7 +144,7 @@ public function getPageToken() /** * A page token, received from a previous `ListFirebaseLinks` call. * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListProperties` must + * When paginating, all other parameters provided to `ListFirebaseLinks` must * match the call that provided the page token. * * Generated from protobuf field string page_token = 3; diff --git a/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php b/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php index af4d19b9ae7..e7fe21099e3 100644 --- a/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php +++ b/AnalyticsAdmin/src/V1beta/MeasurementProtocolSecret.php @@ -16,9 +16,8 @@ class MeasurementProtocolSecret extends \Google\Protobuf\Internal\Message { /** - * Output only. Resource name of this secret. This secret may be a child of any type of - * stream. - * Format: + * Output only. Resource name of this secret. This secret may be a child of + * any type of stream. Format: * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -31,8 +30,8 @@ class MeasurementProtocolSecret extends \Google\Protobuf\Internal\Message */ private $display_name = ''; /** - * Output only. The measurement protocol secret value. Pass this value to the api_secret - * field of the Measurement Protocol API when sending hits to this + * Output only. The measurement protocol secret value. Pass this value to the + * api_secret field of the Measurement Protocol API when sending hits to this * secret's parent property. * * Generated from protobuf field string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -46,15 +45,14 @@ class MeasurementProtocolSecret extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Output only. Resource name of this secret. This secret may be a child of any type of - * stream. - * Format: + * Output only. Resource name of this secret. This secret may be a child of + * any type of stream. Format: * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * @type string $display_name * Required. Human-readable display name for this secret. * @type string $secret_value - * Output only. The measurement protocol secret value. Pass this value to the api_secret - * field of the Measurement Protocol API when sending hits to this + * Output only. The measurement protocol secret value. Pass this value to the + * api_secret field of the Measurement Protocol API when sending hits to this * secret's parent property. * } */ @@ -64,9 +62,8 @@ public function __construct($data = NULL) { } /** - * Output only. Resource name of this secret. This secret may be a child of any type of - * stream. - * Format: + * Output only. Resource name of this secret. This secret may be a child of + * any type of stream. Format: * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -78,9 +75,8 @@ public function getName() } /** - * Output only. Resource name of this secret. This secret may be a child of any type of - * stream. - * Format: + * Output only. Resource name of this secret. This secret may be a child of + * any type of stream. Format: * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -122,8 +118,8 @@ public function setDisplayName($var) } /** - * Output only. The measurement protocol secret value. Pass this value to the api_secret - * field of the Measurement Protocol API when sending hits to this + * Output only. The measurement protocol secret value. Pass this value to the + * api_secret field of the Measurement Protocol API when sending hits to this * secret's parent property. * * Generated from protobuf field string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -135,8 +131,8 @@ public function getSecretValue() } /** - * Output only. The measurement protocol secret value. Pass this value to the api_secret - * field of the Measurement Protocol API when sending hits to this + * Output only. The measurement protocol secret value. Pass this value to the + * api_secret field of the Measurement Protocol API when sending hits to this * secret's parent property. * * Generated from protobuf field string secret_value = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/AnalyticsAdmin/src/V1beta/NumericValue.php b/AnalyticsAdmin/src/V1beta/NumericValue.php new file mode 100644 index 00000000000..0952ee5c779 --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/NumericValue.php @@ -0,0 +1,108 @@ +google.analytics.admin.v1beta.NumericValue + */ +class NumericValue extends \Google\Protobuf\Internal\Message +{ + protected $one_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $int64_value + * Integer value + * @type float $double_value + * Double value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AccessReport::initOnce(); + parent::__construct($data); + } + + /** + * Integer value + * + * Generated from protobuf field int64 int64_value = 1; + * @return int|string + */ + public function getInt64Value() + { + return $this->readOneof(1); + } + + public function hasInt64Value() + { + return $this->hasOneof(1); + } + + /** + * Integer value + * + * Generated from protobuf field int64 int64_value = 1; + * @param int|string $var + * @return $this + */ + public function setInt64Value($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Double value + * + * Generated from protobuf field double double_value = 2; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(2); + } + + public function hasDoubleValue() + { + return $this->hasOneof(2); + } + + /** + * Double value + * + * Generated from protobuf field double double_value = 2; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getOneValue() + { + return $this->whichOneof("one_value"); + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/Property.php b/AnalyticsAdmin/src/V1beta/Property.php index 91de6639791..4c4492e3da5 100644 --- a/AnalyticsAdmin/src/V1beta/Property.php +++ b/AnalyticsAdmin/src/V1beta/Property.php @@ -24,10 +24,10 @@ class Property extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Immutable. The property type for this Property resource. When creating a property, if - * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be - * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created - * via Google Analytics Admin API. + * Immutable. The property type for this Property resource. When creating a + * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then + * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" + * types cannot yet be created with the Google Analytics Admin API. * * Generated from protobuf field .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; */ @@ -68,9 +68,9 @@ class Property extends \Google\Protobuf\Internal\Message */ private $industry_category = 0; /** - * Required. 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. + * Required. 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 @@ -88,22 +88,23 @@ class Property extends \Google\Protobuf\Internal\Message */ private $currency_code = ''; /** - * Output only. The Google Analytics service level that applies to this property. + * Output only. The Google Analytics service level that applies to this + * property. * * Generated from protobuf field .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $service_level = 0; /** - * Output only. If set, the time at which this property was trashed. If not set, then this - * property is not currently in the trash can. + * Output only. If set, the time at which this property was trashed. If not + * set, then this property is not currently in the trash can. * * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $delete_time = null; /** - * Output only. If set, the time at which this trashed property will be permanently - * deleted. If not set, then this property is not currently in the trash can - * and is not slated to be deleted. + * Output only. If set, the time at which this trashed property will be + * permanently deleted. If not set, then this property is not currently in the + * trash can and is not slated to be deleted. * * Generated from protobuf field .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -128,10 +129,10 @@ class Property extends \Google\Protobuf\Internal\Message * Format: properties/{property_id} * Example: "properties/1000" * @type int $property_type - * Immutable. The property type for this Property resource. When creating a property, if - * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be - * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created - * via Google Analytics Admin API. + * Immutable. The property type for this Property resource. When creating a + * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then + * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" + * types cannot yet be created with the Google Analytics Admin API. * @type \Google\Protobuf\Timestamp $create_time * Output only. Time when the entity was originally created. * @type \Google\Protobuf\Timestamp $update_time @@ -148,9 +149,9 @@ class Property extends \Google\Protobuf\Internal\Message * Industry associated with this property * Example: AUTOMOTIVE, FOOD_AND_DRINK * @type string $time_zone - * Required. 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. + * Required. 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 @@ -160,14 +161,15 @@ class Property extends \Google\Protobuf\Internal\Message * Format: https://en.wikipedia.org/wiki/ISO_4217 * Examples: "USD", "EUR", "JPY" * @type int $service_level - * Output only. The Google Analytics service level that applies to this property. + * Output only. The Google Analytics service level that applies to this + * property. * @type \Google\Protobuf\Timestamp $delete_time - * Output only. If set, the time at which this property was trashed. If not set, then this - * property is not currently in the trash can. + * Output only. If set, the time at which this property was trashed. If not + * set, then this property is not currently in the trash can. * @type \Google\Protobuf\Timestamp $expire_time - * Output only. If set, the time at which this trashed property will be permanently - * deleted. If not set, then this property is not currently in the trash can - * and is not slated to be deleted. + * Output only. If set, the time at which this trashed property will be + * permanently deleted. If not set, then this property is not currently in the + * trash can and is not slated to be deleted. * @type string $account * Immutable. The resource name of the parent account * Format: accounts/{account_id} @@ -210,10 +212,10 @@ public function setName($var) } /** - * Immutable. The property type for this Property resource. When creating a property, if - * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be - * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created - * via Google Analytics Admin API. + * Immutable. The property type for this Property resource. When creating a + * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then + * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" + * types cannot yet be created with the Google Analytics Admin API. * * Generated from protobuf field .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; * @return int @@ -224,10 +226,10 @@ public function getPropertyType() } /** - * Immutable. The property type for this Property resource. When creating a property, if - * the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be - * implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created - * via Google Analytics Admin API. + * Immutable. The property type for this Property resource. When creating a + * property, if the type is "PROPERTY_TYPE_UNSPECIFIED", then + * "ORDINARY_PROPERTY" will be implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" + * types cannot yet be created with the Google Analytics Admin API. * * Generated from protobuf field .google.analytics.admin.v1beta.PropertyType property_type = 14 [(.google.api.field_behavior) = IMMUTABLE]; * @param int $var @@ -402,9 +404,9 @@ public function setIndustryCategory($var) } /** - * Required. 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. + * Required. 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 @@ -419,9 +421,9 @@ public function getTimeZone() } /** - * Required. 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. + * Required. 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 @@ -470,7 +472,8 @@ public function setCurrencyCode($var) } /** - * Output only. The Google Analytics service level that applies to this property. + * Output only. The Google Analytics service level that applies to this + * property. * * Generated from protobuf field .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int @@ -481,7 +484,8 @@ public function getServiceLevel() } /** - * Output only. The Google Analytics service level that applies to this property. + * Output only. The Google Analytics service level that applies to this + * property. * * Generated from protobuf field .google.analytics.admin.v1beta.ServiceLevel service_level = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var @@ -496,8 +500,8 @@ public function setServiceLevel($var) } /** - * Output only. If set, the time at which this property was trashed. If not set, then this - * property is not currently in the trash can. + * Output only. If set, the time at which this property was trashed. If not + * set, then this property is not currently in the trash can. * * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -518,8 +522,8 @@ public function clearDeleteTime() } /** - * Output only. If set, the time at which this property was trashed. If not set, then this - * property is not currently in the trash can. + * Output only. If set, the time at which this property was trashed. If not + * set, then this property is not currently in the trash can. * * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var @@ -534,9 +538,9 @@ public function setDeleteTime($var) } /** - * Output only. If set, the time at which this trashed property will be permanently - * deleted. If not set, then this property is not currently in the trash can - * and is not slated to be deleted. + * Output only. If set, the time at which this trashed property will be + * permanently deleted. If not set, then this property is not currently in the + * trash can and is not slated to be deleted. * * Generated from protobuf field .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -557,9 +561,9 @@ public function clearExpireTime() } /** - * Output only. If set, the time at which this trashed property will be permanently - * deleted. If not set, then this property is not currently in the trash can - * and is not slated to be deleted. + * Output only. If set, the time at which this trashed property will be + * permanently deleted. If not set, then this property is not currently in the + * trash can and is not slated to be deleted. * * Generated from protobuf field .google.protobuf.Timestamp expire_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var diff --git a/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php b/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php index effbee9a6c4..b2e065aaa3c 100644 --- a/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php +++ b/AnalyticsAdmin/src/V1beta/ProvisionAccountTicketRequest.php @@ -23,7 +23,7 @@ class ProvisionAccountTicketRequest extends \Google\Protobuf\Internal\Message private $account = null; /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; */ @@ -39,7 +39,7 @@ class ProvisionAccountTicketRequest extends \Google\Protobuf\Internal\Message * The account to create. * @type string $redirect_uri * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Cloud Console as a Redirect URI. * } */ public function __construct($data = NULL) { @@ -85,7 +85,7 @@ public function setAccount($var) /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; * @return string @@ -97,7 +97,7 @@ public function getRedirectUri() /** * Redirect URI where the user will be sent after accepting Terms of Service. - * Must be configured in Developers Console as a Redirect URI + * Must be configured in Cloud Console as a Redirect URI. * * Generated from protobuf field string redirect_uri = 2; * @param string $var diff --git a/AnalyticsAdmin/src/V1beta/RunAccessReportRequest.php b/AnalyticsAdmin/src/V1beta/RunAccessReportRequest.php new file mode 100644 index 00000000000..b2d303a851f --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/RunAccessReportRequest.php @@ -0,0 +1,583 @@ +google.analytics.admin.v1beta.RunAccessReportRequest + */ +class RunAccessReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. + * + * Generated from protobuf field string entity = 1; + */ + private $entity = ''; + /** + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimension dimensions = 2; + */ + private $dimensions; + /** + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetric metrics = 3; + */ + private $metrics; + /** + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDateRange date_ranges = 4; + */ + private $date_ranges; + /** + * Dimension filters let you restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression dimension_filter = 5; + */ + private $dimension_filter = null; + /** + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression metric_filter = 6; + */ + private $metric_filter = null; + /** + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int64 offset = 7; + */ + private $offset = 0; + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int64 limit = 8; + */ + private $limit = 0; + /** + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + * + * Generated from protobuf field string time_zone = 9; + */ + private $time_zone = ''; + /** + * Specifies how rows are ordered in the response. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessOrderBy order_bys = 10; + */ + private $order_bys; + /** + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. + * + * Generated from protobuf field bool return_entity_quota = 11; + */ + private $return_entity_quota = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. + * @type array<\Google\Analytics\Admin\V1beta\AccessDimension>|\Google\Protobuf\Internal\RepeatedField $dimensions + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + * @type array<\Google\Analytics\Admin\V1beta\AccessMetric>|\Google\Protobuf\Internal\RepeatedField $metrics + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + * @type array<\Google\Analytics\Admin\V1beta\AccessDateRange>|\Google\Protobuf\Internal\RepeatedField $date_ranges + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + * @type \Google\Analytics\Admin\V1beta\AccessFilterExpression $dimension_filter + * Dimension filters let you restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @type \Google\Analytics\Admin\V1beta\AccessFilterExpression $metric_filter + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + * @type int|string $offset + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @type int|string $limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @type string $time_zone + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + * @type array<\Google\Analytics\Admin\V1beta\AccessOrderBy>|\Google\Protobuf\Internal\RepeatedField $order_bys + * Specifies how rows are ordered in the response. + * @type bool $return_entity_quota + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AnalyticsAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. + * + * Generated from protobuf field string entity = 1; + * @return string + */ + public function getEntity() + { + return $this->entity; + } + + /** + * The Data Access Report supports requesting at the property level or account + * level. If requested at the account level, Data Access Reports include all + * access for all properties under that account. + * To request at the property level, entity should be for example + * 'properties/123' if "123" is your GA4 property ID. To request at the + * account level, entity should be for example 'accounts/1234' if "1234" is + * your GA4 Account ID. + * + * Generated from protobuf field string entity = 1; + * @param string $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkString($var, True); + $this->entity = $var; + + return $this; + } + + /** + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimension dimensions = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDimensions() + { + return $this->dimensions; + } + + /** + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimension dimensions = 2; + * @param array<\Google\Analytics\Admin\V1beta\AccessDimension>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDimensions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessDimension::class); + $this->dimensions = $arr; + + return $this; + } + + /** + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetric metrics = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetric metrics = 3; + * @param array<\Google\Analytics\Admin\V1beta\AccessMetric>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessMetric::class); + $this->metrics = $arr; + + return $this; + } + + /** + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDateRange date_ranges = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDateRanges() + { + return $this->date_ranges; + } + + /** + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDateRange date_ranges = 4; + * @param array<\Google\Analytics\Admin\V1beta\AccessDateRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDateRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessDateRange::class); + $this->date_ranges = $arr; + + return $this; + } + + /** + * Dimension filters let you restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression dimension_filter = 5; + * @return \Google\Analytics\Admin\V1beta\AccessFilterExpression|null + */ + public function getDimensionFilter() + { + return $this->dimension_filter; + } + + public function hasDimensionFilter() + { + return isset($this->dimension_filter); + } + + public function clearDimensionFilter() + { + unset($this->dimension_filter); + } + + /** + * Dimension filters let you restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression dimension_filter = 5; + * @param \Google\Analytics\Admin\V1beta\AccessFilterExpression $var + * @return $this + */ + public function setDimensionFilter($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessFilterExpression::class); + $this->dimension_filter = $var; + + return $this; + } + + /** + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression metric_filter = 6; + * @return \Google\Analytics\Admin\V1beta\AccessFilterExpression|null + */ + public function getMetricFilter() + { + return $this->metric_filter; + } + + public function hasMetricFilter() + { + return isset($this->metric_filter); + } + + public function clearMetricFilter() + { + unset($this->metric_filter); + } + + /** + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessFilterExpression metric_filter = 6; + * @param \Google\Analytics\Admin\V1beta\AccessFilterExpression $var + * @return $this + */ + public function setMetricFilter($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessFilterExpression::class); + $this->metric_filter = $var; + + return $this; + } + + /** + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int64 offset = 7; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int64 offset = 7; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int64 limit = 8; + * @return int|string + */ + public function getLimit() + { + return $this->limit; + } + + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int64 limit = 8; + * @param int|string $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkInt64($var); + $this->limit = $var; + + return $this; + } + + /** + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + * + * Generated from protobuf field string time_zone = 9; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + * + * Generated from protobuf field string time_zone = 9; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Specifies how rows are ordered in the response. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessOrderBy order_bys = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOrderBys() + { + return $this->order_bys; + } + + /** + * Specifies how rows are ordered in the response. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessOrderBy order_bys = 10; + * @param array<\Google\Analytics\Admin\V1beta\AccessOrderBy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOrderBys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessOrderBy::class); + $this->order_bys = $arr; + + return $this; + } + + /** + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. + * + * Generated from protobuf field bool return_entity_quota = 11; + * @return bool + */ + public function getReturnEntityQuota() + { + return $this->return_entity_quota; + } + + /** + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level + * requests, this field must be false. + * + * Generated from protobuf field bool return_entity_quota = 11; + * @param bool $var + * @return $this + */ + public function setReturnEntityQuota($var) + { + GPBUtil::checkBool($var); + $this->return_entity_quota = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/RunAccessReportResponse.php b/AnalyticsAdmin/src/V1beta/RunAccessReportResponse.php new file mode 100644 index 00000000000..f7d585bbb4a --- /dev/null +++ b/AnalyticsAdmin/src/V1beta/RunAccessReportResponse.php @@ -0,0 +1,257 @@ +google.analytics.admin.v1beta.RunAccessReportResponse + */ +class RunAccessReportResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The header for a column in the report that corresponds to a specific + * dimension. The number of DimensionHeaders and ordering of DimensionHeaders + * matches the dimensions present in rows. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimensionHeader dimension_headers = 1; + */ + private $dimension_headers; + /** + * The header for a column in the report that corresponds to a specific + * metric. The number of MetricHeaders and ordering of MetricHeaders matches + * the metrics present in rows. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetricHeader metric_headers = 2; + */ + private $metric_headers; + /** + * Rows of dimension value combinations and metric values in the report. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessRow rows = 3; + */ + private $rows; + /** + * The total number of rows in the query result. `rowCount` is independent of + * the number of rows returned in the response, the `limit` request + * parameter, and the `offset` request parameter. For example if a query + * returns 175 rows and includes `limit` of 50 in the API request, the + * response will contain `rowCount` of 175 but only 50 rows. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int32 row_count = 4; + */ + private $row_count = 0; + /** + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuota quota = 5; + */ + private $quota = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Analytics\Admin\V1beta\AccessDimensionHeader>|\Google\Protobuf\Internal\RepeatedField $dimension_headers + * The header for a column in the report that corresponds to a specific + * dimension. The number of DimensionHeaders and ordering of DimensionHeaders + * matches the dimensions present in rows. + * @type array<\Google\Analytics\Admin\V1beta\AccessMetricHeader>|\Google\Protobuf\Internal\RepeatedField $metric_headers + * The header for a column in the report that corresponds to a specific + * metric. The number of MetricHeaders and ordering of MetricHeaders matches + * the metrics present in rows. + * @type array<\Google\Analytics\Admin\V1beta\AccessRow>|\Google\Protobuf\Internal\RepeatedField $rows + * Rows of dimension value combinations and metric values in the report. + * @type int $row_count + * The total number of rows in the query result. `rowCount` is independent of + * the number of rows returned in the response, the `limit` request + * parameter, and the `offset` request parameter. For example if a query + * returns 175 rows and includes `limit` of 50 in the API request, the + * response will contain `rowCount` of 175 but only 50 rows. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @type \Google\Analytics\Admin\V1beta\AccessQuota $quota + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Analytics\Admin\V1Beta\AnalyticsAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The header for a column in the report that corresponds to a specific + * dimension. The number of DimensionHeaders and ordering of DimensionHeaders + * matches the dimensions present in rows. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimensionHeader dimension_headers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDimensionHeaders() + { + return $this->dimension_headers; + } + + /** + * The header for a column in the report that corresponds to a specific + * dimension. The number of DimensionHeaders and ordering of DimensionHeaders + * matches the dimensions present in rows. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessDimensionHeader dimension_headers = 1; + * @param array<\Google\Analytics\Admin\V1beta\AccessDimensionHeader>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDimensionHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessDimensionHeader::class); + $this->dimension_headers = $arr; + + return $this; + } + + /** + * The header for a column in the report that corresponds to a specific + * metric. The number of MetricHeaders and ordering of MetricHeaders matches + * the metrics present in rows. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetricHeader metric_headers = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetricHeaders() + { + return $this->metric_headers; + } + + /** + * The header for a column in the report that corresponds to a specific + * metric. The number of MetricHeaders and ordering of MetricHeaders matches + * the metrics present in rows. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessMetricHeader metric_headers = 2; + * @param array<\Google\Analytics\Admin\V1beta\AccessMetricHeader>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetricHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessMetricHeader::class); + $this->metric_headers = $arr; + + return $this; + } + + /** + * Rows of dimension value combinations and metric values in the report. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessRow rows = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRows() + { + return $this->rows; + } + + /** + * Rows of dimension value combinations and metric values in the report. + * + * Generated from protobuf field repeated .google.analytics.admin.v1beta.AccessRow rows = 3; + * @param array<\Google\Analytics\Admin\V1beta\AccessRow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Admin\V1beta\AccessRow::class); + $this->rows = $arr; + + return $this; + } + + /** + * The total number of rows in the query result. `rowCount` is independent of + * the number of rows returned in the response, the `limit` request + * parameter, and the `offset` request parameter. For example if a query + * returns 175 rows and includes `limit` of 50 in the API request, the + * response will contain `rowCount` of 175 but only 50 rows. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int32 row_count = 4; + * @return int + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * The total number of rows in the query result. `rowCount` is independent of + * the number of rows returned in the response, the `limit` request + * parameter, and the `offset` request parameter. For example if a query + * returns 175 rows and includes `limit` of 50 in the API request, the + * response will contain `rowCount` of 175 but only 50 rows. + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * + * Generated from protobuf field int32 row_count = 4; + * @param int $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt32($var); + $this->row_count = $var; + + return $this; + } + + /** + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuota quota = 5; + * @return \Google\Analytics\Admin\V1beta\AccessQuota|null + */ + public function getQuota() + { + return $this->quota; + } + + public function hasQuota() + { + return isset($this->quota); + } + + public function clearQuota() + { + unset($this->quota); + } + + /** + * The quota state for this Analytics property including this request. This + * field doesn't work with account-level requests. + * + * Generated from protobuf field .google.analytics.admin.v1beta.AccessQuota quota = 5; + * @param \Google\Analytics\Admin\V1beta\AccessQuota $var + * @return $this + */ + public function setQuota($var) + { + GPBUtil::checkMessage($var, \Google\Analytics\Admin\V1beta\AccessQuota::class); + $this->quota = $var; + + return $this; + } + +} + diff --git a/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php b/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php index e185b50320e..01873fa4290 100644 --- a/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php +++ b/AnalyticsAdmin/src/V1beta/SearchChangeHistoryEventsRequest.php @@ -16,7 +16,8 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. * * Generated from protobuf field string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -29,21 +30,22 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message */ private $property = ''; /** - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $resource_type; /** - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $action; /** - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * * Generated from protobuf field repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -70,10 +72,11 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message */ private $page_size = 0; /** - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * * Generated from protobuf field string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -86,18 +89,20 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $account - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. * @type string $property * Optional. Resource name for a child property. If set, only return changes * made to this property or its child resources. * @type array|\Google\Protobuf\Internal\RepeatedField $resource_type - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * @type array|\Google\Protobuf\Internal\RepeatedField $action - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * @type array|\Google\Protobuf\Internal\RepeatedField $actor_email - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * @type \Google\Protobuf\Timestamp $earliest_change_time * Optional. If set, only return changes made after this time (inclusive). * @type \Google\Protobuf\Timestamp $latest_change_time @@ -108,10 +113,11 @@ class SearchChangeHistoryEventsRequest extends \Google\Protobuf\Internal\Message * pages. If unspecified, at most 50 items will be returned. * The maximum value is 200 (higher values will be coerced to the maximum). * @type string $page_token - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * } */ public function __construct($data = NULL) { @@ -120,7 +126,8 @@ public function __construct($data = NULL) { } /** - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. * * Generated from protobuf field string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -131,7 +138,8 @@ public function getAccount() } /** - * Required. The account resource for which to return change history resources. + * Required. The account resource for which to return change history + * resources. * * Generated from protobuf field string account = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -174,8 +182,8 @@ public function setProperty($var) } /** - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField @@ -186,8 +194,8 @@ public function getResourceType() } /** - * Optional. If set, only return changes if they are for a resource that matches at - * least one of these types. + * Optional. If set, only return changes if they are for a resource that + * matches at least one of these types. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.ChangeHistoryResourceType resource_type = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var @@ -202,8 +210,8 @@ public function setResourceType($var) } /** - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField @@ -214,8 +222,8 @@ public function getAction() } /** - * Optional. If set, only return changes that match one or more of these types of - * actions. + * Optional. If set, only return changes that match one or more of these types + * of actions. * * Generated from protobuf field repeated .google.analytics.admin.v1beta.ActionType action = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var @@ -230,7 +238,8 @@ public function setAction($var) } /** - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * * Generated from protobuf field repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField @@ -241,7 +250,8 @@ public function getActorEmail() } /** - * Optional. If set, only return changes if they are made by a user in this list. + * Optional. If set, only return changes if they are made by a user in this + * list. * * Generated from protobuf field repeated string actor_email = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var @@ -360,10 +370,11 @@ public function setPageSize($var) } /** - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * * Generated from protobuf field string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -374,10 +385,11 @@ public function getPageToken() } /** - * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters provided to `SearchChangeHistoryEvents` must match the call that - * provided the page token. + * Optional. A page token, received from a previous + * `SearchChangeHistoryEvents` call. Provide this to retrieve the subsequent + * page. When paginating, all other parameters provided to + * `SearchChangeHistoryEvents` must match the call that provided the page + * token. * * Generated from protobuf field string page_token = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php b/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php index 49f02ce2a93..f2fc6e382de 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateAccountRequest.php @@ -23,9 +23,10 @@ class UpdateAccountRequest extends \Google\Protobuf\Internal\Message */ private $account = null; /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -41,9 +42,10 @@ class UpdateAccountRequest extends \Google\Protobuf\Internal\Message * Required. The account to update. * The account's `name` field is used to identify the account. * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all + * fields. * } */ public function __construct($data = NULL) { @@ -90,9 +92,10 @@ public function setAccount($var) } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -113,9 +116,10 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (for example, "field_to_update"). Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php b/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php index 6fbdaca4266..bd16197b4ea 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateCustomDimensionRequest.php @@ -22,9 +22,9 @@ class UpdateCustomDimensionRequest extends \Google\Protobuf\Internal\Message */ private $custom_dimension = null; /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -39,9 +39,9 @@ class UpdateCustomDimensionRequest extends \Google\Protobuf\Internal\Message * @type \Google\Analytics\Admin\V1beta\CustomDimension $custom_dimension * The CustomDimension to update * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * } */ public function __construct($data = NULL) { @@ -86,9 +86,9 @@ public function setCustomDimension($var) } /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -109,9 +109,9 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php b/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php index df95192fb60..b9f8b3d7f4c 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateCustomMetricRequest.php @@ -22,9 +22,9 @@ class UpdateCustomMetricRequest extends \Google\Protobuf\Internal\Message */ private $custom_metric = null; /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -39,9 +39,9 @@ class UpdateCustomMetricRequest extends \Google\Protobuf\Internal\Message * @type \Google\Analytics\Admin\V1beta\CustomMetric $custom_metric * The CustomMetric to update * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * } */ public function __construct($data = NULL) { @@ -86,9 +86,9 @@ public function setCustomMetric($var) } /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -109,9 +109,9 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php b/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php index 6683b5af5d0..edc8bf14c05 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateDataRetentionSettingsRequest.php @@ -23,9 +23,10 @@ class UpdateDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Messa */ private $data_retention_settings = null; /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -41,9 +42,10 @@ class UpdateDataRetentionSettingsRequest extends \Google\Protobuf\Internal\Messa * Required. The settings to update. * The `name` field is used to identify the settings to be updated. * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * } */ public function __construct($data = NULL) { @@ -90,9 +92,10 @@ public function setDataRetentionSettings($var) } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -113,9 +116,10 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php b/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php index 53fb6ba6255..7e63d3d402a 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateDataStreamRequest.php @@ -22,9 +22,9 @@ class UpdateDataStreamRequest extends \Google\Protobuf\Internal\Message */ private $data_stream = null; /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -39,9 +39,9 @@ class UpdateDataStreamRequest extends \Google\Protobuf\Internal\Message * @type \Google\Analytics\Admin\V1beta\DataStream $data_stream * The DataStream to update * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * } */ public function __construct($data = NULL) { @@ -86,9 +86,9 @@ public function setDataStream($var) } /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -109,9 +109,9 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Omitted fields will not be updated. - * To replace the entire entity, use one path with the string "*" to match - * all fields. + * Required. The list of fields to be updated. Omitted fields will not be + * updated. To replace the entire entity, use one path with the string "*" to + * match all fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php b/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php index 5f9a5519092..bff1811fd6b 100644 --- a/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdateGoogleAdsLinkRequest.php @@ -22,9 +22,10 @@ class UpdateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message */ private $google_ads_link = null; /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -39,9 +40,10 @@ class UpdateGoogleAdsLinkRequest extends \Google\Protobuf\Internal\Message * @type \Google\Analytics\Admin\V1beta\GoogleAdsLink $google_ads_link * The GoogleAdsLink to update * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * } */ public function __construct($data = NULL) { @@ -86,9 +88,10 @@ public function setGoogleAdsLink($var) } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -109,9 +112,10 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php b/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php index d9df54c5796..798f6215ba3 100644 --- a/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php +++ b/AnalyticsAdmin/src/V1beta/UpdatePropertyRequest.php @@ -24,9 +24,10 @@ class UpdatePropertyRequest extends \Google\Protobuf\Internal\Message */ private $property = null; /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -43,9 +44,10 @@ class UpdatePropertyRequest extends \Google\Protobuf\Internal\Message * The property's `name` field is used to identify the property to be * updated. * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * } */ public function __construct($data = NULL) { @@ -94,9 +96,10 @@ public function setProperty($var) } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Protobuf\FieldMask|null @@ -117,9 +120,10 @@ public function clearUpdateMask() } /** - * Required. The list of fields to be updated. Field names must be in snake case - * (e.g., "field_to_update"). Omitted fields will not be updated. To replace - * the entire entity, use one path with the string "*" to match all fields. + * Required. The list of fields to be updated. Field names must be in snake + * case (e.g., "field_to_update"). Omitted fields will not be updated. To + * replace the entire entity, use one path with the string "*" to match all + * fields. * * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Protobuf\FieldMask $var diff --git a/AnalyticsAdmin/src/V1beta/gapic_metadata.json b/AnalyticsAdmin/src/V1beta/gapic_metadata.json index 7cdecbe50f9..b04a332389c 100644 --- a/AnalyticsAdmin/src/V1beta/gapic_metadata.json +++ b/AnalyticsAdmin/src/V1beta/gapic_metadata.json @@ -200,6 +200,11 @@ "provisionAccountTicket" ] }, + "RunAccessReport": { + "methods": [ + "runAccessReport" + ] + }, "SearchChangeHistoryEvents": { "methods": [ "searchChangeHistoryEvents" diff --git a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_client_config.json b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_client_config.json index 41861db0ea2..c5239d32ebc 100644 --- a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_client_config.json +++ b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_client_config.json @@ -6,8 +6,7 @@ "retry_policy_1_codes": [ "UNAVAILABLE", "UNKNOWN" - ], - "no_retry_1_codes": [] + ] }, "retry_params": { "no_retry_params": { @@ -27,15 +26,6 @@ "rpc_timeout_multiplier": 1.0, "max_rpc_timeout_millis": 60000, "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 } }, "methods": { @@ -76,13 +66,13 @@ }, "CreateFirebaseLink": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "CreateGoogleAdsLink": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "CreateMeasurementProtocolSecret": { "timeout_millis": 60000, @@ -91,13 +81,13 @@ }, "CreateProperty": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "DeleteAccount": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "DeleteConversionEvent": { "timeout_millis": 60000, @@ -111,13 +101,13 @@ }, "DeleteFirebaseLink": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "DeleteGoogleAdsLink": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "DeleteMeasurementProtocolSecret": { "timeout_millis": 60000, @@ -126,13 +116,13 @@ }, "DeleteProperty": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "GetAccount": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "GetConversionEvent": { "timeout_millis": 60000, @@ -171,8 +161,8 @@ }, "GetProperty": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "ListAccountSummaries": { "timeout_millis": 60000, @@ -181,8 +171,8 @@ }, "ListAccounts": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "ListConversionEvents": { "timeout_millis": 60000, @@ -206,13 +196,13 @@ }, "ListFirebaseLinks": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "ListGoogleAdsLinks": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "ListMeasurementProtocolSecrets": { "timeout_millis": 60000, @@ -221,13 +211,18 @@ }, "ListProperties": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "ProvisionAccountTicket": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RunAccessReport": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "SearchChangeHistoryEvents": { "timeout_millis": 60000, @@ -236,8 +231,8 @@ }, "UpdateAccount": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "UpdateCustomDimension": { "timeout_millis": 60000, @@ -261,8 +256,8 @@ }, "UpdateGoogleAdsLink": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" }, "UpdateMeasurementProtocolSecret": { "timeout_millis": 60000, @@ -271,8 +266,8 @@ }, "UpdateProperty": { "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" } } } diff --git a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php index 9c0dee0666a..d7fb895875f 100644 --- a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php +++ b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php @@ -401,6 +401,25 @@ 'uriTemplate' => '/v1beta/accounts:provisionAccountTicket', 'body' => '*', ], + 'RunAccessReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{entity=properties/*}:runAccessReport', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{entity=accounts/*}:runAccessReport', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'entity' => [ + 'getters' => [ + 'getEntity', + ], + ], + ], + ], 'SearchChangeHistoryEvents' => [ 'method' => 'post', 'uriTemplate' => '/v1beta/{account=accounts/*}:searchChangeHistoryEvents', diff --git a/AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php b/AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php index 3425a57e4fa..b4d77a731c6 100644 --- a/AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php +++ b/AnalyticsAdmin/tests/Unit/V1alpha/AnalyticsAdminServiceClientTest.php @@ -43,7 +43,9 @@ use Google\Analytics\Admin\V1alpha\BatchUpdateUserLinksResponse; use Google\Analytics\Admin\V1alpha\BigQueryLink; use Google\Analytics\Admin\V1alpha\ChangeHistoryEvent; +use Google\Analytics\Admin\V1alpha\ConnectedSiteTag; use Google\Analytics\Admin\V1alpha\ConversionEvent; +use Google\Analytics\Admin\V1alpha\CreateConnectedSiteTagResponse; use Google\Analytics\Admin\V1alpha\CustomDimension; use Google\Analytics\Admin\V1alpha\CustomDimension\DimensionScope; use Google\Analytics\Admin\V1alpha\CustomMetric; @@ -55,6 +57,7 @@ use Google\Analytics\Admin\V1alpha\DataStream\DataStreamType; use Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLink; use Google\Analytics\Admin\V1alpha\DisplayVideo360AdvertiserLinkProposal; +use Google\Analytics\Admin\V1alpha\EnhancedMeasurementSettings; use Google\Analytics\Admin\V1alpha\ExpandedDataSet; use Google\Analytics\Admin\V1alpha\FetchAutomatedGa4ConfigurationOptOutResponse; use Google\Analytics\Admin\V1alpha\FirebaseLink; @@ -66,6 +69,7 @@ use Google\Analytics\Admin\V1alpha\ListAccountsResponse; use Google\Analytics\Admin\V1alpha\ListAudiencesResponse; use Google\Analytics\Admin\V1alpha\ListBigQueryLinksResponse; +use Google\Analytics\Admin\V1alpha\ListConnectedSiteTagsResponse; use Google\Analytics\Admin\V1alpha\ListConversionEventsResponse; use Google\Analytics\Admin\V1alpha\ListCustomDimensionsResponse; use Google\Analytics\Admin\V1alpha\ListCustomMetricsResponse; @@ -1205,6 +1209,72 @@ public function createAudienceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function createConnectedSiteTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CreateConnectedSiteTagResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $connectedSiteTag = new ConnectedSiteTag(); + $connectedSiteTagDisplayName = 'connectedSiteTagDisplayName-1608704893'; + $connectedSiteTag->setDisplayName($connectedSiteTagDisplayName); + $connectedSiteTagTagId = 'connectedSiteTagTagId-937600789'; + $connectedSiteTag->setTagId($connectedSiteTagTagId); + $response = $gapicClient->createConnectedSiteTag($connectedSiteTag); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/CreateConnectedSiteTag', $actualFuncCall); + $actualValue = $actualRequestObject->getConnectedSiteTag(); + $this->assertProtobufEquals($connectedSiteTag, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConnectedSiteTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $connectedSiteTag = new ConnectedSiteTag(); + $connectedSiteTagDisplayName = 'connectedSiteTagDisplayName-1608704893'; + $connectedSiteTag->setDisplayName($connectedSiteTagDisplayName); + $connectedSiteTagTagId = 'connectedSiteTagTagId-937600789'; + $connectedSiteTag->setTagId($connectedSiteTagTagId); + try { + $gapicClient->createConnectedSiteTag($connectedSiteTag); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function createConversionEventTest() { @@ -2259,6 +2329,57 @@ public function deleteAccountExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function deleteConnectedSiteTagTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + $gapicClient->deleteConnectedSiteTag(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/DeleteConnectedSiteTag', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConnectedSiteTagExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->deleteConnectedSiteTag(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function deleteConversionEventTest() { @@ -3228,12 +3349,14 @@ public function getBigQueryLinkTest() $project = 'project-309310695'; $dailyExportEnabled = true; $streamingExportEnabled = false; + $intradayExportEnabled = false; $includeAdvertisingId = false; $expectedResponse = new BigQueryLink(); $expectedResponse->setName($name2); $expectedResponse->setProject($project); $expectedResponse->setDailyExportEnabled($dailyExportEnabled); $expectedResponse->setStreamingExportEnabled($streamingExportEnabled); + $expectedResponse->setIntradayExportEnabled($intradayExportEnabled); $expectedResponse->setIncludeAdvertisingId($includeAdvertisingId); $transport->addResponse($expectedResponse); // Mock request @@ -3807,6 +3930,86 @@ public function getDisplayVideo360AdvertiserLinkProposalExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getEnhancedMeasurementSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $streamEnabled = true; + $scrollsEnabled = true; + $outboundClicksEnabled = true; + $siteSearchEnabled = true; + $videoEngagementEnabled = false; + $fileDownloadsEnabled = true; + $pageChangesEnabled = false; + $formInteractionsEnabled = true; + $searchQueryParameter = 'searchQueryParameter638048347'; + $uriQueryParameter = 'uriQueryParameter964636703'; + $expectedResponse = new EnhancedMeasurementSettings(); + $expectedResponse->setName($name2); + $expectedResponse->setStreamEnabled($streamEnabled); + $expectedResponse->setScrollsEnabled($scrollsEnabled); + $expectedResponse->setOutboundClicksEnabled($outboundClicksEnabled); + $expectedResponse->setSiteSearchEnabled($siteSearchEnabled); + $expectedResponse->setVideoEngagementEnabled($videoEngagementEnabled); + $expectedResponse->setFileDownloadsEnabled($fileDownloadsEnabled); + $expectedResponse->setPageChangesEnabled($pageChangesEnabled); + $expectedResponse->setFormInteractionsEnabled($formInteractionsEnabled); + $expectedResponse->setSearchQueryParameter($searchQueryParameter); + $expectedResponse->setUriQueryParameter($uriQueryParameter); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); + $response = $gapicClient->getEnhancedMeasurementSettings($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/GetEnhancedMeasurementSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnhancedMeasurementSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->enhancedMeasurementSettingsName('[PROPERTY]', '[DATA_STREAM]'); + try { + $gapicClient->getEnhancedMeasurementSettings($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getExpandedDataSetTest() { @@ -4581,6 +4784,58 @@ public function listBigQueryLinksExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function listConnectedSiteTagsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListConnectedSiteTagsResponse(); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listConnectedSiteTags(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/ListConnectedSiteTags', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectedSiteTagsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listConnectedSiteTags(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function listConversionEventsTest() { @@ -6325,6 +6580,94 @@ public function updateDisplayVideo360AdvertiserLinkExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function updateEnhancedMeasurementSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $streamEnabled = true; + $scrollsEnabled = true; + $outboundClicksEnabled = true; + $siteSearchEnabled = true; + $videoEngagementEnabled = false; + $fileDownloadsEnabled = true; + $pageChangesEnabled = false; + $formInteractionsEnabled = true; + $searchQueryParameter = 'searchQueryParameter638048347'; + $uriQueryParameter = 'uriQueryParameter964636703'; + $expectedResponse = new EnhancedMeasurementSettings(); + $expectedResponse->setName($name); + $expectedResponse->setStreamEnabled($streamEnabled); + $expectedResponse->setScrollsEnabled($scrollsEnabled); + $expectedResponse->setOutboundClicksEnabled($outboundClicksEnabled); + $expectedResponse->setSiteSearchEnabled($siteSearchEnabled); + $expectedResponse->setVideoEngagementEnabled($videoEngagementEnabled); + $expectedResponse->setFileDownloadsEnabled($fileDownloadsEnabled); + $expectedResponse->setPageChangesEnabled($pageChangesEnabled); + $expectedResponse->setFormInteractionsEnabled($formInteractionsEnabled); + $expectedResponse->setSearchQueryParameter($searchQueryParameter); + $expectedResponse->setUriQueryParameter($uriQueryParameter); + $transport->addResponse($expectedResponse); + // Mock request + $enhancedMeasurementSettings = new EnhancedMeasurementSettings(); + $enhancedMeasurementSettingsSearchQueryParameter = 'enhancedMeasurementSettingsSearchQueryParameter1139945938'; + $enhancedMeasurementSettings->setSearchQueryParameter($enhancedMeasurementSettingsSearchQueryParameter); + $updateMask = new FieldMask(); + $response = $gapicClient->updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.analytics.admin.v1alpha.AnalyticsAdminService/UpdateEnhancedMeasurementSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getEnhancedMeasurementSettings(); + $this->assertProtobufEquals($enhancedMeasurementSettings, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEnhancedMeasurementSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $enhancedMeasurementSettings = new EnhancedMeasurementSettings(); + $enhancedMeasurementSettingsSearchQueryParameter = 'enhancedMeasurementSettingsSearchQueryParameter1139945938'; + $enhancedMeasurementSettings->setSearchQueryParameter($enhancedMeasurementSettingsSearchQueryParameter); + $updateMask = new FieldMask(); + try { + $gapicClient->updateEnhancedMeasurementSettings($enhancedMeasurementSettings, $updateMask); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function updateExpandedDataSetTest() { diff --git a/AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php b/AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php index 22bb9b6da23..b97cca049b7 100644 --- a/AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php +++ b/AnalyticsAdmin/tests/Unit/V1beta/AnalyticsAdminServiceClientTest.php @@ -52,6 +52,7 @@ use Google\Analytics\Admin\V1beta\MeasurementProtocolSecret; use Google\Analytics\Admin\V1beta\Property; use Google\Analytics\Admin\V1beta\ProvisionAccountTicketResponse; +use Google\Analytics\Admin\V1beta\RunAccessReportResponse; use Google\Analytics\Admin\V1beta\SearchChangeHistoryEventsResponse; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; @@ -2590,6 +2591,60 @@ public function provisionAccountTicketExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function runAccessReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $rowCount = 1340416618; + $expectedResponse = new RunAccessReportResponse(); + $expectedResponse->setRowCount($rowCount); + $transport->addResponse($expectedResponse); + $response = $gapicClient->runAccessReport(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.analytics.admin.v1beta.AnalyticsAdminService/RunAccessReport', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runAccessReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->runAccessReport(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function searchChangeHistoryEventsTest() {