class Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client

Client for the AnalyticsAdminService service.

Service Interface for the Analytics Admin API (GA4).

Attributes

analytics_admin_service_stub[R]

@private

Public Class Methods

configure() { |configure| ... } click to toggle source

Configure the AnalyticsAdminService Client class.

See {::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client::Configuration} for a description of the configuration fields.

@example

# Modify the configuration for all AnalyticsAdminService clients
::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.configure do |config|
  config.timeout = 10.0
end

@yield [config] Configure the Client client. @yieldparam config [Client::Configuration]

@return [Client::Configuration]

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 56
def self.configure
  @configure ||= begin
    namespace = ["Google", "Analytics", "Admin", "V1alpha"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.timeout = 60.0
    default_config.retry_policy = {
      initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2]
    }

    default_config.rpcs.get_account.timeout = 60.0

    default_config.rpcs.list_accounts.timeout = 60.0

    default_config.rpcs.delete_account.timeout = 60.0

    default_config.rpcs.update_account.timeout = 60.0

    default_config.rpcs.provision_account_ticket.timeout = 60.0

    default_config.rpcs.get_property.timeout = 60.0

    default_config.rpcs.list_properties.timeout = 60.0

    default_config.rpcs.create_property.timeout = 60.0

    default_config.rpcs.delete_property.timeout = 60.0

    default_config.rpcs.update_property.timeout = 60.0

    default_config.rpcs.get_user_link.timeout = 60.0

    default_config.rpcs.batch_get_user_links.timeout = 60.0

    default_config.rpcs.list_user_links.timeout = 60.0

    default_config.rpcs.audit_user_links.timeout = 60.0

    default_config.rpcs.create_user_link.timeout = 60.0

    default_config.rpcs.batch_create_user_links.timeout = 60.0

    default_config.rpcs.update_user_link.timeout = 60.0

    default_config.rpcs.batch_update_user_links.timeout = 60.0

    default_config.rpcs.delete_user_link.timeout = 60.0

    default_config.rpcs.batch_delete_user_links.timeout = 60.0

    default_config.rpcs.get_web_data_stream.timeout = 60.0

    default_config.rpcs.update_web_data_stream.timeout = 60.0

    default_config.rpcs.create_web_data_stream.timeout = 60.0

    default_config.rpcs.list_web_data_streams.timeout = 60.0

    default_config.rpcs.get_ios_app_data_stream.timeout = 60.0

    default_config.rpcs.delete_ios_app_data_stream.timeout = 60.0

    default_config.rpcs.update_ios_app_data_stream.timeout = 60.0

    default_config.rpcs.list_ios_app_data_streams.timeout = 60.0

    default_config.rpcs.get_android_app_data_stream.timeout = 60.0

    default_config.rpcs.delete_android_app_data_stream.timeout = 60.0

    default_config.rpcs.update_android_app_data_stream.timeout = 60.0

    default_config.rpcs.list_android_app_data_streams.timeout = 60.0

    default_config.rpcs.get_enhanced_measurement_settings.timeout = 60.0

    default_config.rpcs.update_enhanced_measurement_settings.timeout = 60.0

    default_config.rpcs.create_firebase_link.timeout = 60.0

    default_config.rpcs.delete_firebase_link.timeout = 60.0

    default_config.rpcs.list_firebase_links.timeout = 60.0

    default_config.rpcs.get_global_site_tag.timeout = 60.0

    default_config.rpcs.create_google_ads_link.timeout = 60.0

    default_config.rpcs.update_google_ads_link.timeout = 60.0

    default_config.rpcs.delete_google_ads_link.timeout = 60.0

    default_config.rpcs.list_google_ads_links.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end
new() { |config| ... } click to toggle source

Create a new AnalyticsAdminService client object.

@example

# Create a client using the default configuration
client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a client using a custom configuration
client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config|
  config.timeout = 10.0
end

@yield [config] Configure the AnalyticsAdminService client. @yieldparam config [Client::Configuration]

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 198
def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/analytics/admin/v1alpha/analytics_admin_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
                           !@config.endpoint.split(".").first.include?("-")
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @analytics_admin_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Stub,
    credentials:  credentials,
    endpoint:     @config.endpoint,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors
  )
end

Public Instance Methods

archive_custom_dimension(request, options = nil) { |response, operation| ... } click to toggle source

Archives a CustomDimension on a property.

@overload archive_custom_dimension(request, options = nil)

Pass arguments to `archive_custom_dimension` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload archive_custom_dimension(name: nil)

Pass arguments to `archive_custom_dimension` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the CustomDimension to archive.
  Example format: properties/1234/customDimensions/5678

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5518
def archive_custom_dimension request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.archive_custom_dimension.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.archive_custom_dimension.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.archive_custom_dimension.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :archive_custom_dimension, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
archive_custom_metric(request, options = nil) { |response, operation| ... } click to toggle source

Archives a CustomMetric on a property.

@overload archive_custom_metric(request, options = nil)

Pass arguments to `archive_custom_metric` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload archive_custom_metric(name: nil)

Pass arguments to `archive_custom_metric` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the CustomMetric to archive.
  Example format: properties/1234/customMetrics/5678

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5877
def archive_custom_metric request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.archive_custom_metric.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.archive_custom_metric.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.archive_custom_metric.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :archive_custom_metric, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
configure() { |config| ... } click to toggle source

Configure the AnalyticsAdminService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on {Client.configure}.

