google-analytics-admin-v1alpha 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/analytics/admin/v1alpha/analytics_admin_pb.rb +30 -0
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb +490 -11
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/paths.rb +17 -0
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/client.rb +399 -11
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/service_stub.rb +301 -0
- data/lib/google/analytics/admin/v1alpha/analytics_admin_services_pb.rb +19 -0
- data/lib/google/analytics/admin/v1alpha/resources_pb.rb +22 -0
- data/lib/google/analytics/admin/v1alpha/version.rb +1 -1
- data/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb +105 -10
- data/proto_docs/google/analytics/admin/v1alpha/resources.rb +84 -6
- data/proto_docs/google/api/client.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 810b5fa72ab176563c5bcdb40469b7c59908ff1cce084cca8420c5d19adfefca
|
4
|
+
data.tar.gz: f9a90c8dbc3d1b8c75ad12079ffdf2c788b3ab698fa2491cc5eca32396ec6a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be13acad8d4ac462cf4bffa4668c9766139342b741bd4ed26f48f5c32ff4ac561251d577c13ce50c9fa1a79daa75b3a6286cf297677b8f369ec0d007561f1283
|
7
|
+
data.tar.gz: 5f1c7183ba11725aa2f1f28773e2ab73c6ae2eec2b1c0c990716fd1d9d7d02bd7b695d62e2464b06a1ab5eb292f836dffa8bf57ea2726c6f652a93861dd52bb1
|
data/README.md
CHANGED
@@ -37,14 +37,14 @@ request = ::Google::Analytics::Admin::V1alpha::GetAccountRequest.new # (request
|
|
37
37
|
response = client.get_account request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://rubydoc.info/gems/google-analytics-admin-v1alpha)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
## Enabling Logging
|
44
44
|
|
45
45
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
46
46
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
47
|
-
or a [`Google::Cloud::Logging::Logger`](https://
|
47
|
+
or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
|
48
48
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
49
49
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
50
50
|
|
@@ -538,6 +538,29 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
538
538
|
repeated :bigquery_links, :message, 1, "google.analytics.admin.v1alpha.BigQueryLink"
|
539
539
|
optional :next_page_token, :string, 2
|
540
540
|
end
|
541
|
+
add_message "google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest" do
|
542
|
+
optional :name, :string, 1
|
543
|
+
end
|
544
|
+
add_message "google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest" do
|
545
|
+
optional :enhanced_measurement_settings, :message, 1, "google.analytics.admin.v1alpha.EnhancedMeasurementSettings"
|
546
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
547
|
+
end
|
548
|
+
add_message "google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest" do
|
549
|
+
optional :property, :string, 1
|
550
|
+
optional :connected_site_tag, :message, 2, "google.analytics.admin.v1alpha.ConnectedSiteTag"
|
551
|
+
end
|
552
|
+
add_message "google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse" do
|
553
|
+
end
|
554
|
+
add_message "google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest" do
|
555
|
+
optional :property, :string, 1
|
556
|
+
optional :tag_id, :string, 2
|
557
|
+
end
|
558
|
+
add_message "google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest" do
|
559
|
+
optional :property, :string, 1
|
560
|
+
end
|
561
|
+
add_message "google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse" do
|
562
|
+
repeated :connected_site_tags, :message, 1, "google.analytics.admin.v1alpha.ConnectedSiteTag"
|
563
|
+
end
|
541
564
|
end
|
542
565
|
end
|
543
566
|
|
@@ -679,6 +702,13 @@ module Google
|
|
679
702
|
GetBigQueryLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.GetBigQueryLinkRequest").msgclass
|
680
703
|
ListBigQueryLinksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ListBigQueryLinksRequest").msgclass
|
681
704
|
ListBigQueryLinksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ListBigQueryLinksResponse").msgclass
|
705
|
+
GetEnhancedMeasurementSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.GetEnhancedMeasurementSettingsRequest").msgclass
|
706
|
+
UpdateEnhancedMeasurementSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.UpdateEnhancedMeasurementSettingsRequest").msgclass
|
707
|
+
CreateConnectedSiteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.CreateConnectedSiteTagRequest").msgclass
|
708
|
+
CreateConnectedSiteTagResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.CreateConnectedSiteTagResponse").msgclass
|
709
|
+
DeleteConnectedSiteTagRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.DeleteConnectedSiteTagRequest").msgclass
|
710
|
+
ListConnectedSiteTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ListConnectedSiteTagsRequest").msgclass
|
711
|
+
ListConnectedSiteTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.analytics.admin.v1alpha.ListConnectedSiteTagsResponse").msgclass
|
682
712
|
end
|
683
713
|
end
|
684
714
|
end
|
@@ -125,6 +125,10 @@ module Google
|
|
125
125
|
|
126
126
|
default_config.rpcs.list_google_ads_links.timeout = 60.0
|
127
127
|
|
128
|
+
default_config.rpcs.get_enhanced_measurement_settings.timeout = 60.0
|
129
|
+
|
130
|
+
default_config.rpcs.update_enhanced_measurement_settings.timeout = 60.0
|
131
|
+
|
128
132
|
default_config
|
129
133
|
end
|
130
134
|
yield @configure if block_given?
|
@@ -600,7 +604,7 @@ module Google
|
|
600
604
|
# The account to create.
|
601
605
|
# @param redirect_uri [::String]
|
602
606
|
# Redirect URI where the user will be sent after accepting Terms of Service.
|
603
|
-
# Must be configured in
|
607
|
+
# Must be configured in Cloud Console as a Redirect URI.
|
604
608
|
#
|
605
609
|
# @yield [response, operation] Access the result along with the RPC operation
|
606
610
|
# @yieldparam response [::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse]
|
@@ -7799,9 +7803,14 @@ module Google
|
|
7799
7803
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
7800
7804
|
#
|
7801
7805
|
# @param entity [::String]
|
7802
|
-
# The Data Access Report
|
7803
|
-
#
|
7804
|
-
#
|
7806
|
+
# The Data Access Report supports requesting at the property level or account
|
7807
|
+
# level. If requested at the account level, Data Access Reports include all
|
7808
|
+
# access for all properties under that account.
|
7809
|
+
#
|
7810
|
+
# To request at the property level, entity should be for example
|
7811
|
+
# 'properties/123' if "123" is your GA4 property ID. To request at the
|
7812
|
+
# account level, entity should be for example 'accounts/1234' if "1234" is
|
7813
|
+
# your GA4 Account ID.
|
7805
7814
|
# @param dimensions [::Array<::Google::Analytics::Admin::V1alpha::AccessDimension, ::Hash>]
|
7806
7815
|
# The dimensions requested and displayed in the response. Requests are
|
7807
7816
|
# allowed up to 9 dimensions.
|
@@ -7857,7 +7866,8 @@ module Google
|
|
7857
7866
|
# Specifies how rows are ordered in the response.
|
7858
7867
|
# @param return_entity_quota [::Boolean]
|
7859
7868
|
# Toggles whether to return the current state of this Analytics Property's
|
7860
|
-
# quota. Quota is returned in [AccessQuota](#AccessQuota).
|
7869
|
+
# quota. Quota is returned in [AccessQuota](#AccessQuota). For account-level
|
7870
|
+
# requests, this field must be false.
|
7861
7871
|
#
|
7862
7872
|
# @yield [response, operation] Access the result along with the RPC operation
|
7863
7873
|
# @yieldparam response [::Google::Analytics::Admin::V1alpha::RunAccessReportResponse]
|
@@ -8586,8 +8596,9 @@ module Google
|
|
8586
8596
|
#
|
8587
8597
|
# @param parent [::String]
|
8588
8598
|
# Required. The account or property that owns the access bindings. The parent
|
8589
|
-
#
|
8590
|
-
# match this field.
|
8599
|
+
# of all provided AccessBinding in UpdateAccessBindingRequest messages must
|
8600
|
+
# match this field.
|
8601
|
+
# Formats:
|
8591
8602
|
# - accounts/\\{account}
|
8592
8603
|
# - properties/\\{property}
|
8593
8604
|
# @param requests [::Array<::Google::Analytics::Admin::V1alpha::UpdateAccessBindingRequest, ::Hash>]
|
@@ -8678,8 +8689,8 @@ module Google
|
|
8678
8689
|
#
|
8679
8690
|
# @param parent [::String]
|
8680
8691
|
# Required. The account or property that owns the access bindings. The parent
|
8681
|
-
#
|
8682
|
-
# match this field. Formats:
|
8692
|
+
# of all provided values for the 'names' field in DeleteAccessBindingRequest
|
8693
|
+
# messages must match this field. Formats:
|
8683
8694
|
# - accounts/\\{account}
|
8684
8695
|
# - properties/\\{property}
|
8685
8696
|
# @param requests [::Array<::Google::Analytics::Admin::V1alpha::DeleteAccessBindingRequest, ::Hash>]
|
@@ -9555,6 +9566,439 @@ module Google
|
|
9555
9566
|
raise ::Google::Cloud::Error.from_error(e)
|
9556
9567
|
end
|
9557
9568
|
|
9569
|
+
##
|
9570
|
+
# Returns the enhanced measurement settings for this data stream.
|
9571
|
+
# Note that the stream must enable enhanced measurement for these settings to
|
9572
|
+
# take effect.
|
9573
|
+
#
|
9574
|
+
# @overload get_enhanced_measurement_settings(request, options = nil)
|
9575
|
+
# Pass arguments to `get_enhanced_measurement_settings` via a request object, either of type
|
9576
|
+
# {::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest} or an equivalent Hash.
|
9577
|
+
#
|
9578
|
+
# @param request [::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest, ::Hash]
|
9579
|
+
# A request object representing the call parameters. Required. To specify no
|
9580
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
9581
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
9582
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
9583
|
+
#
|
9584
|
+
# @overload get_enhanced_measurement_settings(name: nil)
|
9585
|
+
# Pass arguments to `get_enhanced_measurement_settings` via keyword arguments. Note that at
|
9586
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
9587
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
9588
|
+
#
|
9589
|
+
# @param name [::String]
|
9590
|
+
# Required. The name of the settings to lookup.
|
9591
|
+
# Format:
|
9592
|
+
# properties/\\{property}/dataStreams/\\{data_stream}/enhancedMeasurementSettings
|
9593
|
+
# Example: "properties/1000/dataStreams/2000/enhancedMeasurementSettings"
|
9594
|
+
#
|
9595
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
9596
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings]
|
9597
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
9598
|
+
#
|
9599
|
+
# @return [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings]
|
9600
|
+
#
|
9601
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
9602
|
+
#
|
9603
|
+
# @example Basic example
|
9604
|
+
# require "google/analytics/admin/v1alpha"
|
9605
|
+
#
|
9606
|
+
# # Create a client object. The client can be reused for multiple calls.
|
9607
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
9608
|
+
#
|
9609
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
9610
|
+
# request = Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest.new
|
9611
|
+
#
|
9612
|
+
# # Call the get_enhanced_measurement_settings method.
|
9613
|
+
# result = client.get_enhanced_measurement_settings request
|
9614
|
+
#
|
9615
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings.
|
9616
|
+
# p result
|
9617
|
+
#
|
9618
|
+
def get_enhanced_measurement_settings request, options = nil
|
9619
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
9620
|
+
|
9621
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest
|
9622
|
+
|
9623
|
+
# Converts hash and nil to an options object
|
9624
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
9625
|
+
|
9626
|
+
# Customize the options with defaults
|
9627
|
+
metadata = @config.rpcs.get_enhanced_measurement_settings.metadata.to_h
|
9628
|
+
|
9629
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
9630
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
9631
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
9632
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
9633
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
9634
|
+
|
9635
|
+
header_params = {}
|
9636
|
+
if request.name
|
9637
|
+
header_params["name"] = request.name
|
9638
|
+
end
|
9639
|
+
|
9640
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
9641
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
9642
|
+
|
9643
|
+
options.apply_defaults timeout: @config.rpcs.get_enhanced_measurement_settings.timeout,
|
9644
|
+
metadata: metadata,
|
9645
|
+
retry_policy: @config.rpcs.get_enhanced_measurement_settings.retry_policy
|
9646
|
+
|
9647
|
+
options.apply_defaults timeout: @config.timeout,
|
9648
|
+
metadata: @config.metadata,
|
9649
|
+
retry_policy: @config.retry_policy
|
9650
|
+
|
9651
|
+
@analytics_admin_service_stub.call_rpc :get_enhanced_measurement_settings, request, options: options do |response, operation|
|
9652
|
+
yield response, operation if block_given?
|
9653
|
+
return response
|
9654
|
+
end
|
9655
|
+
rescue ::GRPC::BadStatus => e
|
9656
|
+
raise ::Google::Cloud::Error.from_error(e)
|
9657
|
+
end
|
9658
|
+
|
9659
|
+
##
|
9660
|
+
# Updates the enhanced measurement settings for this data stream.
|
9661
|
+
# Note that the stream must enable enhanced measurement for these settings to
|
9662
|
+
# take effect.
|
9663
|
+
#
|
9664
|
+
# @overload update_enhanced_measurement_settings(request, options = nil)
|
9665
|
+
# Pass arguments to `update_enhanced_measurement_settings` via a request object, either of type
|
9666
|
+
# {::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest} or an equivalent Hash.
|
9667
|
+
#
|
9668
|
+
# @param request [::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest, ::Hash]
|
9669
|
+
# A request object representing the call parameters. Required. To specify no
|
9670
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
9671
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
9672
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
9673
|
+
#
|
9674
|
+
# @overload update_enhanced_measurement_settings(enhanced_measurement_settings: nil, update_mask: nil)
|
9675
|
+
# Pass arguments to `update_enhanced_measurement_settings` via keyword arguments. Note that at
|
9676
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
9677
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
9678
|
+
#
|
9679
|
+
# @param enhanced_measurement_settings [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings, ::Hash]
|
9680
|
+
# Required. The settings to update.
|
9681
|
+
# The `name` field is used to identify the settings to be updated.
|
9682
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
9683
|
+
# Required. The list of fields to be updated. Field names must be in snake
|
9684
|
+
# case (e.g., "field_to_update"). Omitted fields will not be updated. To
|
9685
|
+
# replace the entire entity, use one path with the string "*" to match all
|
9686
|
+
# fields.
|
9687
|
+
#
|
9688
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
9689
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings]
|
9690
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
9691
|
+
#
|
9692
|
+
# @return [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings]
|
9693
|
+
#
|
9694
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
9695
|
+
#
|
9696
|
+
# @example Basic example
|
9697
|
+
# require "google/analytics/admin/v1alpha"
|
9698
|
+
#
|
9699
|
+
# # Create a client object. The client can be reused for multiple calls.
|
9700
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
9701
|
+
#
|
9702
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
9703
|
+
# request = Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest.new
|
9704
|
+
#
|
9705
|
+
# # Call the update_enhanced_measurement_settings method.
|
9706
|
+
# result = client.update_enhanced_measurement_settings request
|
9707
|
+
#
|
9708
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings.
|
9709
|
+
# p result
|
9710
|
+
#
|
9711
|
+
def update_enhanced_measurement_settings request, options = nil
|
9712
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
9713
|
+
|
9714
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest
|
9715
|
+
|
9716
|
+
# Converts hash and nil to an options object
|
9717
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
9718
|
+
|
9719
|
+
# Customize the options with defaults
|
9720
|
+
metadata = @config.rpcs.update_enhanced_measurement_settings.metadata.to_h
|
9721
|
+
|
9722
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
9723
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
9724
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
9725
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
9726
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
9727
|
+
|
9728
|
+
header_params = {}
|
9729
|
+
if request.enhanced_measurement_settings&.name
|
9730
|
+
header_params["enhanced_measurement_settings.name"] = request.enhanced_measurement_settings.name
|
9731
|
+
end
|
9732
|
+
|
9733
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
9734
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
9735
|
+
|
9736
|
+
options.apply_defaults timeout: @config.rpcs.update_enhanced_measurement_settings.timeout,
|
9737
|
+
metadata: metadata,
|
9738
|
+
retry_policy: @config.rpcs.update_enhanced_measurement_settings.retry_policy
|
9739
|
+
|
9740
|
+
options.apply_defaults timeout: @config.timeout,
|
9741
|
+
metadata: @config.metadata,
|
9742
|
+
retry_policy: @config.retry_policy
|
9743
|
+
|
9744
|
+
@analytics_admin_service_stub.call_rpc :update_enhanced_measurement_settings, request, options: options do |response, operation|
|
9745
|
+
yield response, operation if block_given?
|
9746
|
+
return response
|
9747
|
+
end
|
9748
|
+
rescue ::GRPC::BadStatus => e
|
9749
|
+
raise ::Google::Cloud::Error.from_error(e)
|
9750
|
+
end
|
9751
|
+
|
9752
|
+
##
|
9753
|
+
# Creates a connected site tag for a Universal Analytics property. You can
|
9754
|
+
# create a maximum of 20 connected site tags per property.
|
9755
|
+
# Note: This API cannot be used on GA4 properties.
|
9756
|
+
#
|
9757
|
+
# @overload create_connected_site_tag(request, options = nil)
|
9758
|
+
# Pass arguments to `create_connected_site_tag` via a request object, either of type
|
9759
|
+
# {::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagRequest} or an equivalent Hash.
|
9760
|
+
#
|
9761
|
+
# @param request [::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagRequest, ::Hash]
|
9762
|
+
# A request object representing the call parameters. Required. To specify no
|
9763
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
9764
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
9765
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
9766
|
+
#
|
9767
|
+
# @overload create_connected_site_tag(property: nil, connected_site_tag: nil)
|
9768
|
+
# Pass arguments to `create_connected_site_tag` via keyword arguments. Note that at
|
9769
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
9770
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
9771
|
+
#
|
9772
|
+
# @param property [::String]
|
9773
|
+
# The Universal Analytics property to create connected site tags for.
|
9774
|
+
# This API does not support GA4 properties.
|
9775
|
+
# Format: properties/\\{universalAnalyticsPropertyId}
|
9776
|
+
# Example: properties/1234
|
9777
|
+
# @param connected_site_tag [::Google::Analytics::Admin::V1alpha::ConnectedSiteTag, ::Hash]
|
9778
|
+
# Required. The tag to add to the Universal Analytics property
|
9779
|
+
#
|
9780
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
9781
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse]
|
9782
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
9783
|
+
#
|
9784
|
+
# @return [::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse]
|
9785
|
+
#
|
9786
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
9787
|
+
#
|
9788
|
+
# @example Basic example
|
9789
|
+
# require "google/analytics/admin/v1alpha"
|
9790
|
+
#
|
9791
|
+
# # Create a client object. The client can be reused for multiple calls.
|
9792
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
9793
|
+
#
|
9794
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
9795
|
+
# request = Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagRequest.new
|
9796
|
+
#
|
9797
|
+
# # Call the create_connected_site_tag method.
|
9798
|
+
# result = client.create_connected_site_tag request
|
9799
|
+
#
|
9800
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagResponse.
|
9801
|
+
# p result
|
9802
|
+
#
|
9803
|
+
def create_connected_site_tag request, options = nil
|
9804
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
9805
|
+
|
9806
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateConnectedSiteTagRequest
|
9807
|
+
|
9808
|
+
# Converts hash and nil to an options object
|
9809
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
9810
|
+
|
9811
|
+
# Customize the options with defaults
|
9812
|
+
metadata = @config.rpcs.create_connected_site_tag.metadata.to_h
|
9813
|
+
|
9814
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
9815
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
9816
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
9817
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
9818
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
9819
|
+
|
9820
|
+
options.apply_defaults timeout: @config.rpcs.create_connected_site_tag.timeout,
|
9821
|
+
metadata: metadata,
|
9822
|
+
retry_policy: @config.rpcs.create_connected_site_tag.retry_policy
|
9823
|
+
|
9824
|
+
options.apply_defaults timeout: @config.timeout,
|
9825
|
+
metadata: @config.metadata,
|
9826
|
+
retry_policy: @config.retry_policy
|
9827
|
+
|
9828
|
+
@analytics_admin_service_stub.call_rpc :create_connected_site_tag, request, options: options do |response, operation|
|
9829
|
+
yield response, operation if block_given?
|
9830
|
+
return response
|
9831
|
+
end
|
9832
|
+
rescue ::GRPC::BadStatus => e
|
9833
|
+
raise ::Google::Cloud::Error.from_error(e)
|
9834
|
+
end
|
9835
|
+
|
9836
|
+
##
|
9837
|
+
# Deletes a connected site tag for a Universal Analytics property.
|
9838
|
+
# Note: this has no effect on GA4 properties.
|
9839
|
+
#
|
9840
|
+
# @overload delete_connected_site_tag(request, options = nil)
|
9841
|
+
# Pass arguments to `delete_connected_site_tag` via a request object, either of type
|
9842
|
+
# {::Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest} or an equivalent Hash.
|
9843
|
+
#
|
9844
|
+
# @param request [::Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest, ::Hash]
|
9845
|
+
# A request object representing the call parameters. Required. To specify no
|
9846
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
9847
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
9848
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
9849
|
+
#
|
9850
|
+
# @overload delete_connected_site_tag(property: nil, tag_id: nil)
|
9851
|
+
# Pass arguments to `delete_connected_site_tag` via keyword arguments. Note that at
|
9852
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
9853
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
9854
|
+
#
|
9855
|
+
# @param property [::String]
|
9856
|
+
# The Universal Analytics property to delete connected site tags for.
|
9857
|
+
# This API does not support GA4 properties.
|
9858
|
+
# Format: properties/\\{universalAnalyticsPropertyId}
|
9859
|
+
# Example: properties/1234
|
9860
|
+
# @param tag_id [::String]
|
9861
|
+
# Tag ID to forward events to. Also known as the Measurement ID, or the
|
9862
|
+
# "G-ID" (For example: G-12345).
|
9863
|
+
#
|
9864
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
9865
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
9866
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
9867
|
+
#
|
9868
|
+
# @return [::Google::Protobuf::Empty]
|
9869
|
+
#
|
9870
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
9871
|
+
#
|
9872
|
+
# @example Basic example
|
9873
|
+
# require "google/analytics/admin/v1alpha"
|
9874
|
+
#
|
9875
|
+
# # Create a client object. The client can be reused for multiple calls.
|
9876
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
9877
|
+
#
|
9878
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
9879
|
+
# request = Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest.new
|
9880
|
+
#
|
9881
|
+
# # Call the delete_connected_site_tag method.
|
9882
|
+
# result = client.delete_connected_site_tag request
|
9883
|
+
#
|
9884
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
9885
|
+
# p result
|
9886
|
+
#
|
9887
|
+
def delete_connected_site_tag request, options = nil
|
9888
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
9889
|
+
|
9890
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteConnectedSiteTagRequest
|
9891
|
+
|
9892
|
+
# Converts hash and nil to an options object
|
9893
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
9894
|
+
|
9895
|
+
# Customize the options with defaults
|
9896
|
+
metadata = @config.rpcs.delete_connected_site_tag.metadata.to_h
|
9897
|
+
|
9898
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
9899
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
9900
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
9901
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
9902
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
9903
|
+
|
9904
|
+
options.apply_defaults timeout: @config.rpcs.delete_connected_site_tag.timeout,
|
9905
|
+
metadata: metadata,
|
9906
|
+
retry_policy: @config.rpcs.delete_connected_site_tag.retry_policy
|
9907
|
+
|
9908
|
+
options.apply_defaults timeout: @config.timeout,
|
9909
|
+
metadata: @config.metadata,
|
9910
|
+
retry_policy: @config.retry_policy
|
9911
|
+
|
9912
|
+
@analytics_admin_service_stub.call_rpc :delete_connected_site_tag, request, options: options do |response, operation|
|
9913
|
+
yield response, operation if block_given?
|
9914
|
+
return response
|
9915
|
+
end
|
9916
|
+
rescue ::GRPC::BadStatus => e
|
9917
|
+
raise ::Google::Cloud::Error.from_error(e)
|
9918
|
+
end
|
9919
|
+
|
9920
|
+
##
|
9921
|
+
# Lists the connected site tags for a Universal Analytics property. A maximum
|
9922
|
+
# of 20 connected site tags will be returned. Note: this has no effect on GA4
|
9923
|
+
# property.
|
9924
|
+
#
|
9925
|
+
# @overload list_connected_site_tags(request, options = nil)
|
9926
|
+
# Pass arguments to `list_connected_site_tags` via a request object, either of type
|
9927
|
+
# {::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest} or an equivalent Hash.
|
9928
|
+
#
|
9929
|
+
# @param request [::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest, ::Hash]
|
9930
|
+
# A request object representing the call parameters. Required. To specify no
|
9931
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
9932
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
9933
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
9934
|
+
#
|
9935
|
+
# @overload list_connected_site_tags(property: nil)
|
9936
|
+
# Pass arguments to `list_connected_site_tags` via keyword arguments. Note that at
|
9937
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
9938
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
9939
|
+
#
|
9940
|
+
# @param property [::String]
|
9941
|
+
# The Universal Analytics property to fetch connected site tags for.
|
9942
|
+
# This does not work on GA4 properties. A maximum of 20 connected site tags
|
9943
|
+
# will be returned.
|
9944
|
+
# Example Format: `properties/1234`
|
9945
|
+
#
|
9946
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
9947
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse]
|
9948
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
9949
|
+
#
|
9950
|
+
# @return [::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse]
|
9951
|
+
#
|
9952
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
9953
|
+
#
|
9954
|
+
# @example Basic example
|
9955
|
+
# require "google/analytics/admin/v1alpha"
|
9956
|
+
#
|
9957
|
+
# # Create a client object. The client can be reused for multiple calls.
|
9958
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
9959
|
+
#
|
9960
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
9961
|
+
# request = Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest.new
|
9962
|
+
#
|
9963
|
+
# # Call the list_connected_site_tags method.
|
9964
|
+
# result = client.list_connected_site_tags request
|
9965
|
+
#
|
9966
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsResponse.
|
9967
|
+
# p result
|
9968
|
+
#
|
9969
|
+
def list_connected_site_tags request, options = nil
|
9970
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
9971
|
+
|
9972
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListConnectedSiteTagsRequest
|
9973
|
+
|
9974
|
+
# Converts hash and nil to an options object
|
9975
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
9976
|
+
|
9977
|
+
# Customize the options with defaults
|
9978
|
+
metadata = @config.rpcs.list_connected_site_tags.metadata.to_h
|
9979
|
+
|
9980
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
9981
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
9982
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
9983
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
9984
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
9985
|
+
|
9986
|
+
options.apply_defaults timeout: @config.rpcs.list_connected_site_tags.timeout,
|
9987
|
+
metadata: metadata,
|
9988
|
+
retry_policy: @config.rpcs.list_connected_site_tags.retry_policy
|
9989
|
+
|
9990
|
+
options.apply_defaults timeout: @config.timeout,
|
9991
|
+
metadata: @config.metadata,
|
9992
|
+
retry_policy: @config.retry_policy
|
9993
|
+
|
9994
|
+
@analytics_admin_service_stub.call_rpc :list_connected_site_tags, request, options: options do |response, operation|
|
9995
|
+
yield response, operation if block_given?
|
9996
|
+
return response
|
9997
|
+
end
|
9998
|
+
rescue ::GRPC::BadStatus => e
|
9999
|
+
raise ::Google::Cloud::Error.from_error(e)
|
10000
|
+
end
|
10001
|
+
|
9558
10002
|
##
|
9559
10003
|
# Configuration class for the AnalyticsAdminService API.
|
9560
10004
|
#
|
@@ -9593,9 +10037,9 @@ module Google
|
|
9593
10037
|
# * (`String`) The path to a service account key file in JSON format
|
9594
10038
|
# * (`Hash`) A service account key as a Hash
|
9595
10039
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
9596
|
-
# (see the [googleauth docs](https://
|
10040
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
9597
10041
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
9598
|
-
# (see the [signet docs](https://
|
10042
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
9599
10043
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
9600
10044
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
9601
10045
|
# * (`nil`) indicating no credentials
|
@@ -10200,6 +10644,31 @@ module Google
|
|
10200
10644
|
# @return [::Gapic::Config::Method]
|
10201
10645
|
#
|
10202
10646
|
attr_reader :list_big_query_links
|
10647
|
+
##
|
10648
|
+
# RPC-specific configuration for `get_enhanced_measurement_settings`
|
10649
|
+
# @return [::Gapic::Config::Method]
|
10650
|
+
#
|
10651
|
+
attr_reader :get_enhanced_measurement_settings
|
10652
|
+
##
|
10653
|
+
# RPC-specific configuration for `update_enhanced_measurement_settings`
|
10654
|
+
# @return [::Gapic::Config::Method]
|
10655
|
+
#
|
10656
|
+
attr_reader :update_enhanced_measurement_settings
|
10657
|
+
##
|
10658
|
+
# RPC-specific configuration for `create_connected_site_tag`
|
10659
|
+
# @return [::Gapic::Config::Method]
|
10660
|
+
#
|
10661
|
+
attr_reader :create_connected_site_tag
|
10662
|
+
##
|
10663
|
+
# RPC-specific configuration for `delete_connected_site_tag`
|
10664
|
+
# @return [::Gapic::Config::Method]
|
10665
|
+
#
|
10666
|
+
attr_reader :delete_connected_site_tag
|
10667
|
+
##
|
10668
|
+
# RPC-specific configuration for `list_connected_site_tags`
|
10669
|
+
# @return [::Gapic::Config::Method]
|
10670
|
+
#
|
10671
|
+
attr_reader :list_connected_site_tags
|
10203
10672
|
|
10204
10673
|
# @private
|
10205
10674
|
def initialize parent_rpcs = nil
|
@@ -10407,6 +10876,16 @@ module Google
|
|
10407
10876
|
@get_big_query_link = ::Gapic::Config::Method.new get_big_query_link_config
|
10408
10877
|
list_big_query_links_config = parent_rpcs.list_big_query_links if parent_rpcs.respond_to? :list_big_query_links
|
10409
10878
|
@list_big_query_links = ::Gapic::Config::Method.new list_big_query_links_config
|
10879
|
+
get_enhanced_measurement_settings_config = parent_rpcs.get_enhanced_measurement_settings if parent_rpcs.respond_to? :get_enhanced_measurement_settings
|
10880
|
+
@get_enhanced_measurement_settings = ::Gapic::Config::Method.new get_enhanced_measurement_settings_config
|
10881
|
+
update_enhanced_measurement_settings_config = parent_rpcs.update_enhanced_measurement_settings if parent_rpcs.respond_to? :update_enhanced_measurement_settings
|
10882
|
+
@update_enhanced_measurement_settings = ::Gapic::Config::Method.new update_enhanced_measurement_settings_config
|
10883
|
+
create_connected_site_tag_config = parent_rpcs.create_connected_site_tag if parent_rpcs.respond_to? :create_connected_site_tag
|
10884
|
+
@create_connected_site_tag = ::Gapic::Config::Method.new create_connected_site_tag_config
|
10885
|
+
delete_connected_site_tag_config = parent_rpcs.delete_connected_site_tag if parent_rpcs.respond_to? :delete_connected_site_tag
|
10886
|
+
@delete_connected_site_tag = ::Gapic::Config::Method.new delete_connected_site_tag_config
|
10887
|
+
list_connected_site_tags_config = parent_rpcs.list_connected_site_tags if parent_rpcs.respond_to? :list_connected_site_tags
|
10888
|
+
@list_connected_site_tags = ::Gapic::Config::Method.new list_connected_site_tags_config
|
10410
10889
|
|
10411
10890
|
yield self if block_given?
|
10412
10891
|
end
|