Class: Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb

Overview

Client for the AnalyticsAdminService service.

Service Interface for the Analytics Admin API (GA4).

Defined Under Namespace

Classes: Configuration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#account_path, #attribution_settings_path, #audience_path, #conversion_event_path, #custom_dimension_path, #custom_metric_path, #data_retention_settings_path, #data_sharing_settings_path, #data_stream_path, #display_video360_advertiser_link_path, #display_video360_advertiser_link_proposal_path, #firebase_link_path, #global_site_tag_path, #google_ads_link_path, #google_signals_settings_path, #measurement_protocol_secret_path, #property_path, #user_link_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new AnalyticsAdminService client object.

Examples:


# 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

Yields:

  • (config)

    Configure the AnalyticsAdminService client.

Yield Parameters:



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 114

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

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the AnalyticsAdminService Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 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
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#acknowledge_user_data_collection(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse #acknowledge_user_data_collection(property: nil, acknowledgement: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionRequest.new

# Call the acknowledge_user_data_collection method.
result = client.acknowledge_user_data_collection request

# The returned object is of type Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse.
p result

Overloads:

  • #acknowledge_user_data_collection(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse

    Pass arguments to acknowledge_user_data_collection via a request object, either of type Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #acknowledge_user_data_collection(property: nil, acknowledgement: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse

    Pass arguments to acknowledge_user_data_collection 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).

    Parameters:

    • property (::String) (defaults to: nil)

      Required. The property for which to acknowledge user data collection.

    • acknowledgement (::String) (defaults to: nil)

      Required. An acknowledgement that the caller of this method understands the terms of user data collection.

      This field must contain the exact value: "I acknowledge that I have the necessary privacy disclosures and rights from my end users for the collection and processing of their data, including the association of such data with the visitation information Google Analytics collects from my site and/or app property."

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3431

def acknowledge_user_data_collection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.acknowledge_user_data_collection..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.property
    header_params["property"] = request.property
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :acknowledge_user_data_collection, 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

Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal will be deleted and a new DisplayVideo360AdvertiserLink will be created.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalRequest.new

# Call the approve_display_video360_advertiser_link_proposal method.
result = client.approve_display_video360_advertiser_link_proposal request

# The returned object is of type Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalResponse.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4998

def approve_display_video360_advertiser_link_proposal request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.approve_display_video360_advertiser_link_proposal..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :approve_display_video360_advertiser_link_proposal, 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_audience(request, options = nil) ⇒ ::Google::Protobuf::Empty #archive_audience(name: nil) ⇒ ::Google::Protobuf::Empty

Archives an Audience on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ArchiveAudienceRequest.new

# Call the archive_audience method.
result = client.archive_audience request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #archive_audience(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to archive_audience via a request object, either of type Google::Analytics::Admin::V1alpha::ArchiveAudienceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ArchiveAudienceRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #archive_audience(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to archive_audience 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: properties/1234/audiences/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7068

def archive_audience request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.archive_audience..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :archive_audience, 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_dimension(request, options = nil) ⇒ ::Google::Protobuf::Empty #archive_custom_dimension(name: nil) ⇒ ::Google::Protobuf::Empty

Archives a CustomDimension on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest.new

# Call the archive_custom_dimension method.
result = client.archive_custom_dimension request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #archive_custom_dimension(request, options = nil) ⇒ ::Google::Protobuf::Empty

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

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #archive_custom_dimension(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5452

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
   = @config.rpcs.archive_custom_dimension..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Protobuf::Empty #archive_custom_metric(name: nil) ⇒ ::Google::Protobuf::Empty

Archives a CustomMetric on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest.new

# Call the archive_custom_metric method.
result = client.archive_custom_metric request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #archive_custom_metric(request, options = nil) ⇒ ::Google::Protobuf::Empty

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

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #archive_custom_metric(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5902

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
   = @config.rpcs.archive_custom_metric..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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

Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles.

If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::AuditUserLinksRequest.new

# Call the audit_user_links method.
result = client.audit_user_links request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AuditUserLink.
  p response
end

Overloads:

  • #audit_user_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AuditUserLink>

    Pass arguments to audit_user_links via a request object, either of type Google::Analytics::Admin::V1alpha::AuditUserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::AuditUserLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #audit_user_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AuditUserLink>

    Pass arguments to audit_user_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: accounts/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 1000 user links will be returned. The maximum value is 5000; values above 5000 will be coerced to 5000.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous AuditUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to AuditUserLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1516

def audit_user_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.audit_user_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :audit_user_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :audit_user_links, 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

Creates information about multiple users' links to an account or property.

This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::BatchCreateUserLinksRequest.new

# Call the batch_create_user_links method.
result = client.batch_create_user_links request

# The returned object is of type Google::Analytics::Admin::V1alpha::BatchCreateUserLinksResponse.
p result

Overloads:

  • #batch_create_user_links(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksResponse

    Pass arguments to batch_create_user_links via a request object, either of type BatchCreateUserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #batch_create_user_links(parent: nil, notify_new_users: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksResponse

    Pass arguments to batch_create_user_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The account or property that all user links in the request are for. This field is required. The parent field in the CreateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234

    • notify_new_users (::Boolean) (defaults to: nil)

      Optional. If set, then email the new users notifying them that they've been granted permissions to the resource. Regardless of whether this is set or not, notify_new_user field inside each individual request is ignored.

    • requests (::Array<::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest, ::Hash>) (defaults to: nil)

      Required. The requests specifying the user links to create. A maximum of 1000 user links can be created in a batch.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1709

def batch_create_user_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.batch_create_user_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :batch_create_user_links, 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

Deletes information about multiple users' links to an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::BatchDeleteUserLinksRequest.new

