Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions google-analytics-admin-v1alpha/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
"snippets/analytics_admin_service/update_measurement_protocol_secret.rb",
"snippets/analytics_admin_service/update_property.rb",
"snippets/analytics_admin_service/update_reporting_data_annotation.rb",
"snippets/analytics_admin_service/update_reporting_identity_settings.rb",
"snippets/analytics_admin_service/update_search_ads360_link.rb",
"snippets/analytics_admin_service/update_sk_ad_network_conversion_value_schema.rb",
"snippets/analytics_admin_service/update_subproperty_event_filter.rb",
Expand Down
5 changes: 5 additions & 0 deletions google-analytics-admin-v1alpha/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,11 @@
"get_reporting_identity_settings"
]
},
"UpdateReportingIdentitySettings": {
"methods": [
"update_reporting_identity_settings"
]
},
"GetUserProvidedDataSettings": {
"methods": [
"get_user_provided_data_settings"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14448,6 +14448,98 @@ def get_reporting_identity_settings request, options = nil
raise ::Google::Cloud::Error.from_error(e)
end

##
# Updates the reporting identity settings for this property.
#
# @overload update_reporting_identity_settings(request, options = nil)
# Pass arguments to `update_reporting_identity_settings` via a request object, either of type
# {::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest} or an equivalent Hash.
#
# @param request [::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest, ::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_reporting_identity_settings(reporting_identity_settings: nil, update_mask: nil)
# Pass arguments to `update_reporting_identity_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 reporting_identity_settings [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings, ::Hash]
# Required. The reporting identity settings to update.
# The settings' `name` field is used to identify the settings.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Optional. The list of fields to be updated. Field names must be in snake
# case (for example, "field_to_update"). Omitted fields will not be updated.
# To replace the entire entity, use one path with the string "*" to match all
# fields. If omitted, the service will treat it as an implied field mask
# equivalent to all fields that are populated.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings]
# @yieldparam operation [::GRPC::ActiveCall::Operation]
#
# @return [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings]
#
# @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::UpdateReportingIdentitySettingsRequest.new
#
# # Call the update_reporting_identity_settings method.
# result = client.update_reporting_identity_settings request
#
# # The returned object is of type Google::Analytics::Admin::V1alpha::ReportingIdentitySettings.
# p result
#
def update_reporting_identity_settings request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?

request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest

# 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_reporting_identity_settings.metadata.to_h

# Set x-goog-api-client, x-goog-user-project and x-goog-api-version 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-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

header_params = {}
if request.reporting_identity_settings&.name
header_params["reporting_identity_settings.name"] = request.reporting_identity_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_reporting_identity_settings.timeout,
metadata: metadata,
retry_policy: @config.rpcs.update_reporting_identity_settings.retry_policy

options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy

@analytics_admin_service_stub.call_rpc :update_reporting_identity_settings, request, options: options do |response, operation|
yield response, operation if block_given?
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end

##
# Looks up settings related to user-provided data for a property.
#
Expand Down Expand Up @@ -15490,6 +15582,11 @@ class Rpcs
#
attr_reader :get_reporting_identity_settings
##
# RPC-specific configuration for `update_reporting_identity_settings`
# @return [::Gapic::Config::Method]
#
attr_reader :update_reporting_identity_settings
##
# RPC-specific configuration for `get_user_provided_data_settings`
# @return [::Gapic::Config::Method]
#
Expand Down Expand Up @@ -15805,6 +15902,8 @@ def initialize parent_rpcs = nil
@get_subproperty_sync_config = ::Gapic::Config::Method.new get_subproperty_sync_config_config
get_reporting_identity_settings_config = parent_rpcs.get_reporting_identity_settings if parent_rpcs.respond_to? :get_reporting_identity_settings
@get_reporting_identity_settings = ::Gapic::Config::Method.new get_reporting_identity_settings_config
update_reporting_identity_settings_config = parent_rpcs.update_reporting_identity_settings if parent_rpcs.respond_to? :update_reporting_identity_settings
@update_reporting_identity_settings = ::Gapic::Config::Method.new update_reporting_identity_settings_config
get_user_provided_data_settings_config = parent_rpcs.get_user_provided_data_settings if parent_rpcs.respond_to? :get_user_provided_data_settings
@get_user_provided_data_settings = ::Gapic::Config::Method.new get_user_provided_data_settings_config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13409,6 +13409,91 @@ def get_reporting_identity_settings request, options = nil
raise ::Google::Cloud::Error.from_error(e)
end

##
# Updates the reporting identity settings for this property.
#
# @overload update_reporting_identity_settings(request, options = nil)
# Pass arguments to `update_reporting_identity_settings` via a request object, either of type
# {::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest} or an equivalent Hash.
#
# @param request [::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest, ::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_reporting_identity_settings(reporting_identity_settings: nil, update_mask: nil)
# Pass arguments to `update_reporting_identity_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 reporting_identity_settings [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings, ::Hash]
# Required. The reporting identity settings to update.
# The settings' `name` field is used to identify the settings.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Optional. The list of fields to be updated. Field names must be in snake
# case (for example, "field_to_update"). Omitted fields will not be updated.
# To replace the entire entity, use one path with the string "*" to match all
# fields. If omitted, the service will treat it as an implied field mask
# equivalent to all fields that are populated.
# @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings]
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings]
#
# @raise [::Google::Cloud::Error] if the REST call 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::Rest::Client.new
#
# # Create a request. To set request fields, pass in keyword arguments.
# request = Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest.new
#
# # Call the update_reporting_identity_settings method.
# result = client.update_reporting_identity_settings request
#
# # The returned object is of type Google::Analytics::Admin::V1alpha::ReportingIdentitySettings.
# p result
#
def update_reporting_identity_settings request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?

request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest

# 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
call_metadata = @config.rpcs.update_reporting_identity_settings.metadata.to_h

# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_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,
transports_version_send: [:rest]

call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

options.apply_defaults timeout: @config.rpcs.update_reporting_identity_settings.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.update_reporting_identity_settings.retry_policy

options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy

@analytics_admin_service_stub.update_reporting_identity_settings request, options do |result, operation|
yield result, operation if block_given?
end
rescue ::Gapic::Rest::Error => e
raise ::Google::Cloud::Error.from_error(e)
end

##
# Looks up settings related to user-provided data for a property.
#
Expand Down Expand Up @@ -14407,6 +14492,11 @@ class Rpcs
#
attr_reader :get_reporting_identity_settings
##
# RPC-specific configuration for `update_reporting_identity_settings`
# @return [::Gapic::Config::Method]
#
attr_reader :update_reporting_identity_settings
##
# RPC-specific configuration for `get_user_provided_data_settings`
# @return [::Gapic::Config::Method]
#
Expand Down Expand Up @@ -14722,6 +14812,8 @@ def initialize parent_rpcs = nil
@get_subproperty_sync_config = ::Gapic::Config::Method.new get_subproperty_sync_config_config
get_reporting_identity_settings_config = parent_rpcs.get_reporting_identity_settings if parent_rpcs.respond_to? :get_reporting_identity_settings
@get_reporting_identity_settings = ::Gapic::Config::Method.new get_reporting_identity_settings_config
update_reporting_identity_settings_config = parent_rpcs.update_reporting_identity_settings if parent_rpcs.respond_to? :update_reporting_identity_settings
@update_reporting_identity_settings = ::Gapic::Config::Method.new update_reporting_identity_settings_config
get_user_provided_data_settings_config = parent_rpcs.get_user_provided_data_settings if parent_rpcs.respond_to? :get_user_provided_data_settings
@get_user_provided_data_settings = ::Gapic::Config::Method.new get_user_provided_data_settings_config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6233,6 +6233,46 @@ def get_reporting_identity_settings request_pb, options = nil
end
end

##
# Baseline implementation for the update_reporting_identity_settings REST call
#
# @param request_pb [::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest]
# A request object representing the call parameters. Required.
# @param options [::Gapic::CallOptions]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
# @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings]
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings]
# A result object deserialized from the server's reply
def update_reporting_identity_settings request_pb, options = nil
raise ::ArgumentError, "request must be provided" if request_pb.nil?

