pub struct AnalyticsAdminServiceClient<T> { /* private fields */ }
Expand description

Service Interface for the Analytics Admin API (GA4).

Implementations§

source§

impl<T> AnalyticsAdminServiceClient<T>
where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> AnalyticsAdminServiceClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,

source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

source

pub async fn get_account( &mut self, request: impl IntoRequest<GetAccountRequest>, ) -> Result<Response<Account>, Status>

Lookup for a single Account.

source

pub async fn list_accounts( &mut self, request: impl IntoRequest<ListAccountsRequest>, ) -> Result<Response<ListAccountsResponse>, Status>

Returns all accounts accessible by the caller.

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: “trashed”) accounts are excluded by default. Returns an empty list if no relevant accounts are found.

source

pub async fn delete_account( &mut self, request: impl IntoRequest<DeleteAccountRequest>, ) -> Result<Response<()>, Status>

Marks target Account as soft-deleted (ie: “trashed”) and returns it.

This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.

If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found.

source

pub async fn update_account( &mut self, request: impl IntoRequest<UpdateAccountRequest>, ) -> Result<Response<Account>, Status>

Updates an account.

source

pub async fn provision_account_ticket( &mut self, request: impl IntoRequest<ProvisionAccountTicketRequest>, ) -> Result<Response<ProvisionAccountTicketResponse>, Status>

Requests a ticket for creating an account.

source

pub async fn list_account_summaries( &mut self, request: impl IntoRequest<ListAccountSummariesRequest>, ) -> Result<Response<ListAccountSummariesResponse>, Status>

Returns summaries of all accounts accessible by the caller.

source

pub async fn get_property( &mut self, request: impl IntoRequest<GetPropertyRequest>, ) -> Result<Response<Property>, Status>

Lookup for a single “GA4” Property.

source

pub async fn list_properties( &mut self, request: impl IntoRequest<ListPropertiesRequest>, ) -> Result<Response<ListPropertiesResponse>, Status>

Returns child Properties under the specified parent Account.

Only “GA4” properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: “trashed”) properties are excluded by default. Returns an empty list if no relevant properties are found.

source

pub async fn create_property( &mut self, request: impl IntoRequest<CreatePropertyRequest>, ) -> Result<Response<Property>, Status>

Creates an “GA4” property with the specified location and attributes.

source

pub async fn delete_property( &mut self, request: impl IntoRequest<DeletePropertyRequest>, ) -> Result<Response<Property>, Status>

Marks target Property as soft-deleted (ie: “trashed”) and returns it.

This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.

If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found, or is not a GA4 Property.

source

pub async fn update_property( &mut self, request: impl IntoRequest<UpdatePropertyRequest>, ) -> Result<Response<Property>, Status>

Updates a property.

Creates a FirebaseLink.

Properties can have at most one FirebaseLink.

Deletes a FirebaseLink on a property

Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.

Creates a GoogleAdsLink.

Updates a GoogleAdsLink on a property

Deletes a GoogleAdsLink on a property

Lists GoogleAdsLinks on a property.

source

pub async fn get_data_sharing_settings( &mut self, request: impl IntoRequest<GetDataSharingSettingsRequest>, ) -> Result<Response<DataSharingSettings>, Status>

Get data sharing settings on an account. Data sharing settings are singletons.

source

pub async fn get_measurement_protocol_secret( &mut self, request: impl IntoRequest<GetMeasurementProtocolSecretRequest>, ) -> Result<Response<MeasurementProtocolSecret>, Status>

Lookup for a single “GA4” MeasurementProtocolSecret.

source

pub async fn list_measurement_protocol_secrets( &mut self, request: impl IntoRequest<ListMeasurementProtocolSecretsRequest>, ) -> Result<Response<ListMeasurementProtocolSecretsResponse>, Status>

Returns child MeasurementProtocolSecrets under the specified parent Property.

source

pub async fn create_measurement_protocol_secret( &mut self, request: impl IntoRequest<CreateMeasurementProtocolSecretRequest>, ) -> Result<Response<MeasurementProtocolSecret>, Status>

Creates a measurement protocol secret.

source

pub async fn delete_measurement_protocol_secret( &mut self, request: impl IntoRequest<DeleteMeasurementProtocolSecretRequest>, ) -> Result<Response<()>, Status>

Deletes target MeasurementProtocolSecret.

source

pub async fn update_measurement_protocol_secret( &mut self, request: impl IntoRequest<UpdateMeasurementProtocolSecretRequest>, ) -> Result<Response<MeasurementProtocolSecret>, Status>

Updates a measurement protocol secret.

source

pub async fn acknowledge_user_data_collection( &mut self, request: impl IntoRequest<AcknowledgeUserDataCollectionRequest>, ) -> Result<Response<AcknowledgeUserDataCollectionResponse>, Status>

Acknowledges the terms of user data collection for the specified property.

This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.

source

pub async fn search_change_history_events( &mut self, request: impl IntoRequest<SearchChangeHistoryEventsRequest>, ) -> Result<Response<SearchChangeHistoryEventsResponse>, Status>

Searches through all changes to an account or its children given the specified set of filters.

source

pub async fn create_conversion_event( &mut self, request: impl IntoRequest<CreateConversionEventRequest>, ) -> Result<Response<ConversionEvent>, Status>

Deprecated: Use CreateKeyEvent instead. Creates a conversion event with the specified attributes.

source

pub async fn update_conversion_event( &mut self, request: impl IntoRequest<UpdateConversionEventRequest>, ) -> Result<Response<ConversionEvent>, Status>

Deprecated: Use UpdateKeyEvent instead. Updates a conversion event with the specified attributes.

source

pub async fn get_conversion_event( &mut self, request: impl IntoRequest<GetConversionEventRequest>, ) -> Result<Response<ConversionEvent>, Status>