See {::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client::Configuration} for a description of the configuration fields.

@yield [config] Configure the Client client. @yieldparam config [Client::Configuration]

@return [Client::Configuration]

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 177
def configure
  yield @config if block_given?
  @config
end
create_conversion_event(request, options = nil) { |response, operation| ... } click to toggle source

Creates a conversion event with the specified attributes.

@overload create_conversion_event(request, options = nil)

Pass arguments to `create_conversion_event` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::CreateConversionEventRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::CreateConversionEventRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_conversion_event(conversion_event: nil, parent: nil)

Pass arguments to `create_conversion_event` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param conversion_event [::Google::Analytics::Admin::V1alpha::ConversionEvent, ::Hash]
  Required. The conversion event to create.
@param parent [::String]
  Required. The resource name of the parent property where this conversion event will
  be created. Format: properties/123

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::ConversionEvent] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::ConversionEvent]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 4209
def create_conversion_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateConversionEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_conversion_event.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_conversion_event.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_conversion_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_conversion_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
create_custom_dimension(request, options = nil) { |response, operation| ... } click to toggle source

Creates a CustomDimension.

@overload create_custom_dimension(request, options = nil)

Pass arguments to `create_custom_dimension` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_custom_dimension(parent: nil, custom_dimension: nil)

Pass arguments to `create_custom_dimension` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. Example format: properties/1234
@param custom_dimension [::Google::Analytics::Admin::V1alpha::CustomDimension, ::Hash]
  Required. The CustomDimension to create.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomDimension] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::CustomDimension]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5298
def create_custom_dimension request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_custom_dimension.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_custom_dimension.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_custom_dimension.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_custom_dimension, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
create_custom_metric(request, options = nil) { |response, operation| ... } click to toggle source

Creates a CustomMetric.

@overload create_custom_metric(request, options = nil)

Pass arguments to `create_custom_metric` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_custom_metric(parent: nil, custom_metric: nil)

Pass arguments to `create_custom_metric` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. Example format: properties/1234
@param custom_metric [::Google::Analytics::Admin::V1alpha::CustomMetric, ::Hash]
  Required. The CustomMetric to create.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomMetric] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::CustomMetric]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5657
def create_custom_metric request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_custom_metric.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_custom_metric.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_custom_metric.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_custom_metric, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
create_measurement_protocol_secret(request, options = nil) { |response, operation| ... } click to toggle source

Creates a measurement protocol secret.

@overload create_measurement_protocol_secret(request, options = nil)

Pass arguments to `create_measurement_protocol_secret` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_measurement_protocol_secret(parent: nil, measurement_protocol_secret: nil)

Pass arguments to `create_measurement_protocol_secret` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The parent resource where this secret will be created.
  Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream)
  may be a parent.
  Format: properties/\\{property}/webDataStreams/\\{webDataStream}
@param measurement_protocol_secret [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret, ::Hash]
  Required. The measurement protocol secret to create.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3759
def create_measurement_protocol_secret request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_measurement_protocol_secret.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_measurement_protocol_secret.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_measurement_protocol_secret.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_measurement_protocol_secret, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
create_property(request, options = nil) { |response, operation| ... } click to toggle source

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

@overload create_property(request, options = nil)

Pass arguments to `create_property` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::CreatePropertyRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::CreatePropertyRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_property(property: nil)

Pass arguments to `create_property` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param property [::Google::Analytics::Admin::V1alpha::Property, ::Hash]
  Required. The property to create.
  Note: the supplied property must specify its parent.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::Property] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::Property]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 868
def create_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreatePropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_property.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_property.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
create_web_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Creates a web stream with the specified location and attributes.

@overload create_web_data_stream(request, options = nil)

Pass arguments to `create_web_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::CreateWebDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::CreateWebDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload create_web_data_stream(web_data_stream: nil, parent: nil)

Pass arguments to `create_web_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param web_data_stream [::Google::Analytics::Admin::V1alpha::WebDataStream, ::Hash]
  Required. The web stream to create.
@param parent [::String]
  Required. The parent resource where this web data stream will be created.
  Format: properties/123

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::WebDataStream] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::WebDataStream]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2051
def create_web_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateWebDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.create_web_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_web_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.create_web_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_web_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_account(request, options = nil) { |response, operation| ... } click to toggle source

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, UserLinks) will be permanently purged. support.google.com/analytics/answer/6154772

Returns an error if the target is not found.

@overload delete_account(request, options = nil)

Pass arguments to `delete_account` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::DeleteAccountRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::DeleteAccountRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_account(name: nil)

Pass arguments to `delete_account` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the Account to soft-delete.
  Format: accounts/\\{account}
  Example: "accounts/100"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 426
def delete_account request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteAccountRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_account.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_account.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_account.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_account, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_android_app_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Deletes an android app stream on a property.

@overload delete_android_app_data_stream(request, options = nil)

Pass arguments to `delete_android_app_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::DeleteAndroidAppDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::DeleteAndroidAppDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_android_app_data_stream(name: nil)

Pass arguments to `delete_android_app_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the android app data stream to delete.
  Format: properties/\\{property_id}/androidAppDataStreams/\\{stream_id}
  Example: "properties/123/androidAppDataStreams/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2570
def delete_android_app_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteAndroidAppDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_android_app_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_android_app_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_android_app_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_android_app_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_conversion_event(request, options = nil) { |response, operation| ... } click to toggle source

Deletes a conversion event in a property.

