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

#access_binding_path, #account_path, #ad_sense_link_path, #attribution_settings_path, #audience_path, #big_query_link_path, #channel_group_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, #enhanced_measurement_settings_path, #event_create_rule_path, #expanded_data_set_path, #firebase_link_path, #global_site_tag_path, #google_ads_link_path, #google_signals_settings_path, #measurement_protocol_secret_path, #property_path, #search_ads360_link_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:



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 174

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 == Configuration::DEFAULT_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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 56

def self.configure
  @configure ||= begin
    namespace = ["Google", "Analytics", "Admin", "V1alpha"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

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

    default_config.rpcs..timeout = 60.0

    default_config.rpcs.list_accounts.timeout = 60.0

    default_config.rpcs..timeout = 60.0

    default_config.rpcs..timeout = 60.0

    default_config.rpcs..timeout = 60.0

    default_config.rpcs.get_property.timeout = 60.0

    default_config.rpcs.list_properties.timeout = 60.0

    default_config.rpcs.create_property.timeout = 60.0

    default_config.rpcs.delete_property.timeout = 60.0

    default_config.rpcs.update_property.timeout = 60.0

    default_config.rpcs.get_user_link.timeout = 60.0

    default_config.rpcs.batch_get_user_links.timeout = 60.0

    default_config.rpcs.list_user_links.timeout = 60.0

    default_config.rpcs.audit_user_links.timeout = 60.0

    default_config.rpcs.create_user_link.timeout = 60.0

    default_config.rpcs.batch_create_user_links.timeout = 60.0

    default_config.rpcs.update_user_link.timeout = 60.0

    default_config.rpcs.batch_update_user_links.timeout = 60.0

    default_config.rpcs.delete_user_link.timeout = 60.0

    default_config.rpcs.batch_delete_user_links.timeout = 60.0

    default_config.rpcs.create_firebase_link.timeout = 60.0

    default_config.rpcs.delete_firebase_link.timeout = 60.0

    default_config.rpcs.list_firebase_links.timeout = 60.0

    default_config.rpcs.get_global_site_tag.timeout = 60.0

    default_config.rpcs.create_google_ads_link.timeout = 60.0

    default_config.rpcs.update_google_ads_link.timeout = 60.0

    default_config.rpcs.delete_google_ads_link.timeout = 60.0

    default_config.rpcs.list_google_ads_links.timeout = 60.0

    default_config.rpcs.get_enhanced_measurement_settings.timeout = 60.0

    default_config.rpcs.update_enhanced_measurement_settings.timeout = 60.0

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



3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3480

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.



5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5134

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.



7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7200

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.



5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5586

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.



6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6034

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AuditUserLink.
  p item
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.



1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1568

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

#batch_create_access_bindings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchCreateAccessBindingsResponse #batch_create_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchCreateAccessBindingsResponse

Creates information about multiple access bindings to an account or property.

This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings 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::BatchCreateAccessBindingsRequest.new

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

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

Overloads:

  • #batch_create_access_bindings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchCreateAccessBindingsResponse

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchCreateAccessBindingsRequest, ::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_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchCreateAccessBindingsResponse

    Pass arguments to batch_create_access_bindings 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 owns the access bindings. The parent field in the CreateAccessBindingRequest messages must either be empty or match this field. Formats:

      • accounts/{account}
      • properties/{property}
    • requests (::Array<::Google::Analytics::Admin::V1alpha::CreateAccessBindingRequest, ::Hash>) (defaults to: nil)

      Required. The requests specifying the access bindings to create. A maximum of 1000 access bindings 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.



8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8534

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

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

  # 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_access_bindings..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_access_bindings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_create_access_bindings.retry_policy

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

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



1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1761

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

#batch_delete_access_bindings(request, options = nil) ⇒ ::Google::Protobuf::Empty #batch_delete_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Protobuf::Empty

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::BatchDeleteAccessBindingsRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchDeleteAccessBindingsRequest, ::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_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to batch_delete_access_bindings 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 owns the access bindings. The parent of all provided values for the 'names' field in DeleteAccessBindingRequest messages must match this field. Formats:

      • accounts/{account}
      • properties/{property}
    • requests (::Array<::Google::Analytics::Admin::V1alpha::DeleteAccessBindingRequest, ::Hash>) (defaults to: nil)

      Required. The requests specifying the access bindings to delete. A maximum of 1000 access bindings can be deleted 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.



8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8815

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

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

  # 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_access_bindings..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_access_bindings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_delete_access_bindings.retry_policy

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

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



2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2113

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

#batch_get_access_bindings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchGetAccessBindingsResponse #batch_get_access_bindings(parent: nil, names: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchGetAccessBindingsResponse

Gets information about multiple access bindings 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::BatchGetAccessBindingsRequest.new

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

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

Overloads:

  • #batch_get_access_bindings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchGetAccessBindingsResponse

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchGetAccessBindingsRequest, ::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_access_bindings(parent: nil, names: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchGetAccessBindingsResponse

    Pass arguments to batch_get_access_bindings 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 owns the access bindings. The parent of all provided values for the 'names' field must match this field. Formats:

      • accounts/{account}
      • properties/{property}
    • names (::Array<::String>) (defaults to: nil)

      Required. The names of the access bindings to retrieve. A maximum of 1000 access bindings can be retrieved in a batch. Formats:

      • accounts/{account}/accessBindings/{accessBinding}
      • properties/{property}/accessBindings/{accessBinding}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8629

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

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

  # 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_access_bindings..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_access_bindings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_get_access_bindings.retry_policy

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

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



1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1361

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

#batch_update_access_bindings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchUpdateAccessBindingsResponse #batch_update_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchUpdateAccessBindingsResponse

Updates information about multiple access bindings 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::BatchUpdateAccessBindingsRequest.new

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

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

Overloads:

  • #batch_update_access_bindings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchUpdateAccessBindingsResponse

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::BatchUpdateAccessBindingsRequest, ::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_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchUpdateAccessBindingsResponse

    Pass arguments to batch_update_access_bindings 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 owns the access bindings. The parent of all provided AccessBinding in UpdateAccessBindingRequest messages must match this field. Formats:

      • accounts/{account}
      • properties/{property}
    • requests (::Array<::Google::Analytics::Admin::V1alpha::UpdateAccessBindingRequest, ::Hash>) (defaults to: nil)

      Required. The requests specifying the access bindings to update. A maximum of 1000 access bindings 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.



8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8723

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

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

  # 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_access_bindings..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_access_bindings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.batch_update_access_bindings.retry_policy

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

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



1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1937

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.



5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5224

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:



153
154
155
156
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 153

def configure
  yield @config if block_given?
  @config
end

#create_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding #create_access_binding(parent: nil, access_binding: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

Creates an access binding 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::CreateAccessBindingRequest.new

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

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

Overloads:

  • #create_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateAccessBindingRequest, ::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_access_binding(parent: nil, access_binding: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

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



8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8076

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

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

  # 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_access_binding..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_access_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_access_binding.retry_policy

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

  @analytics_admin_service_stub.call_rpc :create_access_binding, 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 an AdSenseLink.

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::CreateAdSenseLinkRequest.new

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

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

Overloads:

  • #create_ad_sense_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AdSenseLink

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateAdSenseLinkRequest, ::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_ad_sense_link(parent: nil, adsense_link: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AdSenseLink

    Pass arguments to create_ad_sense_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. The property for which to create an AdSense Link. Format: properties/{propertyId} Example: properties/1234

    • adsense_link (::Google::Analytics::Admin::V1alpha::AdSenseLink, ::Hash) (defaults to: nil)

      Required. The AdSense 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.



10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10764

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

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

  # 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_ad_sense_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_ad_sense_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_ad_sense_link.retry_policy

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

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



7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7024

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_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup #create_channel_group(parent: nil, channel_group: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

Creates a ChannelGroup.

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::CreateChannelGroupRequest.new

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

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

Overloads:

  • #create_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateChannelGroupRequest, ::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_channel_group(parent: nil, channel_group: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

    Pass arguments to create_channel_group 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 property for which to create a ChannelGroup. Example format: properties/1234

    • channel_group (::Google::Analytics::Admin::V1alpha::ChannelGroup, ::Hash) (defaults to: nil)

      Required. The ChannelGroup 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.



9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9540

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

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

  # 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_channel_group..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_channel_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_channel_group.retry_policy

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

  @analytics_admin_service_stub.call_rpc :create_channel_group, 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_connected_site_tag(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse #create_connected_site_tag(property: nil, connected_site_tag: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse

Creates a connected site tag for a Universal Analytics property. You can create a maximum of 20 connected site tags per property. Note: This API cannot be used on GA4 properties.

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::CreateConnectedSiteTagRequest.new

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

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

Overloads:

  • #create_connected_site_tag(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagRequest, ::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_connected_site_tag(property: nil, connected_site_tag: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse

    Pass arguments to create_connected_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:

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

      The Universal Analytics property to create connected site tags for. This API does not support GA4 properties. Format: properties/{universalAnalyticsPropertyId} Example: properties/1234

    • connected_site_tag (::Google::Analytics::Admin::V1alpha::ConnectedSiteTag, ::Hash) (defaults to: nil)

      Required. The tag to add to the Universal Analytics property

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10348

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

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

  # 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_connected_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

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

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

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

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



3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3864

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.



5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5311

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.



5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5759

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.



6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6386

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.



4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4509

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.



4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4959

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

#create_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule #create_event_create_rule(parent: nil, event_create_rule: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

Creates an EventCreateRule.

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::CreateEventCreateRuleRequest.new

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

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

Overloads:

  • #create_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateEventCreateRuleRequest, ::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_event_create_rule(parent: nil, event_create_rule: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

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



11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11226

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

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

  # 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_event_create_rule..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_event_create_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_event_create_rule.retry_policy

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

  @analytics_admin_service_stub.call_rpc :create_event_create_rule, 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_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet #create_expanded_data_set(parent: nil, expanded_data_set: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

Creates a ExpandedDataSet.

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::CreateExpandedDataSetRequest.new

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

# The returned object is of type Google::Analytics::Admin::V1alpha::ExpandedDataSet.
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.



9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9088

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

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

  # 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_expanded_data_set..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_expanded_data_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_expanded_data_set.retry_policy

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

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



2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2203

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.



2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2567

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.



3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3207

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.



1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1003

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

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::CreateSearchAds360LinkRequest.new

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

# The returned object is of type Google::Analytics::Admin::V1alpha::SearchAds360Link.
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.



7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7474

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

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

  # 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_search_ads360_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_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_search_ads360_link.retry_policy

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

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



1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1663

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_access_binding(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_access_binding(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an access binding 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::DeleteAccessBindingRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteAccessBindingRequest, ::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_access_binding(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_access_binding 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. Formats:

      • accounts/{account}/accessBindings/{accessBinding}
      • properties/{property}/accessBindings/{accessBinding}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8336

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

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

  # 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_access_binding..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_access_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_access_binding.retry_policy

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

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



453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 453

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

Deletes an AdSenseLink.

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::DeleteAdSenseLinkRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteAdSenseLinkRequest, ::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_ad_sense_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_ad_sense_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. Unique identifier for the AdSense Link to be deleted. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10851

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

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

  # 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_ad_sense_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_ad_sense_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_ad_sense_link.retry_policy

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

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

Deletes a ChannelGroup 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::DeleteChannelGroupRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteChannelGroupRequest, ::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_channel_group(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_channel_group 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 ChannelGroup to delete. Example format: properties/1234/channelGroups/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9718

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

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

  # 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_channel_group..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_channel_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_channel_group.retry_policy

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

  @analytics_admin_service_stub.call_rpc :delete_channel_group, 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_connected_site_tag(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_connected_site_tag(property: nil, tag_id: nil) ⇒ ::Google::Protobuf::Empty

Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on GA4 properties.

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::DeleteConnectedSiteTagRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest, ::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_connected_site_tag(property: nil, tag_id: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_connected_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:

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

      The Universal Analytics property to delete connected site tags for. This API does not support GA4 properties. Format: properties/{universalAnalyticsPropertyId} Example: properties/1234

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

      Tag ID to forward events to. Also known as the Measurement ID, or the "G-ID" (For example: G-12345).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10432

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

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

  # 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_connected_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

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

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

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

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



4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4129

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.



6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6472

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.



4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4595

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.



5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5046

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

#delete_event_create_rule(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_event_create_rule(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an EventCreateRule.

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::DeleteEventCreateRuleRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteEventCreateRuleRequest, ::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_event_create_rule(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_event_create_rule 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/123/dataStreams/456/eventCreateRules/789

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11404

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

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

  # 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_event_create_rule..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_event_create_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_event_create_rule.retry_policy

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

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

Deletes a ExpandedDataSet 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::DeleteExpandedDataSetRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteExpandedDataSetRequest, ::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_expanded_data_set(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_expanded_data_set 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/expandedDataSets/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9265

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

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

  # 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_expanded_data_set..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_expanded_data_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_expanded_data_set.retry_policy

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

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



2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2289

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.



2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2742

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.



3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3294

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



1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1092

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 SearchAds360Link 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::DeleteSearchAds360LinkRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteSearchAds360LinkRequest, ::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_search_ads360_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_search_ads360_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 SearchAds360Link to delete. Example format: properties/1234/SearchAds360Links/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7560

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

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

  # 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_search_ads360_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_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_search_ads360_link.retry_policy

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

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



2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2022

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

#fetch_automated_ga4_configuration_opt_out(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutResponse #fetch_automated_ga4_configuration_opt_out(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutResponse

Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on 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::FetchAutomatedGa4ConfigurationOptOutRequest.new

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

# The returned object is of type Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutResponse.
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.



9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9892

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

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

  # 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.fetch_automated_ga4_configuration_opt_out..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.fetch_automated_ga4_configuration_opt_out.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.fetch_automated_ga4_configuration_opt_out.retry_policy

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

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

#fetch_connected_ga4_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse #fetch_connected_ga4_property(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse

Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be used with GA4 properties.

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::FetchConnectedGa4PropertyRequest.new

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

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

Overloads:

  • #fetch_connected_ga4_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse

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

    Parameters:

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

  • #fetch_connected_ga4_property(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse

    Pass arguments to fetch_connected_ga4_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 (::String) (defaults to: nil)

      Required. The UA property for which to look up the connected GA4 property. Note this request uses the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. Format: properties/{internal_web_property_id} Example: properties/1234

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10596

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

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

  # 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.fetch_connected_ga4_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.fetch_connected_ga4_property.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.fetch_connected_ga4_property.retry_policy

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

  @analytics_admin_service_stub.call_rpc :fetch_connected_ga4_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding #get_access_binding(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

Gets information about an access binding.

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::GetAccessBindingRequest.new

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

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

Overloads:

  • #get_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAccessBindingRequest, ::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_access_binding(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

    Pass arguments to get_access_binding 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 access binding to retrieve. Formats:

      • accounts/{account}/accessBindings/{accessBinding}
      • properties/{property}/accessBindings/{accessBinding}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8164

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

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

  # 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_access_binding..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_access_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_access_binding.retry_policy

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

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



258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 258

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

Looks up a single AdSenseLink.

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::GetAdSenseLinkRequest.new

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

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

Overloads:

  • #get_ad_sense_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AdSenseLink

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAdSenseLinkRequest, ::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_ad_sense_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AdSenseLink

    Pass arguments to get_ad_sense_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. Unique identifier for the AdSense Link requested. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10675

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

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

  # 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_ad_sense_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_ad_sense_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_ad_sense_link.retry_policy

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

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



7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7735

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. Default audiences will not show filter definitions.

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.



6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6835

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

Lookup for a single BigQuery Link.

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::GetBigQueryLinkRequest.new

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

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

Overloads:

  • #get_big_query_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BigQueryLink

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetBigQueryLinkRequest, ::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_big_query_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BigQueryLink

    Pass arguments to get_big_query_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 BigQuery link to lookup. Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: properties/123/bigQueryLinks/456

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9971

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

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

  # 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_big_query_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_big_query_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_big_query_link.retry_policy

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

  @analytics_admin_service_stub.call_rpc :get_big_query_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_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup #get_channel_group(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

Lookup for a single ChannelGroup.

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::GetChannelGroupRequest.new

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

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

Overloads:

  • #get_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetChannelGroupRequest, ::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_channel_group(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

    Pass arguments to get_channel_group 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 ChannelGroup to get. Example format: properties/1234/channelGroups/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9351

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

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

  # 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_channel_group..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_channel_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_channel_group.retry_policy

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

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



4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4042

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.



5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5672

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.



6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6120

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.



6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6208

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.



2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2930

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.



6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6747

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.



4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4317

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.



4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4770

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_enhanced_measurement_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings #get_enhanced_measurement_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

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

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::GetEnhancedMeasurementSettingsRequest.new

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

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

Overloads:

  • #get_enhanced_measurement_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

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

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

  • #get_enhanced_measurement_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

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

    Parameters:

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

      Required. The name of the settings to lookup. Format: properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10163

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

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

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

  # Customize the options with defaults
   = @config.rpcs.get_enhanced_measurement_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_enhanced_measurement_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_enhanced_measurement_settings.retry_policy

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

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

#get_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule #get_event_create_rule(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

Lookup for a single EventCreateRule.

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::GetEventCreateRuleRequest.new

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

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

Overloads:

  • #get_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetEventCreateRuleRequest, ::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_event_create_rule(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

    Pass arguments to get_event_create_rule 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 EventCreateRule to get. Example format: properties/123/dataStreams/456/eventCreateRules/789

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11039

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

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

  # 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_event_create_rule..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_event_create_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_event_create_rule.retry_policy

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

  @analytics_admin_service_stub.call_rpc :get_event_create_rule, 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_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet #get_expanded_data_set(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

Lookup for a single ExpandedDataSet.

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::GetExpandedDataSetRequest.new

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

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

Overloads:

  • #get_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetExpandedDataSetRequest, ::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_expanded_data_set(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

    Pass arguments to get_expanded_data_set 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 ExpandedDataSet to get. Example format: properties/1234/expandedDataSets/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8901

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

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

  # 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_expanded_data_set..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_expanded_data_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_expanded_data_set.retry_policy

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

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



2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2480

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.



3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3685

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.



3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3017

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.



801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 801

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

Look up a single SearchAds360Link

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::GetSearchAds360LinkRequest.new

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

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

Overloads:

  • #get_search_ads360_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SearchAds360Link

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetSearchAds360LinkRequest, ::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_search_ads360_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SearchAds360Link

    Pass arguments to get_search_ads360_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 SearchAds360Link to get. Example format: properties/1234/SearchAds360Link/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7286

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

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

  # 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_search_ads360_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_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_search_ads360_link.retry_policy

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

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

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.



1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1269

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_access_bindings(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccessBinding> #list_access_bindings(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccessBinding>

Lists all access bindings 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::ListAccessBindingsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AccessBinding.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAccessBindingsRequest, ::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_access_bindings(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccessBinding>

    Pass arguments to list_access_bindings 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. Formats:

      • accounts/{account}
      • properties/{property}
    • page_size (::Integer) (defaults to: nil)

      The maximum number of access bindings to return. The service may return fewer than this value. If unspecified, at most 200 access bindings 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 ListAccessBindings call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccessBindings 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.



8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8437

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

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

  # 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_access_bindings..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_access_bindings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_access_bindings.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_access_bindings, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_access_bindings, 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_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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AccountSummary.
  p item
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.



721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 721

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Account.
  p item
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.



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 363

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

Lists AdSenseLinks 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::ListAdSenseLinksRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AdSenseLink.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAdSenseLinksRequest, ::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_ad_sense_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AdSenseLink>

    Pass arguments to list_ad_sense_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. Resource name of the parent property. Format: properties/{propertyId} Example: 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 ListAdSenseLinks call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListAdSenseLinks 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.



10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10952

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

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

  # 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_ad_sense_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_ad_sense_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_ad_sense_links.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_ad_sense_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_ad_sense_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_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. Default audiences will not show filter definitions.

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Audience.
  p item
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.



6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6936

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

Lists BigQuery Links 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::ListBigQueryLinksRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::BigQueryLink.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListBigQueryLinksRequest, ::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_big_query_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::BigQueryLink>

    Pass arguments to list_big_query_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 name of the property to list BigQuery links under. 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 ListBigQueryLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListBigQueryLinks 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.



10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10072

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

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

  # 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_big_query_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_big_query_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_big_query_links.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_big_query_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_big_query_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_channel_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChannelGroup> #list_channel_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChannelGroup>

Lists ChannelGroups 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::ListChannelGroupsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ChannelGroup.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListChannelGroupsRequest, ::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_channel_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChannelGroup>

    Pass arguments to list_channel_groups 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 property for which to list ChannelGroups. 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 ListChannelGroups call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListChannelGroups 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.



9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9451

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

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

  # 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_channel_groups..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_channel_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_channel_groups.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_channel_groups, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_channel_groups, 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_connected_site_tags(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse #list_connected_site_tags(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse

Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected site tags will be returned. Note: this has no effect on GA4 property.

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::ListConnectedSiteTagsRequest.new

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

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

Overloads:

  • #list_connected_site_tags(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest, ::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_connected_site_tags(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse

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

      The Universal Analytics property to fetch connected site tags for. This does not work on GA4 properties. A maximum of 20 connected site tags will be returned. Example Format: properties/1234

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10514

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

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

  # 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_connected_site_tags..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_connected_site_tags.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_connected_site_tags.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_connected_site_tags, 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_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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ConversionEvent.
  p item
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.



4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4230

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomDimension.
  p item
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.



5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5499

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomMetric.
  p item
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.



5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5947

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DataStream.
  p item
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.



6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6660

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal.
  p item
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.



4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4871

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
  p item
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.



4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4417

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

#list_event_create_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::EventCreateRule> #list_event_create_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::EventCreateRule>

Lists EventCreateRules on a web data stream.

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::ListEventCreateRulesRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::EventCreateRule.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListEventCreateRulesRequest, ::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_event_create_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::EventCreateRule>

    Pass arguments to list_event_create_rules 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/123/dataStreams/456

    • 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 ListEventCreateRules call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListEventCreateRules 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.



11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11138

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

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

  # 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_event_create_rules..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_event_create_rules.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_event_create_rules.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_event_create_rules, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_event_create_rules, 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_expanded_data_sets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ExpandedDataSet> #list_expanded_data_sets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ExpandedDataSet>

Lists ExpandedDataSets 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::ListExpandedDataSetsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ExpandedDataSet.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListExpandedDataSetsRequest, ::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_expanded_data_sets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ExpandedDataSet>

    Pass arguments to list_expanded_data_sets 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 ListExpandedDataSets call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListExpandedDataSet 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.



9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9000

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

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

  # 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_expanded_data_sets..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_expanded_data_sets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_expanded_data_sets.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_expanded_data_sets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_expanded_data_sets, 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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::FirebaseLink.
  p item
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 ListFirebaseLinks 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.



2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2390

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::GoogleAdsLink.
  p item
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.



2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2841

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
  p item
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.



3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3118

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Property.
  p item
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.



924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 924

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 SearchAds360Links 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::ListSearchAds360LinksRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::SearchAds360Link.
  p item
end

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListSearchAds360LinksRequest, ::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_search_ads360_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SearchAds360Link>

    Pass arguments to list_search_ads360_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 ListSearchAds360Links call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListSearchAds360Links 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.



7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7386

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

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

  # 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_search_ads360_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_search_ads360_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_search_ads360_links.retry_policy

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

  @analytics_admin_service_stub.call_rpc :list_search_ads360_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_search_ads360_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 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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::UserLink.
  p item
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.



1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1460

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.



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 632

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 supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account.

      To request at the property level, entity should be for example 'properties/123' if "123" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if "1234" is your GA4 Account ID.

    • 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 let you restrict report response to specific dimension values which match the filter. For example, filtering on access records of a single user. To learn more, see Fundamentals of Dimension Filters 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. For account-level requests, this field must be false.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7987

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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent.
  p item
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.



3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3598

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

#set_automated_ga4_configuration_opt_out(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse #set_automated_ga4_configuration_opt_out(property: nil, opt_out: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse

Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on 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::SetAutomatedGa4ConfigurationOptOutRequest.new

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

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

Overloads:

  • #set_automated_ga4_configuration_opt_out(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse

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

    Parameters:

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

  • #set_automated_ga4_configuration_opt_out(property: nil, opt_out: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse

    Pass arguments to set_automated_ga4_configuration_opt_out 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 UA property to set the opt out status. Note this request uses the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. Format: properties/{internalWebPropertyId} Example: properties/1234

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

      The status to set.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9810

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

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

  # 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.set_automated_ga4_configuration_opt_out..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.set_automated_ga4_configuration_opt_out.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.set_automated_ga4_configuration_opt_out.retry_policy

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

  @analytics_admin_service_stub.call_rpc :set_automated_ga4_configuration_opt_out, 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_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding #update_access_binding(access_binding: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

Updates an access binding 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::UpdateAccessBindingRequest.new

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

# The returned object is of type Google::Analytics::Admin::V1alpha::AccessBinding.
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.



8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8249

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

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

  # 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_access_binding..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.access_binding&.name
    header_params["access_binding.name"] = request.access_binding.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_access_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_access_binding.retry_policy

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

  @analytics_admin_service_stub.call_rpc :update_access_binding, 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_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 (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 544

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.



7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7826

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.



7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7115

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_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup #update_channel_group(channel_group: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

Updates a ChannelGroup.

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::UpdateChannelGroupRequest.new

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

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

Overloads:

  • #update_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateChannelGroupRequest, ::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_channel_group(channel_group: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

    Pass arguments to update_channel_group 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:

    • channel_group (::Google::Analytics::Admin::V1alpha::ChannelGroup, ::Hash) (defaults to: nil)

      Required. The ChannelGroup to update. The resource's name field is used to identify the ChannelGroup 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.



9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9632

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

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

  # 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_channel_group..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.channel_group&.name
    header_params["channel_group.name"] = request.channel_group.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_channel_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_channel_group.retry_policy

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

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

Updates 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::UpdateConversionEventRequest.new

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

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

Overloads:

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

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateConversionEventRequest, ::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_conversion_event(conversion_event: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

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



3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3955

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

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

  # 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_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.conversion_event&.name
    header_params["conversion_event.name"] = request.conversion_event.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_conversion_event.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_conversion_event.retry_policy

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

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

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



5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5400

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.



5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5848

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.



6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6299

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.



6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6561

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.



4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4684

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

#update_enhanced_measurement_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings #update_enhanced_measurement_settings(enhanced_measurement_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

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

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::UpdateEnhancedMeasurementSettingsRequest.new

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

# The returned object is of type Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings.
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.



10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10256

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

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

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

  # Customize the options with defaults
   = @config.rpcs.update_enhanced_measurement_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.enhanced_measurement_settings&.name
    header_params["enhanced_measurement_settings.name"] = request.enhanced_measurement_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_enhanced_measurement_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_enhanced_measurement_settings.retry_policy

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

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

#update_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule #update_event_create_rule(event_create_rule: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

Updates an EventCreateRule.

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::UpdateEventCreateRuleRequest.new

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

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

Overloads:

  • #update_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateEventCreateRuleRequest, ::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_event_create_rule(event_create_rule: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

    Pass arguments to update_event_create_rule 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:

    • event_create_rule (::Google::Analytics::Admin::V1alpha::EventCreateRule, ::Hash) (defaults to: nil)

      Required. The EventCreateRule to update. The resource's name field is used to identify the EventCreateRule 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.



11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11318

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

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

  # 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_event_create_rule..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.event_create_rule&.name
    header_params["event_create_rule.name"] = request.event_create_rule.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_event_create_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_event_create_rule.retry_policy

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

  @analytics_admin_service_stub.call_rpc :update_event_create_rule, 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_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet #update_expanded_data_set(expanded_data_set: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

Updates a ExpandedDataSet 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::UpdateExpandedDataSetRequest.new

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

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

Overloads:

  • #update_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

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

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateExpandedDataSetRequest, ::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_expanded_data_set(expanded_data_set: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

    Pass arguments to update_expanded_data_set 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:

    • expanded_data_set (::Google::Analytics::Admin::V1alpha::ExpandedDataSet, ::Hash) (defaults to: nil)

      Required. The ExpandedDataSet to update. The resource's name field is used to identify the ExpandedDataSet 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.



9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9180

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

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

  # 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_expanded_data_set..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.expanded_data_set&.name
    header_params["expanded_data_set.name"] = request.expanded_data_set.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_expanded_data_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_expanded_data_set.retry_policy

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

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



2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2657

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.



3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3776

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.



3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3382

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.



1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1184

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 SearchAds360Link 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::UpdateSearchAds360LinkRequest.new

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

# The returned object is of type Google::Analytics::Admin::V1alpha::SearchAds360Link.
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.



7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7649

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

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

  # 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_search_ads360_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.search_ads_360_link&.name
    header_params["search_ads_360_link.name"] = request.search_ads_360_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_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_search_ads360_link.retry_policy

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

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



1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1846

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