# 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 # # # 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.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.list_android_app_data_streams.timeout = 60.0 default_config.rpcs.create_firebase_link.timeout = 60.0 default_config.rpcs.delete_firebase_link.timeout = 60.0 default_config.rpcs.list_firebase_links.timeout = 60.0 default_config.rpcs.get_global_site_tag.timeout = 60.0 default_config.rpcs.create_google_ads_link.timeout = 60.0 default_config.rpcs.update_google_ads_link.timeout = 60.0 default_config.rpcs.delete_google_ads_link.timeout = 60.0 default_config.rpcs.list_google_ads_links.timeout = 60.0 default_config 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. # # @example # # # Create a client using the default configuration # client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a client using a custom configuration # client = ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new do |config| # config.timeout = 10.0 # end # # @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 # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint && !@config.endpoint.split(".").first.include?("-") credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @analytics_admin_service_stub = ::Gapic::ServiceStub.new( ::Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, interceptors: @config.interceptors ) end # Service calls ## # Lookup for a single Account. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetAccountRequest.new # # # Call the get_account method. # result = client.get_account request # # # The returned object is of type Google::Analytics::Admin::V1alpha::Account. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListAccountsRequest.new # # # Call the list_accounts method. # result = client.list_accounts request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::Account. # p response # end # 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteAccountRequest.new # # # Call the delete_account method. # result = client.delete_account request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateAccountRequest.new # # # Call the update_account method. # result = client.update_account request # # # The returned object is of type Google::Analytics::Admin::V1alpha::Account. # p result # 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 = {} if request.account&.name header_params["account.name"] = request.account.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ProvisionAccountTicketRequest.new # # # Call the provision_account_ticket method. # result = client.provision_account_ticket request # # # The returned object is of type Google::Analytics::Admin::V1alpha::ProvisionAccountTicketResponse. # p result # 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListAccountSummariesRequest.new # # # Call the list_account_summaries method. # result = client.list_account_summaries request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::AccountSummary. # p response # end # 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 timeout: @config.timeout, 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. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetPropertyRequest.new # # # Call the get_property method. # result = client.get_property request # # # The returned object is of type Google::Analytics::Admin::V1alpha::Property. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListPropertiesRequest.new # # # Call the list_properties method. # result = client.list_properties request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::Property. # p response # end # 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreatePropertyRequest.new # # # Call the create_property method. # result = client.create_property request # # # The returned object is of type Google::Analytics::Admin::V1alpha::Property. # p result # 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 timeout: @config.timeout, 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::Analytics::Admin::V1alpha::Property] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::Property] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeletePropertyRequest.new # # # Call the delete_property method. # result = client.delete_property request # # # The returned object is of type Google::Analytics::Admin::V1alpha::Property. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdatePropertyRequest.new # # # Call the update_property method. # result = client.update_property request # # # The returned object is of type Google::Analytics::Admin::V1alpha::Property. # p result # 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 = {} if request.property&.name header_params["property.name"] = request.property.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetUserLinkRequest.new # # # Call the get_user_link method. # result = client.get_user_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::UserLink. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::BatchGetUserLinksRequest.new # # # Call the batch_get_user_links method. # result = client.batch_get_user_links request # # # The returned object is of type Google::Analytics::Admin::V1alpha::BatchGetUserLinksResponse. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListUserLinksRequest.new # # # Call the list_user_links method. # result = client.list_user_links request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::UserLink. # p response # end # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::AuditUserLinksRequest.new # # # Call the audit_user_links method. # result = client.audit_user_links request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::AuditUserLink. # p response # end # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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 set, then email the new user notifying them that they've been granted # permissions to 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateUserLinkRequest.new # # # Call the create_user_link method. # result = client.create_user_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::UserLink. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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 set, then email the new users notifying them that they've been granted # permissions to the resource. Regardless of whether this is set or not, # notify_new_user field inside each individual request is ignored. # @param requests [::Array<::Google::Analytics::Admin::V1alpha::CreateUserLinkRequest, ::Hash>] # Required. 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::BatchCreateUserLinksRequest.new # # # Call the batch_create_user_links method. # result = client.batch_create_user_links request # # # The returned object is of type Google::Analytics::Admin::V1alpha::BatchCreateUserLinksResponse. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateUserLinkRequest.new # # # Call the update_user_link method. # result = client.update_user_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::UserLink. # p result # 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 = {} if request.user_link&.name header_params["user_link.name"] = request.user_link.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") 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 timeout: @config.timeout, 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>] # Required. 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksRequest.new # # # Call the batch_update_user_links method. # result = client.batch_update_user_links request # # # The returned object is of type Google::Analytics::Admin::V1alpha::BatchUpdateUserLinksResponse. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteUserLinkRequest.new # # # Call the delete_user_link method. # result = client.delete_user_link request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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>] # Required. 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::BatchDeleteUserLinksRequest.new # # # Call the batch_delete_user_links method. # result = client.batch_delete_user_links request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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 # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetWebDataStreamRequest.new # # # Call the get_web_data_stream method. # result = client.get_web_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::WebDataStream. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteWebDataStreamRequest.new # # # Call the delete_web_data_stream method. # result = client.delete_web_data_stream request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateWebDataStreamRequest.new # # # Call the update_web_data_stream method. # result = client.update_web_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::WebDataStream. # p result # 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 = {} if request.web_data_stream&.name header_params["web_data_stream.name"] = request.web_data_stream.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateWebDataStreamRequest.new # # # Call the create_web_data_stream method. # result = client.create_web_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::WebDataStream. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListWebDataStreamsRequest.new # # # Call the list_web_data_streams method. # result = client.list_web_data_streams request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::WebDataStream. # p response # end # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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 # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetIosAppDataStreamRequest.new # # # Call the get_ios_app_data_stream method. # result = client.get_ios_app_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::IosAppDataStream. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteIosAppDataStreamRequest.new # # # Call the delete_ios_app_data_stream method. # result = client.delete_ios_app_data_stream request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateIosAppDataStreamRequest.new # # # Call the update_ios_app_data_stream method. # result = client.update_ios_app_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::IosAppDataStream. # p result # 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 = {} if request.ios_app_data_stream&.name header_params["ios_app_data_stream.name"] = request.ios_app_data_stream.name end 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 timeout: @config.timeout, 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 ## # 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListIosAppDataStreamsRequest.new # # # Call the list_ios_app_data_streams method. # result = client.list_ios_app_data_streams request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::IosAppDataStream. # p response # end # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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 # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetAndroidAppDataStreamRequest.new # # # Call the get_android_app_data_stream method. # result = client.get_android_app_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::AndroidAppDataStream. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteAndroidAppDataStreamRequest.new # # # Call the delete_android_app_data_stream method. # result = client.delete_android_app_data_stream request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateAndroidAppDataStreamRequest.new # # # Call the update_android_app_data_stream method. # result = client.update_android_app_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::AndroidAppDataStream. # p result # 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 = {} if request.android_app_data_stream&.name header_params["android_app_data_stream.name"] = request.android_app_data_stream.name end 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 timeout: @config.timeout, 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 ## # 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListAndroidAppDataStreamsRequest.new # # # Call the list_android_app_data_streams method. # result = client.list_android_app_data_streams request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::AndroidAppDataStream. # p response # end # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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 ## # 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateFirebaseLinkRequest.new # # # Call the create_firebase_link method. # result = client.create_firebase_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::FirebaseLink. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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 ## # 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteFirebaseLinkRequest.new # # # Call the delete_firebase_link method. # result = client.delete_firebase_link request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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, page_size: nil, page_token: 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 # @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 `ListFirebaseLinks` 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. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::FirebaseLink>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::FirebaseLink>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListFirebaseLinksRequest.new # # # Call the list_firebase_links method. # result = client.list_firebase_links request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::FirebaseLink. # p response # end # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_firebase_links, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_firebase_links, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetGlobalSiteTagRequest.new # # # Call the get_global_site_tag method. # result = client.get_global_site_tag request # # # The returned object is of type Google::Analytics::Admin::V1alpha::GlobalSiteTag. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateGoogleAdsLinkRequest.new # # # Call the create_google_ads_link method. # result = client.create_google_ads_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::GoogleAdsLink. # p result # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateGoogleAdsLinkRequest.new # # # Call the update_google_ads_link method. # result = client.update_google_ads_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::GoogleAdsLink. # p result # 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 = {} if request.google_ads_link&.name header_params["google_ads_link.name"] = request.google_ads_link.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteGoogleAdsLinkRequest.new # # # Call the delete_google_ads_link method. # result = client.delete_google_ads_link request # # # The returned object is of type Google::Protobuf::Empty. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListGoogleAdsLinksRequest.new # # # Call the list_google_ads_links method. # result = client.list_google_ads_links request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::GoogleAdsLink. # p response # end # 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 = {} if request.parent header_params["parent"] = request.parent end 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 timeout: @config.timeout, 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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetDataSharingSettingsRequest.new # # # Call the get_data_sharing_settings method. # result = client.get_data_sharing_settings request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DataSharingSettings. # p result # 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 = {} if request.name header_params["name"] = request.name end 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 timeout: @config.timeout, 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 ## # Lookup for a single "GA4" MeasurementProtocolSecret. # # @overload get_measurement_protocol_secret(request, options = nil) # Pass arguments to `get_measurement_protocol_secret` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_measurement_protocol_secret(name: nil) # Pass arguments to `get_measurement_protocol_secret` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the measurement protocol secret to lookup. # Format: # properties/\\{property}/webDataStreams/\\{webDataStream}/measurementProtocolSecrets/\\{measurementProtocolSecret} # Note: Any type of stream (WebDataStream, IosAppDataStream, # AndroidAppDataStream) may be a parent. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest.new # # # Call the get_measurement_protocol_secret method. # result = client.get_measurement_protocol_secret request # # # The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret. # p result # def get_measurement_protocol_secret request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetMeasurementProtocolSecretRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_measurement_protocol_secret.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 = {} if request.name header_params["name"] = request.name end 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_measurement_protocol_secret.timeout, metadata: metadata, retry_policy: @config.rpcs.get_measurement_protocol_secret.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_measurement_protocol_secret, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns child MeasurementProtocolSecrets under the specified parent # Property. # # @overload list_measurement_protocol_secrets(request, options = nil) # Pass arguments to `list_measurement_protocol_secrets` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_measurement_protocol_secrets(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_measurement_protocol_secrets` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The resource name of the parent stream. # Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) # may be a parent. # Format: # properties/\\{property}/webDataStreams/\\{webDataStream}/measurementProtocolSecrets # @param page_size [::Integer] # The maximum number of resources to return. # If unspecified, at most 10 resources will be returned. # The maximum value is 10. Higher values will be coerced to the maximum. # @param page_token [::String] # A page token, received from a previous `ListMeasurementProtocolSecrets` # call. Provide this to retrieve the subsequent page. When paginating, all # other parameters provided to `ListMeasurementProtocolSecrets` must match # the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest.new # # # Call the list_measurement_protocol_secrets method. # result = client.list_measurement_protocol_secrets request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret. # p response # end # def list_measurement_protocol_secrets request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListMeasurementProtocolSecretsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_measurement_protocol_secrets.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 = {} if request.parent header_params["parent"] = request.parent end 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_measurement_protocol_secrets.timeout, metadata: metadata, retry_policy: @config.rpcs.list_measurement_protocol_secrets.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_measurement_protocol_secrets, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_measurement_protocol_secrets, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a measurement protocol secret. # # @overload create_measurement_protocol_secret(request, options = nil) # Pass arguments to `create_measurement_protocol_secret` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest, ::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_measurement_protocol_secret(parent: nil, measurement_protocol_secret: nil) # Pass arguments to `create_measurement_protocol_secret` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The parent resource where this secret will be created. # Any type of stream (WebDataStream, IosAppDataStream, AndroidAppDataStream) # may be a parent. # Format: properties/\\{property}/webDataStreams/\\{webDataStream} # @param measurement_protocol_secret [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret, ::Hash] # Required. The measurement protocol secret to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest.new # # # Call the create_measurement_protocol_secret method. # result = client.create_measurement_protocol_secret request # # # The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret. # p result # def create_measurement_protocol_secret request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateMeasurementProtocolSecretRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_measurement_protocol_secret.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 = {} if request.parent header_params["parent"] = request.parent end 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_measurement_protocol_secret.timeout, metadata: metadata, retry_policy: @config.rpcs.create_measurement_protocol_secret.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_measurement_protocol_secret, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes target MeasurementProtocolSecret. # # @overload delete_measurement_protocol_secret(request, options = nil) # Pass arguments to `delete_measurement_protocol_secret` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_measurement_protocol_secret(name: nil) # Pass arguments to `delete_measurement_protocol_secret` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the MeasurementProtocolSecret to delete. # Format: # properties/\\{property}/webDataStreams/\\{webDataStream}/measurementProtocolSecrets/\\{measurementProtocolSecret} # Note: Any type of stream (WebDataStream, IosAppDataStream, # AndroidAppDataStream) may be a parent. # # @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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest.new # # # Call the delete_measurement_protocol_secret method. # result = client.delete_measurement_protocol_secret request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_measurement_protocol_secret request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteMeasurementProtocolSecretRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_measurement_protocol_secret.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 = {} if request.name header_params["name"] = request.name end 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_measurement_protocol_secret.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_measurement_protocol_secret.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_measurement_protocol_secret, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a measurement protocol secret. # # @overload update_measurement_protocol_secret(request, options = nil) # Pass arguments to `update_measurement_protocol_secret` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest, ::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_measurement_protocol_secret(measurement_protocol_secret: nil, update_mask: nil) # Pass arguments to `update_measurement_protocol_secret` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param measurement_protocol_secret [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret, ::Hash] # Required. The measurement protocol secret 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::MeasurementProtocolSecret] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest.new # # # Call the update_measurement_protocol_secret method. # result = client.update_measurement_protocol_secret request # # # The returned object is of type Google::Analytics::Admin::V1alpha::MeasurementProtocolSecret. # p result # def update_measurement_protocol_secret request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateMeasurementProtocolSecretRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_measurement_protocol_secret.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 = {} if request.measurement_protocol_secret&.name header_params["measurement_protocol_secret.name"] = request.measurement_protocol_secret.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_measurement_protocol_secret.timeout, metadata: metadata, retry_policy: @config.rpcs.update_measurement_protocol_secret.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_measurement_protocol_secret, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Acknowledges the terms of user data collection for the specified property. # # This acknowledgement must be completed (either in the Google Analytics UI # or via this API) before MeasurementProtocolSecret resources may be created. # # @overload acknowledge_user_data_collection(request, options = nil) # Pass arguments to `acknowledge_user_data_collection` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload acknowledge_user_data_collection(property: nil, acknowledgement: nil) # Pass arguments to `acknowledge_user_data_collection` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param property [::String] # Required. The property for which to acknowledge user data collection. # @param acknowledgement [::String] # Required. An acknowledgement that the caller of this method understands the terms # of user data collection. # # This field must contain the exact value: # "I acknowledge that I have the necessary privacy disclosures and rights # from my end users for the collection and processing of their data, # including the association of such data with the visitation information # Google Analytics collects from my site and/or app property." # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionRequest.new # # # Call the acknowledge_user_data_collection method. # result = client.acknowledge_user_data_collection request # # # The returned object is of type Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionResponse. # p result # def acknowledge_user_data_collection request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::AcknowledgeUserDataCollectionRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.acknowledge_user_data_collection.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 = {} if request.property header_params["property"] = request.property end 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.acknowledge_user_data_collection.timeout, metadata: metadata, retry_policy: @config.rpcs.acknowledge_user_data_collection.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :acknowledge_user_data_collection, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Searches through all changes to an account or its children given the # specified set of filters. # # @overload search_change_history_events(request, options = nil) # Pass arguments to `search_change_history_events` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload search_change_history_events(account: nil, property: nil, resource_type: nil, action: nil, actor_email: nil, earliest_change_time: nil, latest_change_time: nil, page_size: nil, page_token: nil) # Pass arguments to `search_change_history_events` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param account [::String] # Required. The account resource for which to return change history resources. # @param property [::String] # Optional. Resource name for a child property. If set, only return changes # made to this property or its child resources. # @param resource_type [::Array<::Google::Analytics::Admin::V1alpha::ChangeHistoryResourceType>] # Optional. If set, only return changes if they are for a resource that matches at # least one of these types. # @param action [::Array<::Google::Analytics::Admin::V1alpha::ActionType>] # Optional. If set, only return changes that match one or more of these types of # actions. # @param actor_email [::Array<::String>] # Optional. If set, only return changes if they are made by a user in this list. # @param earliest_change_time [::Google::Protobuf::Timestamp, ::Hash] # Optional. If set, only return changes made after this time (inclusive). # @param latest_change_time [::Google::Protobuf::Timestamp, ::Hash] # Optional. If set, only return changes made before this time (inclusive). # @param page_size [::Integer] # Optional. The maximum number of ChangeHistoryEvent items to return. # The service may return fewer than this value, even if there are additional # pages. If unspecified, at most 50 items will be returned. # The maximum value is 200 (higher values will be coerced to the maximum). # @param page_token [::String] # Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. # Provide this to retrieve the subsequent page. When paginating, all other # parameters provided to `SearchChangeHistoryEvents` must match the call that # provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest.new # # # Call the search_change_history_events method. # result = client.search_change_history_events request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::ChangeHistoryEvent. # p response # end # def search_change_history_events request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::SearchChangeHistoryEventsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.search_change_history_events.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 = {} if request.account header_params["account"] = request.account end 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.search_change_history_events.timeout, metadata: metadata, retry_policy: @config.rpcs.search_change_history_events.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :search_change_history_events, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :search_change_history_events, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for Google Signals settings for a property. # # @overload get_google_signals_settings(request, options = nil) # Pass arguments to `get_google_signals_settings` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_google_signals_settings(name: nil) # Pass arguments to `get_google_signals_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the google signals settings to retrieve. # Format: properties/\\{property}/googleSignalsSettings # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest.new # # # Call the get_google_signals_settings method. # result = client.get_google_signals_settings request # # # The returned object is of type Google::Analytics::Admin::V1alpha::GoogleSignalsSettings. # p result # def get_google_signals_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetGoogleSignalsSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_google_signals_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 = {} if request.name header_params["name"] = request.name end 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_google_signals_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.get_google_signals_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_google_signals_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates Google Signals settings for a property. # # @overload update_google_signals_settings(request, options = nil) # Pass arguments to `update_google_signals_settings` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_google_signals_settings(google_signals_settings: nil, update_mask: nil) # Pass arguments to `update_google_signals_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param google_signals_settings [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings, ::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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::GoogleSignalsSettings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest.new # # # Call the update_google_signals_settings method. # result = client.update_google_signals_settings request # # # The returned object is of type Google::Analytics::Admin::V1alpha::GoogleSignalsSettings. # p result # def update_google_signals_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateGoogleSignalsSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_google_signals_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 = {} if request.google_signals_settings&.name header_params["google_signals_settings.name"] = request.google_signals_settings.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_google_signals_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.update_google_signals_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_google_signals_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a conversion event with the specified attributes. # # @overload create_conversion_event(request, options = nil) # Pass arguments to `create_conversion_event` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateConversionEventRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateConversionEventRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_conversion_event(conversion_event: nil, parent: nil) # Pass arguments to `create_conversion_event` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param conversion_event [::Google::Analytics::Admin::V1alpha::ConversionEvent, ::Hash] # Required. The conversion event to create. # @param parent [::String] # Required. The resource name of the parent property where this conversion event will # be created. Format: properties/123 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::ConversionEvent] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::ConversionEvent] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateConversionEventRequest.new # # # Call the create_conversion_event method. # result = client.create_conversion_event request # # # The returned object is of type Google::Analytics::Admin::V1alpha::ConversionEvent. # p result # def create_conversion_event request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateConversionEventRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_conversion_event.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 = {} if request.parent header_params["parent"] = request.parent end 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_conversion_event.timeout, metadata: metadata, retry_policy: @config.rpcs.create_conversion_event.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_conversion_event, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Retrieve a single conversion event. # # @overload get_conversion_event(request, options = nil) # Pass arguments to `get_conversion_event` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetConversionEventRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetConversionEventRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_conversion_event(name: nil) # Pass arguments to `get_conversion_event` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The resource name of the conversion event to retrieve. # Format: properties/\\{property}/conversionEvents/\\{conversion_event} # Example: "properties/123/conversionEvents/456" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::ConversionEvent] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::ConversionEvent] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetConversionEventRequest.new # # # Call the get_conversion_event method. # result = client.get_conversion_event request # # # The returned object is of type Google::Analytics::Admin::V1alpha::ConversionEvent. # p result # def get_conversion_event request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetConversionEventRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_conversion_event.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 = {} if request.name header_params["name"] = request.name end 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_conversion_event.timeout, metadata: metadata, retry_policy: @config.rpcs.get_conversion_event.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_conversion_event, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a conversion event in a property. # # @overload delete_conversion_event(request, options = nil) # Pass arguments to `delete_conversion_event` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_conversion_event(name: nil) # Pass arguments to `delete_conversion_event` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The resource name of the conversion event to delete. # Format: properties/\\{property}/conversionEvents/\\{conversion_event} # Example: "properties/123/conversionEvents/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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest.new # # # Call the delete_conversion_event method. # result = client.delete_conversion_event request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_conversion_event request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteConversionEventRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_conversion_event.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 = {} if request.name header_params["name"] = request.name end 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_conversion_event.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_conversion_event.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_conversion_event, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns a list of conversion events in the specified parent property. # # Returns an empty list if no conversion events are found. # # @overload list_conversion_events(request, options = nil) # Pass arguments to `list_conversion_events` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_conversion_events(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_conversion_events` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. The resource name of the parent property. # Example: '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 `ListConversionEvents` call. # Provide this to retrieve the subsequent page. # When paginating, all other parameters provided to `ListConversionEvents` # must match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::ConversionEvent>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListConversionEventsRequest.new # # # Call the list_conversion_events method. # result = client.list_conversion_events request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::ConversionEvent. # p response # end # def list_conversion_events request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListConversionEventsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_conversion_events.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 = {} if request.parent header_params["parent"] = request.parent end 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_conversion_events.timeout, metadata: metadata, retry_policy: @config.rpcs.list_conversion_events.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_conversion_events, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_conversion_events, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Look up a single DisplayVideo360AdvertiserLink # # @overload get_display_video360_advertiser_link(request, options = nil) # Pass arguments to `get_display_video360_advertiser_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_display_video360_advertiser_link(name: nil) # Pass arguments to `get_display_video360_advertiser_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DisplayVideo360AdvertiserLink to get. # Example format: properties/1234/displayVideo360AdvertiserLink/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest.new # # # Call the get_display_video360_advertiser_link method. # result = client.get_display_video360_advertiser_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink. # p result # def get_display_video360_advertiser_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_display_video360_advertiser_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 = {} if request.name header_params["name"] = request.name end 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_display_video360_advertiser_link.timeout, metadata: metadata, retry_policy: @config.rpcs.get_display_video360_advertiser_link.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_display_video360_advertiser_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists all DisplayVideo360AdvertiserLinks on a property. # # @overload list_display_video360_advertiser_links(request, options = nil) # Pass arguments to `list_display_video360_advertiser_links` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_display_video360_advertiser_links(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_display_video360_advertiser_links` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @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 `ListDisplayVideo360AdvertiserLinks` # call. Provide this to retrieve the subsequent page. # # When paginating, all other parameters provided to # `ListDisplayVideo360AdvertiserLinks` must match the call that provided the # page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest.new # # # Call the list_display_video360_advertiser_links method. # result = client.list_display_video360_advertiser_links request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink. # p response # end # def list_display_video360_advertiser_links request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinksRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_display_video360_advertiser_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 = {} if request.parent header_params["parent"] = request.parent end 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_display_video360_advertiser_links.timeout, metadata: metadata, retry_policy: @config.rpcs.list_display_video360_advertiser_links.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_display_video360_advertiser_links, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_display_video360_advertiser_links, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a DisplayVideo360AdvertiserLink. # This can only be utilized by users who have proper authorization both on # the Google Analytics property and on the Display & Video 360 advertiser. # Users who do not have access to the Display & Video 360 advertiser should # instead seek to create a DisplayVideo360LinkProposal. # # @overload create_display_video360_advertiser_link(request, options = nil) # Pass arguments to `create_display_video360_advertiser_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkRequest, ::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_display_video360_advertiser_link(parent: nil, display_video_360_advertiser_link: nil) # Pass arguments to `create_display_video360_advertiser_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: properties/1234 # @param display_video_360_advertiser_link [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink, ::Hash] # Required. The DisplayVideo360AdvertiserLink to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkRequest.new # # # Call the create_display_video360_advertiser_link method. # result = client.create_display_video360_advertiser_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink. # p result # def create_display_video360_advertiser_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_display_video360_advertiser_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 = {} if request.parent header_params["parent"] = request.parent end 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_display_video360_advertiser_link.timeout, metadata: metadata, retry_policy: @config.rpcs.create_display_video360_advertiser_link.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_display_video360_advertiser_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a DisplayVideo360AdvertiserLink on a property. # # @overload delete_display_video360_advertiser_link(request, options = nil) # Pass arguments to `delete_display_video360_advertiser_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_display_video360_advertiser_link(name: nil) # Pass arguments to `delete_display_video360_advertiser_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DisplayVideo360AdvertiserLink to delete. # Example format: properties/1234/displayVideo360AdvertiserLinks/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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest.new # # # Call the delete_display_video360_advertiser_link method. # result = client.delete_display_video360_advertiser_link request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_display_video360_advertiser_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_display_video360_advertiser_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 = {} if request.name header_params["name"] = request.name end 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_display_video360_advertiser_link.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_display_video360_advertiser_link.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_display_video360_advertiser_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a DisplayVideo360AdvertiserLink on a property. # # @overload update_display_video360_advertiser_link(request, options = nil) # Pass arguments to `update_display_video360_advertiser_link` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateDisplayVideo360AdvertiserLinkRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateDisplayVideo360AdvertiserLinkRequest, ::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_display_video360_advertiser_link(display_video_360_advertiser_link: nil, update_mask: nil) # Pass arguments to `update_display_video360_advertiser_link` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param display_video_360_advertiser_link [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink, ::Hash] # The DisplayVideo360AdvertiserLink to update # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Required. The list of fields to be updated. Omitted fields will not be updated. # To replace the entire entity, use one path with the string "*" to match # all fields. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateDisplayVideo360AdvertiserLinkRequest.new # # # Call the update_display_video360_advertiser_link method. # result = client.update_display_video360_advertiser_link request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLink. # p result # def update_display_video360_advertiser_link request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateDisplayVideo360AdvertiserLinkRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_display_video360_advertiser_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 = {} if request.display_video_360_advertiser_link&.name header_params["display_video_360_advertiser_link.name"] = request.display_video_360_advertiser_link.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_display_video360_advertiser_link.timeout, metadata: metadata, retry_policy: @config.rpcs.update_display_video360_advertiser_link.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_display_video360_advertiser_link, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single DisplayVideo360AdvertiserLinkProposal. # # @overload get_display_video360_advertiser_link_proposal(request, options = nil) # Pass arguments to `get_display_video360_advertiser_link_proposal` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkProposalRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkProposalRequest, ::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_display_video360_advertiser_link_proposal(name: nil) # Pass arguments to `get_display_video360_advertiser_link_proposal` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. # Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkProposalRequest.new # # # Call the get_display_video360_advertiser_link_proposal method. # result = client.get_display_video360_advertiser_link_proposal request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal. # p result # def get_display_video360_advertiser_link_proposal request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDisplayVideo360AdvertiserLinkProposalRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_display_video360_advertiser_link_proposal.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 = {} if request.name header_params["name"] = request.name end 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_display_video360_advertiser_link_proposal.timeout, metadata: metadata, retry_policy: @config.rpcs.get_display_video360_advertiser_link_proposal.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_display_video360_advertiser_link_proposal, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists DisplayVideo360AdvertiserLinkProposals on a property. # # @overload list_display_video360_advertiser_link_proposals(request, options = nil) # Pass arguments to `list_display_video360_advertiser_link_proposals` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinkProposalsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinkProposalsRequest, ::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_display_video360_advertiser_link_proposals(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_display_video360_advertiser_link_proposals` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @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 # `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve # the subsequent page. # # When paginating, all other parameters provided to # `ListDisplayVideo360AdvertiserLinkProposals` must match the call that # provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinkProposalsRequest.new # # # Call the list_display_video360_advertiser_link_proposals method. # result = client.list_display_video360_advertiser_link_proposals request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal. # p response # end # def list_display_video360_advertiser_link_proposals request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListDisplayVideo360AdvertiserLinkProposalsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_display_video360_advertiser_link_proposals.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 = {} if request.parent header_params["parent"] = request.parent end 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_display_video360_advertiser_link_proposals.timeout, metadata: metadata, retry_policy: @config.rpcs.list_display_video360_advertiser_link_proposals.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_display_video360_advertiser_link_proposals, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_display_video360_advertiser_link_proposals, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a DisplayVideo360AdvertiserLinkProposal. # # @overload create_display_video360_advertiser_link_proposal(request, options = nil) # Pass arguments to `create_display_video360_advertiser_link_proposal` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkProposalRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkProposalRequest, ::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_display_video360_advertiser_link_proposal(parent: nil, display_video_360_advertiser_link_proposal: nil) # Pass arguments to `create_display_video360_advertiser_link_proposal` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: properties/1234 # @param display_video_360_advertiser_link_proposal [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal, ::Hash] # Required. The DisplayVideo360AdvertiserLinkProposal to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkProposalRequest.new # # # Call the create_display_video360_advertiser_link_proposal method. # result = client.create_display_video360_advertiser_link_proposal request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal. # p result # def create_display_video360_advertiser_link_proposal request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateDisplayVideo360AdvertiserLinkProposalRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_display_video360_advertiser_link_proposal.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 = {} if request.parent header_params["parent"] = request.parent end 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_display_video360_advertiser_link_proposal.timeout, metadata: metadata, retry_policy: @config.rpcs.create_display_video360_advertiser_link_proposal.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_display_video360_advertiser_link_proposal, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a DisplayVideo360AdvertiserLinkProposal on a property. # This can only be used on cancelled proposals. # # @overload delete_display_video360_advertiser_link_proposal(request, options = nil) # Pass arguments to `delete_display_video360_advertiser_link_proposal` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkProposalRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkProposalRequest, ::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_display_video360_advertiser_link_proposal(name: nil) # Pass arguments to `delete_display_video360_advertiser_link_proposal` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. # Example format: properties/1234/displayVideo360AdvertiserLinkProposals/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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkProposalRequest.new # # # Call the delete_display_video360_advertiser_link_proposal method. # result = client.delete_display_video360_advertiser_link_proposal request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_display_video360_advertiser_link_proposal request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteDisplayVideo360AdvertiserLinkProposalRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_display_video360_advertiser_link_proposal.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 = {} if request.name header_params["name"] = request.name end 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_display_video360_advertiser_link_proposal.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_display_video360_advertiser_link_proposal.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_display_video360_advertiser_link_proposal, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Approves a DisplayVideo360AdvertiserLinkProposal. # The DisplayVideo360AdvertiserLinkProposal will be deleted and a new # DisplayVideo360AdvertiserLink will be created. # # @overload approve_display_video360_advertiser_link_proposal(request, options = nil) # Pass arguments to `approve_display_video360_advertiser_link_proposal` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalRequest, ::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 approve_display_video360_advertiser_link_proposal(name: nil) # Pass arguments to `approve_display_video360_advertiser_link_proposal` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve. # Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalResponse] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalResponse] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalRequest.new # # # Call the approve_display_video360_advertiser_link_proposal method. # result = client.approve_display_video360_advertiser_link_proposal request # # # The returned object is of type Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalResponse. # p result # def approve_display_video360_advertiser_link_proposal request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ApproveDisplayVideo360AdvertiserLinkProposalRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.approve_display_video360_advertiser_link_proposal.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 = {} if request.name header_params["name"] = request.name end 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.approve_display_video360_advertiser_link_proposal.timeout, metadata: metadata, retry_policy: @config.rpcs.approve_display_video360_advertiser_link_proposal.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :approve_display_video360_advertiser_link_proposal, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Cancels a DisplayVideo360AdvertiserLinkProposal. # Cancelling can mean either: # - Declining a proposal initiated from Display & Video 360 # - Withdrawing a proposal initiated from Google Analytics # After being cancelled, a proposal will eventually be deleted automatically. # # @overload cancel_display_video360_advertiser_link_proposal(request, options = nil) # Pass arguments to `cancel_display_video360_advertiser_link_proposal` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CancelDisplayVideo360AdvertiserLinkProposalRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CancelDisplayVideo360AdvertiserLinkProposalRequest, ::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 cancel_display_video360_advertiser_link_proposal(name: nil) # Pass arguments to `cancel_display_video360_advertiser_link_proposal` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel. # Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CancelDisplayVideo360AdvertiserLinkProposalRequest.new # # # Call the cancel_display_video360_advertiser_link_proposal method. # result = client.cancel_display_video360_advertiser_link_proposal request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DisplayVideo360AdvertiserLinkProposal. # p result # def cancel_display_video360_advertiser_link_proposal request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CancelDisplayVideo360AdvertiserLinkProposalRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.cancel_display_video360_advertiser_link_proposal.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 = {} if request.name header_params["name"] = request.name end 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.cancel_display_video360_advertiser_link_proposal.timeout, metadata: metadata, retry_policy: @config.rpcs.cancel_display_video360_advertiser_link_proposal.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :cancel_display_video360_advertiser_link_proposal, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a CustomDimension. # # @overload create_custom_dimension(request, options = nil) # Pass arguments to `create_custom_dimension` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest, ::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_custom_dimension(parent: nil, custom_dimension: nil) # Pass arguments to `create_custom_dimension` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: properties/1234 # @param custom_dimension [::Google::Analytics::Admin::V1alpha::CustomDimension, ::Hash] # Required. The CustomDimension to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomDimension] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::CustomDimension] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest.new # # # Call the create_custom_dimension method. # result = client.create_custom_dimension request # # # The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension. # p result # def create_custom_dimension request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateCustomDimensionRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_custom_dimension.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 = {} if request.parent header_params["parent"] = request.parent end 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_custom_dimension.timeout, metadata: metadata, retry_policy: @config.rpcs.create_custom_dimension.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_custom_dimension, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a CustomDimension on a property. # # @overload update_custom_dimension(request, options = nil) # Pass arguments to `update_custom_dimension` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest, ::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_custom_dimension(custom_dimension: nil, update_mask: nil) # Pass arguments to `update_custom_dimension` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param custom_dimension [::Google::Analytics::Admin::V1alpha::CustomDimension, ::Hash] # The CustomDimension to update # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Required. The list of fields to be updated. Omitted fields will not be updated. # To replace the entire entity, use one path with the string "*" to match # all fields. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomDimension] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::CustomDimension] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest.new # # # Call the update_custom_dimension method. # result = client.update_custom_dimension request # # # The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension. # p result # def update_custom_dimension request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateCustomDimensionRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_custom_dimension.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 = {} if request.custom_dimension&.name header_params["custom_dimension.name"] = request.custom_dimension.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_custom_dimension.timeout, metadata: metadata, retry_policy: @config.rpcs.update_custom_dimension.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_custom_dimension, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists CustomDimensions on a property. # # @overload list_custom_dimensions(request, options = nil) # Pass arguments to `list_custom_dimensions` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_custom_dimensions(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_custom_dimensions` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @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 `ListCustomDimensions` call. # Provide this to retrieve the subsequent page. # # When paginating, all other parameters provided to `ListCustomDimensions` # must match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomDimension>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest.new # # # Call the list_custom_dimensions method. # result = client.list_custom_dimensions request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomDimension. # p response # end # def list_custom_dimensions request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListCustomDimensionsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_custom_dimensions.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 = {} if request.parent header_params["parent"] = request.parent end 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_custom_dimensions.timeout, metadata: metadata, retry_policy: @config.rpcs.list_custom_dimensions.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_custom_dimensions, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_custom_dimensions, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Archives a CustomDimension on a property. # # @overload archive_custom_dimension(request, options = nil) # Pass arguments to `archive_custom_dimension` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload archive_custom_dimension(name: nil) # Pass arguments to `archive_custom_dimension` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the CustomDimension to archive. # Example format: properties/1234/customDimensions/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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest.new # # # Call the archive_custom_dimension method. # result = client.archive_custom_dimension request # # # The returned object is of type Google::Protobuf::Empty. # p result # def archive_custom_dimension request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ArchiveCustomDimensionRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.archive_custom_dimension.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 = {} if request.name header_params["name"] = request.name end 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.archive_custom_dimension.timeout, metadata: metadata, retry_policy: @config.rpcs.archive_custom_dimension.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :archive_custom_dimension, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single CustomDimension. # # @overload get_custom_dimension(request, options = nil) # Pass arguments to `get_custom_dimension` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_custom_dimension(name: nil) # Pass arguments to `get_custom_dimension` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the CustomDimension to get. # Example format: properties/1234/customDimensions/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomDimension] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::CustomDimension] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest.new # # # Call the get_custom_dimension method. # result = client.get_custom_dimension request # # # The returned object is of type Google::Analytics::Admin::V1alpha::CustomDimension. # p result # def get_custom_dimension request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetCustomDimensionRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_custom_dimension.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 = {} if request.name header_params["name"] = request.name end 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_custom_dimension.timeout, metadata: metadata, retry_policy: @config.rpcs.get_custom_dimension.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_custom_dimension, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a CustomMetric. # # @overload create_custom_metric(request, options = nil) # Pass arguments to `create_custom_metric` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_custom_metric(parent: nil, custom_metric: nil) # Pass arguments to `create_custom_metric` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: properties/1234 # @param custom_metric [::Google::Analytics::Admin::V1alpha::CustomMetric, ::Hash] # Required. The CustomMetric to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomMetric] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::CustomMetric] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest.new # # # Call the create_custom_metric method. # result = client.create_custom_metric request # # # The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric. # p result # def create_custom_metric request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateCustomMetricRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_custom_metric.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 = {} if request.parent header_params["parent"] = request.parent end 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_custom_metric.timeout, metadata: metadata, retry_policy: @config.rpcs.create_custom_metric.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_custom_metric, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a CustomMetric on a property. # # @overload update_custom_metric(request, options = nil) # Pass arguments to `update_custom_metric` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_custom_metric(custom_metric: nil, update_mask: nil) # Pass arguments to `update_custom_metric` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param custom_metric [::Google::Analytics::Admin::V1alpha::CustomMetric, ::Hash] # The CustomMetric to update # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Required. The list of fields to be updated. Omitted fields will not be updated. # To replace the entire entity, use one path with the string "*" to match # all fields. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomMetric] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::CustomMetric] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest.new # # # Call the update_custom_metric method. # result = client.update_custom_metric request # # # The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric. # p result # def update_custom_metric request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateCustomMetricRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_custom_metric.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 = {} if request.custom_metric&.name header_params["custom_metric.name"] = request.custom_metric.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_custom_metric.timeout, metadata: metadata, retry_policy: @config.rpcs.update_custom_metric.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_custom_metric, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists CustomMetrics on a property. # # @overload list_custom_metrics(request, options = nil) # Pass arguments to `list_custom_metrics` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_custom_metrics(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_custom_metrics` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @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 `ListCustomMetrics` call. # Provide this to retrieve the subsequent page. # # When paginating, all other parameters provided to `ListCustomMetrics` must # match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::CustomMetric>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest.new # # # Call the list_custom_metrics method. # result = client.list_custom_metrics request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::CustomMetric. # p response # end # def list_custom_metrics request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListCustomMetricsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_custom_metrics.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 = {} if request.parent header_params["parent"] = request.parent end 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_custom_metrics.timeout, metadata: metadata, retry_policy: @config.rpcs.list_custom_metrics.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_custom_metrics, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_custom_metrics, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Archives a CustomMetric on a property. # # @overload archive_custom_metric(request, options = nil) # Pass arguments to `archive_custom_metric` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload archive_custom_metric(name: nil) # Pass arguments to `archive_custom_metric` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the CustomMetric to archive. # Example format: properties/1234/customMetrics/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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest.new # # # Call the archive_custom_metric method. # result = client.archive_custom_metric request # # # The returned object is of type Google::Protobuf::Empty. # p result # def archive_custom_metric request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ArchiveCustomMetricRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.archive_custom_metric.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 = {} if request.name header_params["name"] = request.name end 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.archive_custom_metric.timeout, metadata: metadata, retry_policy: @config.rpcs.archive_custom_metric.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :archive_custom_metric, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single CustomMetric. # # @overload get_custom_metric(request, options = nil) # Pass arguments to `get_custom_metric` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_custom_metric(name: nil) # Pass arguments to `get_custom_metric` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the CustomMetric to get. # Example format: properties/1234/customMetrics/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::CustomMetric] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::CustomMetric] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetCustomMetricRequest.new # # # Call the get_custom_metric method. # result = client.get_custom_metric request # # # The returned object is of type Google::Analytics::Admin::V1alpha::CustomMetric. # p result # def get_custom_metric request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetCustomMetricRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_custom_metric.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 = {} if request.name header_params["name"] = request.name end 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_custom_metric.timeout, metadata: metadata, retry_policy: @config.rpcs.get_custom_metric.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_custom_metric, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Returns the singleton data retention settings for this property. # # @overload get_data_retention_settings(request, options = nil) # Pass arguments to `get_data_retention_settings` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_data_retention_settings(name: nil) # Pass arguments to `get_data_retention_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the settings to lookup. # Format: # properties/\\{property}/dataRetentionSettings # Example: "properties/1000/dataRetentionSettings" # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DataRetentionSettings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DataRetentionSettings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest.new # # # Call the get_data_retention_settings method. # result = client.get_data_retention_settings request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DataRetentionSettings. # p result # def get_data_retention_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataRetentionSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_data_retention_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 = {} if request.name header_params["name"] = request.name end 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_retention_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.get_data_retention_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_data_retention_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates the singleton data retention settings for this property. # # @overload update_data_retention_settings(request, options = nil) # Pass arguments to `update_data_retention_settings` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_data_retention_settings(data_retention_settings: nil, update_mask: nil) # Pass arguments to `update_data_retention_settings` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param data_retention_settings [::Google::Analytics::Admin::V1alpha::DataRetentionSettings, ::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] # Required. The list of fields to be updated. Field names must be in snake case # (e.g., "field_to_update"). Omitted fields will not be updated. To replace # the entire entity, use one path with the string "*" to match all fields. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DataRetentionSettings] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DataRetentionSettings] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest.new # # # Call the update_data_retention_settings method. # result = client.update_data_retention_settings request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DataRetentionSettings. # p result # def update_data_retention_settings request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateDataRetentionSettingsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_data_retention_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 = {} if request.data_retention_settings&.name header_params["data_retention_settings.name"] = request.data_retention_settings.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_data_retention_settings.timeout, metadata: metadata, retry_policy: @config.rpcs.update_data_retention_settings.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_data_retention_settings, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Creates a DataStream. # # @overload create_data_stream(request, options = nil) # Pass arguments to `create_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::CreateDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::CreateDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload create_data_stream(parent: nil, data_stream: nil) # Pass arguments to `create_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] # Required. Example format: properties/1234 # @param data_stream [::Google::Analytics::Admin::V1alpha::DataStream, ::Hash] # Required. The DataStream to create. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::CreateDataStreamRequest.new # # # Call the create_data_stream method. # result = client.create_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DataStream. # p result # def create_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::CreateDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_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 = {} if request.parent header_params["parent"] = request.parent end 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_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.create_data_stream.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :create_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Deletes a DataStream on a property. # # @overload delete_data_stream(request, options = nil) # Pass arguments to `delete_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload delete_data_stream(name: nil) # Pass arguments to `delete_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DataStream to delete. # Example format: properties/1234/dataStreams/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. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest.new # # # Call the delete_data_stream method. # result = client.delete_data_stream request # # # The returned object is of type Google::Protobuf::Empty. # p result # def delete_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::DeleteDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_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 = {} if request.name header_params["name"] = request.name end 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_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_data_stream.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :delete_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Updates a DataStream on a property. # # @overload update_data_stream(request, options = nil) # Pass arguments to `update_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload update_data_stream(data_stream: nil, update_mask: nil) # Pass arguments to `update_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param data_stream [::Google::Analytics::Admin::V1alpha::DataStream, ::Hash] # The DataStream to update # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] # Required. The list of fields to be updated. Omitted fields will not be updated. # To replace the entire entity, use one path with the string "*" to match # all fields. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest.new # # # Call the update_data_stream method. # result = client.update_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DataStream. # p result # def update_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_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 = {} if request.data_stream&.name header_params["data_stream.name"] = request.data_stream.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_data_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.update_data_stream.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :update_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lists DataStreams on a property. # # @overload list_data_streams(request, options = nil) # Pass arguments to `list_data_streams` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::ListDataStreamsRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::ListDataStreamsRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload list_data_streams(parent: nil, page_size: nil, page_token: nil) # Pass arguments to `list_data_streams` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @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 `ListDataStreams` call. # Provide this to retrieve the subsequent page. # # When paginating, all other parameters provided to `ListDataStreams` must # match the call that provided the page token. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::DataStream>] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::ListDataStreamsRequest.new # # # Call the list_data_streams method. # result = client.list_data_streams request # # # The returned object is of type Gapic::PagedEnumerable. You can # # iterate over all elements by calling #each, and the enumerable # # will lazily make API calls to fetch subsequent pages. Other # # methods are also available for managing paging directly. # result.each do |response| # # Each element is of type ::Google::Analytics::Admin::V1alpha::DataStream. # p response # end # def list_data_streams request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListDataStreamsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_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 = {} if request.parent header_params["parent"] = request.parent end 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_data_streams.timeout, metadata: metadata, retry_policy: @config.rpcs.list_data_streams.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :list_data_streams, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_data_streams, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # Lookup for a single DataStream. # # @overload get_data_stream(request, options = nil) # Pass arguments to `get_data_stream` via a request object, either of type # {::Google::Analytics::Admin::V1alpha::GetDataStreamRequest} or an equivalent Hash. # # @param request [::Google::Analytics::Admin::V1alpha::GetDataStreamRequest, ::Hash] # A request object representing the call parameters. Required. To specify no # parameters, or to keep all the default parameter values, pass an empty Hash. # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # # @overload get_data_stream(name: nil) # Pass arguments to `get_data_stream` via keyword arguments. Note that at # least one keyword argument is required. To specify no parameters, or to keep all # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] # Required. The name of the DataStream to get. # Example format: properties/1234/dataStreams/5678 # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Analytics::Admin::V1alpha::DataStream] # @yieldparam operation [::GRPC::ActiveCall::Operation] # # @return [::Google::Analytics::Admin::V1alpha::DataStream] # # @raise [::Google::Cloud::Error] if the RPC is aborted. # # @example Basic example # require "google/analytics/admin/v1alpha" # # # Create a client object. The client can be reused for multiple calls. # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new # # # Create a request. To set request fields, pass in keyword arguments. # request = Google::Analytics::Admin::V1alpha::GetDataStreamRequest.new # # # Call the get_data_stream method. # result = client.get_data_stream request # # # The returned object is of type Google::Analytics::Admin::V1alpha::DataStream. # p result # def get_data_stream request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetDataStreamRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_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 = {} if request.name header_params["name"] = request.name end 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_stream.timeout, metadata: metadata, retry_policy: @config.rpcs.get_data_stream.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @analytics_admin_service_stub.call_rpc :get_data_stream, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end ## # 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. # # @example # # # 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 # # # 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 seconds # * `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 `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 `list_android_app_data_streams` # @return [::Gapic::Config::Method] # attr_reader :list_android_app_data_streams ## # RPC-specific configuration for `create_firebase_link` # @return [::Gapic::Config::Method] # attr_reader :create_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 ## # RPC-specific configuration for `get_measurement_protocol_secret` # @return [::Gapic::Config::Method] # attr_reader :get_measurement_protocol_secret ## # RPC-specific configuration for `list_measurement_protocol_secrets` # @return [::Gapic::Config::Method] # attr_reader :list_measurement_protocol_secrets ## # RPC-specific configuration for `create_measurement_protocol_secret` # @return [::Gapic::Config::Method] # attr_reader :create_measurement_protocol_secret ## # RPC-specific configuration for `delete_measurement_protocol_secret` # @return [::Gapic::Config::Method] # attr_reader :delete_measurement_protocol_secret ## # RPC-specific configuration for `update_measurement_protocol_secret` # @return [::Gapic::Config::Method] # attr_reader :update_measurement_protocol_secret ## # RPC-specific configuration for `acknowledge_user_data_collection` # @return [::Gapic::Config::Method] # attr_reader :acknowledge_user_data_collection ## # RPC-specific configuration for `search_change_history_events` # @return [::Gapic::Config::Method] # attr_reader :search_change_history_events ## # RPC-specific configuration for `get_google_signals_settings` # @return [::Gapic::Config::Method] # attr_reader :get_google_signals_settings ## # RPC-specific configuration for `update_google_signals_settings` # @return [::Gapic::Config::Method] # attr_reader :update_google_signals_settings ## # RPC-specific configuration for `create_conversion_event` # @return [::Gapic::Config::Method] # attr_reader :create_conversion_event ## # RPC-specific configuration for `get_conversion_event` # @return [::Gapic::Config::Method] # attr_reader :get_conversion_event ## # RPC-specific configuration for `delete_conversion_event` # @return [::Gapic::Config::Method] # attr_reader :delete_conversion_event ## # RPC-specific configuration for `list_conversion_events` # @return [::Gapic::Config::Method] # attr_reader :list_conversion_events ## # RPC-specific configuration for `get_display_video360_advertiser_link` # @return [::Gapic::Config::Method] # attr_reader :get_display_video360_advertiser_link ## # RPC-specific configuration for `list_display_video360_advertiser_links` # @return [::Gapic::Config::Method] # attr_reader :list_display_video360_advertiser_links ## # RPC-specific configuration for `create_display_video360_advertiser_link` # @return [::Gapic::Config::Method] # attr_reader :create_display_video360_advertiser_link ## # RPC-specific configuration for `delete_display_video360_advertiser_link` # @return [::Gapic::Config::Method] # attr_reader :delete_display_video360_advertiser_link ## # RPC-specific configuration for `update_display_video360_advertiser_link` # @return [::Gapic::Config::Method] # attr_reader :update_display_video360_advertiser_link ## # RPC-specific configuration for `get_display_video360_advertiser_link_proposal` # @return [::Gapic::Config::Method] # attr_reader :get_display_video360_advertiser_link_proposal ## # RPC-specific configuration for `list_display_video360_advertiser_link_proposals` # @return [::Gapic::Config::Method] # attr_reader :list_display_video360_advertiser_link_proposals ## # RPC-specific configuration for `create_display_video360_advertiser_link_proposal` # @return [::Gapic::Config::Method] # attr_reader :create_display_video360_advertiser_link_proposal ## # RPC-specific configuration for `delete_display_video360_advertiser_link_proposal` # @return [::Gapic::Config::Method] # attr_reader :delete_display_video360_advertiser_link_proposal ## # RPC-specific configuration for `approve_display_video360_advertiser_link_proposal` # @return [::Gapic::Config::Method] # attr_reader :approve_display_video360_advertiser_link_proposal ## # RPC-specific configuration for `cancel_display_video360_advertiser_link_proposal` # @return [::Gapic::Config::Method] # attr_reader :cancel_display_video360_advertiser_link_proposal ## # RPC-specific configuration for `create_custom_dimension` # @return [::Gapic::Config::Method] # attr_reader :create_custom_dimension ## # RPC-specific configuration for `update_custom_dimension` # @return [::Gapic::Config::Method] # attr_reader :update_custom_dimension ## # RPC-specific configuration for `list_custom_dimensions` # @return [::Gapic::Config::Method] # attr_reader :list_custom_dimensions ## # RPC-specific configuration for `archive_custom_dimension` # @return [::Gapic::Config::Method] # attr_reader :archive_custom_dimension ## # RPC-specific configuration for `get_custom_dimension` # @return [::Gapic::Config::Method] # attr_reader :get_custom_dimension ## # RPC-specific configuration for `create_custom_metric` # @return [::Gapic::Config::Method] # attr_reader :create_custom_metric ## # RPC-specific configuration for `update_custom_metric` # @return [::Gapic::Config::Method] # attr_reader :update_custom_metric ## # RPC-specific configuration for `list_custom_metrics` # @return [::Gapic::Config::Method] # attr_reader :list_custom_metrics ## # RPC-specific configuration for `archive_custom_metric` # @return [::Gapic::Config::Method] # attr_reader :archive_custom_metric ## # RPC-specific configuration for `get_custom_metric` # @return [::Gapic::Config::Method] # attr_reader :get_custom_metric ## # RPC-specific configuration for `get_data_retention_settings` # @return [::Gapic::Config::Method] # attr_reader :get_data_retention_settings ## # RPC-specific configuration for `update_data_retention_settings` # @return [::Gapic::Config::Method] # attr_reader :update_data_retention_settings ## # RPC-specific configuration for `create_data_stream` # @return [::Gapic::Config::Method] # attr_reader :create_data_stream ## # RPC-specific configuration for `delete_data_stream` # @return [::Gapic::Config::Method] # attr_reader :delete_data_stream ## # RPC-specific configuration for `update_data_stream` # @return [::Gapic::Config::Method] # attr_reader :update_data_stream ## # RPC-specific configuration for `list_data_streams` # @return [::Gapic::Config::Method] # attr_reader :list_data_streams ## # RPC-specific configuration for `get_data_stream` # @return [::Gapic::Config::Method] # attr_reader :get_data_stream # @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 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 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 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 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 get_measurement_protocol_secret_config = parent_rpcs.get_measurement_protocol_secret if parent_rpcs.respond_to? :get_measurement_protocol_secret @get_measurement_protocol_secret = ::Gapic::Config::Method.new get_measurement_protocol_secret_config list_measurement_protocol_secrets_config = parent_rpcs.list_measurement_protocol_secrets if parent_rpcs.respond_to? :list_measurement_protocol_secrets @list_measurement_protocol_secrets = ::Gapic::Config::Method.new list_measurement_protocol_secrets_config create_measurement_protocol_secret_config = parent_rpcs.create_measurement_protocol_secret if parent_rpcs.respond_to? :create_measurement_protocol_secret @create_measurement_protocol_secret = ::Gapic::Config::Method.new create_measurement_protocol_secret_config delete_measurement_protocol_secret_config = parent_rpcs.delete_measurement_protocol_secret if parent_rpcs.respond_to? :delete_measurement_protocol_secret @delete_measurement_protocol_secret = ::Gapic::Config::Method.new delete_measurement_protocol_secret_config update_measurement_protocol_secret_config = parent_rpcs.update_measurement_protocol_secret if parent_rpcs.respond_to? :update_measurement_protocol_secret @update_measurement_protocol_secret = ::Gapic::Config::Method.new update_measurement_protocol_secret_config acknowledge_user_data_collection_config = parent_rpcs.acknowledge_user_data_collection if parent_rpcs.respond_to? :acknowledge_user_data_collection @acknowledge_user_data_collection = ::Gapic::Config::Method.new acknowledge_user_data_collection_config search_change_history_events_config = parent_rpcs.search_change_history_events if parent_rpcs.respond_to? :search_change_history_events @search_change_history_events = ::Gapic::Config::Method.new search_change_history_events_config get_google_signals_settings_config = parent_rpcs.get_google_signals_settings if parent_rpcs.respond_to? :get_google_signals_settings @get_google_signals_settings = ::Gapic::Config::Method.new get_google_signals_settings_config update_google_signals_settings_config = parent_rpcs.update_google_signals_settings if parent_rpcs.respond_to? :update_google_signals_settings @update_google_signals_settings = ::Gapic::Config::Method.new update_google_signals_settings_config create_conversion_event_config = parent_rpcs.create_conversion_event if parent_rpcs.respond_to? :create_conversion_event @create_conversion_event = ::Gapic::Config::Method.new create_conversion_event_config get_conversion_event_config = parent_rpcs.get_conversion_event if parent_rpcs.respond_to? :get_conversion_event @get_conversion_event = ::Gapic::Config::Method.new get_conversion_event_config delete_conversion_event_config = parent_rpcs.delete_conversion_event if parent_rpcs.respond_to? :delete_conversion_event @delete_conversion_event = ::Gapic::Config::Method.new delete_conversion_event_config list_conversion_events_config = parent_rpcs.list_conversion_events if parent_rpcs.respond_to? :list_conversion_events @list_conversion_events = ::Gapic::Config::Method.new list_conversion_events_config get_display_video360_advertiser_link_config = parent_rpcs.get_display_video360_advertiser_link if parent_rpcs.respond_to? :get_display_video360_advertiser_link @get_display_video360_advertiser_link = ::Gapic::Config::Method.new get_display_video360_advertiser_link_config list_display_video360_advertiser_links_config = parent_rpcs.list_display_video360_advertiser_links if parent_rpcs.respond_to? :list_display_video360_advertiser_links @list_display_video360_advertiser_links = ::Gapic::Config::Method.new list_display_video360_advertiser_links_config create_display_video360_advertiser_link_config = parent_rpcs.create_display_video360_advertiser_link if parent_rpcs.respond_to? :create_display_video360_advertiser_link @create_display_video360_advertiser_link = ::Gapic::Config::Method.new create_display_video360_advertiser_link_config delete_display_video360_advertiser_link_config = parent_rpcs.delete_display_video360_advertiser_link if parent_rpcs.respond_to? :delete_display_video360_advertiser_link @delete_display_video360_advertiser_link = ::Gapic::Config::Method.new delete_display_video360_advertiser_link_config update_display_video360_advertiser_link_config = parent_rpcs.update_display_video360_advertiser_link if parent_rpcs.respond_to? :update_display_video360_advertiser_link @update_display_video360_advertiser_link = ::Gapic::Config::Method.new update_display_video360_advertiser_link_config get_display_video360_advertiser_link_proposal_config = parent_rpcs.get_display_video360_advertiser_link_proposal if parent_rpcs.respond_to? :get_display_video360_advertiser_link_proposal @get_display_video360_advertiser_link_proposal = ::Gapic::Config::Method.new get_display_video360_advertiser_link_proposal_config list_display_video360_advertiser_link_proposals_config = parent_rpcs.list_display_video360_advertiser_link_proposals if parent_rpcs.respond_to? :list_display_video360_advertiser_link_proposals @list_display_video360_advertiser_link_proposals = ::Gapic::Config::Method.new list_display_video360_advertiser_link_proposals_config create_display_video360_advertiser_link_proposal_config = parent_rpcs.create_display_video360_advertiser_link_proposal if parent_rpcs.respond_to? :create_display_video360_advertiser_link_proposal @create_display_video360_advertiser_link_proposal = ::Gapic::Config::Method.new create_display_video360_advertiser_link_proposal_config delete_display_video360_advertiser_link_proposal_config = parent_rpcs.delete_display_video360_advertiser_link_proposal if parent_rpcs.respond_to? :delete_display_video360_advertiser_link_proposal @delete_display_video360_advertiser_link_proposal = ::Gapic::Config::Method.new delete_display_video360_advertiser_link_proposal_config approve_display_video360_advertiser_link_proposal_config = parent_rpcs.approve_display_video360_advertiser_link_proposal if parent_rpcs.respond_to? :approve_display_video360_advertiser_link_proposal @approve_display_video360_advertiser_link_proposal = ::Gapic::Config::Method.new approve_display_video360_advertiser_link_proposal_config cancel_display_video360_advertiser_link_proposal_config = parent_rpcs.cancel_display_video360_advertiser_link_proposal if parent_rpcs.respond_to? :cancel_display_video360_advertiser_link_proposal @cancel_display_video360_advertiser_link_proposal = ::Gapic::Config::Method.new cancel_display_video360_advertiser_link_proposal_config create_custom_dimension_config = parent_rpcs.create_custom_dimension if parent_rpcs.respond_to? :create_custom_dimension @create_custom_dimension = ::Gapic::Config::Method.new create_custom_dimension_config update_custom_dimension_config = parent_rpcs.update_custom_dimension if parent_rpcs.respond_to? :update_custom_dimension @update_custom_dimension = ::Gapic::Config::Method.new update_custom_dimension_config list_custom_dimensions_config = parent_rpcs.list_custom_dimensions if parent_rpcs.respond_to? :list_custom_dimensions @list_custom_dimensions = ::Gapic::Config::Method.new list_custom_dimensions_config archive_custom_dimension_config = parent_rpcs.archive_custom_dimension if parent_rpcs.respond_to? :archive_custom_dimension @archive_custom_dimension = ::Gapic::Config::Method.new archive_custom_dimension_config get_custom_dimension_config = parent_rpcs.get_custom_dimension if parent_rpcs.respond_to? :get_custom_dimension @get_custom_dimension = ::Gapic::Config::Method.new get_custom_dimension_config create_custom_metric_config = parent_rpcs.create_custom_metric if parent_rpcs.respond_to? :create_custom_metric @create_custom_metric = ::Gapic::Config::Method.new create_custom_metric_config update_custom_metric_config = parent_rpcs.update_custom_metric if parent_rpcs.respond_to? :update_custom_metric @update_custom_metric = ::Gapic::Config::Method.new update_custom_metric_config list_custom_metrics_config = parent_rpcs.list_custom_metrics if parent_rpcs.respond_to? :list_custom_metrics @list_custom_metrics = ::Gapic::Config::Method.new list_custom_metrics_config archive_custom_metric_config = parent_rpcs.archive_custom_metric if parent_rpcs.respond_to? :archive_custom_metric @archive_custom_metric = ::Gapic::Config::Method.new archive_custom_metric_config get_custom_metric_config = parent_rpcs.get_custom_metric if parent_rpcs.respond_to? :get_custom_metric @get_custom_metric = ::Gapic::Config::Method.new get_custom_metric_config get_data_retention_settings_config = parent_rpcs.get_data_retention_settings if parent_rpcs.respond_to? :get_data_retention_settings @get_data_retention_settings = ::Gapic::Config::Method.new get_data_retention_settings_config update_data_retention_settings_config = parent_rpcs.update_data_retention_settings if parent_rpcs.respond_to? :update_data_retention_settings @update_data_retention_settings = ::Gapic::Config::Method.new update_data_retention_settings_config create_data_stream_config = parent_rpcs.create_data_stream if parent_rpcs.respond_to? :create_data_stream @create_data_stream = ::Gapic::Config::Method.new create_data_stream_config delete_data_stream_config = parent_rpcs.delete_data_stream if parent_rpcs.respond_to? :delete_data_stream @delete_data_stream = ::Gapic::Config::Method.new delete_data_stream_config update_data_stream_config = parent_rpcs.update_data_stream if parent_rpcs.respond_to? :update_data_stream @update_data_stream = ::Gapic::Config::Method.new update_data_stream_config list_data_streams_config = parent_rpcs.list_data_streams if parent_rpcs.respond_to? :list_data_streams @list_data_streams = ::Gapic::Config::Method.new list_data_streams_config get_data_stream_config = parent_rpcs.get_data_stream if parent_rpcs.respond_to? :get_data_stream @get_data_stream = ::Gapic::Config::Method.new get_data_stream_config yield self if block_given? end end end end end end end end end