@overload delete_conversion_event(request, options = nil)

Pass arguments to `delete_conversion_event` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_conversion_event(name: nil)

Pass arguments to `delete_conversion_event` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the conversion event to delete.
  Format: properties/\\{property}/conversionEvents/\\{conversion_event}
  Example: "properties/123/conversionEvents/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 4349
def delete_conversion_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_conversion_event.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_conversion_event.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_conversion_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_conversion_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_ios_app_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Deletes an iOS app stream on a property.

@overload delete_ios_app_data_stream(request, options = nil)

Pass arguments to `delete_ios_app_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::DeleteIosAppDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::DeleteIosAppDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_ios_app_data_stream(name: nil)

Pass arguments to `delete_ios_app_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the iOS app data stream to delete.
  Format: properties/\\{property_id}/iosAppDataStreams/\\{stream_id}
  Example: "properties/123/iosAppDataStreams/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2274
def delete_ios_app_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteIosAppDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_ios_app_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_ios_app_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_ios_app_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_ios_app_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_measurement_protocol_secret(request, options = nil) { |response, operation| ... } click to toggle source

Deletes target MeasurementProtocolSecret.

@overload delete_measurement_protocol_secret(request, options = nil)

Pass arguments to `delete_measurement_protocol_secret` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_measurement_protocol_secret(name: nil)

Pass arguments to `delete_measurement_protocol_secret` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the MeasurementProtocolSecret to delete.
  Format:
  properties/\\{property}/webDataStreams/\\{webDataStream}/measurementProtocolSecrets/\\{measurementProtocolSecret}
  Note: Any type of stream (WebDataStream, IosAppDataStream,
  AndroidAppDataStream) may be a parent.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3831
def delete_measurement_protocol_secret request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_measurement_protocol_secret.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_measurement_protocol_secret.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_measurement_protocol_secret.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_measurement_protocol_secret, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_property(request, options = nil) { |response, operation| ... } click to toggle source

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, UserLinks) will be permanently purged. support.google.com/analytics/answer/6154772

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

@overload delete_property(request, options = nil)

Pass arguments to `delete_property` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::DeletePropertyRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::DeletePropertyRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_property(name: nil)

Pass arguments to `delete_property` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the Property to soft-delete.
  Format: properties/\\{property_id}
  Example: "properties/1000"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::Property] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::Property]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 942
def delete_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeletePropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_property.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_property.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
delete_web_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Deletes a web stream on a property.

@overload delete_web_data_stream(request, options = nil)

Pass arguments to `delete_web_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::DeleteWebDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::DeleteWebDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload delete_web_data_stream(name: nil)

Pass arguments to `delete_web_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the web data stream to delete.
  Format: properties/\\{property_id}/webDataStreams/\\{stream_id}
  Example: "properties/123/webDataStreams/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Protobuf::Empty]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 1907
def delete_web_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteWebDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.delete_web_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_web_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.delete_web_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_web_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_account(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single Account.

@overload get_account(request, options = nil)

Pass arguments to `get_account` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetAccountRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetAccountRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_account(name: nil)

Pass arguments to `get_account` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the account to lookup.
  Format: accounts/\\{account}
  Example: "accounts/100"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::Account] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::Account]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 267
def get_account request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAccountRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_account.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_account.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_account.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_account, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_android_app_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single AndroidAppDataStream

@overload get_android_app_data_stream(request, options = nil)

Pass arguments to `get_android_app_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetAndroidAppDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetAndroidAppDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_android_app_data_stream(name: nil)

Pass arguments to `get_android_app_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the android app data stream to lookup.
  Format: properties/\\{property_id}/androidAppDataStreams/\\{stream_id}
  Example: "properties/123/androidAppDataStreams/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2500
def get_android_app_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAndroidAppDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_android_app_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_android_app_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_android_app_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_android_app_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_conversion_event(request, options = nil) { |response, operation| ... } click to toggle source

Retrieve a single conversion event.

@overload get_conversion_event(request, options = nil)

Pass arguments to `get_conversion_event` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetConversionEventRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetConversionEventRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_conversion_event(name: nil)

Pass arguments to `get_conversion_event` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The resource name of the conversion event to retrieve.
  Format: properties/\\{property}/conversionEvents/\\{conversion_event}
  Example: "properties/123/conversionEvents/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::ConversionEvent] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::ConversionEvent]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 4279
def get_conversion_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetConversionEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_conversion_event.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_conversion_event.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_conversion_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_conversion_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_custom_dimension(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single CustomDimension.

@overload get_custom_dimension(request, options = nil)

Pass arguments to `get_custom_dimension` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_custom_dimension(name: nil)

Pass arguments to `get_custom_dimension` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the CustomDimension to get.
  Example format: properties/1234/customDimensions/5678

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomDimension] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::CustomDimension]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5587
def get_custom_dimension request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_custom_dimension.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_custom_dimension.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_custom_dimension.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_custom_dimension, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_custom_metric(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single CustomMetric.

@overload get_custom_metric(request, options = nil)

Pass arguments to `get_custom_metric` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_custom_metric(name: nil)

Pass arguments to `get_custom_metric` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the CustomMetric to get.
  Example format: properties/1234/customMetrics/5678

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomMetric] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::CustomMetric]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5946
def get_custom_metric request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_custom_metric.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_custom_metric.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_custom_metric.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_custom_metric, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_data_retention_settings(request, options = nil) { |response, operation| ... } click to toggle source