# Call the batch_delete_user_links method.
result = client.batch_delete_user_links request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #batch_delete_user_links(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to batch_delete_user_links via a request object, either of type BatchDeleteUserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchDeleteUserLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #batch_delete_user_links(parent: nil, requests: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to batch_delete_user_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The account or property that all user links in the request are for. The parent of all values for user link names to delete must match this field. Example format: accounts/1234

    • requests (::Array<::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest, ::Hash>) (defaults to: nil)

      Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2061

def batch_delete_user_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.batch_delete_user_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :batch_delete_user_links, 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

Gets information about multiple users' links to an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::BatchGetUserLinksRequest.new

# Call the batch_get_user_links method.
result = client.batch_get_user_links request

# The returned object is of type Google::Analytics::Admin::V1alpha::BatchGetUserLinksResponse.
p result

Overloads:

  • #batch_get_user_links(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchGetUserLinksResponse

    Pass arguments to batch_get_user_links via a request object, either of type BatchGetUserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchGetUserLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #batch_get_user_links(parent: nil, names: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchGetUserLinksResponse

    Pass arguments to batch_get_user_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The account or property that all user links in the request are for. The parent of all provided values for the 'names' field must match this field. Example format: accounts/1234

    • names (::Array<::String>) (defaults to: nil)

      Required. The names of the user links to retrieve. A maximum of 1000 user links can be retrieved in a batch. Format: accounts/{accountId}/userLinks/{userLinkId}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1305

def batch_get_user_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.batch_get_user_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :batch_get_user_links, 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

Updates information about multiple users' links to an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksRequest.new

# Call the batch_update_user_links method.
result = client.batch_update_user_links request

# The returned object is of type Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksResponse.
p result

Overloads:

  • #batch_update_user_links(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksResponse

    Pass arguments to batch_update_user_links via a request object, either of type BatchUpdateUserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #batch_update_user_links(parent: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksResponse

    Pass arguments to batch_update_user_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The account or property that all user links in the request are for. The parent field in the UpdateUserLinkRequest messages must either be empty or match this field. Example format: accounts/1234

    • requests (::Array<::Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest, ::Hash>) (defaults to: nil)

      Required. The requests specifying the user links to update. A maximum of 1000 user links can be updated in a batch.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1885

def batch_update_user_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.batch_update_user_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :batch_update_user_links, 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

Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either:

  • Declining a proposal initiated from Display & Video 360
  • Withdrawing a proposal initiated from Google Analytics After being cancelled, a proposal will eventually be deleted automatically.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CancelDisplayVideo360AdvertiserLinkProposalRequest.new

# Call the cancel_display_video360_advertiser_link_proposal method.
result = client.cancel_display_video360_advertiser_link_proposal request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5088

def cancel_display_video360_advertiser_link_proposal request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.cancel_display_video360_advertiser_link_proposal..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :cancel_display_video360_advertiser_link_proposal, 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| ... } ⇒ Client::Configuration

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 configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



93
94
95
96
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 93

def configure
  yield @config if block_given?
  @config
end

#create_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience #create_audience(parent: nil, audience: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

Creates an Audience.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateAudienceRequest.new

# Call the create_audience method.
result = client.create_audience request

# The returned object is of type Google::Analytics::Admin::V1alpha::Audience.
p result

Overloads:

  • #create_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to create_audience via a request object, either of type CreateAudienceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateAudienceRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_audience(parent: nil, audience: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to create_audience 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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6893

def create_audience request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.create_audience..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :create_audience, 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_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent #create_conversion_event(conversion_event: nil, parent: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

Creates a conversion event with the specified attributes.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateConversionEventRequest.new

# Call the create_conversion_event method.
result = client.create_conversion_event request

# The returned object is of type Google::Analytics::Admin::V1alpha::ConversionEvent.
p result

Overloads:

  • #create_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    Pass arguments to create_conversion_event via a request object, either of type CreateConversionEventRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_conversion_event(conversion_event: nil, parent: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    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).

    Parameters:

    • conversion_event (::Google::Analytics::Admin::V1alpha::ConversionEvent, ::Hash) (defaults to: nil)

      Required. The conversion event to create.

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent property where this conversion event will be created. Format: properties/123

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3813

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
   = @config.rpcs.create_conversion_event..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension #create_custom_dimension(parent: nil, custom_dimension: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

Creates a CustomDimension.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest.new

# Call the create_custom_dimension method.
result = client.create_custom_dimension request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5175

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
   = @config.rpcs.create_custom_dimension..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric #create_custom_metric(parent: nil, custom_metric: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

Creates a CustomMetric.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest.new

# Call the create_custom_metric method.
result = client.create_custom_metric request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric.
p result

Overloads:

  • #create_custom_metric(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    Pass arguments to create_custom_metric via a request object, either of type CreateCustomMetricRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_custom_metric(parent: nil, custom_metric: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5625

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
   = @config.rpcs.create_custom_metric..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream #create_data_stream(parent: nil, data_stream: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

Creates a DataStream.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateDataStreamRequest.new

# Call the create_data_stream method.
result = client.create_data_stream request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataStream.
p result

Overloads:

  • #create_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to create_data_stream via a request object, either of type CreateDataStreamRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateDataStreamRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_data_stream(parent: nil, data_stream: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to create_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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6253

def create_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.create_data_stream..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :create_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

Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper authorization both on the Google Analytics property and on the Display & Video 360 advertiser. Users who do not have access to the Display & Video 360 advertiser should instead seek to create a DisplayVideo360LinkProposal.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkRequest.new

# Call the create_display_video360_advertiser_link method.
result = client.create_display_video360_advertiser_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4371

def create_display_video360_advertiser_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.create_display_video360_advertiser_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :create_display_video360_advertiser_link, 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

Creates a DisplayVideo360AdvertiserLinkProposal.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkProposalRequest.new

# Call the create_display_video360_advertiser_link_proposal method.
result = client.create_display_video360_advertiser_link_proposal request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4823

