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

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

Overview

Client for the AnalyticsAdminService service.

Service Interface for the Analytics Admin API (GA4).

Defined Under Namespace

Classes: Configuration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#account_path, #android_app_data_stream_path, #conversion_event_path, #custom_dimension_path, #custom_metric_path, #data_retention_settings_path, #data_sharing_settings_path, #display_video360_advertiser_link_path, #display_video360_advertiser_link_proposal_path, #enhanced_measurement_settings_path, #firebase_link_path, #global_site_tag_path, #google_ads_link_path, #google_signals_settings_path, #ios_app_data_stream_path, #measurement_protocol_secret_path, #property_path, #user_link_path, #web_data_stream_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:



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

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

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

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

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

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

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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# 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.get_web_data_stream.timeout = 60.0

    default_config.rpcs.update_web_data_stream.timeout = 60.0

    default_config.rpcs.create_web_data_stream.timeout = 60.0

    default_config.rpcs.list_web_data_streams.timeout = 60.0

    default_config.rpcs.get_ios_app_data_stream.timeout = 60.0

    default_config.rpcs.delete_ios_app_data_stream.timeout = 60.0

    default_config.rpcs.update_ios_app_data_stream.timeout = 60.0

    default_config.rpcs.list_ios_app_data_streams.timeout = 60.0

    default_config.rpcs.get_android_app_data_stream.timeout = 60.0

    default_config.rpcs.delete_android_app_data_stream.timeout = 60.0

    default_config.rpcs.update_android_app_data_stream.timeout = 60.0

    default_config.rpcs.list_android_app_data_streams.timeout = 60.0

    default_config.rpcs.get_enhanced_measurement_settings.timeout = 60.0

    default_config.rpcs.update_enhanced_measurement_settings.timeout = 60.0

    default_config.rpcs.create_firebase_link.timeout = 60.0

    default_config.rpcs.delete_firebase_link.timeout = 60.0

    default_config.rpcs.list_firebase_links.timeout = 60.0

    default_config.rpcs.get_global_site_tag.timeout = 60.0

    default_config.rpcs.create_google_ads_link.timeout = 60.0

    default_config.rpcs.update_google_ads_link.timeout = 60.0

    default_config.rpcs.delete_google_ads_link.timeout = 60.0

    default_config.rpcs.list_google_ads_links.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5155

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 = {
    "name" => request.name
  }
  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_custom_dimension(request, options = nil) ⇒ ::Google::Protobuf::Empty #archive_custom_dimension(name: nil) ⇒ ::Google::Protobuf::Empty

Archives a CustomDimension on a property.

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.



5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5518

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5877

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1324

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

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

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

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

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

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

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.



1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1483

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

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

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

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

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

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.



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
1801
1802
1803
1804
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1767

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

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

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

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

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

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.



1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1159

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

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

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

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

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

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.



1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1625

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 = {
    "parent" => request.parent
  }
  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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
5264
5265
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5228

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 = {
    "name" => request.name
  }
  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:



177
178
179
180
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 177

def configure
  yield @config if block_given?
  @config
end

#create_conversion_event(request, options = nil) ⇒ ::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.

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.



4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4209

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5298

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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.

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.



5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5657

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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

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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4653

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 = {
    "parent" => request.parent
  }
  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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5014

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

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

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

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

Creates a FirebaseLink.

Properties can have at most one FirebaseLink.

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.



2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2949

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 = {
    "parent" => request.parent
  }
  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.

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.



3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3241

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 = {
    "parent" => request.parent
  }
  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.

Overloads:

  • #create_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

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

    Parameters:

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

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

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

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

  • #create_measurement_protocol_secret(parent: nil, measurement_protocol_secret: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

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

    Parameters:

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

      Required. The parent resource where this secret will be created. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}

    • measurement_protocol_secret (::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret, ::Hash) (defaults to: nil)

      Required. The measurement protocol secret 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.



3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3759

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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.

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.



868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 868

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

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

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

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

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

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

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

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

Creates a user link on an account or property.

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

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.



1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1402

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 = {
    "parent" => request.parent
  }
  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