Returns the singleton data retention settings for this property.

@overload get_data_retention_settings(request, options = nil)

Pass arguments to `get_data_retention_settings` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_data_retention_settings(name: nil)

Pass arguments to `get_data_retention_settings` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the settings to lookup.
  Format:
  properties/\\{property}/dataRetentionSettings
  Example: "properties/1000/dataRetentionSettings"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::DataRetentionSettings] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::DataRetentionSettings]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 6017
def get_data_retention_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_data_retention_settings.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_data_retention_settings.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_data_retention_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_data_retention_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_data_sharing_settings(request, options = nil) { |response, operation| ... } click to toggle source

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

@overload get_data_sharing_settings(request, options = nil)

Pass arguments to `get_data_sharing_settings` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_data_sharing_settings(name: nil)

Pass arguments to `get_data_sharing_settings` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the settings to lookup.
  Format: accounts/\\{account}/dataSharingSettings
  Example: "accounts/1000/dataSharingSettings"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::DataSharingSettings] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::DataSharingSettings]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3531
def get_data_sharing_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_data_sharing_settings.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_data_sharing_settings.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_data_sharing_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_data_sharing_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_enhanced_measurement_settings(request, options = nil) { |response, operation| ... } click to toggle source

Returns the singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.

@overload get_enhanced_measurement_settings(request, options = nil)

Pass arguments to `get_enhanced_measurement_settings` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_enhanced_measurement_settings(name: nil)

Pass arguments to `get_enhanced_measurement_settings` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the settings to lookup.
  Format:
  properties/\\{property_id}/webDataStreams/\\{stream_id}/enhancedMeasurementSettings
  Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2801
def get_enhanced_measurement_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_enhanced_measurement_settings.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_enhanced_measurement_settings.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_enhanced_measurement_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_enhanced_measurement_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_global_site_tag(request, options = nil) { |response, operation| ... } click to toggle source

Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.

@overload get_global_site_tag(request, options = nil)

Pass arguments to `get_global_site_tag` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_global_site_tag(name: nil)

Pass arguments to `get_global_site_tag` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the site tag to lookup.
  Note that site tags are singletons and do not have unique IDs.
  Format: properties/\\{property_id}/webDataStreams/\\{stream_id}/globalSiteTag
  Example: "properties/123/webDataStreams/456/globalSiteTag"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::GlobalSiteTag] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::GlobalSiteTag]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3171
def get_global_site_tag request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_global_site_tag.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_global_site_tag.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_global_site_tag.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_global_site_tag, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_google_signals_settings(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for Google Signals settings for a property.

@overload get_google_signals_settings(request, options = nil)

Pass arguments to `get_google_signals_settings` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_google_signals_settings(name: nil)

Pass arguments to `get_google_signals_settings` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the google signals settings to retrieve.
  Format: properties/\\{property}/googleSignalsSettings

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 4065
def get_google_signals_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_google_signals_settings.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_google_signals_settings.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_google_signals_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_google_signals_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_ios_app_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single IosAppDataStream

@overload get_ios_app_data_stream(request, options = nil)

Pass arguments to `get_ios_app_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetIosAppDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetIosAppDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_ios_app_data_stream(name: nil)

Pass arguments to `get_ios_app_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the iOS app data stream to lookup.
  Format: properties/\\{property_id}/iosAppDataStreams/\\{stream_id}
  Example: "properties/123/iosAppDataStreams/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::IosAppDataStream] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::IosAppDataStream]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2204
def get_ios_app_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetIosAppDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_ios_app_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_ios_app_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_ios_app_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_ios_app_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_measurement_protocol_secret(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single “GA4” MeasurementProtocolSecret.

@overload get_measurement_protocol_secret(request, options = nil)

Pass arguments to `get_measurement_protocol_secret` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_measurement_protocol_secret(name: nil)

Pass arguments to `get_measurement_protocol_secret` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the measurement protocol secret to lookup.
  Format:
  properties/\\{property}/webDataStreams/\\{webDataStream}/measurementProtocolSecrets/\\{measurementProtocolSecret}
  Note: Any type of stream (WebDataStream, IosAppDataStream,
  AndroidAppDataStream) may be a parent.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3603
def get_measurement_protocol_secret request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_measurement_protocol_secret.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_measurement_protocol_secret.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_measurement_protocol_secret.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_measurement_protocol_secret, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_property(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single “GA4” Property.

@overload get_property(request, options = nil)

Pass arguments to `get_property` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetPropertyRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetPropertyRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_property(name: nil)

Pass arguments to `get_property` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the property to lookup.
  Format: properties/\\{property_id}
  Example: "properties/1000"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::Property] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::Property]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 705
def get_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetPropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_property.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_property.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
get_web_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Lookup for a single WebDataStream

@overload get_web_data_stream(request, options = nil)

Pass arguments to `get_web_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::GetWebDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::GetWebDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload get_web_data_stream(name: nil)

Pass arguments to `get_web_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param name [::String]
  Required. The name of the web data stream to lookup.
  Format: properties/\\{property_id}/webDataStreams/\\{stream_id}
  Example: "properties/123/webDataStreams/456"

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::WebDataStream] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::WebDataStream]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 1837
def get_web_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetWebDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.get_web_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_web_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.get_web_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_web_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_account_summaries(request, options = nil) { |response, operation| ... } click to toggle source

Returns summaries of all accounts accessible by the caller.

@overload list_account_summaries(request, options = nil)