def create_display_video360_advertiser_link_proposal request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.create_display_video360_advertiser_link_proposal..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :create_display_video360_advertiser_link_proposal, 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

Creates a FirebaseLink.

Properties can have at most one FirebaseLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateFirebaseLinkRequest.new

# Call the create_firebase_link method.
result = client.create_firebase_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::FirebaseLink.
p result

Overloads:

  • #create_firebase_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::FirebaseLink

    Pass arguments to create_firebase_link via a request object, either of type CreateFirebaseLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateFirebaseLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_firebase_link(parent: nil, firebase_link: nil) ⇒ ::Google::Analytics::Admin::V1alpha::FirebaseLink

    Pass arguments to create_firebase_link 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Format: properties/{property_id} Example: properties/1234

    • firebase_link (::Google::Analytics::Admin::V1alpha::FirebaseLink, ::Hash) (defaults to: nil)

      Required. The Firebase link to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2151

def create_firebase_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.create_firebase_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :create_firebase_link, 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

Creates a GoogleAdsLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateGoogleAdsLinkRequest.new

# Call the create_google_ads_link method.
result = client.create_google_ads_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::GoogleAdsLink.
p result

Overloads:

  • #create_google_ads_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleAdsLink

    Pass arguments to create_google_ads_link via a request object, either of type CreateGoogleAdsLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateGoogleAdsLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_google_ads_link(parent: nil, google_ads_link: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleAdsLink

    Pass arguments to create_google_ads_link 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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2517

def create_google_ads_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.create_google_ads_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :create_google_ads_link, 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) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret #create_measurement_protocol_secret(parent: nil, measurement_protocol_secret: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

Creates a measurement protocol secret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest.new

# Call the create_measurement_protocol_secret method.
result = client.create_measurement_protocol_secret request

# The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3160

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
   = @config.rpcs.create_measurement_protocol_secret..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::Property #create_property(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

Creates an "GA4" property with the specified location and attributes.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreatePropertyRequest.new

# Call the create_property method.
result = client.create_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::Property.
p result

Overloads:

  • #create_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to create_property via a request object, either of type CreatePropertyRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_property(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 948

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
   = @config.rpcs.create_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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

Creates a user link on an account or property.

If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateUserLinkRequest.new

# Call the create_user_link method.
result = client.create_user_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::UserLink.
p result

Overloads:

  • #create_user_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to create_user_link via a request object, either of type CreateUserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_user_link(parent: nil, notify_new_user: nil, user_link: nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to create_user_link 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: accounts/1234

    • notify_new_user (::Boolean) (defaults to: nil)

      Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.

    • user_link (::Google::Analytics::Admin::V1alpha::UserLink, ::Hash) (defaults to: nil)

      Required. The user link to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1611

def create_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.create_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :create_user_link, 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) ⇒ ::Google::Protobuf::Empty #delete_account(name: nil) ⇒ ::Google::Protobuf::Empty

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. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteAccountRequest.new

