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

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

Overview

Client for the AnalyticsAdminService service.

Service Interface for the Analytics Admin API (GA4).

Defined Under Namespace

Classes: Configuration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#access_binding_path, #account_path, #ad_sense_link_path, #attribution_settings_path, #audience_path, #big_query_link_path, #channel_group_path, #conversion_event_path, #custom_dimension_path, #custom_metric_path, #data_retention_settings_path, #data_sharing_settings_path, #data_stream_path, #display_video360_advertiser_link_path, #display_video360_advertiser_link_proposal_path, #enhanced_measurement_settings_path, #event_create_rule_path, #expanded_data_set_path, #firebase_link_path, #global_site_tag_path, #google_ads_link_path, #google_signals_settings_path, #measurement_protocol_secret_path, #property_path, #search_ads360_link_path, #sk_ad_network_conversion_value_schema_path, #user_link_path

Constructor Details

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

Create a new AnalyticsAdminService client object.

Examples:


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

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

Yields:

  • (config)

    Configure the AnalyticsAdminService client.

Yield Parameters:



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

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

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

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

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

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

Class Method Details

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

Configure the AnalyticsAdminService Client class.

See Configuration for a description of the configuration fields.

Examples:


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

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 56

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

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

    default_config.rpcs..timeout = 60.0

    default_config.rpcs.list_accounts.timeout = 60.0

    default_config.rpcs..timeout = 60.0

    default_config.rpcs..timeout = 60.0

    default_config.rpcs..timeout = 60.0

    default_config.rpcs.get_property.timeout = 60.0

    default_config.rpcs.list_properties.timeout = 60.0

    default_config.rpcs.create_property.timeout = 60.0

    default_config.rpcs.delete_property.timeout = 60.0

    default_config.rpcs.update_property.timeout = 60.0

    default_config.rpcs.get_user_link.timeout = 60.0

    default_config.rpcs.batch_get_user_links.timeout = 60.0

    default_config.rpcs.list_user_links.timeout = 60.0

    default_config.rpcs.audit_user_links.timeout = 60.0

    default_config.rpcs.create_user_link.timeout = 60.0

    default_config.rpcs.batch_create_user_links.timeout = 60.0

    default_config.rpcs.update_user_link.timeout = 60.0

    default_config.rpcs.batch_update_user_links.timeout = 60.0

    default_config.rpcs.delete_user_link.timeout = 60.0

    default_config.rpcs.batch_delete_user_links.timeout = 60.0

    default_config.rpcs.create_firebase_link.timeout = 60.0

    default_config.rpcs.delete_firebase_link.timeout = 60.0

    default_config.rpcs.list_firebase_links.timeout = 60.0

    default_config.rpcs.get_global_site_tag.timeout = 60.0

    default_config.rpcs.create_google_ads_link.timeout = 60.0

    default_config.rpcs.update_google_ads_link.timeout = 60.0

    default_config.rpcs.delete_google_ads_link.timeout = 60.0

    default_config.rpcs.list_google_ads_links.timeout = 60.0

    default_config.rpcs.get_enhanced_measurement_settings.timeout = 60.0

    default_config.rpcs.update_enhanced_measurement_settings.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

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

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Archives an Audience on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Archives a CustomDimension on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6041

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

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

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

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

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

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

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

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

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

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

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

Archives a CustomMetric on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6489

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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

      Required. Example format: accounts/1234

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

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

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

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

This method is transactional. If any AccessBinding cannot be created, none of the AccessBindings will be created.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #batch_create_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchCreateAccessBindingsResponse

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

    Parameters:

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

      Required. The account or property that owns the access bindings. The parent field in the CreateAccessBindingRequest messages must either be empty or match this field. Formats:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8989

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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

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

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

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

      Required. The account or property that owns the access bindings. The parent of all provided values for the 'names' field in DeleteAccessBindingRequest messages must match this field. Formats:

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

      Required. The requests specifying the access bindings to delete. A maximum of 1000 access bindings can be deleted in a batch.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #batch_get_access_bindings(parent: nil, names: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchGetAccessBindingsResponse

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

    Parameters:

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

      Required. The account or property that owns the access bindings. The parent of all provided values for the 'names' field must match this field. Formats:

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

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #batch_update_access_bindings(parent: nil, requests: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BatchUpdateAccessBindingsResponse

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

    Parameters:

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

      Required. The account or property that owns the access bindings. The parent of all provided AccessBinding in UpdateAccessBindingRequest messages must match this field. Formats:

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either:

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5679

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

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

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

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

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

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

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

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

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

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

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

Configure the AnalyticsAdminService Client instance.

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

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



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

def configure
  yield @config if block_given?
  @config
end

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

Creates an access binding on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #create_access_binding(parent: nil, access_binding: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

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

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

Creates an AdSenseLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #create_ad_sense_link(parent: nil, adsense_link: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AdSenseLink

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

    Parameters:

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

      Required. The property for which to create an AdSense Link. Format: properties/{propertyId} Example: properties/1234

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

      Required. The AdSense Link to create

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11219

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

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

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

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

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

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

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

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

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

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

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

Creates an Audience.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Creates a ChannelGroup.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #create_channel_group(parent: nil, channel_group: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

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

    Parameters:

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

      Required. The property for which to create a ChannelGroup. Example format: properties/1234

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

      Required. The ChannelGroup to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9995

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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #create_connected_site_tag(property: nil, connected_site_tag: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse

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

    Parameters:

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

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

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

      Required. The tag to add to the Universal Analytics property

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10803

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

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

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

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

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

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

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

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

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

Creates a conversion event with the specified attributes.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

      Required. The conversion event to create.

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

#create_custom_dimension(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension #create_custom_dimension(parent: nil, custom_dimension: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

Creates a CustomDimension.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5766

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

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

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

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

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

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

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

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

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

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

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

Creates a CustomMetric.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Creates a DataStream.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

Creates a DisplayVideo360AdvertiserLinkProposal.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5414

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

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

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

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

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

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

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

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

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

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

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

Creates an EventCreateRule.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

  • #create_event_create_rule(parent: nil, event_create_rule: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

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

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11681

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

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

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

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

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

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

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

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

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

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

#create_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet #create_expanded_data_set(parent: nil, expanded_data_set: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

Creates a ExpandedDataSet.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

Creates a FirebaseLink.

Properties can have at most one FirebaseLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

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

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

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

      Required. The Firebase link to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

Creates a GoogleAdsLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

Creates a measurement protocol secret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

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

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

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

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

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

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

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

Examples:

Basic example

require "google/analytics/admin/v1alpha"

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

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

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

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

Overloads:

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

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

    Parameters:

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

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

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

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

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

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

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

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

    if the RPC is aborted.



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

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

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

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

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

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

  options.apply_defaults timeout:      @config.rpcs.create_property.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Creates a SearchAds360Link.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateSearchAds360LinkRequest.new

# Call the create_search_ads360_link method.
result = client.create_search_ads360_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::SearchAds360Link.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7929