Pass arguments to `list_account_summaries` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_account_summaries(page_size: nil, page_token: nil)

Pass arguments to `list_account_summaries` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param page_size [::Integer]
  The maximum number of AccountSummary resources to return. The service may
  return fewer than this value, even if there are additional pages.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200; (higher values will be coerced to the maximum)
@param page_token [::String]
  A page token, received from a previous `ListAccountSummaries` call.
  Provide this to retrieve the subsequent page.
  When paginating, all other parameters provided to `ListAccountSummaries`
  must match the call that provided the page token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 640
def list_account_summaries request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_account_summaries.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_account_summaries.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_account_summaries.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_account_summaries, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_account_summaries, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_accounts(request, options = nil) { |response, operation| ... } click to toggle source

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.

@overload list_accounts(request, options = nil)

Pass arguments to `list_accounts` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListAccountsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListAccountsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_accounts(page_size: nil, page_token: nil, show_deleted: nil)

Pass arguments to `list_accounts` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param page_size [::Integer]
  The maximum number of resources to return. The service may return
  fewer than this value, even if there are additional pages.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200; (higher values will be coerced to the maximum)
@param page_token [::String]
  A page token, received from a previous `ListAccounts` call.
  Provide this to retrieve the subsequent page.
  When paginating, all other parameters provided to `ListAccounts` must
  match the call that provided the page token.
@param show_deleted [::Boolean]
  Whether to include soft-deleted (ie: "trashed") Accounts in the
  results. Accounts can be inspected to determine whether they are deleted or
  not.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 351
def list_accounts request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAccountsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_accounts.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_accounts.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_accounts.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_accounts, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_accounts, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_android_app_data_streams(request, options = nil) { |response, operation| ... } click to toggle source

Returns child android app streams under the specified parent property.

Android app streams will be excluded if the caller does not have access. Returns an empty list if no relevant android app streams are found.

@overload list_android_app_data_streams(request, options = nil)

Pass arguments to `list_android_app_data_streams` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListAndroidAppDataStreamsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListAndroidAppDataStreamsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_android_app_data_streams(parent: nil, page_size: nil, page_token: nil)

Pass arguments to `list_android_app_data_streams` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The name of the parent property.
  For example, to limit results to app streams under the property with Id
  123: "properties/123"
@param page_size [::Integer]
  The maximum number of resources to return.

  If unspecified, at most 50 resources will be returned.
  The maximum value is 200; (higher values will be coerced to the maximum)
@param page_token [::String]
  A page token, received from a previous call. Provide this to
  retrieve the subsequent page.
  When paginating, all other parameters provided to
  `ListAndroidAppDataStreams` must match the call that provided the page
  token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AndroidAppDataStream>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AndroidAppDataStream>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2727
def list_android_app_data_streams request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAndroidAppDataStreamsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_android_app_data_streams.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_android_app_data_streams.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_android_app_data_streams.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_android_app_data_streams, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_android_app_data_streams, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_conversion_events(request, options = nil) { |response, operation| ... } click to toggle source

Returns a list of conversion events in the specified parent property.

Returns an empty list if no conversion events are found.

@overload list_conversion_events(request, options = nil)

Pass arguments to `list_conversion_events` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_conversion_events(parent: nil, page_size: nil, page_token: nil)

Pass arguments to `list_conversion_events` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The resource name of the parent property.
  Example: 'properties/123'
@param page_size [::Integer]
  The maximum number of resources to return.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200; (higher values will be coerced to the maximum)
@param page_token [::String]
  A page token, received from a previous `ListConversionEvents` call.
  Provide this to retrieve the subsequent page.
  When paginating, all other parameters provided to `ListConversionEvents`
  must match the call that provided the page token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 4429
def list_conversion_events request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_conversion_events.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_conversion_events.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_conversion_events.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_conversion_events, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_conversion_events, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_custom_dimensions(request, options = nil) { |response, operation| ... } click to toggle source

Lists CustomDimensions on a property.

@overload list_custom_dimensions(request, options = nil)

Pass arguments to `list_custom_dimensions` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_custom_dimensions(parent: nil, page_size: nil, page_token: nil)

Pass arguments to `list_custom_dimensions` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. Example format: properties/1234
@param page_size [::Integer]
  The maximum number of resources to return.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200 (higher values will be coerced to the maximum).
@param page_token [::String]
  A page token, received from a previous `ListCustomDimensions` call.
  Provide this to retrieve the subsequent page.

  When paginating, all other parameters provided to `ListCustomDimensions`
  must match the call that provided the page token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5448
def list_custom_dimensions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_custom_dimensions.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_custom_dimensions.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_custom_dimensions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_custom_dimensions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_custom_dimensions, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_custom_metrics(request, options = nil) { |response, operation| ... } click to toggle source

Lists CustomMetrics on a property.

@overload list_custom_metrics(request, options = nil)

Pass arguments to `list_custom_metrics` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_custom_metrics(parent: nil, page_size: nil, page_token: nil)

Pass arguments to `list_custom_metrics` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. Example format: properties/1234
@param page_size [::Integer]
  The maximum number of resources to return.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200 (higher values will be coerced to the maximum).
@param page_token [::String]
  A page token, received from a previous `ListCustomMetrics` call.
  Provide this to retrieve the subsequent page.

  When paginating, all other parameters provided to `ListCustomMetrics` must
  match the call that provided the page token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5807