#create_web_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream #create_web_data_stream(web_data_stream: nil, parent: nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

Creates a web stream with the specified location and attributes.

Overloads:

  • #create_web_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

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

    Parameters:

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

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

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

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

  • #create_web_data_stream(web_data_stream: nil, parent: nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

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

    Parameters:

    • web_data_stream (::Google::Analytics::Admin::V1alpha::WebDataStream, ::Hash) (defaults to: nil)

      Required. The web stream to create.

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

      Required. The parent resource where this web data stream 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.



2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2051

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

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

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

  # Customize the options with defaults
   = @config.rpcs.create_web_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 = {
    "parent" => request.parent
  }
  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_web_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_web_data_stream.retry_policy

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

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

#delete_account(request, options = nil) ⇒ ::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.

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.



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 426

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

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

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

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

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

Deletes an android app stream on a property.

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
2607
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2570

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

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

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

  # Customize the options with defaults
   = @config.rpcs.delete_android_app_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 = {
    "name" => request.name
  }
  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_android_app_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_android_app_data_stream.retry_policy

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

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

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

Deletes a conversion event in a property.

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.



4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4349

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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

Deletes a DisplayVideo360AdvertiserLink on a property.

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.



4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4722

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 = {
    "name" => request.name
  }
  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.

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.



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

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

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

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

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

Deletes a FirebaseLink on a property

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.



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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3018

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 = {
    "name" => request.name
  }
  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

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.



3381
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3381

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 = {
    "name" => request.name
  }
  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_ios_app_data_stream(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_ios_app_data_stream(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an iOS app stream on a property.

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2274

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

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

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

  # Customize the options with defaults
   = @config.rpcs.delete_ios_app_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 = {
    "name" => request.name
  }
  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_ios_app_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_ios_app_data_stream.retry_policy

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

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

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

Deletes target MeasurementProtocolSecret.

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}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3831

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

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

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

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

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

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

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

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

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

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.



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

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

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

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

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

Deletes a user link on an account or property.

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.



1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1693

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 = {
    "name" => request.name
  }
  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

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

Deletes a web stream on a property.

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1907

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

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

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

  # Customize the options with defaults
   = @config.rpcs.delete_web_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 = {
    "name" => request.name
  }
  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_web_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_web_data_stream.retry_policy

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

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

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

Lookup for a single Account.

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.



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
298
299
300
301
302
303
304
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 267

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

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

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

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

#get_android_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream #get_android_app_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream

Lookup for a single AndroidAppDataStream

Overloads:

  • #get_android_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream

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

    Parameters:

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

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

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

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

  • #get_android_app_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2500

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

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

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

  # Customize the options with defaults
   = @config.rpcs.get_android_app_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 = {
    "name" => request.name
  }
  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_android_app_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_android_app_data_stream.retry_policy

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

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

#get_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent #get_conversion_event(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

Retrieve a single conversion event.

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.



4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4279

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5587

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



5946
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5946

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6017

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3531

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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

Look up a single DisplayVideo360AdvertiserLink

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.



4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4499

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 = {
    "name" => request.name
  }
  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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



4863
4864
4865
4866
4867
4868
4869
4870
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4863

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 = {
    "name" => request.name
  }
  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 singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.

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_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings Example: "properties/1000/webDataStreams/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.



2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2801

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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_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.

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}/webDataStreams/{stream_id}/globalSiteTag Example: "properties/123/webDataStreams/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.



3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3171

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4065

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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_ios_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream #get_ios_app_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream

Lookup for a single IosAppDataStream

Overloads:

  • #get_ios_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream

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

    Parameters:

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

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

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

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

  • #get_ios_app_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2204

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

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

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

  # Customize the options with defaults
   = @config.rpcs.get_ios_app_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 = {
    "name" => request.name
  }
  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_ios_app_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_ios_app_data_stream.retry_policy

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

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

#get_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret #get_measurement_protocol_secret(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

Lookup for a single "GA4" MeasurementProtocolSecret.

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}/webDataStreams/{webDataStream}/measurementProtocolSecrets/{measurementProtocolSecret} Note: Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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
3639
3640
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3603

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  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.

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.



