google-analytics-admin-v1alpha 0.33.0 → 0.34.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 +9 -1
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/client.rb +651 -0
- 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 +609 -0
- data/lib/google/analytics/admin/v1alpha/analytics_admin_service/rest/service_stub.rb +369 -0
- data/lib/google/analytics/admin/v1alpha/analytics_admin_services_pb.rb +12 -0
- data/lib/google/analytics/admin/v1alpha/resources_pb.rb +6 -1
- data/lib/google/analytics/admin/v1alpha/version.rb +1 -1
- data/proto_docs/google/analytics/admin/v1alpha/analytics_admin.rb +180 -0
- data/proto_docs/google/analytics/admin/v1alpha/resources.rb +150 -39
- data/proto_docs/google/type/date.rb +53 -0
- metadata +3 -2
@@ -13951,6 +13951,615 @@ module Google
|
|
13951
13951
|
raise ::Google::Cloud::Error.from_error(e)
|
13952
13952
|
end
|
13953
13953
|
|
13954
|
+
##
|
13955
|
+
# Creates a Reporting Data Annotation.
|
13956
|
+
#
|
13957
|
+
# @overload create_reporting_data_annotation(request, options = nil)
|
13958
|
+
# Pass arguments to `create_reporting_data_annotation` via a request object, either of type
|
13959
|
+
# {::Google::Analytics::Admin::V1alpha::CreateReportingDataAnnotationRequest} or an equivalent Hash.
|
13960
|
+
#
|
13961
|
+
# @param request [::Google::Analytics::Admin::V1alpha::CreateReportingDataAnnotationRequest, ::Hash]
|
13962
|
+
# A request object representing the call parameters. Required. To specify no
|
13963
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
13964
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
13965
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
13966
|
+
#
|
13967
|
+
# @overload create_reporting_data_annotation(parent: nil, reporting_data_annotation: nil)
|
13968
|
+
# Pass arguments to `create_reporting_data_annotation` via keyword arguments. Note that at
|
13969
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
13970
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
13971
|
+
#
|
13972
|
+
# @param parent [::String]
|
13973
|
+
# Required. The property for which to create a Reporting Data Annotation.
|
13974
|
+
# Format: properties/property_id
|
13975
|
+
# Example: properties/123
|
13976
|
+
# @param reporting_data_annotation [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation, ::Hash]
|
13977
|
+
# Required. The Reporting Data Annotation to create.
|
13978
|
+
#
|
13979
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
13980
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation]
|
13981
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
13982
|
+
#
|
13983
|
+
# @return [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation]
|
13984
|
+
#
|
13985
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
13986
|
+
#
|
13987
|
+
# @example Basic example
|
13988
|
+
# require "google/analytics/admin/v1alpha"
|
13989
|
+
#
|
13990
|
+
# # Create a client object. The client can be reused for multiple calls.
|
13991
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
13992
|
+
#
|
13993
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
13994
|
+
# request = Google::Analytics::Admin::V1alpha::CreateReportingDataAnnotationRequest.new
|
13995
|
+
#
|
13996
|
+
# # Call the create_reporting_data_annotation method.
|
13997
|
+
# result = client.create_reporting_data_annotation request
|
13998
|
+
#
|
13999
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::ReportingDataAnnotation.
|
14000
|
+
# p result
|
14001
|
+
#
|
14002
|
+
def create_reporting_data_annotation request, options = nil
|
14003
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
14004
|
+
|
14005
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateReportingDataAnnotationRequest
|
14006
|
+
|
14007
|
+
# Converts hash and nil to an options object
|
14008
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
14009
|
+
|
14010
|
+
# Customize the options with defaults
|
14011
|
+
metadata = @config.rpcs.create_reporting_data_annotation.metadata.to_h
|
14012
|
+
|
14013
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
14014
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
14015
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
14016
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
14017
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
14018
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
14019
|
+
|
14020
|
+
header_params = {}
|
14021
|
+
if request.parent
|
14022
|
+
header_params["parent"] = request.parent
|
14023
|
+
end
|
14024
|
+
|
14025
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
14026
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
14027
|
+
|
14028
|
+
options.apply_defaults timeout: @config.rpcs.create_reporting_data_annotation.timeout,
|
14029
|
+
metadata: metadata,
|
14030
|
+
retry_policy: @config.rpcs.create_reporting_data_annotation.retry_policy
|
14031
|
+
|
14032
|
+
options.apply_defaults timeout: @config.timeout,
|
14033
|
+
metadata: @config.metadata,
|
14034
|
+
retry_policy: @config.retry_policy
|
14035
|
+
|
14036
|
+
@analytics_admin_service_stub.call_rpc :create_reporting_data_annotation, request, options: options do |response, operation|
|
14037
|
+
yield response, operation if block_given?
|
14038
|
+
end
|
14039
|
+
rescue ::GRPC::BadStatus => e
|
14040
|
+
raise ::Google::Cloud::Error.from_error(e)
|
14041
|
+
end
|
14042
|
+
|
14043
|
+
##
|
14044
|
+
# Lookup a single Reporting Data Annotation.
|
14045
|
+
#
|
14046
|
+
# @overload get_reporting_data_annotation(request, options = nil)
|
14047
|
+
# Pass arguments to `get_reporting_data_annotation` via a request object, either of type
|
14048
|
+
# {::Google::Analytics::Admin::V1alpha::GetReportingDataAnnotationRequest} or an equivalent Hash.
|
14049
|
+
#
|
14050
|
+
# @param request [::Google::Analytics::Admin::V1alpha::GetReportingDataAnnotationRequest, ::Hash]
|
14051
|
+
# A request object representing the call parameters. Required. To specify no
|
14052
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
14053
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
14054
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
14055
|
+
#
|
14056
|
+
# @overload get_reporting_data_annotation(name: nil)
|
14057
|
+
# Pass arguments to `get_reporting_data_annotation` via keyword arguments. Note that at
|
14058
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
14059
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
14060
|
+
#
|
14061
|
+
# @param name [::String]
|
14062
|
+
# Required. Resource name of the Reporting Data Annotation to lookup.
|
14063
|
+
# Format:
|
14064
|
+
# properties/property_id/reportingDataAnnotations/reportingDataAnnotation
|
14065
|
+
# Example: properties/123/reportingDataAnnotations/456
|
14066
|
+
#
|
14067
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
14068
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation]
|
14069
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
14070
|
+
#
|
14071
|
+
# @return [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation]
|
14072
|
+
#
|
14073
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
14074
|
+
#
|
14075
|
+
# @example Basic example
|
14076
|
+
# require "google/analytics/admin/v1alpha"
|
14077
|
+
#
|
14078
|
+
# # Create a client object. The client can be reused for multiple calls.
|
14079
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
14080
|
+
#
|
14081
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
14082
|
+
# request = Google::Analytics::Admin::V1alpha::GetReportingDataAnnotationRequest.new
|
14083
|
+
#
|
14084
|
+
# # Call the get_reporting_data_annotation method.
|
14085
|
+
# result = client.get_reporting_data_annotation request
|
14086
|
+
#
|
14087
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::ReportingDataAnnotation.
|
14088
|
+
# p result
|
14089
|
+
#
|
14090
|
+
def get_reporting_data_annotation request, options = nil
|
14091
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
14092
|
+
|
14093
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetReportingDataAnnotationRequest
|
14094
|
+
|
14095
|
+
# Converts hash and nil to an options object
|
14096
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
14097
|
+
|
14098
|
+
# Customize the options with defaults
|
14099
|
+
metadata = @config.rpcs.get_reporting_data_annotation.metadata.to_h
|
14100
|
+
|
14101
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
14102
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
14103
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
14104
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
14105
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
14106
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
14107
|
+
|
14108
|
+
header_params = {}
|
14109
|
+
if request.name
|
14110
|
+
header_params["name"] = request.name
|
14111
|
+
end
|
14112
|
+
|
14113
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
14114
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
14115
|
+
|
14116
|
+
options.apply_defaults timeout: @config.rpcs.get_reporting_data_annotation.timeout,
|
14117
|
+
metadata: metadata,
|
14118
|
+
retry_policy: @config.rpcs.get_reporting_data_annotation.retry_policy
|
14119
|
+
|
14120
|
+
options.apply_defaults timeout: @config.timeout,
|
14121
|
+
metadata: @config.metadata,
|
14122
|
+
retry_policy: @config.retry_policy
|
14123
|
+
|
14124
|
+
@analytics_admin_service_stub.call_rpc :get_reporting_data_annotation, request, options: options do |response, operation|
|
14125
|
+
yield response, operation if block_given?
|
14126
|
+
end
|
14127
|
+
rescue ::GRPC::BadStatus => e
|
14128
|
+
raise ::Google::Cloud::Error.from_error(e)
|
14129
|
+
end
|
14130
|
+
|
14131
|
+
##
|
14132
|
+
# List all Reporting Data Annotations on a property.
|
14133
|
+
#
|
14134
|
+
# @overload list_reporting_data_annotations(request, options = nil)
|
14135
|
+
# Pass arguments to `list_reporting_data_annotations` via a request object, either of type
|
14136
|
+
# {::Google::Analytics::Admin::V1alpha::ListReportingDataAnnotationsRequest} or an equivalent Hash.
|
14137
|
+
#
|
14138
|
+
# @param request [::Google::Analytics::Admin::V1alpha::ListReportingDataAnnotationsRequest, ::Hash]
|
14139
|
+
# A request object representing the call parameters. Required. To specify no
|
14140
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
14141
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
14142
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
14143
|
+
#
|
14144
|
+
# @overload list_reporting_data_annotations(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
14145
|
+
# Pass arguments to `list_reporting_data_annotations` via keyword arguments. Note that at
|
14146
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
14147
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
14148
|
+
#
|
14149
|
+
# @param parent [::String]
|
14150
|
+
# Required. Resource name of the property.
|
14151
|
+
# Format: properties/property_id
|
14152
|
+
# Example: properties/123
|
14153
|
+
# @param filter [::String]
|
14154
|
+
# Optional. Filter that restricts which reporting data annotations under the
|
14155
|
+
# parent property are listed.
|
14156
|
+
#
|
14157
|
+
# Supported fields are:
|
14158
|
+
#
|
14159
|
+
# * 'name'
|
14160
|
+
# * `title`
|
14161
|
+
# * `description`
|
14162
|
+
# * `annotation_date`
|
14163
|
+
# * `annotation_date_range`
|
14164
|
+
# * `color`
|
14165
|
+
#
|
14166
|
+
# Additionally, this API provides the following helper functions:
|
14167
|
+
#
|
14168
|
+
# * annotation_duration() : the duration that this annotation marks,
|
14169
|
+
# [durations](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/duration.proto).
|
14170
|
+
# expect a numeric representation of seconds followed by an `s` suffix.
|
14171
|
+
# * is_annotation_in_range(start_date, end_date) : if the annotation is in
|
14172
|
+
# the range specified by the `start_date` and `end_date`. The dates are in
|
14173
|
+
# ISO-8601 format, for example `2031-06-28`.
|
14174
|
+
#
|
14175
|
+
# Supported operations:
|
14176
|
+
#
|
14177
|
+
# * `=` : equals
|
14178
|
+
# * `!=` : not equals
|
14179
|
+
# * `<` : less than
|
14180
|
+
# * `>` : greater than
|
14181
|
+
# * `<=` : less than or equals
|
14182
|
+
# * `>=` : greater than or equals
|
14183
|
+
# * `:` : has operator
|
14184
|
+
# * `=~` : [regular expression](https://github.com/google/re2/wiki/Syntax)
|
14185
|
+
# match
|
14186
|
+
# * `!~` : [regular expression](https://github.com/google/re2/wiki/Syntax)
|
14187
|
+
# does not match
|
14188
|
+
# * `NOT` : Logical not
|
14189
|
+
# * `AND` : Logical and
|
14190
|
+
# * `OR` : Logical or
|
14191
|
+
#
|
14192
|
+
# Examples:
|
14193
|
+
#
|
14194
|
+
# 1. `title="Holiday Sale"`
|
14195
|
+
# 2. `description=~"[Bb]ig [Gg]ame.*[Ss]ale"`
|
14196
|
+
# 3. `is_annotation_in_range("2025-12-25", "2026-01-16") = true`
|
14197
|
+
# 4. `annotation_duration() >= 172800s AND title:BOGO`
|
14198
|
+
# @param page_size [::Integer]
|
14199
|
+
# Optional. The maximum number of resources to return. The service may return
|
14200
|
+
# fewer than this value, even if there are additional pages. If unspecified,
|
14201
|
+
# at most 50 resources will be returned. The maximum value is 200; (higher
|
14202
|
+
# values will be coerced to the maximum)
|
14203
|
+
# @param page_token [::String]
|
14204
|
+
# Optional. A page token, received from a previous
|
14205
|
+
# `ListReportingDataAnnotations` call. Provide this to retrieve the
|
14206
|
+
# subsequent page. When paginating, all other parameters provided to
|
14207
|
+
# `ListReportingDataAnnotations` must match the call that provided the page
|
14208
|
+
# token.
|
14209
|
+
#
|
14210
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
14211
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation>]
|
14212
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
14213
|
+
#
|
14214
|
+
# @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation>]
|
14215
|
+
#
|
14216
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
14217
|
+
#
|
14218
|
+
# @example Basic example
|
14219
|
+
# require "google/analytics/admin/v1alpha"
|
14220
|
+
#
|
14221
|
+
# # Create a client object. The client can be reused for multiple calls.
|
14222
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
14223
|
+
#
|
14224
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
14225
|
+
# request = Google::Analytics::Admin::V1alpha::ListReportingDataAnnotationsRequest.new
|
14226
|
+
#
|
14227
|
+
# # Call the list_reporting_data_annotations method.
|
14228
|
+
# result = client.list_reporting_data_annotations request
|
14229
|
+
#
|
14230
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
14231
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
14232
|
+
# result.each do |item|
|
14233
|
+
# # Each element is of type ::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation.
|
14234
|
+
# p item
|
14235
|
+
# end
|
14236
|
+
#
|
14237
|
+
def list_reporting_data_annotations request, options = nil
|
14238
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
14239
|
+
|
14240
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListReportingDataAnnotationsRequest
|
14241
|
+
|
14242
|
+
# Converts hash and nil to an options object
|
14243
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
14244
|
+
|
14245
|
+
# Customize the options with defaults
|
14246
|
+
metadata = @config.rpcs.list_reporting_data_annotations.metadata.to_h
|
14247
|
+
|
14248
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
14249
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
14250
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
14251
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
14252
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
14253
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
14254
|
+
|
14255
|
+
header_params = {}
|
14256
|
+
if request.parent
|
14257
|
+
header_params["parent"] = request.parent
|
14258
|
+
end
|
14259
|
+
|
14260
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
14261
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
14262
|
+
|
14263
|
+
options.apply_defaults timeout: @config.rpcs.list_reporting_data_annotations.timeout,
|
14264
|
+
metadata: metadata,
|
14265
|
+
retry_policy: @config.rpcs.list_reporting_data_annotations.retry_policy
|
14266
|
+
|
14267
|
+
options.apply_defaults timeout: @config.timeout,
|
14268
|
+
metadata: @config.metadata,
|
14269
|
+
retry_policy: @config.retry_policy
|
14270
|
+
|
14271
|
+
@analytics_admin_service_stub.call_rpc :list_reporting_data_annotations, request, options: options do |response, operation|
|
14272
|
+
response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_reporting_data_annotations, request, response, operation, options
|
14273
|
+
yield response, operation if block_given?
|
14274
|
+
throw :response, response
|
14275
|
+
end
|
14276
|
+
rescue ::GRPC::BadStatus => e
|
14277
|
+
raise ::Google::Cloud::Error.from_error(e)
|
14278
|
+
end
|
14279
|
+
|
14280
|
+
##
|
14281
|
+
# Updates a Reporting Data Annotation.
|
14282
|
+
#
|
14283
|
+
# @overload update_reporting_data_annotation(request, options = nil)
|
14284
|
+
# Pass arguments to `update_reporting_data_annotation` via a request object, either of type
|
14285
|
+
# {::Google::Analytics::Admin::V1alpha::UpdateReportingDataAnnotationRequest} or an equivalent Hash.
|
14286
|
+
#
|
14287
|
+
# @param request [::Google::Analytics::Admin::V1alpha::UpdateReportingDataAnnotationRequest, ::Hash]
|
14288
|
+
# A request object representing the call parameters. Required. To specify no
|
14289
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
14290
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
14291
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
14292
|
+
#
|
14293
|
+
# @overload update_reporting_data_annotation(reporting_data_annotation: nil, update_mask: nil)
|
14294
|
+
# Pass arguments to `update_reporting_data_annotation` via keyword arguments. Note that at
|
14295
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
14296
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
14297
|
+
#
|
14298
|
+
# @param reporting_data_annotation [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation, ::Hash]
|
14299
|
+
# Required. The Reporting Data Annotation to update.
|
14300
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
14301
|
+
# Optional. The list of fields to update. Field names must be in snake case
|
14302
|
+
# (for example, "field_to_update"). Omitted fields will not be updated. To
|
14303
|
+
# replace the entire entity, use one path with the string "*" to match all
|
14304
|
+
# fields.
|
14305
|
+
#
|
14306
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
14307
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation]
|
14308
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
14309
|
+
#
|
14310
|
+
# @return [::Google::Analytics::Admin::V1alpha::ReportingDataAnnotation]
|
14311
|
+
#
|
14312
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
14313
|
+
#
|
14314
|
+
# @example Basic example
|
14315
|
+
# require "google/analytics/admin/v1alpha"
|
14316
|
+
#
|
14317
|
+
# # Create a client object. The client can be reused for multiple calls.
|
14318
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
14319
|
+
#
|
14320
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
14321
|
+
# request = Google::Analytics::Admin::V1alpha::UpdateReportingDataAnnotationRequest.new
|
14322
|
+
#
|
14323
|
+
# # Call the update_reporting_data_annotation method.
|
14324
|
+
# result = client.update_reporting_data_annotation request
|
14325
|
+
#
|
14326
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::ReportingDataAnnotation.
|
14327
|
+
# p result
|
14328
|
+
#
|
14329
|
+
def update_reporting_data_annotation request, options = nil
|
14330
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
14331
|
+
|
14332
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateReportingDataAnnotationRequest
|
14333
|
+
|
14334
|
+
# Converts hash and nil to an options object
|
14335
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
14336
|
+
|
14337
|
+
# Customize the options with defaults
|
14338
|
+
metadata = @config.rpcs.update_reporting_data_annotation.metadata.to_h
|
14339
|
+
|
14340
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
14341
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
14342
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
14343
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
14344
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
14345
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
14346
|
+
|
14347
|
+
header_params = {}
|
14348
|
+
if request.reporting_data_annotation&.name
|
14349
|
+
header_params["reporting_data_annotation.name"] = request.reporting_data_annotation.name
|
14350
|
+
end
|
14351
|
+
|
14352
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
14353
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
14354
|
+
|
14355
|
+
options.apply_defaults timeout: @config.rpcs.update_reporting_data_annotation.timeout,
|
14356
|
+
metadata: metadata,
|
14357
|
+
retry_policy: @config.rpcs.update_reporting_data_annotation.retry_policy
|
14358
|
+
|
14359
|
+
options.apply_defaults timeout: @config.timeout,
|
14360
|
+
metadata: @config.metadata,
|
14361
|
+
retry_policy: @config.retry_policy
|
14362
|
+
|
14363
|
+
@analytics_admin_service_stub.call_rpc :update_reporting_data_annotation, request, options: options do |response, operation|
|
14364
|
+
yield response, operation if block_given?
|
14365
|
+
end
|
14366
|
+
rescue ::GRPC::BadStatus => e
|
14367
|
+
raise ::Google::Cloud::Error.from_error(e)
|
14368
|
+
end
|
14369
|
+
|
14370
|
+
##
|
14371
|
+
# Deletes a Reporting Data Annotation.
|
14372
|
+
#
|
14373
|
+
# @overload delete_reporting_data_annotation(request, options = nil)
|
14374
|
+
# Pass arguments to `delete_reporting_data_annotation` via a request object, either of type
|
14375
|
+
# {::Google::Analytics::Admin::V1alpha::DeleteReportingDataAnnotationRequest} or an equivalent Hash.
|
14376
|
+
#
|
14377
|
+
# @param request [::Google::Analytics::Admin::V1alpha::DeleteReportingDataAnnotationRequest, ::Hash]
|
14378
|
+
# A request object representing the call parameters. Required. To specify no
|
14379
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
14380
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
14381
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
14382
|
+
#
|
14383
|
+
# @overload delete_reporting_data_annotation(name: nil)
|
14384
|
+
# Pass arguments to `delete_reporting_data_annotation` via keyword arguments. Note that at
|
14385
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
14386
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
14387
|
+
#
|
14388
|
+
# @param name [::String]
|
14389
|
+
# Required. Resource name of the Reporting Data Annotation to delete.
|
14390
|
+
# Format:
|
14391
|
+
# properties/property_id/reportingDataAnnotations/reporting_data_annotation
|
14392
|
+
# Example: properties/123/reportingDataAnnotations/456
|
14393
|
+
#
|
14394
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
14395
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
14396
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
14397
|
+
#
|
14398
|
+
# @return [::Google::Protobuf::Empty]
|
14399
|
+
#
|
14400
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
14401
|
+
#
|
14402
|
+
# @example Basic example
|
14403
|
+
# require "google/analytics/admin/v1alpha"
|
14404
|
+
#
|
14405
|
+
# # Create a client object. The client can be reused for multiple calls.
|
14406
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
14407
|
+
#
|
14408
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
14409
|
+
# request = Google::Analytics::Admin::V1alpha::DeleteReportingDataAnnotationRequest.new
|
14410
|
+
#
|
14411
|
+
# # Call the delete_reporting_data_annotation method.
|
14412
|
+
# result = client.delete_reporting_data_annotation request
|
14413
|
+
#
|
14414
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
14415
|
+
# p result
|
14416
|
+
#
|
14417
|
+
def delete_reporting_data_annotation request, options = nil
|
14418
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
14419
|
+
|
14420
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteReportingDataAnnotationRequest
|
14421
|
+
|
14422
|
+
# Converts hash and nil to an options object
|
14423
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
14424
|
+
|
14425
|
+
# Customize the options with defaults
|
14426
|
+
metadata = @config.rpcs.delete_reporting_data_annotation.metadata.to_h
|
14427
|
+
|
14428
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
14429
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
14430
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
14431
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
14432
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
14433
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
14434
|
+
|
14435
|
+
header_params = {}
|
14436
|
+
if request.name
|
14437
|
+
header_params["name"] = request.name
|
14438
|
+
end
|
14439
|
+
|
14440
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
14441
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
14442
|
+
|
14443
|
+
options.apply_defaults timeout: @config.rpcs.delete_reporting_data_annotation.timeout,
|
14444
|
+
metadata: metadata,
|
14445
|
+
retry_policy: @config.rpcs.delete_reporting_data_annotation.retry_policy
|
14446
|
+
|
14447
|
+
options.apply_defaults timeout: @config.timeout,
|
14448
|
+
metadata: @config.metadata,
|
14449
|
+
retry_policy: @config.retry_policy
|
14450
|
+
|
14451
|
+
@analytics_admin_service_stub.call_rpc :delete_reporting_data_annotation, request, options: options do |response, operation|
|
14452
|
+
yield response, operation if block_given?
|
14453
|
+
end
|
14454
|
+
rescue ::GRPC::BadStatus => e
|
14455
|
+
raise ::Google::Cloud::Error.from_error(e)
|
14456
|
+
end
|
14457
|
+
|
14458
|
+
##
|
14459
|
+
# Submits a request for user deletion for a property.
|
14460
|
+
#
|
14461
|
+
# @overload submit_user_deletion(request, options = nil)
|
14462
|
+
# Pass arguments to `submit_user_deletion` via a request object, either of type
|
14463
|
+
# {::Google::Analytics::Admin::V1alpha::SubmitUserDeletionRequest} or an equivalent Hash.
|
14464
|
+
#
|
14465
|
+
# @param request [::Google::Analytics::Admin::V1alpha::SubmitUserDeletionRequest, ::Hash]
|
14466
|
+
# A request object representing the call parameters. Required. To specify no
|
14467
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
14468
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
14469
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
14470
|
+
#
|
14471
|
+
# @overload submit_user_deletion(user_id: nil, client_id: nil, app_instance_id: nil, user_provided_data: nil, name: nil)
|
14472
|
+
# Pass arguments to `submit_user_deletion` via keyword arguments. Note that at
|
14473
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
14474
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
14475
|
+
#
|
14476
|
+
# @param user_id [::String]
|
14477
|
+
# Google Analytics [user
|
14478
|
+
# ID](https://firebase.google.com/docs/analytics/userid).
|
14479
|
+
#
|
14480
|
+
# Note: The following fields are mutually exclusive: `user_id`, `client_id`, `app_instance_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
14481
|
+
# @param client_id [::String]
|
14482
|
+
# Google Analytics [client
|
14483
|
+
# ID](https://support.google.com/analytics/answer/11593727).
|
14484
|
+
#
|
14485
|
+
# Note: The following fields are mutually exclusive: `client_id`, `user_id`, `app_instance_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
14486
|
+
# @param app_instance_id [::String]
|
14487
|
+
# Firebase [application instance
|
14488
|
+
# ID](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#getAppInstanceId).
|
14489
|
+
#
|
14490
|
+
# Note: The following fields are mutually exclusive: `app_instance_id`, `user_id`, `client_id`, `user_provided_data`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
14491
|
+
# @param user_provided_data [::String]
|
14492
|
+
# The un-hashed, unencrypted, [user-provided
|
14493
|
+
# data](https://support.google.com/analytics/answer/14077171).
|
14494
|
+
#
|
14495
|
+
# Note: The following fields are mutually exclusive: `user_provided_data`, `user_id`, `client_id`, `app_instance_id`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
14496
|
+
# @param name [::String]
|
14497
|
+
# Required. The name of the property to submit user deletion for.
|
14498
|
+
#
|
14499
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
14500
|
+
# @yieldparam response [::Google::Analytics::Admin::V1alpha::SubmitUserDeletionResponse]
|
14501
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
14502
|
+
#
|
14503
|
+
# @return [::Google::Analytics::Admin::V1alpha::SubmitUserDeletionResponse]
|
14504
|
+
#
|
14505
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
14506
|
+
#
|
14507
|
+
# @example Basic example
|
14508
|
+
# require "google/analytics/admin/v1alpha"
|
14509
|
+
#
|
14510
|
+
# # Create a client object. The client can be reused for multiple calls.
|
14511
|
+
# client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
|
14512
|
+
#
|
14513
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
14514
|
+
# request = Google::Analytics::Admin::V1alpha::SubmitUserDeletionRequest.new
|
14515
|
+
#
|
14516
|
+
# # Call the submit_user_deletion method.
|
14517
|
+
# result = client.submit_user_deletion request
|
14518
|
+
#
|
14519
|
+
# # The returned object is of type Google::Analytics::Admin::V1alpha::SubmitUserDeletionResponse.
|
14520
|
+
# p result
|
14521
|
+
#
|
14522
|
+
def submit_user_deletion request, options = nil
|
14523
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
14524
|
+
|
14525
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::SubmitUserDeletionRequest
|
14526
|
+
|
14527
|
+
# Converts hash and nil to an options object
|
14528
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
14529
|
+
|
14530
|
+
# Customize the options with defaults
|
14531
|
+
metadata = @config.rpcs.submit_user_deletion.metadata.to_h
|
14532
|
+
|
14533
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
14534
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
14535
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
14536
|
+
gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
|
14537
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
14538
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
14539
|
+
|
14540
|
+
header_params = {}
|
14541
|
+
if request.name
|
14542
|
+
header_params["name"] = request.name
|
14543
|
+
end
|
14544
|
+
|
14545
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
14546
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
14547
|
+
|
14548
|
+
options.apply_defaults timeout: @config.rpcs.submit_user_deletion.timeout,
|
14549
|
+
metadata: metadata,
|
14550
|
+
retry_policy: @config.rpcs.submit_user_deletion.retry_policy
|
14551
|
+
|
14552
|
+
options.apply_defaults timeout: @config.timeout,
|
14553
|
+
metadata: @config.metadata,
|
14554
|
+
retry_policy: @config.retry_policy
|
14555
|
+
|
14556
|
+
@analytics_admin_service_stub.call_rpc :submit_user_deletion, request, options: options do |response, operation|
|
14557
|
+
yield response, operation if block_given?
|
14558
|
+
end
|
14559
|
+
rescue ::GRPC::BadStatus => e
|
14560
|
+
raise ::Google::Cloud::Error.from_error(e)
|
14561
|
+
end
|
14562
|
+
|
13954
14563
|
##
|
13955
14564
|
# Configuration class for the AnalyticsAdminService API.
|
13956
14565
|
#
|
@@ -14867,6 +15476,36 @@ module Google
|
|
14867
15476
|
# @return [::Gapic::Config::Method]
|
14868
15477
|
#
|
14869
15478
|
attr_reader :delete_subproperty_event_filter
|
15479
|
+
##
|
15480
|
+
# RPC-specific configuration for `create_reporting_data_annotation`
|
15481
|
+
# @return [::Gapic::Config::Method]
|
15482
|
+
#
|
15483
|
+
attr_reader :create_reporting_data_annotation
|
15484
|
+
##
|
15485
|
+
# RPC-specific configuration for `get_reporting_data_annotation`
|
15486
|
+
# @return [::Gapic::Config::Method]
|
15487
|
+
#
|
15488
|
+
attr_reader :get_reporting_data_annotation
|
15489
|
+
##
|
15490
|
+
# RPC-specific configuration for `list_reporting_data_annotations`
|
15491
|
+
# @return [::Gapic::Config::Method]
|
15492
|
+
#
|
15493
|
+
attr_reader :list_reporting_data_annotations
|
15494
|
+
##
|
15495
|
+
# RPC-specific configuration for `update_reporting_data_annotation`
|
15496
|
+
# @return [::Gapic::Config::Method]
|
15497
|
+
#
|
15498
|
+
attr_reader :update_reporting_data_annotation
|
15499
|
+
##
|
15500
|
+
# RPC-specific configuration for `delete_reporting_data_annotation`
|
15501
|
+
# @return [::Gapic::Config::Method]
|
15502
|
+
#
|
15503
|
+
attr_reader :delete_reporting_data_annotation
|
15504
|
+
##
|
15505
|
+
# RPC-specific configuration for `submit_user_deletion`
|
15506
|
+
# @return [::Gapic::Config::Method]
|
15507
|
+
#
|
15508
|
+
attr_reader :submit_user_deletion
|
14870
15509
|
|
14871
15510
|
# @private
|
14872
15511
|
def initialize parent_rpcs = nil
|
@@ -15170,6 +15809,18 @@ module Google
|
|
15170
15809
|
@update_subproperty_event_filter = ::Gapic::Config::Method.new update_subproperty_event_filter_config
|
15171
15810
|
delete_subproperty_event_filter_config = parent_rpcs.delete_subproperty_event_filter if parent_rpcs.respond_to? :delete_subproperty_event_filter
|
15172
15811
|
@delete_subproperty_event_filter = ::Gapic::Config::Method.new delete_subproperty_event_filter_config
|
15812
|
+
create_reporting_data_annotation_config = parent_rpcs.create_reporting_data_annotation if parent_rpcs.respond_to? :create_reporting_data_annotation
|
15813
|
+
@create_reporting_data_annotation = ::Gapic::Config::Method.new create_reporting_data_annotation_config
|
15814
|
+
get_reporting_data_annotation_config = parent_rpcs.get_reporting_data_annotation if parent_rpcs.respond_to? :get_reporting_data_annotation
|
15815
|
+
@get_reporting_data_annotation = ::Gapic::Config::Method.new get_reporting_data_annotation_config
|
15816
|
+
list_reporting_data_annotations_config = parent_rpcs.list_reporting_data_annotations if parent_rpcs.respond_to? :list_reporting_data_annotations
|
15817
|
+
@list_reporting_data_annotations = ::Gapic::Config::Method.new list_reporting_data_annotations_config
|
15818
|
+
update_reporting_data_annotation_config = parent_rpcs.update_reporting_data_annotation if parent_rpcs.respond_to? :update_reporting_data_annotation
|
15819
|
+
@update_reporting_data_annotation = ::Gapic::Config::Method.new update_reporting_data_annotation_config
|
15820
|
+
delete_reporting_data_annotation_config = parent_rpcs.delete_reporting_data_annotation if parent_rpcs.respond_to? :delete_reporting_data_annotation
|
15821
|
+
@delete_reporting_data_annotation = ::Gapic::Config::Method.new delete_reporting_data_annotation_config
|
15822
|
+
submit_user_deletion_config = parent_rpcs.submit_user_deletion if parent_rpcs.respond_to? :submit_user_deletion
|
15823
|
+
@submit_user_deletion = ::Gapic::Config::Method.new submit_user_deletion_config
|
15173
15824
|
|
15174
15825
|
yield self if block_given?
|
15175
15826
|
end
|