# Call the delete_account method.
result = client. request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_account(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_account via a request object, either of type DeleteAccountRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_account(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 395

def  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
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_conversion_event(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_conversion_event(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a conversion event in a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest.new

# Call the delete_conversion_event method.
result = client.delete_conversion_event request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_conversion_event(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_conversion_event via a request object, either of type DeleteConversionEventRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_conversion_event(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3987

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
   = @config.rpcs.delete_conversion_event..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_data_stream(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_data_stream(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a DataStream on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest.new

# Call the delete_data_stream method.
result = client.delete_data_stream request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_data_stream(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_data_stream via a request object, either of type DeleteDataStreamRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_data_stream(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6339

def delete_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.delete_data_stream..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :delete_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

Deletes a DisplayVideo360AdvertiserLink on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest.new

# Call the delete_display_video360_advertiser_link method.
result = client.delete_display_video360_advertiser_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_display_video360_advertiser_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link via a request object, either of type DeleteDisplayVideo360AdvertiserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_display_video360_advertiser_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: properties/1234/displayVideo360AdvertiserLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4457

def delete_display_video360_advertiser_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.delete_display_video360_advertiser_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :delete_display_video360_advertiser_link, 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

Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on cancelled proposals.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkProposalRequest.new

# Call the delete_display_video360_advertiser_link_proposal method.
result = client.delete_display_video360_advertiser_link_proposal request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_display_video360_advertiser_link_proposal(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link_proposal via a request object, either of type DeleteDisplayVideo360AdvertiserLinkProposalRequest or an equivalent Hash.

    Parameters:

  • #delete_display_video360_advertiser_link_proposal(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link_proposal 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4910

def delete_display_video360_advertiser_link_proposal request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.delete_display_video360_advertiser_link_proposal..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :delete_display_video360_advertiser_link_proposal, 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

Deletes a FirebaseLink on a property

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest.new

# Call the delete_firebase_link method.
result = client.delete_firebase_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_firebase_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_firebase_link via a request object, either of type DeleteFirebaseLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_firebase_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_firebase_link 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2237

def delete_firebase_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.delete_firebase_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :delete_firebase_link, 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

Deletes a GoogleAdsLink on a property

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest.new

# Call the delete_google_ads_link method.
result = client.delete_google_ads_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_google_ads_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_google_ads_link via a request object, either of type DeleteGoogleAdsLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_google_ads_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_google_ads_link 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: properties/1234/googleAdsLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2691

def delete_google_ads_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.delete_google_ads_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :delete_google_ads_link, 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) ⇒ ::Google::Protobuf::Empty #delete_measurement_protocol_secret(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes target MeasurementProtocolSecret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest.new

# Call the delete_measurement_protocol_secret method.
result = client.delete_measurement_protocol_secret request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_measurement_protocol_secret via a request object, either of type DeleteMeasurementProtocolSecretRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_measurement_protocol_secret(name: nil) ⇒ ::Google::Protobuf::Empty

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3247

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
   = @config.rpcs.delete_measurement_protocol_secret..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::Property #delete_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

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. https://support.google.com/analytics/answer/6154772

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeletePropertyRequest.new

# Call the delete_property method.
result = client.delete_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::Property.
p result

Overloads:

  • #delete_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to delete_property via a request object, either of type DeletePropertyRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1037

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
   = @config.rpcs.delete_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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

Deletes a user link on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest.new

# Call the delete_user_link method.
result = client.delete_user_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_user_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_user_link via a request object, either of type DeleteUserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_user_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_user_link 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: accounts/1234/userLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1970

def delete_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.delete_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :delete_user_link, 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) ⇒ ::Google::Analytics::Admin::V1alpha::Account #get_account(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

Lookup for a single Account.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAccountRequest.new

# Call the get_account method.
result = client. request

# The returned object is of type Google::Analytics::Admin::V1alpha::Account.
p result

Overloads:

  • #get_account(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    Pass arguments to get_account via a request object, either of type GetAccountRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_account(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 198

def  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
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings #get_attribution_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

Lookup for a AttributionSettings singleton.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAttributionSettingsRequest.new

# Call the get_attribution_settings method.
result = client.get_attribution_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::AttributionSettings.
p result

Overloads:

  • #get_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to get_attribution_settings via a request object, either of type GetAttributionSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAttributionSettingsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_attribution_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to get_attribution_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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the attribution settings to retrieve. Format: properties/{property}/attributionSettings

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7154

def get_attribution_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.get_attribution_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :get_attribution_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_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience #get_audience(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

Lookup for a single Audience. Audiences created before 2020 may not be supported.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAudienceRequest.new

# Call the get_audience method.
result = client.get_audience request

# The returned object is of type Google::Analytics::Admin::V1alpha::Audience.
p result

Overloads:

  • #get_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to get_audience via a request object, either of type GetAudienceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAudienceRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_audience(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to get_audience 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Audience to get. Example format: properties/1234/audiences/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6703

def get_audience request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.get_audience..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :get_audience, 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) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent #get_conversion_event(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

Retrieve a single conversion event.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetConversionEventRequest.new

# Call the get_conversion_event method.
result = client.get_conversion_event request

# The returned object is of type Google::Analytics::Admin::V1alpha::ConversionEvent.
p result

Overloads:

  • #get_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    Pass arguments to get_conversion_event via a request object, either of type GetConversionEventRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_conversion_event(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3900

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
   = @config.rpcs.get_conversion_event..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension #get_custom_dimension(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

Lookup for a single CustomDimension.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest.new

# Call the get_custom_dimension method.
result = client.get_custom_dimension request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension.
p result

Overloads:

  • #get_custom_dimension(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

    Pass arguments to get_custom_dimension via a request object, either of type GetCustomDimensionRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_custom_dimension(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5538

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
   = @config.rpcs.get_custom_dimension..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric #get_custom_metric(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

Lookup for a single CustomMetric.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetCustomMetricRequest.new

# Call the get_custom_metric method.
result = client.get_custom_metric request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric.
p result

Overloads:

  • #get_custom_metric(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    Pass arguments to get_custom_metric via a request object, either of type GetCustomMetricRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_custom_metric(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5988

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
   = @config.rpcs.get_custom_metric..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings #get_data_retention_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

Returns the singleton data retention settings for this property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest.new

# Call the get_data_retention_settings method.
result = client.get_data_retention_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataRetentionSettings.
p result

Overloads:

  • #get_data_retention_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    Pass arguments to get_data_retention_settings via a request object, either of type GetDataRetentionSettingsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_data_retention_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: "properties/1000/dataRetentionSettings"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6076

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
   = @config.rpcs.get_data_retention_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings #get_data_sharing_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest.new

# Call the get_data_sharing_settings method.
result = client.get_data_sharing_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataSharingSettings.
p result

Overloads:

  • #get_data_sharing_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings

    Pass arguments to get_data_sharing_settings via a request object, either of type GetDataSharingSettingsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_data_sharing_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2881

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
   = @config.rpcs.get_data_sharing_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream #get_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

Lookup for a single DataStream.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDataStreamRequest.new

# Call the get_data_stream method.
result = client.get_data_stream request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataStream.
p result

Overloads:

  • #get_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to get_data_stream via a request object, either of type GetDataStreamRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetDataStreamRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to get_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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6616

def get_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.get_data_stream..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :get_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

Look up a single DisplayVideo360AdvertiserLink

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest.new

# Call the get_display_video360_advertiser_link method.
result = client.get_display_video360_advertiser_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
p result

Overloads:

  • #get_display_video360_advertiser_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink

    Pass arguments to get_display_video360_advertiser_link via a request object, either of type GetDisplayVideo360AdvertiserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_display_video360_advertiser_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink

    Pass arguments to get_display_video360_advertiser_link 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: properties/1234/displayVideo360AdvertiserLink/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4177

def get_display_video360_advertiser_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.get_display_video360_advertiser_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :get_display_video360_advertiser_link, 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

Lookup for a single DisplayVideo360AdvertiserLinkProposal.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkProposalRequest.new

# Call the get_display_video360_advertiser_link_proposal method.
result = client.get_display_video360_advertiser_link_proposal request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4632

def get_display_video360_advertiser_link_proposal request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.get_display_video360_advertiser_link_proposal..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :get_display_video360_advertiser_link_proposal, 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) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag #get_global_site_tag(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest.new

# Call the get_global_site_tag method.
result = client.get_global_site_tag request

# The returned object is of type Google::Analytics::Admin::V1alpha::GlobalSiteTag.
p result

Overloads:

  • #get_global_site_tag(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag

    Pass arguments to get_global_site_tag via a request object, either of type GetGlobalSiteTagRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_global_site_tag(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      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}/dataStreams/{stream_id}/globalSiteTag Example: "properties/123/dataStreams/456/globalSiteTag"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2430

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
   = @config.rpcs.get_global_site_tag..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings #get_google_signals_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

Lookup for Google Signals settings for a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest.new

# Call the get_google_signals_settings method.
result = client.get_google_signals_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::GoogleSignalsSettings.
p result

Overloads:

  • #get_google_signals_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    Pass arguments to get_google_signals_settings via a request object, either of type GetGoogleSignalsSettingsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_google_signals_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the google signals settings to retrieve. Format: properties/{property}/googleSignalsSettings

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3635

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
   = @config.rpcs.get_google_signals_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret #get_measurement_protocol_secret(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

Lookup for a single "GA4" MeasurementProtocolSecret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest.new

# Call the get_measurement_protocol_secret method.
result = client.get_measurement_protocol_secret request

# The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
p result

Overloads:

  • #get_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

    Pass arguments to get_measurement_protocol_secret via a request object, either of type GetMeasurementProtocolSecretRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_measurement_protocol_secret(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2968

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
   = @config.rpcs.get_measurement_protocol_secret..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::Property #get_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

Lookup for a single "GA4" Property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetPropertyRequest.new

# Call the get_property method.
result = client.get_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::Property.
p result

Overloads:

  • #get_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to get_property via a request object, either of type GetPropertyRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the property to lookup. Format: properties/{property_id} Example: "properties/1000"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 744

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
   = @config.rpcs.get_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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

Gets information about a user's link to an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetUserLinkRequest.new

# Call the get_user_link method.
result = client.get_user_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::UserLink.
p result

Overloads:

  • #get_user_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to get_user_link via a request object, either of type GetUserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetUserLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_user_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to get_user_link 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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: accounts/1234/userLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1213

def get_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.get_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :get_user_link, 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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary> #list_account_summaries(page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>

Returns summaries of all accounts accessible by the caller.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest.new

# Call the list_account_summaries method.
result = client. request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AccountSummary.
  p response
end

Overloads:

  • #list_account_summaries(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>

    Pass arguments to list_account_summaries via a request object, either of type ListAccountSummariesRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_account_summaries(page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>

    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).

    Parameters:

    • page_size (::Integer) (defaults to: nil)

      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)

    • page_token (::String) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 664

def  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
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account> #list_accounts(page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>

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.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAccountsRequest.new

# Call the list_accounts method.
result = client.list_accounts request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Account.
  p response
end

Overloads:

  • #list_accounts(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>

    Pass arguments to list_accounts via a request object, either of type ListAccountsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_accounts(page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>

    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).

    Parameters:

    • page_size (::Integer) (defaults to: nil)

      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)

    • page_token (::String) (defaults to: nil)

      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.

    • show_deleted (::Boolean) (defaults to: nil)

      Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 305

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
   = @config.rpcs.list_accounts..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_audiences(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience> #list_audiences(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience>

Lists Audiences on a property. Audiences created before 2020 may not be supported.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAudiencesRequest.new

# Call the list_audiences method.
result = client.list_audiences request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Audience.
  p response
end

Overloads:

  • #list_audiences(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience>

    Pass arguments to list_audiences via a request object, either of type ListAudiencesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAudiencesRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_audiences(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience>

    Pass arguments to list_audiences 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListAudiences call. Provide this to retrieve the subsequent page.

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6805

def list_audiences request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.list_audiences..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :list_audiences, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_audiences, 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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent> #list_conversion_events(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>

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

Returns an empty list if no conversion events are found.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListConversionEventsRequest.new

# Call the list_conversion_events method.
result = client.list_conversion_events request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ConversionEvent.
  p response
end

Overloads:

  • #list_conversion_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>

    Pass arguments to list_conversion_events via a request object, either of type ListConversionEventsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_conversion_events(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent property. Example: 'properties/123'

    • page_size (::Integer) (defaults to: nil)

      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)

    • page_token (::String) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4090

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
   = @config.rpcs.list_conversion_events..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension> #list_custom_dimensions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>

Lists CustomDimensions on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest.new

# Call the list_custom_dimensions method.
result = client.list_custom_dimensions request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomDimension.
  p response
end

Overloads:

  • #list_custom_dimensions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>

    Pass arguments to list_custom_dimensions via a request object, either of type ListCustomDimensionsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_custom_dimensions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5365

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
   = @config.rpcs.list_custom_dimensions..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric> #list_custom_metrics(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>

Lists CustomMetrics on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest.new

# Call the list_custom_metrics method.
result = client.list_custom_metrics request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomMetric.
  p response
end

Overloads:

  • #list_custom_metrics(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>

    Pass arguments to list_custom_metrics via a request object, either of type ListCustomMetricsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_custom_metrics(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5815

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
   = @config.rpcs.list_custom_metrics..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_data_streams(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream> #list_data_streams(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>

Lists DataStreams on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListDataStreamsRequest.new

# Call the list_data_streams method.
result = client.list_data_streams request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DataStream.
  p response
end

Overloads:

  • #list_data_streams(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>

    Pass arguments to list_data_streams via a request object, either of type ListDataStreamsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListDataStreamsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_data_streams(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>

    Pass arguments to list_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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListDataStreams call. Provide this to retrieve the subsequent page.

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6529

def list_data_streams request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.list_data_streams..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :list_data_streams, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_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

Lists DisplayVideo360AdvertiserLinkProposals on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinkProposalsRequest.new

# Call the list_display_video360_advertiser_link_proposals method.
result = client.list_display_video360_advertiser_link_proposals request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal.
  p response
end

Overloads:

  • #list_display_video360_advertiser_link_proposals(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal>

    Pass arguments to list_display_video360_advertiser_link_proposals via a request object, either of type ListDisplayVideo360AdvertiserLinkProposalsRequest or an equivalent Hash.

    Parameters:

  • #list_display_video360_advertiser_link_proposals(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal>

    Pass arguments to list_display_video360_advertiser_link_proposals 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListDisplayVideo360AdvertiserLinkProposals call. Provide this to retrieve the subsequent page.

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4735

def list_display_video360_advertiser_link_proposals request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.list_display_video360_advertiser_link_proposals..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :list_display_video360_advertiser_link_proposals, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_display_video360_advertiser_link_proposals, 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

Lists all DisplayVideo360AdvertiserLinks on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest.new

# Call the list_display_video360_advertiser_links method.
result = client.list_display_video360_advertiser_links request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
  p response
end

Overloads:

  • #list_display_video360_advertiser_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink>

    Pass arguments to list_display_video360_advertiser_links via a request object, either of type ListDisplayVideo360AdvertiserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_display_video360_advertiser_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink>

    Pass arguments to list_display_video360_advertiser_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListDisplayVideo360AdvertiserLinks call. Provide this to retrieve the subsequent page.

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4279

def list_display_video360_advertiser_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.list_display_video360_advertiser_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :list_display_video360_advertiser_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_display_video360_advertiser_links, 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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest.new

# Call the list_firebase_links method.
result = client.list_firebase_links request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::FirebaseLink.
  p response
end

Overloads:

  • #list_firebase_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::FirebaseLink>

    Pass arguments to list_firebase_links via a request object, either of type ListFirebaseLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_firebase_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::FirebaseLink>

    Pass arguments to list_firebase_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Format: properties/{property_id} Example: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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)

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListFirebaseLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2340

def list_firebase_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.list_firebase_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :list_firebase_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_firebase_links, 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

Lists GoogleAdsLinks on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest.new

# Call the list_google_ads_links method.
result = client.list_google_ads_links request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::GoogleAdsLink.
  p response
end

Overloads:

  • #list_google_ads_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::GoogleAdsLink>

    Pass arguments to list_google_ads_links via a request object, either of type ListGoogleAdsLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_google_ads_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::GoogleAdsLink>

    Pass arguments to list_google_ads_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListGoogleAdsLinks call. Provide this to retrieve the subsequent page.

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2792

def list_google_ads_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.list_google_ads_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :list_google_ads_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_google_ads_links, 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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret> #list_measurement_protocol_secrets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>

Returns child MeasurementProtocolSecrets under the specified parent Property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest.new

# Call the list_measurement_protocol_secrets method.
result = client.list_measurement_protocol_secrets request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
  p response
end

Overloads:

  • #list_measurement_protocol_secrets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>

    Pass arguments to list_measurement_protocol_secrets via a request object, either of type ListMeasurementProtocolSecretsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_measurement_protocol_secrets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>

    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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets

    • page_size (::Integer) (defaults to: nil)

      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.

    • page_token (::String) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3071

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
   = @config.rpcs.list_measurement_protocol_secrets..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property> #list_properties(filter: nil, page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>

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.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListPropertiesRequest.new

# Call the list_properties method.
result = client.list_properties request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Property.
  p response
end

Overloads:

  • #list_properties(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>

    Pass arguments to list_properties via a request object, either of type ListPropertiesRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_properties(filter: nil, page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>

    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).

    Parameters:

    • filter (::String) (defaults to: nil)

      Required. An expression for filtering the results of the request. Fields eligible for filtering are: parent:(The resource name of the parent account/property) or ancestor:(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.       |
      | parent:properties/123       | The property with property id: 123.       |
      | ancestor: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.    |
      
    • page_size (::Integer) (defaults to: nil)

      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)

    • page_token (::String) (defaults to: nil)

      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.

    • show_deleted (::Boolean) (defaults to: nil)

      Whether to include soft-deleted (ie: "trashed") Properties in the results. Properties can be inspected to determine whether they are deleted or not.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 869

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
   = @config.rpcs.list_properties..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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

Lists all user links on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListUserLinksRequest.new

# Call the list_user_links method.
result = client.list_user_links request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::UserLink.
  p response
end

Overloads:

  • #list_user_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::UserLink>

    Pass arguments to list_user_links via a request object, either of type ListUserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListUserLinksRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_user_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::UserLink>

    Pass arguments to list_user_links 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).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: accounts/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListUserLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1406

def list_user_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.list_user_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :list_user_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_user_links, 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) ⇒ ::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse #provision_account_ticket(account: nil, redirect_uri: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse

Requests a ticket for creating an account.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest.new

# Call the provision_account_ticket method.
result = client. request

# The returned object is of type Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 573

def  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
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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

#run_access_report(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse #run_access_report(entity: nil, dimensions: nil, metrics: nil, date_ranges: nil, dimension_filter: nil, metric_filter: nil, offset: nil, limit: nil, time_zone: nil, order_bys: nil, return_entity_quota: nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse

Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years.

Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators.

These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see searchChangeHistoryEvents.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::RunAccessReportRequest.new

# Call the run_access_report method.
result = client.run_access_report request

# The returned object is of type Google::Analytics::Admin::V1alpha::RunAccessReportResponse.
p result

Overloads:

  • #run_access_report(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse

    Pass arguments to run_access_report via a request object, either of type RunAccessReportRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::RunAccessReportRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #run_access_report(entity: nil, dimensions: nil, metrics: nil, date_ranges: nil, dimension_filter: nil, metric_filter: nil, offset: nil, limit: nil, time_zone: nil, order_bys: nil, return_entity_quota: nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse

    Pass arguments to run_access_report 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).

    Parameters:

    • entity (::String) (defaults to: nil)

      The Data Access Report is requested for this property. For example if "123" is your GA4 property ID, then entity should be "properties/123".

    • dimensions (::Array<::Google::Analytics::Admin::V1alpha::AccessDimension, ::Hash>) (defaults to: nil)

      The dimensions requested and displayed in the response. Requests are allowed up to 9 dimensions.

    • metrics (::Array<::Google::Analytics::Admin::V1alpha::AccessMetric, ::Hash>) (defaults to: nil)

      The metrics requested and displayed in the response. Requests are allowed up to 10 metrics.

    • date_ranges (::Array<::Google::Analytics::Admin::V1alpha::AccessDateRange, ::Hash>) (defaults to: nil)

      Date ranges of access records to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the access records for the overlapping days is included in the response rows for both date ranges. Requests are allowed up to 2 date ranges.

    • dimension_filter (::Google::Analytics::Admin::V1alpha::AccessFilterExpression, ::Hash) (defaults to: nil)

      Dimension filters allow you to restrict report response to specific dimension values which match the filter. For example, filtering on access records of a single user. To learn more, see Fundamentals of Dimension Filters for examples. Metrics cannot be used in this filter.

    • metric_filter (::Google::Analytics::Admin::V1alpha::AccessFilterExpression, ::Hash) (defaults to: nil)

      Metric filters allow you to restrict report response to specific metric values which match the filter. Metric filters are applied after aggregating the report's rows, similar to SQL having-clause. Dimensions cannot be used in this filter.

    • offset (::Integer) (defaults to: nil)

      The row count of the start row. The first row is counted as row 0. If offset is unspecified, it is treated as 0. If offset is zero, then this method will return the first page of results with limit entries.

      To learn more about this pagination parameter, see Pagination.

    • limit (::Integer) (defaults to: nil)

      The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. limit must be positive.

      The API may return fewer rows than the requested limit, if there aren't as many remaining rows as the limit. For instance, there are fewer than 300 possible values for the dimension country, so when reporting on only country, you can't get more than 300 rows, even if you set limit to a higher value.

      To learn more about this pagination parameter, see Pagination.

    • time_zone (::String) (defaults to: nil)

      This request's time zone if specified. If unspecified, the property's time zone is used. The request's time zone is used to interpret the start & end dates of the report.

      Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example "America/New_York" or "Asia/Tokyo".

    • order_bys (::Array<::Google::Analytics::Admin::V1alpha::AccessOrderBy, ::Hash>) (defaults to: nil)

      Specifies how rows are ordered in the response.

    • return_entity_quota (::Boolean) (defaults to: nil)

      Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in AccessQuota.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7399

def run_access_report request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.run_access_report..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.entity
    header_params["entity"] = request.entity
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :run_access_report, 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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent> #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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest.new

# Call the search_change_history_events method.
result = client.search_change_history_events request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent.
  p response
end

Overloads:

  • #search_change_history_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>

    Pass arguments to search_change_history_events via a request object, either of type SearchChangeHistoryEventsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #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) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>

    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).

    Parameters:

    • account (::String) (defaults to: nil)

      Required. The account resource for which to return change history resources.

    • property (::String) (defaults to: nil)

      Optional. Resource name for a child property. If set, only return changes made to this property or its child resources.

    • resource_type (::Array<::Google::Analytics::Admin::V1alpha::ChangeHistoryResourceType>) (defaults to: nil)

      Optional. If set, only return changes if they are for a resource that matches at least one of these types.

    • action (::Array<::Google::Analytics::Admin::V1alpha::ActionType>) (defaults to: nil)

      Optional. If set, only return changes that match one or more of these types of actions.

    • actor_email (::Array<::String>) (defaults to: nil)

      Optional. If set, only return changes if they are made by a user in this list.

    • earliest_change_time (::Google::Protobuf::Timestamp, ::Hash) (defaults to: nil)

      Optional. If set, only return changes made after this time (inclusive).

    • latest_change_time (::Google::Protobuf::Timestamp, ::Hash) (defaults to: nil)

      Optional. If set, only return changes made before this time (inclusive).

    • page_size (::Integer) (defaults to: nil)

      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).

    • page_token (::String) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3548

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
   = @config.rpcs.search_change_history_events..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.
    header_params["account"] = request.
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::Account #update_account(account: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

Updates an account.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateAccountRequest.new

# Call the update_account method.
result = client. request

# The returned object is of type Google::Analytics::Admin::V1alpha::Account.
p result

Overloads:

  • #update_account(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    Pass arguments to update_account via a request object, either of type UpdateAccountRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_account(account: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    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).

    Parameters:

    • account (::Google::Analytics::Admin::V1alpha::Account, ::Hash) (defaults to: nil)

      Required. The account to update. The account's name field is used to identify the account.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 485

def  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
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.&.name
    header_params["account.name"] = request..name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings #update_attribution_settings(attribution_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

Updates attribution settings on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateAttributionSettingsRequest.new

# Call the update_attribution_settings method.
result = client.update_attribution_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::AttributionSettings.
p result

Overloads:

  • #update_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to update_attribution_settings via a request object, either of type UpdateAttributionSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateAttributionSettingsRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_attribution_settings(attribution_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to update_attribution_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).

    Parameters:

    • attribution_settings (::Google::Analytics::Admin::V1alpha::AttributionSettings, ::Hash) (defaults to: nil)

      Required. The attribution settings to update. The name field is used to identify the settings to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7244

def update_attribution_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.update_attribution_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.attribution_settings&.name
    header_params["attribution_settings.name"] = request.attribution_settings.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :update_attribution_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_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience #update_audience(audience: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

Updates an Audience on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateAudienceRequest.new

# Call the update_audience method.
result = client.update_audience request

# The returned object is of type Google::Analytics::Admin::V1alpha::Audience.
p result

Overloads:

  • #update_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to update_audience via a request object, either of type UpdateAudienceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateAudienceRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_audience(audience: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to update_audience 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).

    Parameters:

    • audience (::Google::Analytics::Admin::V1alpha::Audience, ::Hash) (defaults to: nil)

      Required. The audience to update. The audience's name field is used to identify the audience to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6983

def update_audience request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.update_audience..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.audience&.name
    header_params["audience.name"] = request.audience.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :update_audience, 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) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension #update_custom_dimension(custom_dimension: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

Updates a CustomDimension on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest.new

# Call the update_custom_dimension method.
result = client.update_custom_dimension request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5264

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
   = @config.rpcs.update_custom_dimension..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.custom_dimension&.name
    header_params["custom_dimension.name"] = request.custom_dimension.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric #update_custom_metric(custom_metric: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

Updates a CustomMetric on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest.new

# Call the update_custom_metric method.
result = client.update_custom_metric request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric.
p result

Overloads:

  • #update_custom_metric(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    Pass arguments to update_custom_metric via a request object, either of type UpdateCustomMetricRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_custom_metric(custom_metric: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5714

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
   = @config.rpcs.update_custom_metric..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.custom_metric&.name
    header_params["custom_metric.name"] = request.custom_metric.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings #update_data_retention_settings(data_retention_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

Updates the singleton data retention settings for this property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest.new

# Call the update_data_retention_settings method.
result = client.update_data_retention_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataRetentionSettings.
p result

Overloads:

  • #update_data_retention_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    Pass arguments to update_data_retention_settings via a request object, either of type UpdateDataRetentionSettingsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_data_retention_settings(data_retention_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    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).

    Parameters:

    • data_retention_settings (::Google::Analytics::Admin::V1alpha::DataRetentionSettings, ::Hash) (defaults to: nil)

      Required. The settings to update. The name field is used to identify the settings to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6166

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
   = @config.rpcs.update_data_retention_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.data_retention_settings&.name
    header_params["data_retention_settings.name"] = request.data_retention_settings.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream #update_data_stream(data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

Updates a DataStream on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest.new

# Call the update_data_stream method.
result = client.update_data_stream request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataStream.
p result

Overloads:

  • #update_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to update_data_stream via a request object, either of type UpdateDataStreamRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_data_stream(data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to update_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).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6428

def update_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.update_data_stream..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.data_stream&.name
    header_params["data_stream.name"] = request.data_stream.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :update_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

Updates a DisplayVideo360AdvertiserLink on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateDisplayVideo360AdvertiserLinkRequest.new

# Call the update_display_video360_advertiser_link method.
result = client.update_display_video360_advertiser_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4546

def update_display_video360_advertiser_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.update_display_video360_advertiser_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.display_video_360_advertiser_link&.name
    header_params["display_video_360_advertiser_link.name"] = request.display_video_360_advertiser_link.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :update_display_video360_advertiser_link, 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

Updates a GoogleAdsLink on a property

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest.new

# Call the update_google_ads_link method.
result = client.update_google_ads_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::GoogleAdsLink.
p result

Overloads:

  • #update_google_ads_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleAdsLink

    Pass arguments to update_google_ads_link via a request object, either of type UpdateGoogleAdsLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest, ::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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_google_ads_link(google_ads_link: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleAdsLink

    Pass arguments to update_google_ads_link 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).

    Parameters:

    • google_ads_link (::Google::Analytics::Admin::V1alpha::GoogleAdsLink, ::Hash) (defaults to: nil)

      The GoogleAdsLink to update

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2606

def update_google_ads_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.update_google_ads_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.google_ads_link&.name
    header_params["google_ads_link.name"] = request.google_ads_link.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :update_google_ads_link, 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) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings #update_google_signals_settings(google_signals_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

Updates Google Signals settings for a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest.new

# Call the update_google_signals_settings method.
result = client.update_google_signals_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::GoogleSignalsSettings.
p result

Overloads:

  • #update_google_signals_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    Pass arguments to update_google_signals_settings via a request object, either of type UpdateGoogleSignalsSettingsRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_google_signals_settings(google_signals_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    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).

    Parameters:

    • google_signals_settings (::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings, ::Hash) (defaults to: nil)

      Required. The settings to update. The name field is used to identify the settings to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3725

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
   = @config.rpcs.update_google_signals_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.google_signals_settings&.name
    header_params["google_signals_settings.name"] = request.google_signals_settings.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret #update_measurement_protocol_secret(measurement_protocol_secret: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

Updates a measurement protocol secret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest.new

# Call the update_measurement_protocol_secret method.
result = client.update_measurement_protocol_secret request

# The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3334

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
   = @config.rpcs.update_measurement_protocol_secret..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.measurement_protocol_secret&.name
    header_params["measurement_protocol_secret.name"] = request.measurement_protocol_secret.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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) ⇒ ::Google::Analytics::Admin::V1alpha::Property #update_property(property: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

Updates a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdatePropertyRequest.new

# Call the update_property method.
result = client.update_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::Property.
p result

Overloads:

  • #update_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to update_property via a request object, either of type UpdatePropertyRequest or an equivalent Hash.

    Parameters:

    • 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.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_property(property: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    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).

    Parameters:

    • property (::Google::Analytics::Admin::V1alpha::Property, ::Hash) (defaults to: nil)

      Required. The property to update. The property's name field is used to identify the property to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1128

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
   = @config.rpcs.update_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.property&.name
    header_params["property.name"] = request.property.name
  end

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

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

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         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

Updates a user link on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest.new

# Call the update_user_link method.
result = client.update_user_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::UserLink.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1794

def update_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

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

  # 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
   = @config.rpcs.update_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.user_link&.name
    header_params["user_link.name"] = request.user_link.name
  end

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

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

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

  @analytics_admin_service_stub.call_rpc :update_user_link, 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