705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 705

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

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

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

  # Customize the options with defaults
   = @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 = {
    "name" => request.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

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

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

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

Gets information about a user's link to an account or property.

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.



1084
1085
1086
1087
1088
1089
1090
1091
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1084

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 = {
    "name" => request.name
  }
  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

#get_web_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream #get_web_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

Lookup for a single WebDataStream

Overloads:

  • #get_web_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

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

    Parameters:

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

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

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

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

  • #get_web_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1837
1838
1839
1840
1841
1842
1843
1844
1845
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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1837

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

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

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

  # Customize the options with defaults
   = @config.rpcs.get_web_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 = {
    "name" => request.name
  }
  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_web_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_web_data_stream.retry_policy

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

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

#list_account_summaries(request, options = nil) ⇒ ::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.

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.



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 640

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.

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.



351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 351

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

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

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

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

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

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

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

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

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

Returns child android app streams under the specified parent property.

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

      Required. The name of the parent property. For example, to limit results to app streams under the property with Id 123: "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 call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAndroidAppDataStreams must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2727

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

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

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

  # Customize the options with defaults
   = @config.rpcs.list_android_app_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 = {
    "parent" => request.parent
  }
  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_android_app_data_streams.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_android_app_data_streams.retry_policy

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

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

#list_conversion_events(request, options = nil) ⇒ ::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.

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.



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
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4429

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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.

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.



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

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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.

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.



5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5807

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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

Lists DisplayVideo360AdvertiserLinkProposals on a property.

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.



4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4943

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 = {
    "parent" => request.parent
  }
  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.

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.



4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4578

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

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

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

      The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3098

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 = {
    "parent" => request.parent
  }
  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.

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.



3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3459

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 = {
    "parent" => request.parent
  }
  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_ios_app_data_streams(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::IosAppDataStream> #list_ios_app_data_streams(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::IosAppDataStream>

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

      Required. The name of the parent property. For example, to list results of app streams under the property with Id 123: "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 ListIosAppDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListIosAppDataStreams must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2429

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

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

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

  # Customize the options with defaults
   = @config.rpcs.list_ios_app_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 = {
    "parent" => request.parent
  }
  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_ios_app_data_streams.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_ios_app_data_streams.retry_policy

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

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

#list_measurement_protocol_secrets(request, options = nil) ⇒ ::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.

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. Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) may be a parent. Format: properties/{property}/webDataStreams/{webDataStream}/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.



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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3685

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

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

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

  # Customize the options with defaults
   = @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 = {
    "parent" => request.parent
  }
  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.

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) or firebase_project:(The id or number of the linked firebase project). Some examples of filters:

      | Filter                      | Description                               |
      |-----------------------------|-------------------------------------------|
      | parent:accounts/123         | The account with account id: 123.         |
      | firebase_project:project-id | The firebase project with id: project-id. |
      | firebase_project:123        | The firebase project with number: 123.    |
      
    • 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.



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
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 804

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

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

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

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

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

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

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

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

Lists all user links on an account or property.

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.



1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1237

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 = {
    "parent" => request.parent
  }
  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

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

Returns child web data streams under the specified parent property.

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

      Required. The name of the parent property. For example, to list results of web streams under the property with Id 123: "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 ListWebDataStreams call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListWebDataStreams must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2133

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

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

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

  # Customize the options with defaults
   = @config.rpcs.list_web_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 = {
    "parent" => request.parent
  }
  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_web_data_streams.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_web_data_streams.retry_policy

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

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

#provision_account_ticket(request, options = nil) ⇒ ::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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 570

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

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

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.