Deprecated: Use GetKeyEvent instead. Retrieve a single conversion event.

source

pub async fn delete_conversion_event( &mut self, request: impl IntoRequest<DeleteConversionEventRequest>, ) -> Result<Response<()>, Status>

Deprecated: Use DeleteKeyEvent instead. Deletes a conversion event in a property.

source

pub async fn list_conversion_events( &mut self, request: impl IntoRequest<ListConversionEventsRequest>, ) -> Result<Response<ListConversionEventsResponse>, Status>

Deprecated: Use ListKeyEvents instead. Returns a list of conversion events in the specified parent property.

Returns an empty list if no conversion events are found.

source

pub async fn create_key_event( &mut self, request: impl IntoRequest<CreateKeyEventRequest>, ) -> Result<Response<KeyEvent>, Status>

Creates a Key Event.

source

pub async fn update_key_event( &mut self, request: impl IntoRequest<UpdateKeyEventRequest>, ) -> Result<Response<KeyEvent>, Status>

Updates a Key Event.

source

pub async fn get_key_event( &mut self, request: impl IntoRequest<GetKeyEventRequest>, ) -> Result<Response<KeyEvent>, Status>

Retrieve a single Key Event.

source

pub async fn delete_key_event( &mut self, request: impl IntoRequest<DeleteKeyEventRequest>, ) -> Result<Response<()>, Status>

Deletes a Key Event.

source

pub async fn list_key_events( &mut self, request: impl IntoRequest<ListKeyEventsRequest>, ) -> Result<Response<ListKeyEventsResponse>, Status>

Returns a list of Key Events in the specified parent property. Returns an empty list if no Key Events are found.

source

pub async fn create_custom_dimension( &mut self, request: impl IntoRequest<CreateCustomDimensionRequest>, ) -> Result<Response<CustomDimension>, Status>

Creates a CustomDimension.

source

pub async fn update_custom_dimension( &mut self, request: impl IntoRequest<UpdateCustomDimensionRequest>, ) -> Result<Response<CustomDimension>, Status>

Updates a CustomDimension on a property.

source

pub async fn list_custom_dimensions( &mut self, request: impl IntoRequest<ListCustomDimensionsRequest>, ) -> Result<Response<ListCustomDimensionsResponse>, Status>

Lists CustomDimensions on a property.

source

pub async fn archive_custom_dimension( &mut self, request: impl IntoRequest<ArchiveCustomDimensionRequest>, ) -> Result<Response<()>, Status>

Archives a CustomDimension on a property.

source

pub async fn get_custom_dimension( &mut self, request: impl IntoRequest<GetCustomDimensionRequest>, ) -> Result<Response<CustomDimension>, Status>

Lookup for a single CustomDimension.

source

pub async fn create_custom_metric( &mut self, request: impl IntoRequest<CreateCustomMetricRequest>, ) -> Result<Response<CustomMetric>, Status>

Creates a CustomMetric.

source

pub async fn update_custom_metric( &mut self, request: impl IntoRequest<UpdateCustomMetricRequest>, ) -> Result<Response<CustomMetric>, Status>

Updates a CustomMetric on a property.

source

pub async fn list_custom_metrics( &mut self, request: impl IntoRequest<ListCustomMetricsRequest>, ) -> Result<Response<ListCustomMetricsResponse>, Status>

Lists CustomMetrics on a property.

source

pub async fn archive_custom_metric( &mut self, request: impl IntoRequest<ArchiveCustomMetricRequest>, ) -> Result<Response<()>, Status>

Archives a CustomMetric on a property.

source

pub async fn get_custom_metric( &mut self, request: impl IntoRequest<GetCustomMetricRequest>, ) -> Result<Response<CustomMetric>, Status>

Lookup for a single CustomMetric.

source

pub async fn get_data_retention_settings( &mut self, request: impl IntoRequest<GetDataRetentionSettingsRequest>, ) -> Result<Response<DataRetentionSettings>, Status>

Returns the singleton data retention settings for this property.

source

pub async fn update_data_retention_settings( &mut self, request: impl IntoRequest<UpdateDataRetentionSettingsRequest>, ) -> Result<Response<DataRetentionSettings>, Status>

Updates the singleton data retention settings for this property.

source

pub async fn create_data_stream( &mut self, request: impl IntoRequest<CreateDataStreamRequest>, ) -> Result<Response<DataStream>, Status>

Creates a DataStream.

source

pub async fn delete_data_stream( &mut self, request: impl IntoRequest<DeleteDataStreamRequest>, ) -> Result<Response<()>, Status>

Deletes a DataStream on a property.

source

pub async fn update_data_stream( &mut self, request: impl IntoRequest<UpdateDataStreamRequest>, ) -> Result<Response<DataStream>, Status>

Updates a DataStream on a property.

source

pub async fn list_data_streams( &mut self, request: impl IntoRequest<ListDataStreamsRequest>, ) -> Result<Response<ListDataStreamsResponse>, Status>

Lists DataStreams on a property.

source

pub async fn get_data_stream( &mut self, request: impl IntoRequest<GetDataStreamRequest>, ) -> Result<Response<DataStream>, Status>

Lookup for a single DataStream.

source

pub async fn run_access_report( &mut self, request: impl IntoRequest<RunAccessReportRequest>, ) -> Result<Response<RunAccessReportResponse>, Status>

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. Reports may be requested for any property, but dimensions that aren’t related to quota can only be requested on Google Analytics 360 properties. 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.

Trait Implementations§

source§

impl<T: Clone> Clone for AnalyticsAdminServiceClient<T>

source§

fn clone(&self) -> AnalyticsAdminServiceClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for AnalyticsAdminServiceClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more