def list_custom_metrics request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_custom_metrics.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_custom_metrics.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_custom_metrics.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_custom_metrics, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_custom_metrics, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_ios_app_data_streams(request, options = nil) { |response, operation| ... } click to toggle source

Returns child iOS app data streams under the specified parent property.

iOS app data streams will be excluded if the caller does not have access. Returns an empty list if no relevant iOS app data streams are found.

@overload list_ios_app_data_streams(request, options = nil)

Pass arguments to `list_ios_app_data_streams` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListIosAppDataStreamsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListIosAppDataStreamsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_ios_app_data_streams(parent: nil, page_size: nil, page_token: nil)

Pass arguments to `list_ios_app_data_streams` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The name of the parent property.
  For example, to list results of app streams under the property with Id
  123: "properties/123"
@param page_size [::Integer]
  The maximum number of resources to return.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200; (higher values will be coerced to the maximum)
@param page_token [::String]
  A page token, received from a previous `ListIosAppDataStreams`
  call. Provide this to retrieve the subsequent page.
  When paginating, all other parameters provided to `ListIosAppDataStreams`
  must match the call that provided the page token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::IosAppDataStream>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::IosAppDataStream>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2429
def list_ios_app_data_streams request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListIosAppDataStreamsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_ios_app_data_streams.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_ios_app_data_streams.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_ios_app_data_streams.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_ios_app_data_streams, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_ios_app_data_streams, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_measurement_protocol_secrets(request, options = nil) { |response, operation| ... } click to toggle source

Returns child MeasurementProtocolSecrets under the specified parent Property.

@overload list_measurement_protocol_secrets(request, options = nil)

Pass arguments to `list_measurement_protocol_secrets` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_measurement_protocol_secrets(parent: nil, page_size: nil, page_token: nil)

Pass arguments to `list_measurement_protocol_secrets` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The resource name of the parent stream.
  Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream)
  may be a parent.
  Format:
  properties/\\{property}/webDataStreams/\\{webDataStream}/measurementProtocolSecrets
@param page_size [::Integer]
  The maximum number of resources to return.
  If unspecified, at most 10 resources will be returned.
  The maximum value is 10. Higher values will be coerced to the maximum.
@param page_token [::String]
  A page token, received from a previous `ListMeasurementProtocolSecrets`
  call. Provide this to retrieve the subsequent page. When paginating, all
  other parameters provided to `ListMeasurementProtocolSecrets` must match
  the call that provided the page token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3685
def list_measurement_protocol_secrets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_measurement_protocol_secrets.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_measurement_protocol_secrets.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_measurement_protocol_secrets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_measurement_protocol_secrets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_measurement_protocol_secrets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_properties(request, options = nil) { |response, operation| ... } click to toggle source

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.

@overload list_properties(request, options = nil)

Pass arguments to `list_properties` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListPropertiesRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListPropertiesRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_properties(filter: nil, page_size: nil, page_token: nil, show_deleted: nil)

Pass arguments to `list_properties` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param filter [::String]
  Required. An expression for filtering the results of the request.
  Fields eligible for filtering are:
  `parent:`(The resource name of the parent account) or
  `firebase_project:`(The id or number of the linked firebase project).
  Some examples of filters:

  ```
  | Filter                      | Description                               |
  |-----------------------------|-------------------------------------------|
  | parent:accounts/123         | The account with account id: 123.         |
  | firebase_project:project-id | The firebase project with id: project-id. |
  | firebase_project:123        | The firebase project with number: 123.    |
  ```
@param page_size [::Integer]
  The maximum number of resources to return. The service may return
  fewer than this value, even if there are additional pages.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200; (higher values will be coerced to the maximum)
@param page_token [::String]
  A page token, received from a previous `ListProperties` call.
  Provide this to retrieve the subsequent page.
  When paginating, all other parameters provided to `ListProperties` must
  match the call that provided the page token.
@param show_deleted [::Boolean]
  Whether to include soft-deleted (ie: "trashed") Properties in the
  results. Properties can be inspected to determine whether they are deleted
  or not.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 804
def list_properties request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListPropertiesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_properties.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_properties.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_properties.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_properties, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_properties, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
list_web_data_streams(request, options = nil) { |response, operation| ... } click to toggle source

Returns child web data streams under the specified parent property.

Web data streams will be excluded if the caller does not have access. Returns an empty list if no relevant web data streams are found.

@overload list_web_data_streams(request, options = nil)

Pass arguments to `list_web_data_streams` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ListWebDataStreamsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ListWebDataStreamsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload list_web_data_streams(parent: nil, page_size: nil, page_token: nil)

Pass arguments to `list_web_data_streams` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param parent [::String]
  Required. The name of the parent property.
  For example, to list results of web streams under the property with Id
  123: "properties/123"
@param page_size [::Integer]
  The maximum number of resources to return.
  If unspecified, at most 50 resources will be returned.
  The maximum value is 200; (higher values will be coerced to the maximum)
@param page_token [::String]
  A page token, received from a previous `ListWebDataStreams` call.
  Provide this to retrieve the subsequent page.
  When paginating, all other parameters provided to `ListWebDataStreams` must
  match the call that provided the page token.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::WebDataStream>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::WebDataStream>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2133
def list_web_data_streams request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListWebDataStreamsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.list_web_data_streams.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "parent" => request.parent
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_web_data_streams.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.list_web_data_streams.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_web_data_streams, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_web_data_streams, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
provision_account_ticket(request, options = nil) { |response, operation| ... } click to toggle source

