google-analytics-admin-v1alpha 0.27.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/analytics/admin/v1alpha/analytics_admin_pb.rb +7 -1
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb +498 -1
- 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 +463 -1
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/service_stub.rb +297 -0
- data/lib/google/analytics/admin/v1alpha/analytics_admin_services_pb.rb +10 -0
- data/lib/google/analytics/admin/v1alpha/resources_pb.rb +4 -1
- data/lib/google/analytics/admin/v1alpha/version.rb +1 -1
- data/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb +96 -1
- data/proto_docs/google/analytics/admin/v1alpha/resources.rb +101 -1
- metadata +2 -2
|
@@ -2877,10 +2877,12 @@ module Google
|
|
|
2877
2877
|
#
|
|
2878
2878
|
# @param account [::String]
|
|
2879
2879
|
# Required. The account resource for which to return change history
|
|
2880
|
-
# resources.
|
|
2880
|
+
# resources. Format: accounts/\\{account} Example: "accounts/100"
|
|
2881
2881
|
# @param property [::String]
|
|
2882
2882
|
# Optional. Resource name for a child property. If set, only return changes
|
|
2883
2883
|
# made to this property or its child resources.
|
|
2884
|
+
# Format: properties/\\{propertyId}
|
|
2885
|
+
# Example: "properties/100"
|
|
2884
2886
|
# @param resource_type [::Array<::Google::Analytics::Admin::V1alpha::ChangeHistoryResourceType>]
|
|
2885
2887
|
# Optional. If set, only return changes if they are for a resource that
|
|
2886
2888
|
# matches at least one of these types.
|
|
@@ -10397,6 +10399,431 @@ module Google
|
|
|
10397
10399
|
raise ::Google::Cloud::Error.from_error(e)
|
|
10398
10400
|
end
|
|
10399
10401
|
|
|
10402
|
+
##
|
|
10403
|
+
# Lookup for a single CalculatedMetric.
|
|
10404
|
+
#
|
|
10405
|
+
# @overload get_calculated_metric(request, options = nil)
|
|
10406
|
+
# Pass arguments to `get_calculated_metric` via a request object, either of type
|
|
10407
|
+
# {::Google::Analytics::Admin::V1alpha::GetCalculatedMetricRequest} or an equivalent Hash.
|
|
10408
|
+
#
|
|
10409
|
+
# @param request [::Google::Analytics::Admin::V1alpha::GetCalculatedMetricRequest, ::Hash]
|
|
10410
|
+
# A request object representing the call parameters. Required. To specify no
|
|
10411
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
10412
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
10413
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
10414
|
+
#
|
|
10415
|
+
# @overload get_calculated_metric(name: nil)
|
|
10416
|
+
# Pass arguments to `get_calculated_metric` via keyword arguments. Note that at
|
|
10417
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
10418
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
10419
|
+
#
|
|
10420
|
+
# @param name [::String]
|
|
10421
|
+
# Required. The name of the CalculatedMetric to get.
|
|
10422
|
+
# Format: properties/\\{property_id}/calculatedMetrics/\\{calculated_metric_id}
|
|
10423
|
+
# Example: properties/1234/calculatedMetrics/Metric01
|
|
10424
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
10425
|
+
# @yieldparam result [::Google::Analytics::Admin::V1alpha::CalculatedMetric]
|
|
10426
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
10427
|
+
#
|
|
10428
|
+
# @return [::Google::Analytics::Admin::V1alpha::CalculatedMetric]
|
|
10429
|
+
#
|
|
10430
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
10431
|
+
#
|
|
10432
|
+
# @example Basic example
|
|
10433
|
+
# require "google/analytics/admin/v1alpha"
|
|
10434
|
+
#
|
|
10435
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
10436
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new
|
|
10437
|
+
#
|
|
10438
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
10439
|
+
# request = Google::Analytics::Admin::V1alpha::GetCalculatedMetricRequest.new
|
|
10440
|
+
#
|
|
10441
|
+
# # Call the get_calculated_metric method.
|
|
10442
|
+
# result = client.get_calculated_metric request
|
|
10443
|
+
#
|
|
10444
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::CalculatedMetric.
|
|
10445
|
+
# p result
|
|
10446
|
+
#
|
|
10447
|
+
def get_calculated_metric request, options = nil
|
|
10448
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
10449
|
+
|
|
10450
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetCalculatedMetricRequest
|
|
10451
|
+
|
|
10452
|
+
# Converts hash and nil to an options object
|
|
10453
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
10454
|
+
|
|
10455
|
+
# Customize the options with defaults
|
|
10456
|
+
call_metadata = @config.rpcs.get_calculated_metric.metadata.to_h
|
|
10457
|
+
|
|
10458
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
10459
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
10460
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
10461
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION,
|
|
10462
|
+
transports_version_send: [:rest]
|
|
10463
|
+
|
|
10464
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
10465
|
+
|
|
10466
|
+
options.apply_defaults timeout: @config.rpcs.get_calculated_metric.timeout,
|
|
10467
|
+
metadata: call_metadata,
|
|
10468
|
+
retry_policy: @config.rpcs.get_calculated_metric.retry_policy
|
|
10469
|
+
|
|
10470
|
+
options.apply_defaults timeout: @config.timeout,
|
|
10471
|
+
metadata: @config.metadata,
|
|
10472
|
+
retry_policy: @config.retry_policy
|
|
10473
|
+
|
|
10474
|
+
@analytics_admin_service_stub.get_calculated_metric request, options do |result, operation|
|
|
10475
|
+
yield result, operation if block_given?
|
|
10476
|
+
return result
|
|
10477
|
+
end
|
|
10478
|
+
rescue ::Gapic::Rest::Error => e
|
|
10479
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
10480
|
+
end
|
|
10481
|
+
|
|
10482
|
+
##
|
|
10483
|
+
# Creates a CalculatedMetric.
|
|
10484
|
+
#
|
|
10485
|
+
# @overload create_calculated_metric(request, options = nil)
|
|
10486
|
+
# Pass arguments to `create_calculated_metric` via a request object, either of type
|
|
10487
|
+
# {::Google::Analytics::Admin::V1alpha::CreateCalculatedMetricRequest} or an equivalent Hash.
|
|
10488
|
+
#
|
|
10489
|
+
# @param request [::Google::Analytics::Admin::V1alpha::CreateCalculatedMetricRequest, ::Hash]
|
|
10490
|
+
# A request object representing the call parameters. Required. To specify no
|
|
10491
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
10492
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
10493
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
10494
|
+
#
|
|
10495
|
+
# @overload create_calculated_metric(parent: nil, calculated_metric_id: nil, calculated_metric: nil)
|
|
10496
|
+
# Pass arguments to `create_calculated_metric` via keyword arguments. Note that at
|
|
10497
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
10498
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
10499
|
+
#
|
|
10500
|
+
# @param parent [::String]
|
|
10501
|
+
# Required. Format: properties/\\{property_id}
|
|
10502
|
+
# Example: properties/1234
|
|
10503
|
+
# @param calculated_metric_id [::String]
|
|
10504
|
+
# Required. The ID to use for the calculated metric which will become the
|
|
10505
|
+
# final component of the calculated metric's resource name.
|
|
10506
|
+
#
|
|
10507
|
+
# This value should be 1-80 characters and valid characters are
|
|
10508
|
+
# /[a-zA-Z0-9_]/, no spaces allowed. calculated_metric_id must be unique
|
|
10509
|
+
# between all calculated metrics under a property. The calculated_metric_id
|
|
10510
|
+
# is used when referencing this calculated metric from external APIs, for
|
|
10511
|
+
# example, "calcMetric:\\{calculated_metric_id}".
|
|
10512
|
+
# @param calculated_metric [::Google::Analytics::Admin::V1alpha::CalculatedMetric, ::Hash]
|
|
10513
|
+
# Required. The CalculatedMetric to create.
|
|
10514
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
10515
|
+
# @yieldparam result [::Google::Analytics::Admin::V1alpha::CalculatedMetric]
|
|
10516
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
10517
|
+
#
|
|
10518
|
+
# @return [::Google::Analytics::Admin::V1alpha::CalculatedMetric]
|
|
10519
|
+
#
|
|
10520
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
10521
|
+
#
|
|
10522
|
+
# @example Basic example
|
|
10523
|
+
# require "google/analytics/admin/v1alpha"
|
|
10524
|
+
#
|
|
10525
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
10526
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new
|
|
10527
|
+
#
|
|
10528
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
10529
|
+
# request = Google::Analytics::Admin::V1alpha::CreateCalculatedMetricRequest.new
|
|
10530
|
+
#
|
|
10531
|
+
# # Call the create_calculated_metric method.
|
|
10532
|
+
# result = client.create_calculated_metric request
|
|
10533
|
+
#
|
|
10534
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::CalculatedMetric.
|
|
10535
|
+
# p result
|
|
10536
|
+
#
|
|
10537
|
+
def create_calculated_metric request, options = nil
|
|
10538
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
10539
|
+
|
|
10540
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateCalculatedMetricRequest
|
|
10541
|
+
|
|
10542
|
+
# Converts hash and nil to an options object
|
|
10543
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
10544
|
+
|
|
10545
|
+
# Customize the options with defaults
|
|
10546
|
+
call_metadata = @config.rpcs.create_calculated_metric.metadata.to_h
|
|
10547
|
+
|
|
10548
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
10549
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
10550
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
10551
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION,
|
|
10552
|
+
transports_version_send: [:rest]
|
|
10553
|
+
|
|
10554
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
10555
|
+
|
|
10556
|
+
options.apply_defaults timeout: @config.rpcs.create_calculated_metric.timeout,
|
|
10557
|
+
metadata: call_metadata,
|
|
10558
|
+
retry_policy: @config.rpcs.create_calculated_metric.retry_policy
|
|
10559
|
+
|
|
10560
|
+
options.apply_defaults timeout: @config.timeout,
|
|
10561
|
+
metadata: @config.metadata,
|
|
10562
|
+
retry_policy: @config.retry_policy
|
|
10563
|
+
|
|
10564
|
+
@analytics_admin_service_stub.create_calculated_metric request, options do |result, operation|
|
|
10565
|
+
yield result, operation if block_given?
|
|
10566
|
+
return result
|
|
10567
|
+
end
|
|
10568
|
+
rescue ::Gapic::Rest::Error => e
|
|
10569
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
10570
|
+
end
|
|
10571
|
+
|
|
10572
|
+
##
|
|
10573
|
+
# Lists CalculatedMetrics on a property.
|
|
10574
|
+
#
|
|
10575
|
+
# @overload list_calculated_metrics(request, options = nil)
|
|
10576
|
+
# Pass arguments to `list_calculated_metrics` via a request object, either of type
|
|
10577
|
+
# {::Google::Analytics::Admin::V1alpha::ListCalculatedMetricsRequest} or an equivalent Hash.
|
|
10578
|
+
#
|
|
10579
|
+
# @param request [::Google::Analytics::Admin::V1alpha::ListCalculatedMetricsRequest, ::Hash]
|
|
10580
|
+
# A request object representing the call parameters. Required. To specify no
|
|
10581
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
10582
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
10583
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
10584
|
+
#
|
|
10585
|
+
# @overload list_calculated_metrics(parent: nil, page_size: nil, page_token: nil)
|
|
10586
|
+
# Pass arguments to `list_calculated_metrics` via keyword arguments. Note that at
|
|
10587
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
10588
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
10589
|
+
#
|
|
10590
|
+
# @param parent [::String]
|
|
10591
|
+
# Required. Example format: properties/1234
|
|
10592
|
+
# @param page_size [::Integer]
|
|
10593
|
+
# Optional. The maximum number of resources to return.
|
|
10594
|
+
# If unspecified, at most 50 resources will be returned.
|
|
10595
|
+
# The maximum value is 200 (higher values will be coerced to the maximum).
|
|
10596
|
+
# @param page_token [::String]
|
|
10597
|
+
# Optional. A page token, received from a previous `ListCalculatedMetrics`
|
|
10598
|
+
# call. Provide this to retrieve the subsequent page.
|
|
10599
|
+
#
|
|
10600
|
+
# When paginating, all other parameters provided to `ListCalculatedMetrics`
|
|
10601
|
+
# must match the call that provided the page token.
|
|
10602
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
10603
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CalculatedMetric>]
|
|
10604
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
10605
|
+
#
|
|
10606
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CalculatedMetric>]
|
|
10607
|
+
#
|
|
10608
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
10609
|
+
#
|
|
10610
|
+
# @example Basic example
|
|
10611
|
+
# require "google/analytics/admin/v1alpha"
|
|
10612
|
+
#
|
|
10613
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
10614
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new
|
|
10615
|
+
#
|
|
10616
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
10617
|
+
# request = Google::Analytics::Admin::V1alpha::ListCalculatedMetricsRequest.new
|
|
10618
|
+
#
|
|
10619
|
+
# # Call the list_calculated_metrics method.
|
|
10620
|
+
# result = client.list_calculated_metrics request
|
|
10621
|
+
#
|
|
10622
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
10623
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
10624
|
+
# result.each do |item|
|
|
10625
|
+
# # Each element is of type ::Google::Analytics::Admin::V1alpha::CalculatedMetric.
|
|
10626
|
+
# p item
|
|
10627
|
+
# end
|
|
10628
|
+
#
|
|
10629
|
+
def list_calculated_metrics request, options = nil
|
|
10630
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
10631
|
+
|
|
10632
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListCalculatedMetricsRequest
|
|
10633
|
+
|
|
10634
|
+
# Converts hash and nil to an options object
|
|
10635
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
10636
|
+
|
|
10637
|
+
# Customize the options with defaults
|
|
10638
|
+
call_metadata = @config.rpcs.list_calculated_metrics.metadata.to_h
|
|
10639
|
+
|
|
10640
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
10641
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
10642
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
10643
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION,
|
|
10644
|
+
transports_version_send: [:rest]
|
|
10645
|
+
|
|
10646
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
10647
|
+
|
|
10648
|
+
options.apply_defaults timeout: @config.rpcs.list_calculated_metrics.timeout,
|
|
10649
|
+
metadata: call_metadata,
|
|
10650
|
+
retry_policy: @config.rpcs.list_calculated_metrics.retry_policy
|
|
10651
|
+
|
|
10652
|
+
options.apply_defaults timeout: @config.timeout,
|
|
10653
|
+
metadata: @config.metadata,
|
|
10654
|
+
retry_policy: @config.retry_policy
|
|
10655
|
+
|
|
10656
|
+
@analytics_admin_service_stub.list_calculated_metrics request, options do |result, operation|
|
|
10657
|
+
result = ::Gapic::Rest::PagedEnumerable.new @analytics_admin_service_stub, :list_calculated_metrics, "calculated_metrics", request, result, options
|
|
10658
|
+
yield result, operation if block_given?
|
|
10659
|
+
return result
|
|
10660
|
+
end
|
|
10661
|
+
rescue ::Gapic::Rest::Error => e
|
|
10662
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
10663
|
+
end
|
|
10664
|
+
|
|
10665
|
+
##
|
|
10666
|
+
# Updates a CalculatedMetric on a property.
|
|
10667
|
+
#
|
|
10668
|
+
# @overload update_calculated_metric(request, options = nil)
|
|
10669
|
+
# Pass arguments to `update_calculated_metric` via a request object, either of type
|
|
10670
|
+
# {::Google::Analytics::Admin::V1alpha::UpdateCalculatedMetricRequest} or an equivalent Hash.
|
|
10671
|
+
#
|
|
10672
|
+
# @param request [::Google::Analytics::Admin::V1alpha::UpdateCalculatedMetricRequest, ::Hash]
|
|
10673
|
+
# A request object representing the call parameters. Required. To specify no
|
|
10674
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
10675
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
10676
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
10677
|
+
#
|
|
10678
|
+
# @overload update_calculated_metric(calculated_metric: nil, update_mask: nil)
|
|
10679
|
+
# Pass arguments to `update_calculated_metric` via keyword arguments. Note that at
|
|
10680
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
10681
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
10682
|
+
#
|
|
10683
|
+
# @param calculated_metric [::Google::Analytics::Admin::V1alpha::CalculatedMetric, ::Hash]
|
|
10684
|
+
# Required. The CalculatedMetric to update
|
|
10685
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
10686
|
+
# Required. The list of fields to be updated. Omitted fields will not be
|
|
10687
|
+
# updated. To replace the entire entity, use one path with the string "*" to
|
|
10688
|
+
# match all fields.
|
|
10689
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
10690
|
+
# @yieldparam result [::Google::Analytics::Admin::V1alpha::CalculatedMetric]
|
|
10691
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
10692
|
+
#
|
|
10693
|
+
# @return [::Google::Analytics::Admin::V1alpha::CalculatedMetric]
|
|
10694
|
+
#
|
|
10695
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
10696
|
+
#
|
|
10697
|
+
# @example Basic example
|
|
10698
|
+
# require "google/analytics/admin/v1alpha"
|
|
10699
|
+
#
|
|
10700
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
10701
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new
|
|
10702
|
+
#
|
|
10703
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
10704
|
+
# request = Google::Analytics::Admin::V1alpha::UpdateCalculatedMetricRequest.new
|
|
10705
|
+
#
|
|
10706
|
+
# # Call the update_calculated_metric method.
|
|
10707
|
+
# result = client.update_calculated_metric request
|
|
10708
|
+
#
|
|
10709
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::CalculatedMetric.
|
|
10710
|
+
# p result
|
|
10711
|
+
#
|
|
10712
|
+
def update_calculated_metric request, options = nil
|
|
10713
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
10714
|
+
|
|
10715
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateCalculatedMetricRequest
|
|
10716
|
+
|
|
10717
|
+
# Converts hash and nil to an options object
|
|
10718
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
10719
|
+
|
|
10720
|
+
# Customize the options with defaults
|
|
10721
|
+
call_metadata = @config.rpcs.update_calculated_metric.metadata.to_h
|
|
10722
|
+
|
|
10723
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
10724
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
10725
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
10726
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION,
|
|
10727
|
+
transports_version_send: [:rest]
|
|
10728
|
+
|
|
10729
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
10730
|
+
|
|
10731
|
+
options.apply_defaults timeout: @config.rpcs.update_calculated_metric.timeout,
|
|
10732
|
+
metadata: call_metadata,
|
|
10733
|
+
retry_policy: @config.rpcs.update_calculated_metric.retry_policy
|
|
10734
|
+
|
|
10735
|
+
options.apply_defaults timeout: @config.timeout,
|
|
10736
|
+
metadata: @config.metadata,
|
|
10737
|
+
retry_policy: @config.retry_policy
|
|
10738
|
+
|
|
10739
|
+
@analytics_admin_service_stub.update_calculated_metric request, options do |result, operation|
|
|
10740
|
+
yield result, operation if block_given?
|
|
10741
|
+
return result
|
|
10742
|
+
end
|
|
10743
|
+
rescue ::Gapic::Rest::Error => e
|
|
10744
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
10745
|
+
end
|
|
10746
|
+
|
|
10747
|
+
##
|
|
10748
|
+
# Deletes a CalculatedMetric on a property.
|
|
10749
|
+
#
|
|
10750
|
+
# @overload delete_calculated_metric(request, options = nil)
|
|
10751
|
+
# Pass arguments to `delete_calculated_metric` via a request object, either of type
|
|
10752
|
+
# {::Google::Analytics::Admin::V1alpha::DeleteCalculatedMetricRequest} or an equivalent Hash.
|
|
10753
|
+
#
|
|
10754
|
+
# @param request [::Google::Analytics::Admin::V1alpha::DeleteCalculatedMetricRequest, ::Hash]
|
|
10755
|
+
# A request object representing the call parameters. Required. To specify no
|
|
10756
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
10757
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
10758
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
10759
|
+
#
|
|
10760
|
+
# @overload delete_calculated_metric(name: nil)
|
|
10761
|
+
# Pass arguments to `delete_calculated_metric` via keyword arguments. Note that at
|
|
10762
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
10763
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
10764
|
+
#
|
|
10765
|
+
# @param name [::String]
|
|
10766
|
+
# Required. The name of the CalculatedMetric to delete.
|
|
10767
|
+
# Format: properties/\\{property_id}/calculatedMetrics/\\{calculated_metric_id}
|
|
10768
|
+
# Example: properties/1234/calculatedMetrics/Metric01
|
|
10769
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
10770
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
|
10771
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
10772
|
+
#
|
|
10773
|
+
# @return [::Google::Protobuf::Empty]
|
|
10774
|
+
#
|
|
10775
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
10776
|
+
#
|
|
10777
|
+
# @example Basic example
|
|
10778
|
+
# require "google/analytics/admin/v1alpha"
|
|
10779
|
+
#
|
|
10780
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
10781
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Rest::Client.new
|
|
10782
|
+
#
|
|
10783
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
10784
|
+
# request = Google::Analytics::Admin::V1alpha::DeleteCalculatedMetricRequest.new
|
|
10785
|
+
#
|
|
10786
|
+
# # Call the delete_calculated_metric method.
|
|
10787
|
+
# result = client.delete_calculated_metric request
|
|
10788
|
+
#
|
|
10789
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
10790
|
+
# p result
|
|
10791
|
+
#
|
|
10792
|
+
def delete_calculated_metric request, options = nil
|
|
10793
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
10794
|
+
|
|
10795
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteCalculatedMetricRequest
|
|
10796
|
+
|
|
10797
|
+
# Converts hash and nil to an options object
|
|
10798
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
10799
|
+
|
|
10800
|
+
# Customize the options with defaults
|
|
10801
|
+
call_metadata = @config.rpcs.delete_calculated_metric.metadata.to_h
|
|
10802
|
+
|
|
10803
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
10804
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
10805
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
10806
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION,
|
|
10807
|
+
transports_version_send: [:rest]
|
|
10808
|
+
|
|
10809
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
10810
|
+
|
|
10811
|
+
options.apply_defaults timeout: @config.rpcs.delete_calculated_metric.timeout,
|
|
10812
|
+
metadata: call_metadata,
|
|
10813
|
+
retry_policy: @config.rpcs.delete_calculated_metric.retry_policy
|
|
10814
|
+
|
|
10815
|
+
options.apply_defaults timeout: @config.timeout,
|
|
10816
|
+
metadata: @config.metadata,
|
|
10817
|
+
retry_policy: @config.retry_policy
|
|
10818
|
+
|
|
10819
|
+
@analytics_admin_service_stub.delete_calculated_metric request, options do |result, operation|
|
|
10820
|
+
yield result, operation if block_given?
|
|
10821
|
+
return result
|
|
10822
|
+
end
|
|
10823
|
+
rescue ::Gapic::Rest::Error => e
|
|
10824
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
10825
|
+
end
|
|
10826
|
+
|
|
10400
10827
|
##
|
|
10401
10828
|
# Create a roll-up property and all roll-up property source links.
|
|
10402
10829
|
#
|
|
@@ -12064,6 +12491,31 @@ module Google
|
|
|
12064
12491
|
#
|
|
12065
12492
|
attr_reader :get_data_redaction_settings
|
|
12066
12493
|
##
|
|
12494
|
+
# RPC-specific configuration for `get_calculated_metric`
|
|
12495
|
+
# @return [::Gapic::Config::Method]
|
|
12496
|
+
#
|
|
12497
|
+
attr_reader :get_calculated_metric
|
|
12498
|
+
##
|
|
12499
|
+
# RPC-specific configuration for `create_calculated_metric`
|
|
12500
|
+
# @return [::Gapic::Config::Method]
|
|
12501
|
+
#
|
|
12502
|
+
attr_reader :create_calculated_metric
|
|
12503
|
+
##
|
|
12504
|
+
# RPC-specific configuration for `list_calculated_metrics`
|
|
12505
|
+
# @return [::Gapic::Config::Method]
|
|
12506
|
+
#
|
|
12507
|
+
attr_reader :list_calculated_metrics
|
|
12508
|
+
##
|
|
12509
|
+
# RPC-specific configuration for `update_calculated_metric`
|
|
12510
|
+
# @return [::Gapic::Config::Method]
|
|
12511
|
+
#
|
|
12512
|
+
attr_reader :update_calculated_metric
|
|
12513
|
+
##
|
|
12514
|
+
# RPC-specific configuration for `delete_calculated_metric`
|
|
12515
|
+
# @return [::Gapic::Config::Method]
|
|
12516
|
+
#
|
|
12517
|
+
attr_reader :delete_calculated_metric
|
|
12518
|
+
##
|
|
12067
12519
|
# RPC-specific configuration for `create_rollup_property`
|
|
12068
12520
|
# @return [::Gapic::Config::Method]
|
|
12069
12521
|
#
|
|
@@ -12361,6 +12813,16 @@ module Google
|
|
|
12361
12813
|
@update_data_redaction_settings = ::Gapic::Config::Method.new update_data_redaction_settings_config
|
|
12362
12814
|
get_data_redaction_settings_config = parent_rpcs.get_data_redaction_settings if parent_rpcs.respond_to? :get_data_redaction_settings
|
|
12363
12815
|
@get_data_redaction_settings = ::Gapic::Config::Method.new get_data_redaction_settings_config
|
|
12816
|
+
get_calculated_metric_config = parent_rpcs.get_calculated_metric if parent_rpcs.respond_to? :get_calculated_metric
|
|
12817
|
+
@get_calculated_metric = ::Gapic::Config::Method.new get_calculated_metric_config
|
|
12818
|
+
create_calculated_metric_config = parent_rpcs.create_calculated_metric if parent_rpcs.respond_to? :create_calculated_metric
|
|
12819
|
+
@create_calculated_metric = ::Gapic::Config::Method.new create_calculated_metric_config
|
|
12820
|
+
list_calculated_metrics_config = parent_rpcs.list_calculated_metrics if parent_rpcs.respond_to? :list_calculated_metrics
|
|
12821
|
+
@list_calculated_metrics = ::Gapic::Config::Method.new list_calculated_metrics_config
|
|
12822
|
+
update_calculated_metric_config = parent_rpcs.update_calculated_metric if parent_rpcs.respond_to? :update_calculated_metric
|
|
12823
|
+
@update_calculated_metric = ::Gapic::Config::Method.new update_calculated_metric_config
|
|
12824
|
+
delete_calculated_metric_config = parent_rpcs.delete_calculated_metric if parent_rpcs.respond_to? :delete_calculated_metric
|
|
12825
|
+
@delete_calculated_metric = ::Gapic::Config::Method.new delete_calculated_metric_config
|
|
12364
12826
|
create_rollup_property_config = parent_rpcs.create_rollup_property if parent_rpcs.respond_to? :create_rollup_property
|
|
12365
12827
|
@create_rollup_property = ::Gapic::Config::Method.new create_rollup_property_config
|
|
12366
12828
|
get_rollup_property_source_link_config = parent_rpcs.get_rollup_property_source_link if parent_rpcs.respond_to? :get_rollup_property_source_link
|