verb, uri, query_string_params, body = ServiceStub.transcode_update_reporting_identity_settings_request request_pb
query_string_params = if query_string_params.any?
query_string_params.to_h { |p| p.split "=", 2 }
else
{}
end

response = @client_stub.make_http_request(
verb,
uri: uri,
body: body || "",
params: query_string_params,
method_name: "update_reporting_identity_settings",
options: options
)
operation = ::Gapic::Rest::TransportOperation.new response
result = ::Google::Analytics::Admin::V1alpha::ReportingIdentitySettings.decode_json response.body, ignore_unknown_fields: true
catch :response do
yield result, operation if block_given?
result
end
end

##
# Baseline implementation for the get_user_provided_data_settings REST call
#
Expand Down Expand Up @@ -9638,6 +9678,28 @@ def self.transcode_get_reporting_identity_settings_request request_pb
transcoder.transcode request_pb
end

##
# @private
#
# GRPC transcoding helper method for the update_reporting_identity_settings REST call
#
# @param request_pb [::Google::Analytics::Admin::V1alpha::UpdateReportingIdentitySettingsRequest]
# A request object representing the call parameters. Required.
# @return [Array(String, [String, nil], Hash{String => String})]
# Uri, Body, Query string parameters
def self.transcode_update_reporting_identity_settings_request request_pb
transcoder = Gapic::Rest::GrpcTranscoder.new
.with_bindings(
uri_method: :patch,
uri_template: "/v1alpha/{reporting_identity_settings.name}",
body: "reporting_identity_settings",
matches: [
["reporting_identity_settings.name", %r{^properties/[^/]+/reportingIdentitySettings/?$}, false]
]
)
transcoder.transcode request_pb
end

##
# @private
#
Expand Down
Loading
Loading