Requests a ticket for creating an account.

@overload provision_account_ticket(request, options = nil)

Pass arguments to `provision_account_ticket` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload provision_account_ticket(account: nil, redirect_uri: nil)

Pass arguments to `provision_account_ticket` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param account [::Google::Analytics::Admin::V1alpha::Account, ::Hash]
  The account to create.
@param redirect_uri [::String]
  Redirect URI where the user will be sent after accepting Terms of Service.
  Must be configured in Developers Console as a Redirect URI

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 570
def provision_account_ticket request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.provision_account_ticket.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.provision_account_ticket.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.provision_account_ticket.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :provision_account_ticket, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
search_change_history_events(request, options = nil) { |response, operation| ... } click to toggle source

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

@overload search_change_history_events(request, options = nil)

Pass arguments to `search_change_history_events` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload search_change_history_events(account: nil, property: nil, resource_type: nil, action: nil, actor_email: nil, earliest_change_time: nil, latest_change_time: nil, page_size: nil, page_token: nil)

Pass arguments to `search_change_history_events` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param account [::String]
  Required. The account resource for which to return change history resources.
@param property [::String]
  Optional. Resource name for a child property. If set, only return changes
  made to this property or its child resources.
@param resource_type [::Array<::Google::Analytics::Admin::V1alpha::ChangeHistoryResourceType>]
  Optional. If set, only return changes if they are for a resource that matches at
  least one of these types.
@param action [::Array<::Google::Analytics::Admin::V1alpha::ActionType>]
  Optional. If set, only return changes that match one or more of these types of
  actions.
@param actor_email [::Array<::String>]
  Optional. If set, only return changes if they are made by a user in this list.
@param earliest_change_time [::Google::Protobuf::Timestamp, ::Hash]
  Optional. If set, only return changes made after this time (inclusive).
@param latest_change_time [::Google::Protobuf::Timestamp, ::Hash]
  Optional. If set, only return changes made before this time (inclusive).
@param page_size [::Integer]
  Optional. The maximum number of ChangeHistoryEvent items to return.
  The service may return fewer than this value, even if there are additional
  pages. If unspecified, at most 50 items will be returned.
  The maximum value is 200 (higher values will be coerced to the maximum).
@param page_token [::String]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3995
def search_change_history_events request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.search_change_history_events.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "account" => request.account
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.search_change_history_events.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.search_change_history_events.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :search_change_history_events, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :search_change_history_events, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_account(request, options = nil) { |response, operation| ... } click to toggle source

Updates an account.

@overload update_account(request, options = nil)

Pass arguments to `update_account` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateAccountRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateAccountRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_account(account: nil, update_mask: nil)

Pass arguments to `update_account` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param account [::Google::Analytics::Admin::V1alpha::Account, ::Hash]
  Required. The account to update.
  The account's `name` field is used to identify the account.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::Account] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::Account]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 499
def update_account request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAccountRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_account.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "account.name" => request.account.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_account.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_account.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_account, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_android_app_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Updates an android app stream on a property.

@overload update_android_app_data_stream(request, options = nil)

Pass arguments to `update_android_app_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateAndroidAppDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateAndroidAppDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_android_app_data_stream(android_app_data_stream: nil, update_mask: nil)

Pass arguments to `update_android_app_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param android_app_data_stream [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream, ::Hash]
  Required. The android app stream to update.
  The `name` field is used to identify the android app stream to be updated.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2643
def update_android_app_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAndroidAppDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_android_app_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "android_app_data_stream.name" => request.android_app_data_stream.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_android_app_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_android_app_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_android_app_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_custom_dimension(request, options = nil) { |response, operation| ... } click to toggle source

Updates a CustomDimension on a property.

@overload update_custom_dimension(request, options = nil)

Pass arguments to `update_custom_dimension` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_custom_dimension(custom_dimension: nil, update_mask: nil)

Pass arguments to `update_custom_dimension` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param custom_dimension [::Google::Analytics::Admin::V1alpha::CustomDimension, ::Hash]
  The CustomDimension to update
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomDimension] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::CustomDimension]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5370
def update_custom_dimension request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_custom_dimension.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "custom_dimension.name" => request.custom_dimension.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_custom_dimension.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_custom_dimension.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_custom_dimension, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_custom_metric(request, options = nil) { |response, operation| ... } click to toggle source

Updates a CustomMetric on a property.

@overload update_custom_metric(request, options = nil)

Pass arguments to `update_custom_metric` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_custom_metric(custom_metric: nil, update_mask: nil)

Pass arguments to `update_custom_metric` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param custom_metric [::Google::Analytics::Admin::V1alpha::CustomMetric, ::Hash]
  The CustomMetric to update
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomMetric] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::CustomMetric]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 5729
def update_custom_metric request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_custom_metric.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "custom_metric.name" => request.custom_metric.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_custom_metric.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_custom_metric.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_custom_metric, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_data_retention_settings(request, options = nil) { |response, operation| ... } click to toggle source

Updates the singleton data retention settings for this property.

@overload update_data_retention_settings(request, options = nil)

Pass arguments to `update_data_retention_settings` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_data_retention_settings(data_retention_settings: nil, update_mask: nil)

Pass arguments to `update_data_retention_settings` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param data_retention_settings [::Google::Analytics::Admin::V1alpha::DataRetentionSettings, ::Hash]
  Required. The settings to update.
  The `name` field is used to identify the settings to be updated.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::DataRetentionSettings] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::DataRetentionSettings]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 6090