3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3995

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

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

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

  # Customize the options with defaults
   = @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 = {
    "account" => request.
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

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

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

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

#update_account(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account #update_account(account: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

Updates an account.

Overloads:

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

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

    Parameters:

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

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

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

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

  • #update_account(account: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

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

    Parameters:

    • account (::Google::Analytics::Admin::V1alpha::Account, ::Hash) (defaults to: nil)

      Required. The account to update. The account's name field is used to identify the account.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 499

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 = {
    "account.name" => request..name
  }
  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_android_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream #update_android_app_data_stream(android_app_data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream

Updates an android app stream on a property.

Overloads:

  • #update_android_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream

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

    Parameters:

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

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

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

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

  • #update_android_app_data_stream(android_app_data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream

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

    Parameters:

    • android_app_data_stream (::Google::Analytics::Admin::V1alpha::AndroidAppDataStream, ::Hash) (defaults to: nil)

      Required. The android app stream to update. The name field is used to identify the android app stream 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.



2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2643

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

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

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

  # Customize the options with defaults
   = @config.rpcs.update_android_app_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 = {
    "android_app_data_stream.name" => request.android_app_data_stream.name
  }
  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_android_app_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_android_app_data_stream.retry_policy

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

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

#update_custom_dimension(request, options = nil) ⇒ ::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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5370

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

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

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

  # Customize the options with defaults
   = @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 = {
    "custom_dimension.name" => request.custom_dimension.name
  }
  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.

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.



5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5729

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

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

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

  # Customize the options with defaults
   = @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 = {
    "custom_metric.name" => request.custom_metric.name
  }
  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.

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.



6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6090

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

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

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

  # Customize the options with defaults
   = @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 = {
    "data_retention_settings.name" => request.data_retention_settings.name
  }
  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

Updates a DisplayVideo360AdvertiserLink on a property.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4794

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 = {
    "display_video_360_advertiser_link.name" => request.display_video_360_advertiser_link.name
  }
  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 singleton enhanced measurement settings for this web stream. Note that the stream must enable enhanced measurement for these settings to take effect.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2876

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

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

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

  # Customize the options with defaults
   = @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 = {
    "enhanced_measurement_settings.name" => request.enhanced_measurement_settings.name
  }
  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

Updates a GoogleAdsLink on a property

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.



3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3313

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 = {
    "google_ads_link.name" => request.google_ads_link.name
  }
  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.

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.



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
4169
4170
4171
4172
4173
4174
4175
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4138

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

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

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

  # Customize the options with defaults
   = @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 = {
    "google_signals_settings.name" => request.google_signals_settings.name
  }
  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_ios_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream #update_ios_app_data_stream(ios_app_data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream

Updates an iOS app stream on a property.

Overloads:

  • #update_ios_app_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream

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

    Parameters:

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

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

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

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

  • #update_ios_app_data_stream(ios_app_data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::IosAppDataStream

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

    Parameters:

    • ios_app_data_stream (::Google::Analytics::Admin::V1alpha::IosAppDataStream, ::Hash) (defaults to: nil)

      Required. The iOS app stream to update. The name field is used to identify the iOS app stream 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.



2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2347

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

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

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

  # Customize the options with defaults
   = @config.rpcs.update_ios_app_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 = {
    "ios_app_data_stream.name" => request.ios_app_data_stream.name
  }
  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_ios_app_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_ios_app_data_stream.retry_policy

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

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

#update_measurement_protocol_secret(request, options = nil) ⇒ ::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.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3901

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

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

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

  # Customize the options with defaults
   = @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 = {
    "measurement_protocol_secret.name" => request.measurement_protocol_secret.name
  }
  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.

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.



1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1016

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

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

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

  # Customize the options with defaults
   = @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 = {
    "property.name" => request.property.name
  }
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

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

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

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

Updates a user link on an account or property.

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1551

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 = {
    "user_link.name" => request.user_link.name
  }
  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

#update_web_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream #update_web_data_stream(web_data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

Updates a web stream on a property.

Overloads:

  • #update_web_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

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

    Parameters:

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

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

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

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

  • #update_web_data_stream(web_data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::WebDataStream

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

    Parameters:

    • web_data_stream (::Google::Analytics::Admin::V1alpha::WebDataStream, ::Hash) (defaults to: nil)

      Required. The web stream to update. The name field is used to identify the web stream 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.



1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1980

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

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

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

  # Customize the options with defaults
   = @config.rpcs.update_web_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 = {
    "web_data_stream.name" => request.web_data_stream.name
  }
  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_web_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_web_data_stream.retry_policy

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

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