def create_search_ads360_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateSearchAds360LinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_search_ads360_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_search_ads360_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_search_ads360_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_sk_ad_network_conversion_value_schema(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema #create_sk_ad_network_conversion_value_schema(parent: nil, skadnetwork_conversion_value_schema: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema

Creates a SKAdNetworkConversionValueSchema.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateSKAdNetworkConversionValueSchemaRequest.new

# Call the create_sk_ad_network_conversion_value_schema method.
result = client.create_sk_ad_network_conversion_value_schema request

# The returned object is of type Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3656

def create_sk_ad_network_conversion_value_schema request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateSKAdNetworkConversionValueSchemaRequest

  # Converts hash and nil 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_sk_ad_network_conversion_value_schema..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_sk_ad_network_conversion_value_schema.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_sk_ad_network_conversion_value_schema.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_sk_ad_network_conversion_value_schema, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Creates a user link on an account or property.

If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::CreateUserLinkRequest.new

# Call the create_user_link method.
result = client.create_user_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::UserLink.
p result

Overloads:

  • #create_user_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to create_user_link via a request object, either of type CreateUserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_user_link(parent: nil, notify_new_user: nil, user_link: nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to create_user_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: accounts/1234

    • notify_new_user (::Boolean) (defaults to: nil)

      Optional. If set, then email the new user notifying them that they've been granted permissions to the resource.

    • user_link (::Google::Analytics::Admin::V1alpha::UserLink, ::Hash) (defaults to: nil)

      Required. The user link to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1664

def create_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_user_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_user_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :create_user_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_access_binding(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_access_binding(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an access binding on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteAccessBindingRequest.new

# Call the delete_access_binding method.
result = client.delete_access_binding request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_access_binding(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_access_binding via a request object, either of type DeleteAccessBindingRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteAccessBindingRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_access_binding(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_access_binding via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Formats:

      • accounts/{account}/accessBindings/{accessBinding}
      • properties/{property}/accessBindings/{accessBinding}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8791

def delete_access_binding request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteAccessBindingRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_access_binding..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_access_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_access_binding.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_access_binding, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_account(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_account(name: nil) ⇒ ::Google::Protobuf::Empty

Marks target Account as soft-deleted (ie: "trashed") and returns it.

This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.

If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteAccountRequest.new

# Call the delete_account method.
result = client. request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_account(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_account via a request object, either of type DeleteAccountRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteAccountRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_account(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_account via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 454

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteAccountRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_account, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Deletes an AdSenseLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteAdSenseLinkRequest.new

# Call the delete_ad_sense_link method.
result = client.delete_ad_sense_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_ad_sense_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_ad_sense_link via a request object, either of type DeleteAdSenseLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteAdSenseLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_ad_sense_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_ad_sense_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Unique identifier for the AdSense Link to be deleted. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11306

def delete_ad_sense_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteAdSenseLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_ad_sense_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_ad_sense_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_ad_sense_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_ad_sense_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_channel_group(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_channel_group(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a ChannelGroup on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteChannelGroupRequest.new

# Call the delete_channel_group method.
result = client.delete_channel_group request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_channel_group(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_channel_group via a request object, either of type DeleteChannelGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteChannelGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_channel_group(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_channel_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The ChannelGroup to delete. Example format: properties/1234/channelGroups/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10173

def delete_channel_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteChannelGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_channel_group..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_channel_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_channel_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_channel_group, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_connected_site_tag(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_connected_site_tag(property: nil, tag_id: nil) ⇒ ::Google::Protobuf::Empty

Deletes a connected site tag for a Universal Analytics property. Note: this has no effect on GA4 properties.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest.new

# Call the delete_connected_site_tag method.
result = client.delete_connected_site_tag request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_connected_site_tag(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_connected_site_tag via a request object, either of type DeleteConnectedSiteTagRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_connected_site_tag(property: nil, tag_id: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_connected_site_tag via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • property (::String) (defaults to: nil)

      The Universal Analytics property to delete connected site tags for. This API does not support GA4 properties. Format: properties/{universalAnalyticsPropertyId} Example: properties/1234

    • tag_id (::String) (defaults to: nil)

      Tag ID to forward events to. Also known as the Measurement ID, or the "G-ID" (For example: G-12345).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10887

def delete_connected_site_tag request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_connected_site_tag..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_connected_site_tag.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_connected_site_tag.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_connected_site_tag, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_conversion_event(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_conversion_event(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a conversion event in a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest.new

# Call the delete_conversion_event method.
result = client.delete_conversion_event request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_conversion_event(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_conversion_event via a request object, either of type DeleteConversionEventRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_conversion_event(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_conversion_event via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



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
4617
4618
4619
4620
4621
4622
4623
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4584

def delete_conversion_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_conversion_event..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_conversion_event.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_conversion_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_conversion_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_data_stream(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_data_stream(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a DataStream on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest.new

# Call the delete_data_stream method.
result = client.delete_data_stream request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_data_stream(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_data_stream via a request object, either of type DeleteDataStreamRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_data_stream(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_data_stream via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6927

def delete_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_data_stream..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Deletes a DisplayVideo360AdvertiserLink on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest.new

# Call the delete_display_video360_advertiser_link method.
result = client.delete_display_video360_advertiser_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_display_video360_advertiser_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link via a request object, either of type DeleteDisplayVideo360AdvertiserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_display_video360_advertiser_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DisplayVideo360AdvertiserLink to delete. Example format: properties/1234/displayVideo360AdvertiserLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5050

def delete_display_video360_advertiser_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_display_video360_advertiser_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_display_video360_advertiser_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_display_video360_advertiser_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_display_video360_advertiser_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on cancelled proposals.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkProposalRequest.new

# Call the delete_display_video360_advertiser_link_proposal method.
result = client.delete_display_video360_advertiser_link_proposal request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_display_video360_advertiser_link_proposal(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link_proposal via a request object, either of type DeleteDisplayVideo360AdvertiserLinkProposalRequest or an equivalent Hash.

    Parameters:

  • #delete_display_video360_advertiser_link_proposal(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_display_video360_advertiser_link_proposal via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5501

def delete_display_video360_advertiser_link_proposal request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkProposalRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_display_video360_advertiser_link_proposal..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_display_video360_advertiser_link_proposal.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_display_video360_advertiser_link_proposal.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_display_video360_advertiser_link_proposal, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_event_create_rule(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_event_create_rule(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes an EventCreateRule.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteEventCreateRuleRequest.new

# Call the delete_event_create_rule method.
result = client.delete_event_create_rule request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_event_create_rule(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_event_create_rule via a request object, either of type DeleteEventCreateRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteEventCreateRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_event_create_rule(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_event_create_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: properties/123/dataStreams/456/eventCreateRules/789

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11859

def delete_event_create_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteEventCreateRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_event_create_rule..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_event_create_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_event_create_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_event_create_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_expanded_data_set(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_expanded_data_set(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a ExpandedDataSet on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteExpandedDataSetRequest.new

# Call the delete_expanded_data_set method.
result = client.delete_expanded_data_set request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_expanded_data_set(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_expanded_data_set via a request object, either of type DeleteExpandedDataSetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteExpandedDataSetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_expanded_data_set(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_expanded_data_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: properties/1234/expandedDataSets/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9720

def delete_expanded_data_set request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteExpandedDataSetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_expanded_data_set..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_expanded_data_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_expanded_data_set.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_expanded_data_set, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Deletes a FirebaseLink on a property

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest.new

# Call the delete_firebase_link method.
result = client.delete_firebase_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_firebase_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_firebase_link via a request object, either of type DeleteFirebaseLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_firebase_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_firebase_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2290

def delete_firebase_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_firebase_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_firebase_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_firebase_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_firebase_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Deletes a GoogleAdsLink on a property

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest.new

# Call the delete_google_ads_link method.
result = client.delete_google_ads_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_google_ads_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_google_ads_link via a request object, either of type DeleteGoogleAdsLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_google_ads_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_google_ads_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: properties/1234/googleAdsLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2743

def delete_google_ads_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_google_ads_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_google_ads_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_google_ads_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_google_ads_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_measurement_protocol_secret(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes target MeasurementProtocolSecret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest.new

# Call the delete_measurement_protocol_secret method.
result = client.delete_measurement_protocol_secret request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_measurement_protocol_secret via a request object, either of type DeleteMeasurementProtocolSecretRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_measurement_protocol_secret(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_measurement_protocol_secret via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3295

def delete_measurement_protocol_secret request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_measurement_protocol_secret..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_measurement_protocol_secret.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_measurement_protocol_secret.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_measurement_protocol_secret, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property #delete_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

Marks target Property as soft-deleted (ie: "trashed") and returns it.

This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.

If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found, or is not a GA4 Property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeletePropertyRequest.new

# Call the delete_property method.
result = client.delete_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::Property.
p result

Overloads:

  • #delete_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to delete_property via a request object, either of type DeletePropertyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeletePropertyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to delete_property via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1093

def delete_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeletePropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_property.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Deletes a SearchAds360Link on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteSearchAds360LinkRequest.new

# Call the delete_search_ads360_link method.
result = client.delete_search_ads360_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_search_ads360_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_search_ads360_link via a request object, either of type DeleteSearchAds360LinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteSearchAds360LinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_search_ads360_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_search_ads360_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the SearchAds360Link to delete. Example format: properties/1234/SearchAds360Links/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8015

def delete_search_ads360_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteSearchAds360LinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_search_ads360_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_search_ads360_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_search_ads360_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_sk_ad_network_conversion_value_schema(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_sk_ad_network_conversion_value_schema(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes target SKAdNetworkConversionValueSchema.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteSKAdNetworkConversionValueSchemaRequest.new

# Call the delete_sk_ad_network_conversion_value_schema method.
result = client.delete_sk_ad_network_conversion_value_schema request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_sk_ad_network_conversion_value_schema(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_sk_ad_network_conversion_value_schema via a request object, either of type DeleteSKAdNetworkConversionValueSchemaRequest or an equivalent Hash.

    Parameters:

  • #delete_sk_ad_network_conversion_value_schema(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_sk_ad_network_conversion_value_schema via keyword arguments. Note that at least one keyword argument 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 SKAdNetworkConversionValueSchema to delete. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3743

def delete_sk_ad_network_conversion_value_schema request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteSKAdNetworkConversionValueSchemaRequest

  # Converts hash and nil 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_sk_ad_network_conversion_value_schema..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_sk_ad_network_conversion_value_schema.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_sk_ad_network_conversion_value_schema.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_sk_ad_network_conversion_value_schema, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Deletes a user link on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest.new

# Call the delete_user_link method.
result = client.delete_user_link request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_user_link(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_user_link via a request object, either of type DeleteUserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_user_link(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_user_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: accounts/1234/userLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2023

def delete_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_user_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_user_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :delete_user_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#fetch_automated_ga4_configuration_opt_out(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutResponse #fetch_automated_ga4_configuration_opt_out(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutResponse

Fetches the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on GA4 property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutRequest.new

# Call the fetch_automated_ga4_configuration_opt_out method.
result = client.fetch_automated_ga4_configuration_opt_out request

# The returned object is of type Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutResponse.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10347

def fetch_automated_ga4_configuration_opt_out request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::FetchAutomatedGa4ConfigurationOptOutRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.fetch_automated_ga4_configuration_opt_out..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.fetch_automated_ga4_configuration_opt_out.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.fetch_automated_ga4_configuration_opt_out.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :fetch_automated_ga4_configuration_opt_out, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#fetch_connected_ga4_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse #fetch_connected_ga4_property(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse

Given a specified UA property, looks up the GA4 property connected to it. Note: this cannot be used with GA4 properties.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyRequest.new

# Call the fetch_connected_ga4_property method.
result = client.fetch_connected_ga4_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse.
p result

Overloads:

  • #fetch_connected_ga4_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse

    Pass arguments to fetch_connected_ga4_property via a request object, either of type FetchConnectedGa4PropertyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #fetch_connected_ga4_property(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyResponse

    Pass arguments to fetch_connected_ga4_property via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • property (::String) (defaults to: nil)

      Required. The UA property for which to look up the connected GA4 property. Note this request uses the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. Format: properties/{internal_web_property_id} Example: properties/1234

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11051

def fetch_connected_ga4_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::FetchConnectedGa4PropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.fetch_connected_ga4_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.fetch_connected_ga4_property.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.fetch_connected_ga4_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :fetch_connected_ga4_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding #get_access_binding(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

Gets information about an access binding.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAccessBindingRequest.new

# Call the get_access_binding method.
result = client.get_access_binding request

# The returned object is of type Google::Analytics::Admin::V1alpha::AccessBinding.
p result

Overloads:

  • #get_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

    Pass arguments to get_access_binding via a request object, either of type GetAccessBindingRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAccessBindingRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_access_binding(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

    Pass arguments to get_access_binding via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the access binding to retrieve. Formats:

      • accounts/{account}/accessBindings/{accessBinding}
      • properties/{property}/accessBindings/{accessBinding}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8619

def get_access_binding request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAccessBindingRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_access_binding..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_access_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_access_binding.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_access_binding, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_account(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account #get_account(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

Lookup for a single Account.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAccountRequest.new

# Call the get_account method.
result = client. request

# The returned object is of type Google::Analytics::Admin::V1alpha::Account.
p result

Overloads:

  • #get_account(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    Pass arguments to get_account via a request object, either of type GetAccountRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAccountRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_account(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    Pass arguments to get_account via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the account to lookup. Format: accounts/{account} Example: "accounts/100"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 259

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAccountRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_account, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Looks up a single AdSenseLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAdSenseLinkRequest.new

# Call the get_ad_sense_link method.
result = client.get_ad_sense_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::AdSenseLink.
p result

Overloads:

  • #get_ad_sense_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AdSenseLink

    Pass arguments to get_ad_sense_link via a request object, either of type GetAdSenseLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAdSenseLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_ad_sense_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AdSenseLink

    Pass arguments to get_ad_sense_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Unique identifier for the AdSense Link requested. Format: properties/{propertyId}/adSenseLinks/{linkId} Example: properties/1234/adSenseLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11130

def get_ad_sense_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAdSenseLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_ad_sense_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_ad_sense_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_ad_sense_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_ad_sense_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings #get_attribution_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

Lookup for a AttributionSettings singleton.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAttributionSettingsRequest.new

# Call the get_attribution_settings method.
result = client.get_attribution_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::AttributionSettings.
p result

Overloads:

  • #get_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to get_attribution_settings via a request object, either of type GetAttributionSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAttributionSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_attribution_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to get_attribution_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the attribution settings to retrieve. Format: properties/{property}/attributionSettings

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8190

def get_attribution_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAttributionSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_attribution_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_attribution_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_attribution_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_attribution_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience #get_audience(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

Lookup for a single Audience. Audiences created before 2020 may not be supported. Default audiences will not show filter definitions.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetAudienceRequest.new

# Call the get_audience method.
result = client.get_audience request

# The returned object is of type Google::Analytics::Admin::V1alpha::Audience.
p result

Overloads:

  • #get_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to get_audience via a request object, either of type GetAudienceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetAudienceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_audience(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to get_audience via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the Audience to get. Example format: properties/1234/audiences/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7290

def get_audience request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAudienceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_audience..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_audience.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_audience.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_audience, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lookup for a single BigQuery Link.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetBigQueryLinkRequest.new

# Call the get_big_query_link method.
result = client.get_big_query_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::BigQueryLink.
p result

Overloads:

  • #get_big_query_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::BigQueryLink

    Pass arguments to get_big_query_link via a request object, either of type GetBigQueryLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetBigQueryLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_big_query_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::BigQueryLink

    Pass arguments to get_big_query_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the BigQuery link to lookup. Format: properties/{property_id}/bigQueryLinks/{bigquery_link_id} Example: properties/123/bigQueryLinks/456

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10426

def get_big_query_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetBigQueryLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_big_query_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_big_query_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_big_query_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_big_query_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup #get_channel_group(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

Lookup for a single ChannelGroup.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetChannelGroupRequest.new

# Call the get_channel_group method.
result = client.get_channel_group request

# The returned object is of type Google::Analytics::Admin::V1alpha::ChannelGroup.
p result

Overloads:

  • #get_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

    Pass arguments to get_channel_group via a request object, either of type GetChannelGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetChannelGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_channel_group(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

    Pass arguments to get_channel_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The ChannelGroup to get. Example format: properties/1234/channelGroups/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9806

def get_channel_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetChannelGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_channel_group..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_channel_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_channel_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_channel_group, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent #get_conversion_event(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

Retrieve a single conversion event.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetConversionEventRequest.new

# Call the get_conversion_event method.
result = client.get_conversion_event request

# The returned object is of type Google::Analytics::Admin::V1alpha::ConversionEvent.
p result

Overloads:

  • #get_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    Pass arguments to get_conversion_event via a request object, either of type GetConversionEventRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetConversionEventRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_conversion_event(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    Pass arguments to get_conversion_event via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: "properties/123/conversionEvents/456"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4497
4498
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 4497

def get_conversion_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetConversionEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_conversion_event..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_conversion_event.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_conversion_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_conversion_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_custom_dimension(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension #get_custom_dimension(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

Lookup for a single CustomDimension.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest.new

# Call the get_custom_dimension method.
result = client.get_custom_dimension request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension.
p result

Overloads:

  • #get_custom_dimension(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

    Pass arguments to get_custom_dimension via a request object, either of type GetCustomDimensionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_custom_dimension(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

    Pass arguments to get_custom_dimension via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6127

def get_custom_dimension request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_custom_dimension..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_custom_dimension.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_custom_dimension.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_custom_dimension, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_custom_metric(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric #get_custom_metric(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

Lookup for a single CustomMetric.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetCustomMetricRequest.new

# Call the get_custom_metric method.
result = client.get_custom_metric request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric.
p result

Overloads:

  • #get_custom_metric(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    Pass arguments to get_custom_metric via a request object, either of type GetCustomMetricRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_custom_metric(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    Pass arguments to get_custom_metric via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6575

def get_custom_metric request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_custom_metric..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_custom_metric.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_custom_metric.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_custom_metric, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_data_retention_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings #get_data_retention_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

Returns the singleton data retention settings for this property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest.new

# Call the get_data_retention_settings method.
result = client.get_data_retention_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataRetentionSettings.
p result

Overloads:

  • #get_data_retention_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    Pass arguments to get_data_retention_settings via a request object, either of type GetDataRetentionSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_data_retention_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    Pass arguments to get_data_retention_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: "properties/1000/dataRetentionSettings"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6663

def get_data_retention_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_data_retention_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_data_retention_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_data_retention_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_data_retention_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_data_sharing_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings #get_data_sharing_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings

Get data sharing settings on an account. Data sharing settings are singletons.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest.new

# Call the get_data_sharing_settings method.
result = client.get_data_sharing_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataSharingSettings.
p result

Overloads:

  • #get_data_sharing_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings

    Pass arguments to get_data_sharing_settings via a request object, either of type GetDataSharingSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_data_sharing_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataSharingSettings

    Pass arguments to get_data_sharing_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: "accounts/1000/dataSharingSettings"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2931

def get_data_sharing_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_data_sharing_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_data_sharing_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_data_sharing_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_data_sharing_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream #get_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

Lookup for a single DataStream.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDataStreamRequest.new

# Call the get_data_stream method.
result = client.get_data_stream request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataStream.
p result

Overloads:

  • #get_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to get_data_stream via a request object, either of type GetDataStreamRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetDataStreamRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_data_stream(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to get_data_stream via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7202

def get_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_data_stream..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Look up a single DisplayVideo360AdvertiserLink

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest.new

# Call the get_display_video360_advertiser_link method.
result = client.get_display_video360_advertiser_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
p result

Overloads:

  • #get_display_video360_advertiser_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink

    Pass arguments to get_display_video360_advertiser_link via a request object, either of type GetDisplayVideo360AdvertiserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_display_video360_advertiser_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink

    Pass arguments to get_display_video360_advertiser_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the DisplayVideo360AdvertiserLink to get. Example format: properties/1234/displayVideo360AdvertiserLink/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4772

def get_display_video360_advertiser_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_display_video360_advertiser_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_display_video360_advertiser_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_display_video360_advertiser_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_display_video360_advertiser_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lookup for a single DisplayVideo360AdvertiserLinkProposal.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkProposalRequest.new

# Call the get_display_video360_advertiser_link_proposal method.
result = client.get_display_video360_advertiser_link_proposal request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5225

def get_display_video360_advertiser_link_proposal request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkProposalRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_display_video360_advertiser_link_proposal..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_display_video360_advertiser_link_proposal.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_display_video360_advertiser_link_proposal.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_display_video360_advertiser_link_proposal, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_enhanced_measurement_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings #get_enhanced_measurement_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

Returns the enhanced measurement settings for this data stream. Note that the stream must enable enhanced measurement for these settings to take effect.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest.new

# Call the get_enhanced_measurement_settings method.
result = client.get_enhanced_measurement_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings.
p result

Overloads:

  • #get_enhanced_measurement_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

    Pass arguments to get_enhanced_measurement_settings via a request object, either of type GetEnhancedMeasurementSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_enhanced_measurement_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

    Pass arguments to get_enhanced_measurement_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the settings to lookup. Format: properties/{property}/dataStreams/{data_stream}/enhancedMeasurementSettings Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10618

def get_enhanced_measurement_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_enhanced_measurement_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_enhanced_measurement_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_enhanced_measurement_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_enhanced_measurement_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule #get_event_create_rule(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

Lookup for a single EventCreateRule.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetEventCreateRuleRequest.new

# Call the get_event_create_rule method.
result = client.get_event_create_rule request

# The returned object is of type Google::Analytics::Admin::V1alpha::EventCreateRule.
p result

Overloads:

  • #get_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

    Pass arguments to get_event_create_rule via a request object, either of type GetEventCreateRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetEventCreateRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_event_create_rule(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

    Pass arguments to get_event_create_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the EventCreateRule to get. Example format: properties/123/dataStreams/456/eventCreateRules/789

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11494

def get_event_create_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetEventCreateRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_event_create_rule..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_event_create_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_event_create_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_event_create_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet #get_expanded_data_set(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

Lookup for a single ExpandedDataSet.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetExpandedDataSetRequest.new

# Call the get_expanded_data_set method.
result = client.get_expanded_data_set request

# The returned object is of type Google::Analytics::Admin::V1alpha::ExpandedDataSet.
p result

Overloads:

  • #get_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

    Pass arguments to get_expanded_data_set via a request object, either of type GetExpandedDataSetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetExpandedDataSetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_expanded_data_set(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

    Pass arguments to get_expanded_data_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the ExpandedDataSet to get. Example format: properties/1234/expandedDataSets/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9356

def get_expanded_data_set request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetExpandedDataSetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_expanded_data_set..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_expanded_data_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_expanded_data_set.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_expanded_data_set, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_global_site_tag(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag #get_global_site_tag(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag

Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest.new

# Call the get_global_site_tag method.
result = client.get_global_site_tag request

# The returned object is of type Google::Analytics::Admin::V1alpha::GlobalSiteTag.
p result

Overloads:

  • #get_global_site_tag(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag

    Pass arguments to get_global_site_tag via a request object, either of type GetGlobalSiteTagRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_global_site_tag(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GlobalSiteTag

    Pass arguments to get_global_site_tag via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: "properties/123/dataStreams/456/globalSiteTag"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2481

def get_global_site_tag request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_global_site_tag..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_global_site_tag.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_global_site_tag.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_global_site_tag, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_google_signals_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings #get_google_signals_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

Lookup for Google Signals settings for a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest.new

# Call the get_google_signals_settings method.
result = client.get_google_signals_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::GoogleSignalsSettings.
p result

Overloads:

  • #get_google_signals_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    Pass arguments to get_google_signals_settings via a request object, either of type GetGoogleSignalsSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_google_signals_settings(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    Pass arguments to get_google_signals_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the google signals settings to retrieve. Format: properties/{property}/googleSignalsSettings

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



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
4176
4177
4178
4179
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4140

def get_google_signals_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_google_signals_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_google_signals_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_google_signals_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_google_signals_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret #get_measurement_protocol_secret(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

Lookup for a single "GA4" MeasurementProtocolSecret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest.new

# Call the get_measurement_protocol_secret method.
result = client.get_measurement_protocol_secret request

# The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
p result

Overloads:

  • #get_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

    Pass arguments to get_measurement_protocol_secret via a request object, either of type GetMeasurementProtocolSecretRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_measurement_protocol_secret(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

    Pass arguments to get_measurement_protocol_secret via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3018

def get_measurement_protocol_secret request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_measurement_protocol_secret..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_measurement_protocol_secret.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_measurement_protocol_secret.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_measurement_protocol_secret, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property #get_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

Lookup for a single "GA4" Property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetPropertyRequest.new

# Call the get_property method.
result = client.get_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::Property.
p result

Overloads:

  • #get_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to get_property via a request object, either of type GetPropertyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetPropertyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_property(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to get_property via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the property to lookup. Format: properties/{property_id} Example: "properties/1000"

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 802

def get_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetPropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_property.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Look up a single SearchAds360Link

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetSearchAds360LinkRequest.new

# Call the get_search_ads360_link method.
result = client.get_search_ads360_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::SearchAds360Link.
p result

Overloads:

  • #get_search_ads360_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SearchAds360Link

    Pass arguments to get_search_ads360_link via a request object, either of type GetSearchAds360LinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetSearchAds360LinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_search_ads360_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SearchAds360Link

    Pass arguments to get_search_ads360_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the SearchAds360Link to get. Example format: properties/1234/SearchAds360Link/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7741

def get_search_ads360_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetSearchAds360LinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_search_ads360_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_search_ads360_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_search_ads360_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_sk_ad_network_conversion_value_schema(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema #get_sk_ad_network_conversion_value_schema(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema

Looks up a single SKAdNetworkConversionValueSchema.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetSKAdNetworkConversionValueSchemaRequest.new

# Call the get_sk_ad_network_conversion_value_schema method.
result = client.get_sk_ad_network_conversion_value_schema request

# The returned object is of type Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema.
p result

Overloads:

  • #get_sk_ad_network_conversion_value_schema(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema

    Pass arguments to get_sk_ad_network_conversion_value_schema via a request object, either of type GetSKAdNetworkConversionValueSchemaRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetSKAdNetworkConversionValueSchemaRequest, ::Hash)

      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_sk_ad_network_conversion_value_schema(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema

    Pass arguments to get_sk_ad_network_conversion_value_schema via keyword arguments. Note that at least one keyword argument 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 SKAdNetwork conversion value schema to look up. Format: properties/{property}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema/{skadnetwork_conversion_value_schema}

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3568

def get_sk_ad_network_conversion_value_schema request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetSKAdNetworkConversionValueSchemaRequest

  # Converts hash and nil 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_sk_ad_network_conversion_value_schema..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_sk_ad_network_conversion_value_schema.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_sk_ad_network_conversion_value_schema.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_sk_ad_network_conversion_value_schema, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Gets information about a user's link to an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::GetUserLinkRequest.new

# Call the get_user_link method.
result = client.get_user_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::UserLink.
p result

Overloads:

  • #get_user_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to get_user_link via a request object, either of type GetUserLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::GetUserLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_user_link(name: nil) ⇒ ::Google::Analytics::Admin::V1alpha::UserLink

    Pass arguments to get_user_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Example format: accounts/1234/userLinks/5678

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1270

def get_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetUserLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_user_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_user_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :get_user_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_access_bindings(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccessBinding> #list_access_bindings(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccessBinding>

Lists all access bindings on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAccessBindingsRequest.new

# Call the list_access_bindings method.
result = client.list_access_bindings request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AccessBinding.
  p item
end

Overloads:

  • #list_access_bindings(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccessBinding>

    Pass arguments to list_access_bindings via a request object, either of type ListAccessBindingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAccessBindingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_access_bindings(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccessBinding>

    Pass arguments to list_access_bindings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Formats:

      • accounts/{account}
      • properties/{property}
    • page_size (::Integer) (defaults to: nil)

      The maximum number of access bindings to return. The service may return fewer than this value. If unspecified, at most 200 access bindings will be returned. The maximum value is 500; values above 500 will be coerced to 500.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListAccessBindings call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccessBindings must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8892

def list_access_bindings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAccessBindingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_access_bindings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_access_bindings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_access_bindings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_access_bindings, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_access_bindings, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_account_summaries(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary> #list_account_summaries(page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>

Returns summaries of all accounts accessible by the caller.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest.new

# Call the list_account_summaries method.
result = client. request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AccountSummary.
  p item
end

Overloads:

  • #list_account_summaries(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>

    Pass arguments to list_account_summaries via a request object, either of type ListAccountSummariesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_account_summaries(page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>

    Pass arguments to list_account_summaries via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • page_size (::Integer) (defaults to: nil)

      The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListAccountSummaries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccountSummaries must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 722

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_account_summaries, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_account_summaries, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_accounts(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account> #list_accounts(page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>

Returns all accounts accessible by the caller.

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAccountsRequest.new

# Call the list_accounts method.
result = client.list_accounts request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Account.
  p item
end

Overloads:

  • #list_accounts(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>

    Pass arguments to list_accounts via a request object, either of type ListAccountsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAccountsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_accounts(page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>

    Pass arguments to list_accounts via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListAccounts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccounts must match the call that provided the page token.

    • show_deleted (::Boolean) (defaults to: nil)

      Whether to include soft-deleted (ie: "trashed") Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 364

def list_accounts request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAccountsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_accounts..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_accounts.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_accounts.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_accounts, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_accounts, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists AdSenseLinks on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAdSenseLinksRequest.new

# Call the list_ad_sense_links method.
result = client.list_ad_sense_links request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::AdSenseLink.
  p item
end

Overloads:

  • #list_ad_sense_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AdSenseLink>

    Pass arguments to list_ad_sense_links via a request object, either of type ListAdSenseLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAdSenseLinksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_ad_sense_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AdSenseLink>

    Pass arguments to list_ad_sense_links via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Resource name of the parent property. Format: properties/{propertyId} Example: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token received from a previous ListAdSenseLinks call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListAdSenseLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11407

def list_ad_sense_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAdSenseLinksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_ad_sense_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_ad_sense_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_ad_sense_links.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_ad_sense_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_ad_sense_links, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_audiences(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience> #list_audiences(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience>

Lists Audiences on a property. Audiences created before 2020 may not be supported. Default audiences will not show filter definitions.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListAudiencesRequest.new

# Call the list_audiences method.
result = client.list_audiences request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Audience.
  p item
end

Overloads:

  • #list_audiences(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience>

    Pass arguments to list_audiences via a request object, either of type ListAudiencesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListAudiencesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_audiences(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Audience>

    Pass arguments to list_audiences via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListAudiences call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListAudiences must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7391

def list_audiences request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAudiencesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_audiences..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_audiences.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_audiences.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_audiences, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_audiences, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists BigQuery Links on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListBigQueryLinksRequest.new

# Call the list_big_query_links method.
result = client.list_big_query_links request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::BigQueryLink.
  p item
end

Overloads:

  • #list_big_query_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::BigQueryLink>

    Pass arguments to list_big_query_links via a request object, either of type ListBigQueryLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListBigQueryLinksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_big_query_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::BigQueryLink>

    Pass arguments to list_big_query_links via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The name of the property to list BigQuery links under. Format: properties/{property_id} Example: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListBigQueryLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListBigQueryLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10527

def list_big_query_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListBigQueryLinksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_big_query_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_big_query_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_big_query_links.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_big_query_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_big_query_links, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_channel_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChannelGroup> #list_channel_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChannelGroup>

Lists ChannelGroups on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListChannelGroupsRequest.new

# Call the list_channel_groups method.
result = client.list_channel_groups request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ChannelGroup.
  p item
end

Overloads:

  • #list_channel_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChannelGroup>

    Pass arguments to list_channel_groups via a request object, either of type ListChannelGroupsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListChannelGroupsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_channel_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChannelGroup>

    Pass arguments to list_channel_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The property for which to list ChannelGroups. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListChannelGroups call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListChannelGroups must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9906

def list_channel_groups request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListChannelGroupsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_channel_groups..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_channel_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_channel_groups.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_channel_groups, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_channel_groups, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_connected_site_tags(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse #list_connected_site_tags(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse

Lists the connected site tags for a Universal Analytics property. A maximum of 20 connected site tags will be returned. Note: this has no effect on GA4 property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest.new

# Call the list_connected_site_tags method.
result = client.list_connected_site_tags request

# The returned object is of type Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse.
p result

Overloads:

  • #list_connected_site_tags(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse

    Pass arguments to list_connected_site_tags via a request object, either of type ListConnectedSiteTagsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_connected_site_tags(property: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse

    Pass arguments to list_connected_site_tags via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • property (::String) (defaults to: nil)

      The Universal Analytics property to fetch connected site tags for. This does not work on GA4 properties. A maximum of 20 connected site tags will be returned. Example Format: properties/1234

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10969

def list_connected_site_tags request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_connected_site_tags..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_connected_site_tags.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_connected_site_tags.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_connected_site_tags, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_conversion_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent> #list_conversion_events(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>

Returns a list of conversion events in the specified parent property.

Returns an empty list if no conversion events are found.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListConversionEventsRequest.new

# Call the list_conversion_events method.
result = client.list_conversion_events request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ConversionEvent.
  p item
end

Overloads:

  • #list_conversion_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>

    Pass arguments to list_conversion_events via a request object, either of type ListConversionEventsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_conversion_events(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>

    Pass arguments to list_conversion_events via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent property. Example: 'properties/123'

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListConversionEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListConversionEvents must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4685

def list_conversion_events request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_conversion_events..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_conversion_events.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_conversion_events.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_conversion_events, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_conversion_events, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_custom_dimensions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension> #list_custom_dimensions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>

Lists CustomDimensions on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest.new

# Call the list_custom_dimensions method.
result = client.list_custom_dimensions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomDimension.
  p item
end

Overloads:

  • #list_custom_dimensions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>

    Pass arguments to list_custom_dimensions via a request object, either of type ListCustomDimensionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_custom_dimensions(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>

    Pass arguments to list_custom_dimensions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListCustomDimensions call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListCustomDimensions must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5954

def list_custom_dimensions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_custom_dimensions..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_custom_dimensions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_custom_dimensions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_custom_dimensions, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_custom_dimensions, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_custom_metrics(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric> #list_custom_metrics(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>

Lists CustomMetrics on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest.new

# Call the list_custom_metrics method.
result = client.list_custom_metrics request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomMetric.
  p item
end

Overloads:

  • #list_custom_metrics(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>

    Pass arguments to list_custom_metrics via a request object, either of type ListCustomMetricsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_custom_metrics(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>

    Pass arguments to list_custom_metrics via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListCustomMetrics call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListCustomMetrics must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6402

def list_custom_metrics request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_custom_metrics..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_custom_metrics.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_custom_metrics.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_custom_metrics, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_custom_metrics, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_data_streams(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream> #list_data_streams(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>

Lists DataStreams on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListDataStreamsRequest.new

# Call the list_data_streams method.
result = client.list_data_streams request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DataStream.
  p item
end

Overloads:

  • #list_data_streams(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>

    Pass arguments to list_data_streams via a request object, either of type ListDataStreamsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListDataStreamsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_data_streams(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>

    Pass arguments to list_data_streams via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListDataStreams call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListDataStreams must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7115

def list_data_streams request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListDataStreamsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_data_streams..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_data_streams.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_data_streams.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_data_streams, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_data_streams, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists DisplayVideo360AdvertiserLinkProposals on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinkProposalsRequest.new

# Call the list_display_video360_advertiser_link_proposals method.
result = client.list_display_video360_advertiser_link_proposals request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal.
  p item
end

Overloads:

  • #list_display_video360_advertiser_link_proposals(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal>

    Pass arguments to list_display_video360_advertiser_link_proposals via a request object, either of type ListDisplayVideo360AdvertiserLinkProposalsRequest or an equivalent Hash.

    Parameters:

  • #list_display_video360_advertiser_link_proposals(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal>

    Pass arguments to list_display_video360_advertiser_link_proposals via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListDisplayVideo360AdvertiserLinkProposals call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListDisplayVideo360AdvertiserLinkProposals must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5326

def list_display_video360_advertiser_link_proposals request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinkProposalsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_display_video360_advertiser_link_proposals..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_display_video360_advertiser_link_proposals.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_display_video360_advertiser_link_proposals.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_display_video360_advertiser_link_proposals, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_display_video360_advertiser_link_proposals, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists all DisplayVideo360AdvertiserLinks on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest.new

# Call the list_display_video360_advertiser_links method.
result = client.list_display_video360_advertiser_links request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
  p item
end

Overloads:

  • #list_display_video360_advertiser_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink>

    Pass arguments to list_display_video360_advertiser_links via a request object, either of type ListDisplayVideo360AdvertiserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_display_video360_advertiser_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink>

    Pass arguments to list_display_video360_advertiser_links via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListDisplayVideo360AdvertiserLinks call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListDisplayVideo360AdvertiserLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4872

def list_display_video360_advertiser_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_display_video360_advertiser_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_display_video360_advertiser_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_display_video360_advertiser_links.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_display_video360_advertiser_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_display_video360_advertiser_links, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_event_create_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::EventCreateRule> #list_event_create_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::EventCreateRule>

Lists EventCreateRules on a web data stream.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListEventCreateRulesRequest.new

# Call the list_event_create_rules method.
result = client.list_event_create_rules request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::EventCreateRule.
  p item
end

Overloads:

  • #list_event_create_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::EventCreateRule>

    Pass arguments to list_event_create_rules via a request object, either of type ListEventCreateRulesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListEventCreateRulesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_event_create_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::EventCreateRule>

    Pass arguments to list_event_create_rules via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/123/dataStreams/456

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListEventCreateRules call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListEventCreateRules must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11593

def list_event_create_rules request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListEventCreateRulesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_event_create_rules..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_event_create_rules.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_event_create_rules.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_event_create_rules, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_event_create_rules, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_expanded_data_sets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ExpandedDataSet> #list_expanded_data_sets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ExpandedDataSet>

Lists ExpandedDataSets on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListExpandedDataSetsRequest.new

# Call the list_expanded_data_sets method.
result = client.list_expanded_data_sets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ExpandedDataSet.
  p item
end

Overloads:

  • #list_expanded_data_sets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ExpandedDataSet>

    Pass arguments to list_expanded_data_sets via a request object, either of type ListExpandedDataSetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListExpandedDataSetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_expanded_data_sets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ExpandedDataSet>

    Pass arguments to list_expanded_data_sets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListExpandedDataSets call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListExpandedDataSet must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9455

def list_expanded_data_sets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListExpandedDataSetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_expanded_data_sets..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_expanded_data_sets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_expanded_data_sets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_expanded_data_sets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_expanded_data_sets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest.new

# Call the list_firebase_links method.
result = client.list_firebase_links request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::FirebaseLink.
  p item
end

Overloads:

  • #list_firebase_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::FirebaseLink>

    Pass arguments to list_firebase_links via a request object, either of type ListFirebaseLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_firebase_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::FirebaseLink>

    Pass arguments to list_firebase_links via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Format: properties/{property_id} Example: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListFirebaseLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListFirebaseLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2391

def list_firebase_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_firebase_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_firebase_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_firebase_links.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_firebase_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_firebase_links, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists GoogleAdsLinks on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest.new

# Call the list_google_ads_links method.
result = client.list_google_ads_links request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::GoogleAdsLink.
  p item
end

Overloads:

  • #list_google_ads_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::GoogleAdsLink>

    Pass arguments to list_google_ads_links via a request object, either of type ListGoogleAdsLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_google_ads_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::GoogleAdsLink>

    Pass arguments to list_google_ads_links via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListGoogleAdsLinks call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListGoogleAdsLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2842

def list_google_ads_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_google_ads_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_google_ads_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_google_ads_links.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_google_ads_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_google_ads_links, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_measurement_protocol_secrets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret> #list_measurement_protocol_secrets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>

Returns child MeasurementProtocolSecrets under the specified parent Property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest.new

# Call the list_measurement_protocol_secrets method.
result = client.list_measurement_protocol_secrets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
  p item
end

Overloads:

  • #list_measurement_protocol_secrets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>

    Pass arguments to list_measurement_protocol_secrets via a request object, either of type ListMeasurementProtocolSecretsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_measurement_protocol_secrets(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>

    Pass arguments to list_measurement_protocol_secrets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListMeasurementProtocolSecrets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListMeasurementProtocolSecrets must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3119

def list_measurement_protocol_secrets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_measurement_protocol_secrets..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_measurement_protocol_secrets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_measurement_protocol_secrets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_measurement_protocol_secrets, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_measurement_protocol_secrets, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_properties(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property> #list_properties(filter: nil, page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>

Returns child Properties under the specified parent Account.

Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListPropertiesRequest.new

# Call the list_properties method.
result = client.list_properties request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::Property.
  p item
end

Overloads:

  • #list_properties(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>

    Pass arguments to list_properties via a request object, either of type ListPropertiesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListPropertiesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_properties(filter: nil, page_size: nil, page_token: nil, show_deleted: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>

    Pass arguments to list_properties via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • filter (::String) (defaults to: nil)

      Required. An expression for filtering the results of the request. Fields eligible for filtering are: parent:(The resource name of the parent account/property) or ancestor:(The resource name of the parent account) or firebase_project:(The id or number of the linked firebase project). Some examples of filters:

      | Filter                      | Description                               |
      |-----------------------------|-------------------------------------------|
      | parent:accounts/123         | The account with account id: 123.       |
      | parent:properties/123       | The property with property id: 123.       |
      | ancestor:accounts/123       | The account with account id: 123.         |
      | firebase_project:project-id | The firebase project with id: project-id. |
      | firebase_project:123        | The firebase project with number: 123.    |
      
    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListProperties call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

    • show_deleted (::Boolean) (defaults to: nil)

      Whether to include soft-deleted (ie: "trashed") Properties in the results. Properties can be inspected to determine whether they are deleted or not.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 925

def list_properties request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListPropertiesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_properties..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_properties.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_properties.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_properties, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_properties, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists all SearchAds360Links on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListSearchAds360LinksRequest.new

# Call the list_search_ads360_links method.
result = client.list_search_ads360_links request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::SearchAds360Link.
  p item
end

Overloads:

  • #list_search_ads360_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SearchAds360Link>

    Pass arguments to list_search_ads360_links via a request object, either of type ListSearchAds360LinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListSearchAds360LinksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_search_ads360_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SearchAds360Link>

    Pass arguments to list_search_ads360_links via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: properties/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListSearchAds360Links call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListSearchAds360Links must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7841

def list_search_ads360_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListSearchAds360LinksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_search_ads360_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_search_ads360_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_search_ads360_links.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_search_ads360_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_search_ads360_links, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_sk_ad_network_conversion_value_schemas(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema> #list_sk_ad_network_conversion_value_schemas(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema>

Lists SKAdNetworkConversionValueSchema on a stream. Properties can have at most one SKAdNetworkConversionValueSchema.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListSKAdNetworkConversionValueSchemasRequest.new

# Call the list_sk_ad_network_conversion_value_schemas method.
result = client.list_sk_ad_network_conversion_value_schemas request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema.
  p item
end

Overloads:

  • #list_sk_ad_network_conversion_value_schemas(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema>

    Pass arguments to list_sk_ad_network_conversion_value_schemas via a request object, either of type ListSKAdNetworkConversionValueSchemasRequest or an equivalent Hash.

    Parameters:

  • #list_sk_ad_network_conversion_value_schemas(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema>

    Pass arguments to list_sk_ad_network_conversion_value_schemas via keyword arguments. Note that at least one keyword argument 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}/dataStreams/{dataStream}/sKAdNetworkConversionValueSchema Example: properties/1234/dataStreams/5678/sKAdNetworkConversionValueSchema

    • 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 ListSKAdNetworkConversionValueSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListSKAdNetworkConversionValueSchema 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.



3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3934

def list_sk_ad_network_conversion_value_schemas request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListSKAdNetworkConversionValueSchemasRequest

  # Converts hash and nil 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_sk_ad_network_conversion_value_schemas..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_sk_ad_network_conversion_value_schemas.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_sk_ad_network_conversion_value_schemas.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_sk_ad_network_conversion_value_schemas, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_sk_ad_network_conversion_value_schemas, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Lists all user links on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ListUserLinksRequest.new

# Call the list_user_links method.
result = client.list_user_links request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::UserLink.
  p item
end

Overloads:

  • #list_user_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::UserLink>

    Pass arguments to list_user_links via a request object, either of type ListUserLinksRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::ListUserLinksRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_user_links(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::UserLink>

    Pass arguments to list_user_links via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Example format: accounts/1234

    • page_size (::Integer) (defaults to: nil)

      The maximum number of user links to return. The service may return fewer than this value. If unspecified, at most 200 user links will be returned. The maximum value is 500; values above 500 will be coerced to 500.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListUserLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListUserLinks must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1461

def list_user_links request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListUserLinksRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_user_links..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_user_links.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_user_links.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :list_user_links, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_user_links, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#provision_account_ticket(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse #provision_account_ticket(account: nil, redirect_uri: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse

Requests a ticket for creating an account.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest.new

# Call the provision_account_ticket method.
result = client. request

# The returned object is of type Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 633

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :provision_account_ticket, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#run_access_report(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse #run_access_report(entity: nil, dimensions: nil, metrics: nil, date_ranges: nil, dimension_filter: nil, metric_filter: nil, offset: nil, limit: nil, time_zone: nil, order_bys: nil, return_entity_quota: nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse

Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years.

Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators.

These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see searchChangeHistoryEvents.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::RunAccessReportRequest.new

# Call the run_access_report method.
result = client.run_access_report request

# The returned object is of type Google::Analytics::Admin::V1alpha::RunAccessReportResponse.
p result

Overloads:

  • #run_access_report(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse

    Pass arguments to run_access_report via a request object, either of type RunAccessReportRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::RunAccessReportRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #run_access_report(entity: nil, dimensions: nil, metrics: nil, date_ranges: nil, dimension_filter: nil, metric_filter: nil, offset: nil, limit: nil, time_zone: nil, order_bys: nil, return_entity_quota: nil) ⇒ ::Google::Analytics::Admin::V1alpha::RunAccessReportResponse

    Pass arguments to run_access_report via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • entity (::String) (defaults to: nil)

      The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account.

      To request at the property level, entity should be for example 'properties/123' if "123" is your GA4 property ID. To request at the account level, entity should be for example 'accounts/1234' if "1234" is your GA4 Account ID.

    • dimensions (::Array<::Google::Analytics::Admin::V1alpha::AccessDimension, ::Hash>) (defaults to: nil)

      The dimensions requested and displayed in the response. Requests are allowed up to 9 dimensions.

    • metrics (::Array<::Google::Analytics::Admin::V1alpha::AccessMetric, ::Hash>) (defaults to: nil)

      The metrics requested and displayed in the response. Requests are allowed up to 10 metrics.

    • date_ranges (::Array<::Google::Analytics::Admin::V1alpha::AccessDateRange, ::Hash>) (defaults to: nil)

      Date ranges of access records to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the access records for the overlapping days is included in the response rows for both date ranges. Requests are allowed up to 2 date ranges.

    • dimension_filter (::Google::Analytics::Admin::V1alpha::AccessFilterExpression, ::Hash) (defaults to: nil)

      Dimension filters let you restrict report response to specific dimension values which match the filter. For example, filtering on access records of a single user. To learn more, see Fundamentals of Dimension Filters for examples. Metrics cannot be used in this filter.

    • metric_filter (::Google::Analytics::Admin::V1alpha::AccessFilterExpression, ::Hash) (defaults to: nil)

      Metric filters allow you to restrict report response to specific metric values which match the filter. Metric filters are applied after aggregating the report's rows, similar to SQL having-clause. Dimensions cannot be used in this filter.

    • offset (::Integer) (defaults to: nil)

      The row count of the start row. The first row is counted as row 0. If offset is unspecified, it is treated as 0. If offset is zero, then this method will return the first page of results with limit entries.

      To learn more about this pagination parameter, see Pagination.

    • limit (::Integer) (defaults to: nil)

      The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. limit must be positive.

      The API may return fewer rows than the requested limit, if there aren't as many remaining rows as the limit. For instance, there are fewer than 300 possible values for the dimension country, so when reporting on only country, you can't get more than 300 rows, even if you set limit to a higher value.

      To learn more about this pagination parameter, see Pagination.

    • time_zone (::String) (defaults to: nil)

      This request's time zone if specified. If unspecified, the property's time zone is used. The request's time zone is used to interpret the start & end dates of the report.

      Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example "America/New_York" or "Asia/Tokyo".

    • order_bys (::Array<::Google::Analytics::Admin::V1alpha::AccessOrderBy, ::Hash>) (defaults to: nil)

      Specifies how rows are ordered in the response.

    • return_entity_quota (::Boolean) (defaults to: nil)

      Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in AccessQuota. For account-level requests, this field must be false.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8442

def run_access_report request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::RunAccessReportRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.run_access_report..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.entity
    header_params["entity"] = request.entity
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.run_access_report.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.run_access_report.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :run_access_report, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#search_change_history_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent> #search_change_history_events(account: nil, property: nil, resource_type: nil, action: nil, actor_email: nil, earliest_change_time: nil, latest_change_time: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>

Searches through all changes to an account or its children given the specified set of filters.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest.new

# Call the search_change_history_events method.
result = client.search_change_history_events request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent.
  p item
end

Overloads:

  • #search_change_history_events(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>

    Pass arguments to search_change_history_events via a request object, either of type SearchChangeHistoryEventsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #search_change_history_events(account: nil, property: nil, resource_type: nil, action: nil, actor_email: nil, earliest_change_time: nil, latest_change_time: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>

    Pass arguments to search_change_history_events via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • account (::String) (defaults to: nil)

      Required. The account resource for which to return change history resources.

    • property (::String) (defaults to: nil)

      Optional. Resource name for a child property. If set, only return changes made to this property or its child resources.

    • resource_type (::Array<::Google::Analytics::Admin::V1alpha::ChangeHistoryResourceType>) (defaults to: nil)

      Optional. If set, only return changes if they are for a resource that matches at least one of these types.

    • action (::Array<::Google::Analytics::Admin::V1alpha::ActionType>) (defaults to: nil)

      Optional. If set, only return changes that match one or more of these types of actions.

    • actor_email (::Array<::String>) (defaults to: nil)

      Optional. If set, only return changes if they are made by a user in this list.

    • earliest_change_time (::Google::Protobuf::Timestamp, ::Hash) (defaults to: nil)

      Optional. If set, only return changes made after this time (inclusive).

    • latest_change_time (::Google::Protobuf::Timestamp, ::Hash) (defaults to: nil)

      Optional. If set, only return changes made before this time (inclusive).

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of ChangeHistoryEvent items to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 items will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

    • page_token (::String) (defaults to: nil)

      Optional. A page token, received from a previous SearchChangeHistoryEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchChangeHistoryEvents must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4053

def search_change_history_events request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.search_change_history_events..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.
    header_params["account"] = request.
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.search_change_history_events.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.search_change_history_events.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :search_change_history_events, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :search_change_history_events, request, response, operation, options
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#set_automated_ga4_configuration_opt_out(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse #set_automated_ga4_configuration_opt_out(property: nil, opt_out: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse

Sets the opt out status for the automated GA4 setup process for a UA property. Note: this has no effect on GA4 property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutRequest.new

# Call the set_automated_ga4_configuration_opt_out method.
result = client.set_automated_ga4_configuration_opt_out request

# The returned object is of type Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse.
p result

Overloads:

  • #set_automated_ga4_configuration_opt_out(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse

    Pass arguments to set_automated_ga4_configuration_opt_out via a request object, either of type SetAutomatedGa4ConfigurationOptOutRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #set_automated_ga4_configuration_opt_out(property: nil, opt_out: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutResponse

    Pass arguments to set_automated_ga4_configuration_opt_out via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • property (::String) (defaults to: nil)

      Required. The UA property to set the opt out status. Note this request uses the internal property ID, not the tracking ID of the form UA-XXXXXX-YY. Format: properties/{internalWebPropertyId} Example: properties/1234

    • opt_out (::Boolean) (defaults to: nil)

      The status to set.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10265

def set_automated_ga4_configuration_opt_out request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::SetAutomatedGa4ConfigurationOptOutRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.set_automated_ga4_configuration_opt_out..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.set_automated_ga4_configuration_opt_out.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.set_automated_ga4_configuration_opt_out.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :set_automated_ga4_configuration_opt_out, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_access_binding(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding #update_access_binding(access_binding: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AccessBinding

Updates an access binding on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateAccessBindingRequest.new

# Call the update_access_binding method.
result = client.update_access_binding request

# The returned object is of type Google::Analytics::Admin::V1alpha::AccessBinding.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8704

def update_access_binding request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAccessBindingRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_access_binding..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.access_binding&.name
    header_params["access_binding.name"] = request.access_binding.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_access_binding.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_access_binding.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_access_binding, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_account(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account #update_account(account: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

Updates an account.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateAccountRequest.new

# Call the update_account method.
result = client. request

# The returned object is of type Google::Analytics::Admin::V1alpha::Account.
p result

Overloads:

  • #update_account(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    Pass arguments to update_account via a request object, either of type UpdateAccountRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateAccountRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_account(account: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Account

    Pass arguments to update_account via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • account (::Google::Analytics::Admin::V1alpha::Account, ::Hash) (defaults to: nil)

      Required. The account to update. The account's name field is used to identify the account.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (for example, "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 545

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAccountRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.&.name
    header_params["account.name"] = request..name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_account, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings #update_attribution_settings(attribution_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

Updates attribution settings on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateAttributionSettingsRequest.new

# Call the update_attribution_settings method.
result = client.update_attribution_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::AttributionSettings.
p result

Overloads:

  • #update_attribution_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to update_attribution_settings via a request object, either of type UpdateAttributionSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateAttributionSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_attribution_settings(attribution_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::AttributionSettings

    Pass arguments to update_attribution_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • attribution_settings (::Google::Analytics::Admin::V1alpha::AttributionSettings, ::Hash) (defaults to: nil)

      Required. The attribution settings to update. The name field is used to identify the settings to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8281

def update_attribution_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAttributionSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_attribution_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.attribution_settings&.name
    header_params["attribution_settings.name"] = request.attribution_settings.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_attribution_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_attribution_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_attribution_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience #update_audience(audience: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

Updates an Audience on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateAudienceRequest.new

# Call the update_audience method.
result = client.update_audience request

# The returned object is of type Google::Analytics::Admin::V1alpha::Audience.
p result

Overloads:

  • #update_audience(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to update_audience via a request object, either of type UpdateAudienceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateAudienceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_audience(audience: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Audience

    Pass arguments to update_audience via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • audience (::Google::Analytics::Admin::V1alpha::Audience, ::Hash) (defaults to: nil)

      Required. The audience to update. The audience's name field is used to identify the audience to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7570

def update_audience request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAudienceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_audience..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.audience&.name
    header_params["audience.name"] = request.audience.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_audience.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_audience.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_audience, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup #update_channel_group(channel_group: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

Updates a ChannelGroup.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateChannelGroupRequest.new

# Call the update_channel_group method.
result = client.update_channel_group request

# The returned object is of type Google::Analytics::Admin::V1alpha::ChannelGroup.
p result

Overloads:

  • #update_channel_group(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

    Pass arguments to update_channel_group via a request object, either of type UpdateChannelGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateChannelGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_channel_group(channel_group: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ChannelGroup

    Pass arguments to update_channel_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • channel_group (::Google::Analytics::Admin::V1alpha::ChannelGroup, ::Hash) (defaults to: nil)

      Required. The ChannelGroup to update. The resource's name field is used to identify the ChannelGroup to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10087

def update_channel_group request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateChannelGroupRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_channel_group..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.channel_group&.name
    header_params["channel_group.name"] = request.channel_group.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_channel_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_channel_group.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_channel_group, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent #update_conversion_event(conversion_event: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

Updates a conversion event with the specified attributes.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateConversionEventRequest.new

# Call the update_conversion_event method.
result = client.update_conversion_event request

# The returned object is of type Google::Analytics::Admin::V1alpha::ConversionEvent.
p result

Overloads:

  • #update_conversion_event(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    Pass arguments to update_conversion_event via a request object, either of type UpdateConversionEventRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateConversionEventRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_conversion_event(conversion_event: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ConversionEvent

    Pass arguments to update_conversion_event via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • conversion_event (::Google::Analytics::Admin::V1alpha::ConversionEvent, ::Hash) (defaults to: nil)

      Required. The conversion event to update. The name field is used to identify the settings to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4410

def update_conversion_event request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateConversionEventRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_conversion_event..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.conversion_event&.name
    header_params["conversion_event.name"] = request.conversion_event.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_conversion_event.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_conversion_event.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_conversion_event, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_custom_dimension(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension #update_custom_dimension(custom_dimension: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomDimension

Updates a CustomDimension on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest.new

# Call the update_custom_dimension method.
result = client.update_custom_dimension request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5855

def update_custom_dimension request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_custom_dimension..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.custom_dimension&.name
    header_params["custom_dimension.name"] = request.custom_dimension.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_custom_dimension.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_custom_dimension.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_custom_dimension, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_custom_metric(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric #update_custom_metric(custom_metric: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

Updates a CustomMetric on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest.new

# Call the update_custom_metric method.
result = client.update_custom_metric request

# The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric.
p result

Overloads:

  • #update_custom_metric(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    Pass arguments to update_custom_metric via a request object, either of type UpdateCustomMetricRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_custom_metric(custom_metric: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::CustomMetric

    Pass arguments to update_custom_metric via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6303

def update_custom_metric request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_custom_metric..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.custom_metric&.name
    header_params["custom_metric.name"] = request.custom_metric.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_custom_metric.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_custom_metric.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_custom_metric, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_data_retention_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings #update_data_retention_settings(data_retention_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

Updates the singleton data retention settings for this property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest.new

# Call the update_data_retention_settings method.
result = client.update_data_retention_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataRetentionSettings.
p result

Overloads:

  • #update_data_retention_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    Pass arguments to update_data_retention_settings via a request object, either of type UpdateDataRetentionSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_data_retention_settings(data_retention_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataRetentionSettings

    Pass arguments to update_data_retention_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • data_retention_settings (::Google::Analytics::Admin::V1alpha::DataRetentionSettings, ::Hash) (defaults to: nil)

      Required. The settings to update. The name field is used to identify the settings to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 6754

def update_data_retention_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_data_retention_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.data_retention_settings&.name
    header_params["data_retention_settings.name"] = request.data_retention_settings.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_data_retention_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_data_retention_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_data_retention_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream #update_data_stream(data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

Updates a DataStream on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest.new

# Call the update_data_stream method.
result = client.update_data_stream request

# The returned object is of type Google::Analytics::Admin::V1alpha::DataStream.
p result

Overloads:

  • #update_data_stream(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to update_data_stream via a request object, either of type UpdateDataStreamRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_data_stream(data_stream: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::DataStream

    Pass arguments to update_data_stream via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 7016

def update_data_stream request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_data_stream..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.data_stream&.name
    header_params["data_stream.name"] = request.data_stream.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_data_stream.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_data_stream.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_data_stream, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Updates a DisplayVideo360AdvertiserLink on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateDisplayVideo360AdvertiserLinkRequest.new

# Call the update_display_video360_advertiser_link method.
result = client.update_display_video360_advertiser_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 5139

def update_display_video360_advertiser_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateDisplayVideo360AdvertiserLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_display_video360_advertiser_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.display_video_360_advertiser_link&.name
    header_params["display_video_360_advertiser_link.name"] = request.display_video_360_advertiser_link.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_display_video360_advertiser_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_display_video360_advertiser_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_display_video360_advertiser_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_enhanced_measurement_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings #update_enhanced_measurement_settings(enhanced_measurement_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings

Updates the enhanced measurement settings for this data stream. Note that the stream must enable enhanced measurement for these settings to take effect.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest.new

# Call the update_enhanced_measurement_settings method.
result = client.update_enhanced_measurement_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 10711

def update_enhanced_measurement_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_enhanced_measurement_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.enhanced_measurement_settings&.name
    header_params["enhanced_measurement_settings.name"] = request.enhanced_measurement_settings.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_enhanced_measurement_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_enhanced_measurement_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_enhanced_measurement_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule #update_event_create_rule(event_create_rule: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

Updates an EventCreateRule.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateEventCreateRuleRequest.new

# Call the update_event_create_rule method.
result = client.update_event_create_rule request

# The returned object is of type Google::Analytics::Admin::V1alpha::EventCreateRule.
p result

Overloads:

  • #update_event_create_rule(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

    Pass arguments to update_event_create_rule via a request object, either of type UpdateEventCreateRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateEventCreateRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_event_create_rule(event_create_rule: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::EventCreateRule

    Pass arguments to update_event_create_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • event_create_rule (::Google::Analytics::Admin::V1alpha::EventCreateRule, ::Hash) (defaults to: nil)

      Required. The EventCreateRule to update. The resource's name field is used to identify the EventCreateRule to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 11773

def update_event_create_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateEventCreateRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_event_create_rule..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.event_create_rule&.name
    header_params["event_create_rule.name"] = request.event_create_rule.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_event_create_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_event_create_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_event_create_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet #update_expanded_data_set(expanded_data_set: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

Updates a ExpandedDataSet on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateExpandedDataSetRequest.new

# Call the update_expanded_data_set method.
result = client.update_expanded_data_set request

# The returned object is of type Google::Analytics::Admin::V1alpha::ExpandedDataSet.
p result

Overloads:

  • #update_expanded_data_set(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

    Pass arguments to update_expanded_data_set via a request object, either of type UpdateExpandedDataSetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateExpandedDataSetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_expanded_data_set(expanded_data_set: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::ExpandedDataSet

    Pass arguments to update_expanded_data_set via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • expanded_data_set (::Google::Analytics::Admin::V1alpha::ExpandedDataSet, ::Hash) (defaults to: nil)

      Required. The ExpandedDataSet to update. The resource's name field is used to identify the ExpandedDataSet to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 9635

def update_expanded_data_set request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateExpandedDataSetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_expanded_data_set..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.expanded_data_set&.name
    header_params["expanded_data_set.name"] = request.expanded_data_set.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_expanded_data_set.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_expanded_data_set.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_expanded_data_set, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Updates a GoogleAdsLink on a property

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest.new

# Call the update_google_ads_link method.
result = client.update_google_ads_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::GoogleAdsLink.
p result

Overloads:

  • #update_google_ads_link(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleAdsLink

    Pass arguments to update_google_ads_link via a request object, either of type UpdateGoogleAdsLinkRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_google_ads_link(google_ads_link: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleAdsLink

    Pass arguments to update_google_ads_link via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • google_ads_link (::Google::Analytics::Admin::V1alpha::GoogleAdsLink, ::Hash) (defaults to: nil)

      The GoogleAdsLink to update

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 2658

def update_google_ads_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_google_ads_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.google_ads_link&.name
    header_params["google_ads_link.name"] = request.google_ads_link.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_google_ads_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_google_ads_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_google_ads_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_google_signals_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings #update_google_signals_settings(google_signals_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

Updates Google Signals settings for a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest.new

# Call the update_google_signals_settings method.
result = client.update_google_signals_settings request

# The returned object is of type Google::Analytics::Admin::V1alpha::GoogleSignalsSettings.
p result

Overloads:

  • #update_google_signals_settings(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    Pass arguments to update_google_signals_settings via a request object, either of type UpdateGoogleSignalsSettingsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_google_signals_settings(google_signals_settings: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings

    Pass arguments to update_google_signals_settings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • google_signals_settings (::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings, ::Hash) (defaults to: nil)

      Required. The settings to update. The name field is used to identify the settings to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 4231

def update_google_signals_settings request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_google_signals_settings..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.google_signals_settings&.name
    header_params["google_signals_settings.name"] = request.google_signals_settings.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_google_signals_settings.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_google_signals_settings.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_google_signals_settings, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_measurement_protocol_secret(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret #update_measurement_protocol_secret(measurement_protocol_secret: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret

Updates a measurement protocol secret.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest.new

# Call the update_measurement_protocol_secret method.
result = client.update_measurement_protocol_secret request

# The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3383

def update_measurement_protocol_secret request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_measurement_protocol_secret..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.measurement_protocol_secret&.name
    header_params["measurement_protocol_secret.name"] = request.measurement_protocol_secret.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_measurement_protocol_secret.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_measurement_protocol_secret.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_measurement_protocol_secret, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property #update_property(property: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

Updates a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdatePropertyRequest.new

# Call the update_property method.
result = client.update_property request

# The returned object is of type Google::Analytics::Admin::V1alpha::Property.
p result

Overloads:

  • #update_property(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to update_property via a request object, either of type UpdatePropertyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_property(property: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::Property

    Pass arguments to update_property via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • property (::Google::Analytics::Admin::V1alpha::Property, ::Hash) (defaults to: nil)

      Required. The property to update. The property's name field is used to identify the property to be updated.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1185

def update_property request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_property..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.property&.name
    header_params["property.name"] = request.property.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_property.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_property.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_property, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Updates a SearchAds360Link on a property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateSearchAds360LinkRequest.new

# Call the update_search_ads360_link method.
result = client.update_search_ads360_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::SearchAds360Link.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 8104

def update_search_ads360_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateSearchAds360LinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_search_ads360_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.search_ads_360_link&.name
    header_params["search_ads_360_link.name"] = request.search_ads_360_link.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_search_ads360_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_search_ads360_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_search_ads360_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_sk_ad_network_conversion_value_schema(request, options = nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema #update_sk_ad_network_conversion_value_schema(skadnetwork_conversion_value_schema: nil, update_mask: nil) ⇒ ::Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema

Updates a SKAdNetworkConversionValueSchema.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateSKAdNetworkConversionValueSchemaRequest.new

# Call the update_sk_ad_network_conversion_value_schema method.
result = client.update_sk_ad_network_conversion_value_schema request

# The returned object is of type Google::Analytics::Admin::V1alpha::SKAdNetworkConversionValueSchema.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



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
3869
3870
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 3831

def update_sk_ad_network_conversion_value_schema request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateSKAdNetworkConversionValueSchemaRequest

  # Converts hash and nil 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_sk_ad_network_conversion_value_schema..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.skadnetwork_conversion_value_schema&.name
    header_params["skadnetwork_conversion_value_schema.name"] = request.skadnetwork_conversion_value_schema.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_sk_ad_network_conversion_value_schema.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_sk_ad_network_conversion_value_schema.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_sk_ad_network_conversion_value_schema, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

Updates a user link on an account or property.

Examples:

Basic example

require "google/analytics/admin/v1alpha"

# Create a client object. The client can be reused for multiple calls.
client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest.new

# Call the update_user_link method.
result = client.update_user_link request

# The returned object is of type Google::Analytics::Admin::V1alpha::UserLink.
p result

Overloads:

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
# File 'lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb', line 1847

def update_user_link request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_user_link..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.user_link&.name
    header_params["user_link.name"] = request.user_link.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_user_link.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_user_link.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @analytics_admin_service_stub.call_rpc :update_user_link, request, options: options do |response, operation|
    yield response, operation if block_given?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end