def update_data_retention_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_data_retention_settings.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "data_retention_settings.name" => request.data_retention_settings.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_data_retention_settings.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_data_retention_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_data_retention_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_enhanced_measurement_settings(request, options = nil) { |response, operation| ... } click to toggle source

Updates the singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.

@overload update_enhanced_measurement_settings(request, options = nil)

Pass arguments to `update_enhanced_measurement_settings` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_enhanced_measurement_settings(enhanced_measurement_settings: nil, update_mask: nil)

Pass arguments to `update_enhanced_measurement_settings` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param enhanced_measurement_settings [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings, ::Hash]
  Required. The settings to update.
  The `name` field is used to identify the settings to be updated.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2876
def update_enhanced_measurement_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_enhanced_measurement_settings.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "enhanced_measurement_settings.name" => request.enhanced_measurement_settings.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_enhanced_measurement_settings.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_enhanced_measurement_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_enhanced_measurement_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_google_signals_settings(request, options = nil) { |response, operation| ... } click to toggle source

Updates Google Signals settings for a property.

@overload update_google_signals_settings(request, options = nil)

Pass arguments to `update_google_signals_settings` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_google_signals_settings(google_signals_settings: nil, update_mask: nil)

Pass arguments to `update_google_signals_settings` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param google_signals_settings [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings, ::Hash]
  Required. The settings to update.
  The `name` field is used to identify the settings to be updated.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 4138
def update_google_signals_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_google_signals_settings.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "google_signals_settings.name" => request.google_signals_settings.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_google_signals_settings.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_google_signals_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_google_signals_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_ios_app_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Updates an iOS app stream on a property.

@overload update_ios_app_data_stream(request, options = nil)

Pass arguments to `update_ios_app_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateIosAppDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateIosAppDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_ios_app_data_stream(ios_app_data_stream: nil, update_mask: nil)

Pass arguments to `update_ios_app_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param ios_app_data_stream [::Google::Analytics::Admin::V1alpha::IosAppDataStream, ::Hash]
  Required. The iOS app stream to update.
  The `name` field is used to identify the iOS app stream to be updated.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::IosAppDataStream] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::IosAppDataStream]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 2347
def update_ios_app_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateIosAppDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_ios_app_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "ios_app_data_stream.name" => request.ios_app_data_stream.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_ios_app_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_ios_app_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_ios_app_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_measurement_protocol_secret(request, options = nil) { |response, operation| ... } click to toggle source

Updates a measurement protocol secret.

@overload update_measurement_protocol_secret(request, options = nil)

Pass arguments to `update_measurement_protocol_secret` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_measurement_protocol_secret(measurement_protocol_secret: nil, update_mask: nil)

Pass arguments to `update_measurement_protocol_secret` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param measurement_protocol_secret [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret, ::Hash]
  Required. The measurement protocol secret to update.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  The list of fields to be updated. Omitted fields will not be updated.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 3901
def update_measurement_protocol_secret request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_measurement_protocol_secret.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "measurement_protocol_secret.name" => request.measurement_protocol_secret.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_measurement_protocol_secret.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_measurement_protocol_secret.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_measurement_protocol_secret, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_property(request, options = nil) { |response, operation| ... } click to toggle source

Updates a property.

@overload update_property(request, options = nil)

Pass arguments to `update_property` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_property(property: nil, update_mask: nil)

Pass arguments to `update_property` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param property [::Google::Analytics::Admin::V1alpha::Property, ::Hash]
  Required. The property to update.
  The property's `name` field is used to identify the property to be
  updated.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::Property] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::Property]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 1016
def update_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_property.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "property.name" => request.property.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_property.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end
update_web_data_stream(request, options = nil) { |response, operation| ... } click to toggle source

Updates a web stream on a property.

@overload update_web_data_stream(request, options = nil)

Pass arguments to `update_web_data_stream` via a request object, either of type
{::Google::Analytics::Admin::V1alpha::UpdateWebDataStreamRequest} or an equivalent Hash.

@param request [::Google::Analytics::Admin::V1alpha::UpdateWebDataStreamRequest, ::Hash]
  A request object representing the call parameters. Required. To specify no
  parameters, or to keep all the default parameter values, pass an empty Hash.
@param options [::Gapic::CallOptions, ::Hash]
  Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

@overload update_web_data_stream(web_data_stream: nil, update_mask: nil)

Pass arguments to `update_web_data_stream` via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).

@param web_data_stream [::Google::Analytics::Admin::V1alpha::WebDataStream, ::Hash]
  Required. The web stream to update.
  The `name` field is used to identify the web stream to be updated.
@param update_mask [::Google::Protobuf::FieldMask, ::Hash]
  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.

@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Analytics::Admin::V1alpha::WebDataStream] @yieldparam operation [::GRPC::ActiveCall::Operation]

@return [::Google::Analytics::Admin::V1alpha::WebDataStream]

@raise [::Google::Cloud::Error] if the RPC is aborted.

# File lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb, line 1980
def update_web_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateWebDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
  metadata = @config.rpcs.update_web_data_stream.metadata.to_h

  # Set x-goog-api-client and x-goog-user-project headers
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {
    "web_data_stream.name" => request.web_data_stream.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  metadata[:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_web_data_stream.timeout,
                         metadata:     metadata,
                         retry_policy: @config.rpcs.update_web_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.metadata,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_web_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end