# frozen_string_literal: true # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/errors" require "google/analytics/admin/v1alpha/analytics_admin_pb" module Google module Analytics module Admin module V1alpha module AnalyticsAdminService ## # Client for the AnalyticsAdminService service. # # Service Interface for the Analytics Admin API (GA4). # class Client include Paths # @private attr_reader :analytics_admin_service_stub ## # Configure the AnalyticsAdminService Client class. # # See {::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client::Configuration} # for a description of the configuration fields. # # ## Example # # To modify the configuration for all AnalyticsAdminService clients: # # ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.configure do |config| # config.timeout = 10.0 # end # # @yield [config] Configure the Client client. # @yieldparam config [Client::Configuration] # # @return [Client::Configuration] # def self.configure @configure ||= begin namespace = ["Google", "Analytics", "Admin", "V1alpha"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const&.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.retry_policy = { initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] } default_config.rpcs.get_account.timeout = 60.0 default_config.rpcs.list_accounts.timeout = 60.0 default_config.rpcs.delete_account.timeout = 60.0 default_config.rpcs.update_account.timeout = 60.0 default_config.rpcs.provision_account_ticket.timeout = 60.0 default_config.rpcs.get_property.timeout = 60.0 default_config.rpcs.list_properties.timeout = 60.0 default_config.rpcs.create_property.timeout = 60.0 default_config.rpcs.delete_property.timeout = 60.0 default_config.rpcs.update_property.timeout = 60.0 default_config.rpcs.get_user_link.timeout = 60.0 default_config.rpcs.batch_get_user_links.timeout = 60.0 default_config.rpcs.list_user_links.timeout = 60.0 default_config.rpcs.audit_user_links.timeout = 60.0 default_config.rpcs.create_user_link.timeout = 60.0 default_config.rpcs.batch_create_user_links.timeout = 60.0 default_config.rpcs.update_user_link.timeout = 60.0 default_config.rpcs.batch_update_user_links.timeout = 60.0 default_config.rpcs.delete_user_link.timeout = 60.0 default_config.rpcs.batch_delete_user_links.timeout = 60.0 default_config.rpcs.get_web_data_stream.timeout = 60.0 default_config.rpcs.update_web_data_stream.timeout = 60.0 default_config.rpcs.create_web_data_stream.timeout = 60.0 default_config.rpcs.list_web_data_streams.timeout = 60.0 default_config.rpcs.get_ios_app_data_stream.timeout = 60.0 default_config.rpcs.delete_ios_app_data_stream.timeout = 60.0 default_config.rpcs.update_ios_app_data_stream.timeout = 60.0 default_config.rpcs.create_ios_app_data_stream.timeout = 60.0 default_config.rpcs.list_ios_app_data_streams.timeout = 60.0 default_config.rpcs.get_android_app_data_stream.timeout = 60.0 default_config.rpcs.delete_android_app_data_stream.timeout = 60.0 default_config.rpcs.update_android_app_data_stream.timeout = 60.0 default_config.rpcs.create_android_app_data_stream.timeout = 60.0 default_config.rpcs.list_android_app_data_streams.timeout = 60.0 default_config.rpcs.get_enhanced_measurement_settings.timeout = 60.0 default_config.rpcs.update_enhanced_measurement_settings.timeout = 60.0 default_config.rpcs.create_firebase_link.timeout = 60.0 default_config.rpcs.update_firebase_link.timeout = 60.0 default_config.rpcs.delete_firebase_link.timeout = 60.0 default_config.rpcs.list_firebase_links.timeout = 60.0 default_config.rpcs.get_global_site_tag.timeout = 60.0 default_config.rpcs.create_google_ads_link.timeout = 60.0 default_config.rpcs.update_google_ads_link.timeout = 60.0 default_config.rpcs.delete_google_ads_link.timeout = 60.0 default_config.rpcs.list_google_ads_links.timeout = 60.0 default_config end yield @configure if block_given? @configure end ## # Configure the AnalyticsAdminService Client instance. # # The configuration is set to the derived mode, meaning that values can be changed, # but structural changes (adding new fields, etc.) are not allowed. Structural changes # should be made on {Client.configure}. # # See {::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client::Configuration} # for a description of the configuration fields. # # @yield [config] Configure the Client client. # @yieldparam config [Client::Configuration] # # @return [Client::Configuration] # def configure yield @config if block_given? @config end ## # Create a new AnalyticsAdminService client object. # # ## Examples # # To create a new AnalyticsAdminService client with the default # configuration: # # client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # To create a new AnalyticsAdminService client with a custom # configuration: # # client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| # config.timeout = 10.0 # end # # @yield [config] Configure the AnalyticsAdminService client. # @yieldparam config [Client::Configuration] # def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/analytics/admin/v1alpha/analytics_admin_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials credentials ||= Credentials.default scope: @config.scope if credentials.is_a?(String) || credentials.is_a?(Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @analytics_admin_service_stub = ::Gapic::ServiceStub.new( ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, interceptors: @config.interceptors ) end # Service calls ## # Lookup for a single Account. # Throws "Target not found" if no such account found, or if caller does not # have permissions to access it. # # @overload get_account(request, options = nil) # Pass arguments to `get_account` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetAccountRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetAccountRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_account(name: nil) # Pass arguments to `get_account` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the account to lookup. # Format: accounts/\\{account} # Example: "accounts/100" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::Account] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::Account] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_account request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAccountRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_account.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_account.timeout, metadata: metadata, retry_policy: @config.rpcs.get_account.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_account, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns all accounts accessible by the caller. # # Note that these accounts might not currently have GA4 properties. # Soft-deleted (ie: "trashed") accounts are excluded by default. # Returns an empty list if no relevant accounts are found. # # @overload list_accounts(request, options = nil) # Pass arguments to `list_accounts` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListAccountsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListAccountsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_accounts(page_size: nil, page_token: nil, show_deleted: nil) # Pass arguments to `list_accounts` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param page_size [::Integer] # The maximum number of resources to return. The service may return # fewer than this value, even if there are additional pages. # If unspecified, at most 50 resources will be returned. # The maximum value is 200; (higher values will be coerced to the maximum) # @param page_token [::String] # A page token, received from a previous `ListAccounts` call. # Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `ListAccounts` must # match the call that provided the page token. # @param show_deleted [::Boolean] # Whether to include soft-deleted (ie: "trashed") Accounts in the # results. Accounts can be inspected to determine whether they are deleted or # not. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Account>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_accounts request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAccountsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_accounts.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_accounts.timeout, metadata: metadata, retry_policy: @config.rpcs.list_accounts.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_accounts, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_accounts, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Marks target Account as soft-deleted (ie: "trashed") and returns it. # # This API does not have a method to restore soft-deleted accounts. # However, they can be restored using the Trash Can UI. # # If the accounts are not restored before the expiration time, the account # and all child resources (eg: Properties, GoogleAdsLinks, Streams, # UserLinks) will be permanently purged. # https://support.google.com/analytics/answer/6154772 # # Returns an error if the target is not found. # # @overload delete_account(request, options = nil) # Pass arguments to `delete_account` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteAccountRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteAccountRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_account(name: nil) # Pass arguments to `delete_account` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the Account to soft-delete. # Format: accounts/\\{account} # Example: "accounts/100" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_account request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteAccountRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_account.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_account.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_account.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_account, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates an account. # # @overload update_account(request, options = nil) # Pass arguments to `update_account` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateAccountRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateAccountRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_account(account: nil, update_mask: nil) # Pass arguments to `update_account` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::Google::Analytics::Admin::V1alpha::Account, ::Hash] # Required. The account to update. # The account's `name` field is used to identify the account. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::Account] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::Account] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_account request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAccountRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_account.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "account.name" => request.account.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_account.timeout, metadata: metadata, retry_policy: @config.rpcs.update_account.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_account, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Requests a ticket for creating an account. # # @overload provision_account_ticket(request, options = nil) # Pass arguments to `provision_account_ticket` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload provision_account_ticket(account: nil, redirect_uri: nil) # Pass arguments to `provision_account_ticket` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::Google::Analytics::Admin::V1alpha::Account, ::Hash] # The account to create. # @param redirect_uri [::String] # Redirect URI where the user will be sent after accepting Terms of Service. # Must be configured in Developers Console as a Redirect URI # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def provision_account_ticket request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.provision_account_ticket.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.provision_account_ticket.timeout, metadata: metadata, retry_policy: @config.rpcs.provision_account_ticket.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :provision_account_ticket, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns summaries of all accounts accessible by the caller. # # @overload list_account_summaries(request, options = nil) # Pass arguments to `list_account_summaries` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_account_summaries(page_size: nil, page_token: nil) # Pass arguments to `list_account_summaries` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param page_size [::Integer] # The maximum number of AccountSummary resources to return. The service may # return fewer than this value, even if there are additional pages. # If unspecified, at most 50 resources will be returned. # The maximum value is 200; (higher values will be coerced to the maximum) # @param page_token [::String] # A page token, received from a previous `ListAccountSummaries` call. # Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `ListAccountSummaries` # must match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AccountSummary>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_account_summaries request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_account_summaries.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_account_summaries.timeout, metadata: metadata, retry_policy: @config.rpcs.list_account_summaries.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_account_summaries, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_account_summaries, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single "GA4" Property. # # Throws "Target not found" if no such property found, if property is not # of the type "GA4", or if caller does not have permissions to access it. # # @overload get_property(request, options = nil) # Pass arguments to `get_property` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetPropertyRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetPropertyRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_property(name: nil) # Pass arguments to `get_property` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the property to lookup. # Format: properties/\\{property_id} # Example: "properties/1000" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::Property] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::Property] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_property request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetPropertyRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_property.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_property.timeout, metadata: metadata, retry_policy: @config.rpcs.get_property.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_property, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns child Properties under the specified parent Account. # # Only "GA4" properties will be returned. # Properties will be excluded if the caller does not have access. # Soft-deleted (ie: "trashed") properties are excluded by default. # Returns an empty list if no relevant properties are found. # # @overload list_properties(request, options = nil) # Pass arguments to `list_properties` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListPropertiesRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListPropertiesRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_properties(filter: nil, page_size: nil, page_token: nil, show_deleted: nil) # Pass arguments to `list_properties` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param filter [::String] # Required. An expression for filtering the results of the request. # Fields eligible for filtering are: # `parent:`(The resource name of the parent account) or # `firebase_project:`(The id or number of the linked firebase project). # Some examples of filters: # # | Filter | Description | # |-----------------------------|-------------------------------------------| # | parent:accounts/123 | The account with account id: 123. | # | firebase_project:project-id | The firebase project with id: project-id. | # | firebase_project:123 | The firebase project with number: 123. | # @param page_size [::Integer] # The maximum number of resources to return. The service may return # fewer than this value, even if there are additional pages. # If unspecified, at most 50 resources will be returned. # The maximum value is 200; (higher values will be coerced to the maximum) # @param page_token [::String] # A page token, received from a previous `ListProperties` call. # Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `ListProperties` must # match the call that provided the page token. # @param show_deleted [::Boolean] # Whether to include soft-deleted (ie: "trashed") Properties in the # results. Properties can be inspected to determine whether they are deleted # or not. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::Property>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_properties request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListPropertiesRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_properties.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.list_properties.timeout, metadata: metadata, retry_policy: @config.rpcs.list_properties.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_properties, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_properties, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates an "GA4" property with the specified location and attributes. # # @overload create_property(request, options = nil) # Pass arguments to `create_property` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreatePropertyRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreatePropertyRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_property(property: nil) # Pass arguments to `create_property` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param property [::Google::Analytics::Admin::V1alpha::Property, ::Hash] # Required. The property to create. # Note: the supplied property must specify its parent. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::Property] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::Property] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def create_property request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreatePropertyRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_property.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.create_property.timeout, metadata: metadata, retry_policy: @config.rpcs.create_property.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_property, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Marks target Property as soft-deleted (ie: "trashed") and returns it. # # This API does not have a method to restore soft-deleted properties. # However, they can be restored using the Trash Can UI. # # If the properties are not restored before the expiration time, the Property # and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) # will be permanently purged. # https://support.google.com/analytics/answer/6154772 # # Returns an error if the target is not found, or is not an GA4 Property. # # @overload delete_property(request, options = nil) # Pass arguments to `delete_property` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeletePropertyRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeletePropertyRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_property(name: nil) # Pass arguments to `delete_property` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the Property to soft-delete. # Format: properties/\\{property_id} # Example: "properties/1000" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_property request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeletePropertyRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_property.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_property.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_property.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_property, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a property. # # @overload update_property(request, options = nil) # Pass arguments to `update_property` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_property(property: nil, update_mask: nil) # Pass arguments to `update_property` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param property [::Google::Analytics::Admin::V1alpha::Property, ::Hash] # Required. The property to update. # The property's `name` field is used to identify the property to be # updated. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::Property] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::Property] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_property request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdatePropertyRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_property.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "property.name" => request.property.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_property.timeout, metadata: metadata, retry_policy: @config.rpcs.update_property.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_property, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets information about a user's link to an account or property. # # @overload get_user_link(request, options = nil) # Pass arguments to `get_user_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetUserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetUserLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_user_link(name: nil) # Pass arguments to `get_user_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. Example format: accounts/1234/userLinks/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::UserLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::UserLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_user_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetUserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_user_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_user_link.timeout, metadata: metadata, retry_policy: @config.rpcs.get_user_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_user_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Gets information about multiple users' links to an account or property. # # @overload batch_get_user_links(request, options = nil) # Pass arguments to `batch_get_user_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::BatchGetUserLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::BatchGetUserLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload batch_get_user_links(parent: nil, names: nil) # Pass arguments to `batch_get_user_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The account or property that all user links in the request are # for. The parent of all provided values for the 'names' field must match # this field. # Example format: accounts/1234 # @param names [::Array<::String>] # Required. The names of the user links to retrieve. # A maximum of 1000 user links can be retrieved in a batch. # Format: accounts/\\{accountId}/userLinks/\\{userLinkId} # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::BatchGetUserLinksResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::BatchGetUserLinksResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def batch_get_user_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::BatchGetUserLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.batch_get_user_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.batch_get_user_links.timeout, metadata: metadata, retry_policy: @config.rpcs.batch_get_user_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :batch_get_user_links, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists all user links on an account or property. # # @overload list_user_links(request, options = nil) # Pass arguments to `list_user_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListUserLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListUserLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_user_links(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_user_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: accounts/1234 # @param page_size [::Integer] # The maximum number of user links to return. # The service may return fewer than this value. # If unspecified, at most 200 user links will be returned. # The maximum value is 500; values above 500 will be coerced to 500. # @param page_token [::String] # A page token, received from a previous `ListUserLinks` call. # Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `ListUserLinks` must # match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::UserLink>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::UserLink>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_user_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListUserLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_user_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_user_links.timeout, metadata: metadata, retry_policy: @config.rpcs.list_user_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_user_links, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_user_links, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists all user links on an account or property, including implicit ones # that come from effective permissions granted by groups or organization # admin roles. # # If a returned user link does not have direct permissions, they cannot # be removed from the account or property directly with the DeleteUserLink # command. They have to be removed from the group/etc that gives them # permissions, which is currently only usable/discoverable in the GA or GMP # UIs. # # @overload audit_user_links(request, options = nil) # Pass arguments to `audit_user_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::AuditUserLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::AuditUserLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload audit_user_links(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `audit_user_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: accounts/1234 # @param page_size [::Integer] # The maximum number of user links to return. # The service may return fewer than this value. # If unspecified, at most 1000 user links will be returned. # The maximum value is 5000; values above 5000 will be coerced to 5000. # @param page_token [::String] # A page token, received from a previous `AuditUserLinks` call. # Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `AuditUserLinks` must # match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AuditUserLink>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AuditUserLink>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def audit_user_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::AuditUserLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.audit_user_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.audit_user_links.timeout, metadata: metadata, retry_policy: @config.rpcs.audit_user_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :audit_user_links, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :audit_user_links, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a user link on an account or property. # # If the user with the specified email already has permissions on the # account or property, then the user's existing permissions will be unioned # with the permissions specified in the new UserLink. # # @overload create_user_link(request, options = nil) # Pass arguments to `create_user_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_user_link(parent: nil, notify_new_user: nil, user_link: nil) # Pass arguments to `create_user_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: accounts/1234 # @param notify_new_user [::Boolean] # Optional. If notify_new_user is set, then email new user that they've been given # permissions on the resource. # @param user_link [::Google::Analytics::Admin::V1alpha::UserLink, ::Hash] # Required. The user link to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::UserLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::UserLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def create_user_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_user_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_user_link.timeout, metadata: metadata, retry_policy: @config.rpcs.create_user_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_user_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates information about multiple users' links to an account or property. # # This method is transactional. If any UserLink cannot be created, none of # the UserLinks will be created. # # @overload batch_create_user_links(request, options = nil) # Pass arguments to `batch_create_user_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload batch_create_user_links(parent: nil, notify_new_users: nil, requests: nil) # Pass arguments to `batch_create_user_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The account or property that all user links in the request are for. # This field is required. The parent field in the CreateUserLinkRequest # messages must either be empty or match this field. # Example format: accounts/1234 # @param notify_new_users [::Boolean] # Optional. If notify_new_users is set, then email new users that they've been given # permissions on the resource. # @param requests [::Array<::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest, ::Hash>] # The requests specifying the user links to create. # A maximum of 1000 user links can be created in a batch. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def batch_create_user_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::BatchCreateUserLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.batch_create_user_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.batch_create_user_links.timeout, metadata: metadata, retry_policy: @config.rpcs.batch_create_user_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :batch_create_user_links, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a user link on an account or property. # # @overload update_user_link(request, options = nil) # Pass arguments to `update_user_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_user_link(user_link: nil) # Pass arguments to `update_user_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param user_link [::Google::Analytics::Admin::V1alpha::UserLink, ::Hash] # Required. The user link to update. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::UserLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::UserLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_user_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_user_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "user_link.name" => request.user_link.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_user_link.timeout, metadata: metadata, retry_policy: @config.rpcs.update_user_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_user_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates information about multiple users' links to an account or property. # # @overload batch_update_user_links(request, options = nil) # Pass arguments to `batch_update_user_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload batch_update_user_links(parent: nil, requests: nil) # Pass arguments to `batch_update_user_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The account or property that all user links in the request are # for. The parent field in the UpdateUserLinkRequest messages must either be # empty or match this field. # Example format: accounts/1234 # @param requests [::Array<::Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest, ::Hash>] # The requests specifying the user links to update. # A maximum of 1000 user links can be updated in a batch. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def batch_update_user_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.batch_update_user_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.batch_update_user_links.timeout, metadata: metadata, retry_policy: @config.rpcs.batch_update_user_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :batch_update_user_links, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a user link on an account or property. # # @overload delete_user_link(request, options = nil) # Pass arguments to `delete_user_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_user_link(name: nil) # Pass arguments to `delete_user_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. Example format: accounts/1234/userLinks/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_user_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_user_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_user_link.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_user_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_user_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes information about multiple users' links to an account or property. # # @overload batch_delete_user_links(request, options = nil) # Pass arguments to `batch_delete_user_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::BatchDeleteUserLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::BatchDeleteUserLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload batch_delete_user_links(parent: nil, requests: nil) # Pass arguments to `batch_delete_user_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The account or property that all user links in the request are # for. The parent of all values for user link names to delete must match this # field. # Example format: accounts/1234 # @param requests [::Array<::Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest, ::Hash>] # The requests specifying the user links to update. # A maximum of 1000 user links can be updated in a batch. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def batch_delete_user_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::BatchDeleteUserLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.batch_delete_user_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.batch_delete_user_links.timeout, metadata: metadata, retry_policy: @config.rpcs.batch_delete_user_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :batch_delete_user_links, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single WebDataStream # # Throws "Target not found" if no such web data stream found, or if the # caller does not have permissions to access it. # # @overload get_web_data_stream(request, options = nil) # Pass arguments to `get_web_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetWebDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetWebDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_web_data_stream(name: nil) # Pass arguments to `get_web_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the web data stream to lookup. # Format: properties/\\{property_id}/webDataStreams/\\{stream_id} # Example: "properties/123/webDataStreams/456" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::WebDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::WebDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_web_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetWebDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_web_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_web_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.get_web_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_web_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a web stream on a property. # # @overload delete_web_data_stream(request, options = nil) # Pass arguments to `delete_web_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteWebDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteWebDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_web_data_stream(name: nil) # Pass arguments to `delete_web_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the web data stream to delete. # Format: properties/\\{property_id}/webDataStreams/\\{stream_id} # Example: "properties/123/webDataStreams/456" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_web_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteWebDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_web_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_web_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_web_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_web_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a web stream on a property. # # @overload update_web_data_stream(request, options = nil) # Pass arguments to `update_web_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateWebDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateWebDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_web_data_stream(web_data_stream: nil, update_mask: nil) # Pass arguments to `update_web_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param web_data_stream [::Google::Analytics::Admin::V1alpha::WebDataStream, ::Hash] # Required. The web stream to update. # The `name` field is used to identify the web stream to be updated. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::WebDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::WebDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_web_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateWebDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_web_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "web_data_stream.name" => request.web_data_stream.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_web_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.update_web_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_web_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a web stream with the specified location and attributes. # # @overload create_web_data_stream(request, options = nil) # Pass arguments to `create_web_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateWebDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateWebDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_web_data_stream(web_data_stream: nil, parent: nil) # Pass arguments to `create_web_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param web_data_stream [::Google::Analytics::Admin::V1alpha::WebDataStream, ::Hash] # Required. The web stream to create. # @param parent [::String] # Required. The parent resource where this web data stream will be created. # Format: properties/123 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::WebDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::WebDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def create_web_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateWebDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_web_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_web_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.create_web_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_web_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns child web data streams under the specified parent property. # # Web data streams will be excluded if the caller does not have access. # Returns an empty list if no relevant web data streams are found. # # @overload list_web_data_streams(request, options = nil) # Pass arguments to `list_web_data_streams` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListWebDataStreamsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListWebDataStreamsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_web_data_streams(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_web_data_streams` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The name of the parent property. # For example, to list results of web streams under the property with Id # 123: "properties/123" # @param page_size [::Integer] # The maximum number of resources to return. # If unspecified, at most 50 resources will be returned. # The maximum value is 200; (higher values will be coerced to the maximum) # @param page_token [::String] # A page token, received from a previous `ListWebDataStreams` call. # Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `ListWebDataStreams` must # match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::WebDataStream>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::WebDataStream>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_web_data_streams request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListWebDataStreamsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_web_data_streams.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_web_data_streams.timeout, metadata: metadata, retry_policy: @config.rpcs.list_web_data_streams.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_web_data_streams, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_web_data_streams, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single IosAppDataStream # # Throws "Target not found" if no such iOS app data stream found, or if the # caller does not have permissions to access it. # # @overload get_ios_app_data_stream(request, options = nil) # Pass arguments to `get_ios_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetIosAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetIosAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_ios_app_data_stream(name: nil) # Pass arguments to `get_ios_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the iOS app data stream to lookup. # Format: properties/\\{property_id}/iosAppDataStreams/\\{stream_id} # Example: "properties/123/iosAppDataStreams/456" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::IosAppDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::IosAppDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_ios_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetIosAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_ios_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_ios_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.get_ios_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_ios_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes an iOS app stream on a property. # # @overload delete_ios_app_data_stream(request, options = nil) # Pass arguments to `delete_ios_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteIosAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteIosAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_ios_app_data_stream(name: nil) # Pass arguments to `delete_ios_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the iOS app data stream to delete. # Format: properties/\\{property_id}/iosAppDataStreams/\\{stream_id} # Example: "properties/123/iosAppDataStreams/456" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_ios_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteIosAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_ios_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_ios_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_ios_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_ios_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates an iOS app stream on a property. # # @overload update_ios_app_data_stream(request, options = nil) # Pass arguments to `update_ios_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateIosAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateIosAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_ios_app_data_stream(ios_app_data_stream: nil, update_mask: nil) # Pass arguments to `update_ios_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param ios_app_data_stream [::Google::Analytics::Admin::V1alpha::IosAppDataStream, ::Hash] # Required. The iOS app stream to update. # The `name` field is used to identify the iOS app stream to be updated. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::IosAppDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::IosAppDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_ios_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateIosAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_ios_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "ios_app_data_stream.name" => request.ios_app_data_stream.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_ios_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.update_ios_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_ios_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates an iOS app data stream with the specified location and attributes. # # @overload create_ios_app_data_stream(request, options = nil) # Pass arguments to `create_ios_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateIosAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateIosAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_ios_app_data_stream(ios_app_data_stream: nil, parent: nil) # Pass arguments to `create_ios_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param ios_app_data_stream [::Google::Analytics::Admin::V1alpha::IosAppDataStream, ::Hash] # Required. The iOS app data stream to create. # @param parent [::String] # Required. The parent resource where this ios app data stream will be created. # Format: properties/123 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::IosAppDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::IosAppDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def create_ios_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateIosAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_ios_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_ios_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.create_ios_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_ios_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns child iOS app data streams under the specified parent property. # # iOS app data streams will be excluded if the caller does not have access. # Returns an empty list if no relevant iOS app data streams are found. # # @overload list_ios_app_data_streams(request, options = nil) # Pass arguments to `list_ios_app_data_streams` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListIosAppDataStreamsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListIosAppDataStreamsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_ios_app_data_streams(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_ios_app_data_streams` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The name of the parent property. # For example, to list results of app streams under the property with Id # 123: "properties/123" # @param page_size [::Integer] # The maximum number of resources to return. # If unspecified, at most 50 resources will be returned. # The maximum value is 200; (higher values will be coerced to the maximum) # @param page_token [::String] # A page token, received from a previous `ListIosAppDataStreams` # call. Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `ListIosAppDataStreams` # must match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::IosAppDataStream>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::IosAppDataStream>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_ios_app_data_streams request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListIosAppDataStreamsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_ios_app_data_streams.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_ios_app_data_streams.timeout, metadata: metadata, retry_policy: @config.rpcs.list_ios_app_data_streams.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_ios_app_data_streams, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_ios_app_data_streams, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single AndroidAppDataStream # # Throws "Target not found" if no such android app data stream found, or if # the caller does not have permissions to access it. # # @overload get_android_app_data_stream(request, options = nil) # Pass arguments to `get_android_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetAndroidAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetAndroidAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_android_app_data_stream(name: nil) # Pass arguments to `get_android_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the android app data stream to lookup. # Format: properties/\\{property_id}/androidAppDataStreams/\\{stream_id} # Example: "properties/123/androidAppDataStreams/456" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_android_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetAndroidAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_android_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_android_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.get_android_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_android_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes an android app stream on a property. # # @overload delete_android_app_data_stream(request, options = nil) # Pass arguments to `delete_android_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteAndroidAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteAndroidAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_android_app_data_stream(name: nil) # Pass arguments to `delete_android_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the android app data stream to delete. # Format: properties/\\{property_id}/androidAppDataStreams/\\{stream_id} # Example: "properties/123/androidAppDataStreams/456" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_android_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteAndroidAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_android_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_android_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_android_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_android_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates an android app stream on a property. # # @overload update_android_app_data_stream(request, options = nil) # Pass arguments to `update_android_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateAndroidAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateAndroidAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_android_app_data_stream(android_app_data_stream: nil, update_mask: nil) # Pass arguments to `update_android_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param android_app_data_stream [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream, ::Hash] # Required. The android app stream to update. # The `name` field is used to identify the android app stream to be updated. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_android_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateAndroidAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_android_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "android_app_data_stream.name" => request.android_app_data_stream.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_android_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.update_android_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_android_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates an android app stream with the specified location and attributes. # # @overload create_android_app_data_stream(request, options = nil) # Pass arguments to `create_android_app_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateAndroidAppDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateAndroidAppDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_android_app_data_stream(android_app_data_stream: nil, parent: nil) # Pass arguments to `create_android_app_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param android_app_data_stream [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream, ::Hash] # Required. The android app stream to create. # @param parent [::String] # Required. The parent resource where this android app data stream will be created. # Format: properties/123 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::AndroidAppDataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def create_android_app_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateAndroidAppDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_android_app_data_stream.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_android_app_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.create_android_app_data_stream.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_android_app_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns child android app streams under the specified parent property. # # Android app streams will be excluded if the caller does not have access. # Returns an empty list if no relevant android app streams are found. # # @overload list_android_app_data_streams(request, options = nil) # Pass arguments to `list_android_app_data_streams` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListAndroidAppDataStreamsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListAndroidAppDataStreamsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_android_app_data_streams(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_android_app_data_streams` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The name of the parent property. # For example, to limit results to app streams under the property with Id # 123: "properties/123" # @param page_size [::Integer] # The maximum number of resources to return. # # If unspecified, at most 50 resources will be returned. # The maximum value is 200; (higher values will be coerced to the maximum) # @param page_token [::String] # A page token, received from a previous call. Provide this to # retrieve the subsequent page. # When paginating, all other parameters provided to # `ListAndroidAppDataStreams` must match the call that provided the page # token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AndroidAppDataStream>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::AndroidAppDataStream>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_android_app_data_streams request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListAndroidAppDataStreamsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_android_app_data_streams.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_android_app_data_streams.timeout, metadata: metadata, retry_policy: @config.rpcs.list_android_app_data_streams.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_android_app_data_streams, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_android_app_data_streams, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns the singleton enhanced measurement settings for this web stream. # Note that the stream must enable enhanced measurement for these settings to # take effect. # # @overload get_enhanced_measurement_settings(request, options = nil) # Pass arguments to `get_enhanced_measurement_settings` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_enhanced_measurement_settings(name: nil) # Pass arguments to `get_enhanced_measurement_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the settings to lookup. # Format: # properties/\\{property_id}/webDataStreams/\\{stream_id}/enhancedMeasurementSettings # Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_enhanced_measurement_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetEnhancedMeasurementSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_enhanced_measurement_settings.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_enhanced_measurement_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.get_enhanced_measurement_settings.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_enhanced_measurement_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates the singleton enhanced measurement settings for this web stream. # Note that the stream must enable enhanced measurement for these settings to # take effect. # # @overload update_enhanced_measurement_settings(request, options = nil) # Pass arguments to `update_enhanced_measurement_settings` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_enhanced_measurement_settings(enhanced_measurement_settings: nil, update_mask: nil) # Pass arguments to `update_enhanced_measurement_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param enhanced_measurement_settings [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings, ::Hash] # Required. The settings to update. # The `name` field is used to identify the settings to be updated. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::EnhancedMeasurementSettings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_enhanced_measurement_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateEnhancedMeasurementSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_enhanced_measurement_settings.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "enhanced_measurement_settings.name" => request.enhanced_measurement_settings.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_enhanced_measurement_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.update_enhanced_measurement_settings.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_enhanced_measurement_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a FirebaseLink. # # Properties can have at most one FirebaseLink. # # @overload create_firebase_link(request, options = nil) # Pass arguments to `create_firebase_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateFirebaseLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateFirebaseLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_firebase_link(parent: nil, firebase_link: nil) # Pass arguments to `create_firebase_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Format: properties/\\{property_id} # Example: properties/1234 # @param firebase_link [::Google::Analytics::Admin::V1alpha::FirebaseLink, ::Hash] # Required. The Firebase link to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::FirebaseLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::FirebaseLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def create_firebase_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateFirebaseLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_firebase_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_firebase_link.timeout, metadata: metadata, retry_policy: @config.rpcs.create_firebase_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_firebase_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a FirebaseLink on a property # # @overload update_firebase_link(request, options = nil) # Pass arguments to `update_firebase_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateFirebaseLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateFirebaseLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_firebase_link(firebase_link: nil, update_mask: nil) # Pass arguments to `update_firebase_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param firebase_link [::Google::Analytics::Admin::V1alpha::FirebaseLink, ::Hash] # Required. The Firebase link to update. # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::FirebaseLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::FirebaseLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_firebase_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateFirebaseLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_firebase_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "firebase_link.name" => request.firebase_link.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_firebase_link.timeout, metadata: metadata, retry_policy: @config.rpcs.update_firebase_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_firebase_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a FirebaseLink on a property # # @overload delete_firebase_link(request, options = nil) # Pass arguments to `delete_firebase_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_firebase_link(name: nil) # Pass arguments to `delete_firebase_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. Format: properties/\\{property_id}/firebaseLinks/\\{firebase_link_id} # Example: properties/1234/firebaseLinks/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_firebase_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_firebase_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_firebase_link.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_firebase_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_firebase_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists FirebaseLinks on a property. # Properties can have at most one FirebaseLink. # # @overload list_firebase_links(request, options = nil) # Pass arguments to `list_firebase_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_firebase_links(parent: nil) # Pass arguments to `list_firebase_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Format: properties/\\{property_id} # Example: properties/1234 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::ListFirebaseLinksResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::ListFirebaseLinksResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_firebase_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_firebase_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_firebase_links.timeout, metadata: metadata, retry_policy: @config.rpcs.list_firebase_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_firebase_links, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns the Site Tag for the specified web stream. # Site Tags are immutable singletons. # # @overload get_global_site_tag(request, options = nil) # Pass arguments to `get_global_site_tag` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_global_site_tag(name: nil) # Pass arguments to `get_global_site_tag` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the site tag to lookup. # Note that site tags are singletons and do not have unique IDs. # Format: properties/\\{property_id}/webDataStreams/\\{stream_id}/globalSiteTag # Example: "properties/123/webDataStreams/456/globalSiteTag" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::GlobalSiteTag] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::GlobalSiteTag] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_global_site_tag request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_global_site_tag.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_global_site_tag.timeout, metadata: metadata, retry_policy: @config.rpcs.get_global_site_tag.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_global_site_tag, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a GoogleAdsLink. # # @overload create_google_ads_link(request, options = nil) # Pass arguments to `create_google_ads_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateGoogleAdsLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateGoogleAdsLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_google_ads_link(parent: nil, google_ads_link: nil) # Pass arguments to `create_google_ads_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: properties/1234 # @param google_ads_link [::Google::Analytics::Admin::V1alpha::GoogleAdsLink, ::Hash] # Required. The GoogleAdsLink to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::GoogleAdsLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::GoogleAdsLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def create_google_ads_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateGoogleAdsLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_google_ads_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_google_ads_link.timeout, metadata: metadata, retry_policy: @config.rpcs.create_google_ads_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_google_ads_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a GoogleAdsLink on a property # # @overload update_google_ads_link(request, options = nil) # Pass arguments to `update_google_ads_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_google_ads_link(google_ads_link: nil, update_mask: nil) # Pass arguments to `update_google_ads_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param google_ads_link [::Google::Analytics::Admin::V1alpha::GoogleAdsLink, ::Hash] # The GoogleAdsLink to update # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # The list of fields to be updated. Omitted fields will not be updated. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::GoogleAdsLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::GoogleAdsLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def update_google_ads_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_google_ads_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "google_ads_link.name" => request.google_ads_link.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_google_ads_link.timeout, metadata: metadata, retry_policy: @config.rpcs.update_google_ads_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_google_ads_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a GoogleAdsLink on a property # # @overload delete_google_ads_link(request, options = nil) # Pass arguments to `delete_google_ads_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_google_ads_link(name: nil) # Pass arguments to `delete_google_ads_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. Example format: properties/1234/googleAdsLinks/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Protobuf::Empty] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def delete_google_ads_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_google_ads_link.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_google_ads_link.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_google_ads_link.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_google_ads_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists GoogleAdsLinks on a property. # # @overload list_google_ads_links(request, options = nil) # Pass arguments to `list_google_ads_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_google_ads_links(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_google_ads_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: properties/1234 # @param page_size [::Integer] # The maximum number of resources to return. # If unspecified, at most 50 resources will be returned. # The maximum value is 200 (higher values will be coerced to the maximum). # @param page_token [::String] # A page token, received from a previous `ListGoogleAdsLinks` call. # Provide this to retrieve the subsequent page. # # When paginating, all other parameters provided to `ListGoogleAdsLinks` must # match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::GoogleAdsLink>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::GoogleAdsLink>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def list_google_ads_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_google_ads_links.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_google_ads_links.timeout, metadata: metadata, retry_policy: @config.rpcs.list_google_ads_links.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_google_ads_links, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_google_ads_links, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Get data sharing settings on an account. # Data sharing settings are singletons. # # @overload get_data_sharing_settings(request, options = nil) # Pass arguments to `get_data_sharing_settings` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_data_sharing_settings(name: nil) # Pass arguments to `get_data_sharing_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the settings to lookup. # Format: accounts/\\{account}/dataSharingSettings # Example: "accounts/1000/dataSharingSettings" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DataSharingSettings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DataSharingSettings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # def get_data_sharing_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_data_sharing_settings.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_data_sharing_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.get_data_sharing_settings.retry_policy options.apply_defaults metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_data_sharing_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Configuration class for the AnalyticsAdminService API. # # This class represents the configuration for AnalyticsAdminService, # providing control over timeouts, retry behavior, logging, transport # parameters, and other low-level controls. Certain parameters can also be # applied individually to specific RPCs. See # {::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client::Configuration::Rpcs} # for a list of RPCs that can be configured independently. # # Configuration can be applied globally to all clients, or to a single client # on construction. # # # Examples # # To modify the global config, setting the timeout for get_account # to 20 seconds, and all remaining timeouts to 10 seconds: # # ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.configure do |config| # config.timeout = 10.0 # config.rpcs.get_account.timeout = 20.0 # end # # To apply the above configuration only to a new client: # # client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| # config.timeout = 10.0 # config.rpcs.get_account.timeout = 20.0 # end # # @!attribute [rw] endpoint # The hostname or hostname:port of the service endpoint. # Defaults to `"analyticsadmin.googleapis.com"`. # @return [::String] # @!attribute [rw] credentials # Credentials to send with calls. You may provide any of the following types: # * (`String`) The path to a service account key file in JSON format # * (`Hash`) A service account key as a Hash # * (`Google::Auth::Credentials`) A googleauth credentials object # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html)) # * (`Signet::OAuth2::Client`) A signet oauth2 client object # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html)) # * (`GRPC::Core::Channel`) a gRPC channel with included credentials # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object # * (`nil`) indicating no credentials # @return [::Object] # @!attribute [rw] scope # The OAuth scopes # @return [::Array<::String>] # @!attribute [rw] lib_name # The library name as recorded in instrumentation and logging # @return [::String] # @!attribute [rw] lib_version # The library version as recorded in instrumentation and logging # @return [::String] # @!attribute [rw] channel_args # Extra parameters passed to the gRPC channel. Note: this is ignored if a # `GRPC::Core::Channel` object is provided as the credential. # @return [::Hash] # @!attribute [rw] interceptors # An array of interceptors that are run before calls are executed. # @return [::Array<::GRPC::ClientInterceptor>] # @!attribute [rw] timeout # The call timeout in seconds. # @return [::Numeric] # @!attribute [rw] metadata # Additional gRPC headers to be sent with the call. # @return [::Hash{::Symbol=>::String}] # @!attribute [rw] retry_policy # The retry policy. The value is a hash with the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array`) - The error codes that should # trigger a retry. # @return [::Hash] # @!attribute [rw] quota_project # A separate project against which to charge quota. # @return [::String] # class Configuration extend ::Gapic::Config config_attr :endpoint, "analyticsadmin.googleapis.com", ::String config_attr :credentials, nil do |value| allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil] allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC allowed.any? { |klass| klass === value } end config_attr :scope, nil, ::String, ::Array, nil config_attr :lib_name, nil, ::String, nil config_attr :lib_version, nil, ::String, nil config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil) config_attr :interceptors, nil, ::Array, nil config_attr :timeout, nil, ::Numeric, nil config_attr :metadata, nil, ::Hash, nil config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil # @private def initialize parent_config = nil @parent_config = parent_config unless parent_config.nil? yield self if block_given? end ## # Configurations for individual RPCs # @return [Rpcs] # def rpcs @rpcs ||= begin parent_rpcs = nil parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs) Rpcs.new parent_rpcs end end ## # Configuration RPC class for the AnalyticsAdminService API. # # Includes fields providing the configuration for each RPC in this service. # Each configuration object is of type `Gapic::Config::Method` and includes # the following configuration fields: # # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields # include the following keys: # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. # * `:retry_codes` (*type:* `Array`) - The error codes that should # trigger a retry. # class Rpcs ## # RPC-specific configuration for `get_account` # @return [::Gapic::Config::Method] # attr_reader :get_account ## # RPC-specific configuration for `list_accounts` # @return [::Gapic::Config::Method] # attr_reader :list_accounts ## # RPC-specific configuration for `delete_account` # @return [::Gapic::Config::Method] # attr_reader :delete_account ## # RPC-specific configuration for `update_account` # @return [::Gapic::Config::Method] # attr_reader :update_account ## # RPC-specific configuration for `provision_account_ticket` # @return [::Gapic::Config::Method] # attr_reader :provision_account_ticket ## # RPC-specific configuration for `list_account_summaries` # @return [::Gapic::Config::Method] # attr_reader :list_account_summaries ## # RPC-specific configuration for `get_property` # @return [::Gapic::Config::Method] # attr_reader :get_property ## # RPC-specific configuration for `list_properties` # @return [::Gapic::Config::Method] # attr_reader :list_properties ## # RPC-specific configuration for `create_property` # @return [::Gapic::Config::Method] # attr_reader :create_property ## # RPC-specific configuration for `delete_property` # @return [::Gapic::Config::Method] # attr_reader :delete_property ## # RPC-specific configuration for `update_property` # @return [::Gapic::Config::Method] # attr_reader :update_property ## # RPC-specific configuration for `get_user_link` # @return [::Gapic::Config::Method] # attr_reader :get_user_link ## # RPC-specific configuration for `batch_get_user_links` # @return [::Gapic::Config::Method] # attr_reader :batch_get_user_links ## # RPC-specific configuration for `list_user_links` # @return [::Gapic::Config::Method] # attr_reader :list_user_links ## # RPC-specific configuration for `audit_user_links` # @return [::Gapic::Config::Method] # attr_reader :audit_user_links ## # RPC-specific configuration for `create_user_link` # @return [::Gapic::Config::Method] # attr_reader :create_user_link ## # RPC-specific configuration for `batch_create_user_links` # @return [::Gapic::Config::Method] # attr_reader :batch_create_user_links ## # RPC-specific configuration for `update_user_link` # @return [::Gapic::Config::Method] # attr_reader :update_user_link ## # RPC-specific configuration for `batch_update_user_links` # @return [::Gapic::Config::Method] # attr_reader :batch_update_user_links ## # RPC-specific configuration for `delete_user_link` # @return [::Gapic::Config::Method] # attr_reader :delete_user_link ## # RPC-specific configuration for `batch_delete_user_links` # @return [::Gapic::Config::Method] # attr_reader :batch_delete_user_links ## # RPC-specific configuration for `get_web_data_stream` # @return [::Gapic::Config::Method] # attr_reader :get_web_data_stream ## # RPC-specific configuration for `delete_web_data_stream` # @return [::Gapic::Config::Method] # attr_reader :delete_web_data_stream ## # RPC-specific configuration for `update_web_data_stream` # @return [::Gapic::Config::Method] # attr_reader :update_web_data_stream ## # RPC-specific configuration for `create_web_data_stream` # @return [::Gapic::Config::Method] # attr_reader :create_web_data_stream ## # RPC-specific configuration for `list_web_data_streams` # @return [::Gapic::Config::Method] # attr_reader :list_web_data_streams ## # RPC-specific configuration for `get_ios_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :get_ios_app_data_stream ## # RPC-specific configuration for `delete_ios_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :delete_ios_app_data_stream ## # RPC-specific configuration for `update_ios_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :update_ios_app_data_stream ## # RPC-specific configuration for `create_ios_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :create_ios_app_data_stream ## # RPC-specific configuration for `list_ios_app_data_streams` # @return [::Gapic::Config::Method] # attr_reader :list_ios_app_data_streams ## # RPC-specific configuration for `get_android_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :get_android_app_data_stream ## # RPC-specific configuration for `delete_android_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :delete_android_app_data_stream ## # RPC-specific configuration for `update_android_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :update_android_app_data_stream ## # RPC-specific configuration for `create_android_app_data_stream` # @return [::Gapic::Config::Method] # attr_reader :create_android_app_data_stream ## # RPC-specific configuration for `list_android_app_data_streams` # @return [::Gapic::Config::Method] # attr_reader :list_android_app_data_streams ## # RPC-specific configuration for `get_enhanced_measurement_settings` # @return [::Gapic::Config::Method] # attr_reader :get_enhanced_measurement_settings ## # RPC-specific configuration for `update_enhanced_measurement_settings` # @return [::Gapic::Config::Method] # attr_reader :update_enhanced_measurement_settings ## # RPC-specific configuration for `create_firebase_link` # @return [::Gapic::Config::Method] # attr_reader :create_firebase_link ## # RPC-specific configuration for `update_firebase_link` # @return [::Gapic::Config::Method] # attr_reader :update_firebase_link ## # RPC-specific configuration for `delete_firebase_link` # @return [::Gapic::Config::Method] # attr_reader :delete_firebase_link ## # RPC-specific configuration for `list_firebase_links` # @return [::Gapic::Config::Method] # attr_reader :list_firebase_links ## # RPC-specific configuration for `get_global_site_tag` # @return [::Gapic::Config::Method] # attr_reader :get_global_site_tag ## # RPC-specific configuration for `create_google_ads_link` # @return [::Gapic::Config::Method] # attr_reader :create_google_ads_link ## # RPC-specific configuration for `update_google_ads_link` # @return [::Gapic::Config::Method] # attr_reader :update_google_ads_link ## # RPC-specific configuration for `delete_google_ads_link` # @return [::Gapic::Config::Method] # attr_reader :delete_google_ads_link ## # RPC-specific configuration for `list_google_ads_links` # @return [::Gapic::Config::Method] # attr_reader :list_google_ads_links ## # RPC-specific configuration for `get_data_sharing_settings` # @return [::Gapic::Config::Method] # attr_reader :get_data_sharing_settings # @private def initialize parent_rpcs = nil get_account_config = parent_rpcs&.get_account if parent_rpcs&.respond_to? :get_account @get_account = ::Gapic::Config::Method.new get_account_config list_accounts_config = parent_rpcs&.list_accounts if parent_rpcs&.respond_to? :list_accounts @list_accounts = ::Gapic::Config::Method.new list_accounts_config delete_account_config = parent_rpcs&.delete_account if parent_rpcs&.respond_to? :delete_account @delete_account = ::Gapic::Config::Method.new delete_account_config update_account_config = parent_rpcs&.update_account if parent_rpcs&.respond_to? :update_account @update_account = ::Gapic::Config::Method.new update_account_config provision_account_ticket_config = parent_rpcs&.provision_account_ticket if parent_rpcs&.respond_to? :provision_account_ticket @provision_account_ticket = ::Gapic::Config::Method.new provision_account_ticket_config list_account_summaries_config = parent_rpcs&.list_account_summaries if parent_rpcs&.respond_to? :list_account_summaries @list_account_summaries = ::Gapic::Config::Method.new list_account_summaries_config get_property_config = parent_rpcs&.get_property if parent_rpcs&.respond_to? :get_property @get_property = ::Gapic::Config::Method.new get_property_config list_properties_config = parent_rpcs&.list_properties if parent_rpcs&.respond_to? :list_properties @list_properties = ::Gapic::Config::Method.new list_properties_config create_property_config = parent_rpcs&.create_property if parent_rpcs&.respond_to? :create_property @create_property = ::Gapic::Config::Method.new create_property_config delete_property_config = parent_rpcs&.delete_property if parent_rpcs&.respond_to? :delete_property @delete_property = ::Gapic::Config::Method.new delete_property_config update_property_config = parent_rpcs&.update_property if parent_rpcs&.respond_to? :update_property @update_property = ::Gapic::Config::Method.new update_property_config get_user_link_config = parent_rpcs&.get_user_link if parent_rpcs&.respond_to? :get_user_link @get_user_link = ::Gapic::Config::Method.new get_user_link_config batch_get_user_links_config = parent_rpcs&.batch_get_user_links if parent_rpcs&.respond_to? :batch_get_user_links @batch_get_user_links = ::Gapic::Config::Method.new batch_get_user_links_config list_user_links_config = parent_rpcs&.list_user_links if parent_rpcs&.respond_to? :list_user_links @list_user_links = ::Gapic::Config::Method.new list_user_links_config audit_user_links_config = parent_rpcs&.audit_user_links if parent_rpcs&.respond_to? :audit_user_links @audit_user_links = ::Gapic::Config::Method.new audit_user_links_config create_user_link_config = parent_rpcs&.create_user_link if parent_rpcs&.respond_to? :create_user_link @create_user_link = ::Gapic::Config::Method.new create_user_link_config batch_create_user_links_config = parent_rpcs&.batch_create_user_links if parent_rpcs&.respond_to? :batch_create_user_links @batch_create_user_links = ::Gapic::Config::Method.new batch_create_user_links_config update_user_link_config = parent_rpcs&.update_user_link if parent_rpcs&.respond_to? :update_user_link @update_user_link = ::Gapic::Config::Method.new update_user_link_config batch_update_user_links_config = parent_rpcs&.batch_update_user_links if parent_rpcs&.respond_to? :batch_update_user_links @batch_update_user_links = ::Gapic::Config::Method.new batch_update_user_links_config delete_user_link_config = parent_rpcs&.delete_user_link if parent_rpcs&.respond_to? :delete_user_link @delete_user_link = ::Gapic::Config::Method.new delete_user_link_config batch_delete_user_links_config = parent_rpcs&.batch_delete_user_links if parent_rpcs&.respond_to? :batch_delete_user_links @batch_delete_user_links = ::Gapic::Config::Method.new batch_delete_user_links_config get_web_data_stream_config = parent_rpcs&.get_web_data_stream if parent_rpcs&.respond_to? :get_web_data_stream @get_web_data_stream = ::Gapic::Config::Method.new get_web_data_stream_config delete_web_data_stream_config = parent_rpcs&.delete_web_data_stream if parent_rpcs&.respond_to? :delete_web_data_stream @delete_web_data_stream = ::Gapic::Config::Method.new delete_web_data_stream_config update_web_data_stream_config = parent_rpcs&.update_web_data_stream if parent_rpcs&.respond_to? :update_web_data_stream @update_web_data_stream = ::Gapic::Config::Method.new update_web_data_stream_config create_web_data_stream_config = parent_rpcs&.create_web_data_stream if parent_rpcs&.respond_to? :create_web_data_stream @create_web_data_stream = ::Gapic::Config::Method.new create_web_data_stream_config list_web_data_streams_config = parent_rpcs&.list_web_data_streams if parent_rpcs&.respond_to? :list_web_data_streams @list_web_data_streams = ::Gapic::Config::Method.new list_web_data_streams_config get_ios_app_data_stream_config = parent_rpcs&.get_ios_app_data_stream if parent_rpcs&.respond_to? :get_ios_app_data_stream @get_ios_app_data_stream = ::Gapic::Config::Method.new get_ios_app_data_stream_config delete_ios_app_data_stream_config = parent_rpcs&.delete_ios_app_data_stream if parent_rpcs&.respond_to? :delete_ios_app_data_stream @delete_ios_app_data_stream = ::Gapic::Config::Method.new delete_ios_app_data_stream_config update_ios_app_data_stream_config = parent_rpcs&.update_ios_app_data_stream if parent_rpcs&.respond_to? :update_ios_app_data_stream @update_ios_app_data_stream = ::Gapic::Config::Method.new update_ios_app_data_stream_config create_ios_app_data_stream_config = parent_rpcs&.create_ios_app_data_stream if parent_rpcs&.respond_to? :create_ios_app_data_stream @create_ios_app_data_stream = ::Gapic::Config::Method.new create_ios_app_data_stream_config list_ios_app_data_streams_config = parent_rpcs&.list_ios_app_data_streams if parent_rpcs&.respond_to? :list_ios_app_data_streams @list_ios_app_data_streams = ::Gapic::Config::Method.new list_ios_app_data_streams_config get_android_app_data_stream_config = parent_rpcs&.get_android_app_data_stream if parent_rpcs&.respond_to? :get_android_app_data_stream @get_android_app_data_stream = ::Gapic::Config::Method.new get_android_app_data_stream_config delete_android_app_data_stream_config = parent_rpcs&.delete_android_app_data_stream if parent_rpcs&.respond_to? :delete_android_app_data_stream @delete_android_app_data_stream = ::Gapic::Config::Method.new delete_android_app_data_stream_config update_android_app_data_stream_config = parent_rpcs&.update_android_app_data_stream if parent_rpcs&.respond_to? :update_android_app_data_stream @update_android_app_data_stream = ::Gapic::Config::Method.new update_android_app_data_stream_config create_android_app_data_stream_config = parent_rpcs&.create_android_app_data_stream if parent_rpcs&.respond_to? :create_android_app_data_stream @create_android_app_data_stream = ::Gapic::Config::Method.new create_android_app_data_stream_config list_android_app_data_streams_config = parent_rpcs&.list_android_app_data_streams if parent_rpcs&.respond_to? :list_android_app_data_streams @list_android_app_data_streams = ::Gapic::Config::Method.new list_android_app_data_streams_config get_enhanced_measurement_settings_config = parent_rpcs&.get_enhanced_measurement_settings if parent_rpcs&.respond_to? :get_enhanced_measurement_settings @get_enhanced_measurement_settings = ::Gapic::Config::Method.new get_enhanced_measurement_settings_config update_enhanced_measurement_settings_config = parent_rpcs&.update_enhanced_measurement_settings if parent_rpcs&.respond_to? :update_enhanced_measurement_settings @update_enhanced_measurement_settings = ::Gapic::Config::Method.new update_enhanced_measurement_settings_config create_firebase_link_config = parent_rpcs&.create_firebase_link if parent_rpcs&.respond_to? :create_firebase_link @create_firebase_link = ::Gapic::Config::Method.new create_firebase_link_config update_firebase_link_config = parent_rpcs&.update_firebase_link if parent_rpcs&.respond_to? :update_firebase_link @update_firebase_link = ::Gapic::Config::Method.new update_firebase_link_config delete_firebase_link_config = parent_rpcs&.delete_firebase_link if parent_rpcs&.respond_to? :delete_firebase_link @delete_firebase_link = ::Gapic::Config::Method.new delete_firebase_link_config list_firebase_links_config = parent_rpcs&.list_firebase_links if parent_rpcs&.respond_to? :list_firebase_links @list_firebase_links = ::Gapic::Config::Method.new list_firebase_links_config get_global_site_tag_config = parent_rpcs&.get_global_site_tag if parent_rpcs&.respond_to? :get_global_site_tag @get_global_site_tag = ::Gapic::Config::Method.new get_global_site_tag_config create_google_ads_link_config = parent_rpcs&.create_google_ads_link if parent_rpcs&.respond_to? :create_google_ads_link @create_google_ads_link = ::Gapic::Config::Method.new create_google_ads_link_config update_google_ads_link_config = parent_rpcs&.update_google_ads_link if parent_rpcs&.respond_to? :update_google_ads_link @update_google_ads_link = ::Gapic::Config::Method.new update_google_ads_link_config delete_google_ads_link_config = parent_rpcs&.delete_google_ads_link if parent_rpcs&.respond_to? :delete_google_ads_link @delete_google_ads_link = ::Gapic::Config::Method.new delete_google_ads_link_config list_google_ads_links_config = parent_rpcs&.list_google_ads_links if parent_rpcs&.respond_to? :list_google_ads_links @list_google_ads_links = ::Gapic::Config::Method.new list_google_ads_links_config get_data_sharing_settings_config = parent_rpcs&.get_data_sharing_settings if parent_rpcs&.respond_to? :get_data_sharing_settings @get_data_sharing_settings = ::Gapic::Config::Method.new get_data_sharing_settings_config yield self if block_given? end end end end end end end end end