@@ -944,6 +944,21 @@ def parse_subproperty_sync_config_path(path: str) -> Dict[str, str]:
944944 )
945945 return m.groupdict() if m else {}
946946
947+ @staticmethod
948+ def user_provided_data_settings_path(
949+ property: str,
950+ ) -> str:
951+ """Returns a fully-qualified user_provided_data_settings string."""
952+ return "properties/{property}/userProvidedDataSettings".format(
953+ property=property,
954+ )
955+
956+ @staticmethod
957+ def parse_user_provided_data_settings_path(path: str) -> Dict[str, str]:
958+ """Parses a user_provided_data_settings path into its component segments."""
959+ m = re.match(r"^properties/(?P<property>.+?)/userProvidedDataSettings$", path)
960+ return m.groupdict() if m else {}
961+
947962 @staticmethod
948963 def common_billing_account_path(
949964 billing_account: str,
@@ -15260,8 +15275,8 @@ def get_reporting_identity_settings(
1526015275 timeout: Union[float, object] = gapic_v1.method.DEFAULT,
1526115276 metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
1526215277 ) -> resources.ReportingIdentitySettings:
15263- r"""Returns the singleton data retention settings for
15264- this property.
15278+ r"""Returns the reporting identity settings for this
15279+ property.
1526515280
1526615281 Args:
1526715282 request (Union[google.analytics.admin_v1alpha.types.GetReportingIdentitySettingsRequest, dict]):
@@ -15340,6 +15355,96 @@ def get_reporting_identity_settings(
1534015355 # Done; return the response.
1534115356 return response
1534215357
15358+ def get_user_provided_data_settings(
15359+ self,
15360+ request: Optional[
15361+ Union[analytics_admin.GetUserProvidedDataSettingsRequest, dict]
15362+ ] = None,
15363+ *,
15364+ name: Optional[str] = None,
15365+ retry: OptionalRetry = gapic_v1.method.DEFAULT,
15366+ timeout: Union[float, object] = gapic_v1.method.DEFAULT,
15367+ metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
15368+ ) -> resources.UserProvidedDataSettings:
15369+ r"""Looks up settings related to user-provided data for a
15370+ property.
15371+
15372+ Args:
15373+ request (Union[google.analytics.admin_v1alpha.types.GetUserProvidedDataSettingsRequest, dict]):
15374+ The request object. Request message for
15375+ GetUserProvidedDataSettings RPC
15376+ name (str):
15377+ Required. The name of the user
15378+ provided data settings to retrieve.
15379+ Format:
15380+ properties/{property}/userProvidedDataSettings
15381+
15382+ This corresponds to the ``name`` field
15383+ on the ``request`` instance; if ``request`` is provided, this
15384+ should not be set.
15385+ retry (google.api_core.retry.Retry): Designation of what errors, if any,
15386+ should be retried.
15387+ timeout (float): The timeout for this request.
15388+ metadata (Sequence[Tuple[str, Union[str, bytes]]]): Key/value pairs which should be
15389+ sent along with the request as metadata. Normally, each value must be of type `str`,
15390+ but for metadata keys ending with the suffix `-bin`, the corresponding values must
15391+ be of type `bytes`.
15392+
15393+ Returns:
15394+ google.analytics.admin_v1alpha.types.UserProvidedDataSettings:
15395+ Configuration for user-provided data
15396+ collection. This is a singleton resource
15397+ for a Google Analytics property.
15398+
15399+ """
15400+ # Create or coerce a protobuf request object.
15401+ # - Quick check: If we got a request object, we should *not* have
15402+ # gotten any keyword arguments that map to the request.
15403+ flattened_params = [name]
15404+ has_flattened_params = (
15405+ len([param for param in flattened_params if param is not None]) > 0
15406+ )
15407+ if request is not None and has_flattened_params:
15408+ raise ValueError(
15409+ "If the `request` argument is set, then none of "
15410+ "the individual field arguments should be set."
15411+ )
15412+
15413+ # - Use the request object if provided (there's no risk of modifying the input as
15414+ # there are no flattened fields), or create one.
15415+ if not isinstance(request, analytics_admin.GetUserProvidedDataSettingsRequest):
15416+ request = analytics_admin.GetUserProvidedDataSettingsRequest(request)
15417+ # If we have keyword arguments corresponding to fields on the
15418+ # request, apply these.
15419+ if name is not None:
15420+ request.name = name
15421+
15422+ # Wrap the RPC method; this adds retry and timeout information,
15423+ # and friendly error handling.
15424+ rpc = self._transport._wrapped_methods[
15425+ self._transport.get_user_provided_data_settings
15426+ ]
15427+
15428+ # Certain fields should be provided within the metadata header;
15429+ # add these here.
15430+ metadata = tuple(metadata) + (
15431+ gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
15432+ )
15433+
15434+ # Validate the universe domain.
15435+ self._validate_universe_domain()
15436+
15437+ # Send the request.
15438+ response = rpc(
15439+ request,
15440+ retry=retry,
15441+ timeout=timeout,
15442+ metadata=metadata,
15443+ )
15444+
15445+ # Done; return the response.
15446+ return response
15447+
1534315448 def __enter__(self) -> "AnalyticsAdminServiceClient":
1534415449 return self
1534515450
0 commit comments