google-analytics-admin-v1alpha 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13427,7 +13427,7 @@ module Google
13427
13427
  # @param options [::Gapic::CallOptions, ::Hash]
13428
13428
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
13429
13429
  #
13430
- # @overload provision_subproperty(subproperty: nil, subproperty_event_filter: nil)
13430
+ # @overload provision_subproperty(subproperty: nil, subproperty_event_filter: nil, custom_dimension_and_metric_synchronization_mode: nil)
13431
13431
  # Pass arguments to `provision_subproperty` via keyword arguments. Note that at
13432
13432
  # least one keyword argument is required. To specify no parameters, or to keep all
13433
13433
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -13436,6 +13436,9 @@ module Google
13436
13436
  # Required. The subproperty to create.
13437
13437
  # @param subproperty_event_filter [::Google::Analytics::Admin::V1alpha::SubpropertyEventFilter, ::Hash]
13438
13438
  # Optional. The subproperty event filter to create on an ordinary property.
13439
+ # @param custom_dimension_and_metric_synchronization_mode [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig::SynchronizationMode]
13440
+ # Optional. The subproperty feature synchronization mode for Custom
13441
+ # Dimensions and Metrics
13439
13442
  #
13440
13443
  # @yield [response, operation] Access the result along with the RPC operation
13441
13444
  # @yieldparam response [::Google::Analytics::Admin::V1alpha::ProvisionSubpropertyResponse]
@@ -14560,6 +14563,288 @@ module Google
14560
14563
  raise ::Google::Cloud::Error.from_error(e)
14561
14564
  end
14562
14565
 
14566
+ ##
14567
+ # List all Subproperty Sync Configs on a property.
14568
+ #
14569
+ # @overload list_subproperty_sync_configs(request, options = nil)
14570
+ # Pass arguments to `list_subproperty_sync_configs` via a request object, either of type
14571
+ # {::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest} or an equivalent Hash.
14572
+ #
14573
+ # @param request [::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest, ::Hash]
14574
+ # A request object representing the call parameters. Required. To specify no
14575
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
14576
+ # @param options [::Gapic::CallOptions, ::Hash]
14577
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
14578
+ #
14579
+ # @overload list_subproperty_sync_configs(parent: nil, page_size: nil, page_token: nil)
14580
+ # Pass arguments to `list_subproperty_sync_configs` via keyword arguments. Note that at
14581
+ # least one keyword argument is required. To specify no parameters, or to keep all
14582
+ # the default parameter values, pass an empty Hash as a request object (see above).
14583
+ #
14584
+ # @param parent [::String]
14585
+ # Required. Resource name of the property.
14586
+ # Format: properties/property_id
14587
+ # Example: properties/123
14588
+ # @param page_size [::Integer]
14589
+ # Optional. The maximum number of resources to return. The service may return
14590
+ # fewer than this value, even if there are additional pages. If unspecified,
14591
+ # at most 50 resources will be returned. The maximum value is 200; (higher
14592
+ # values will be coerced to the maximum)
14593
+ # @param page_token [::String]
14594
+ # Optional. A page token, received from a previous
14595
+ # `ListSubpropertySyncConfig` call. Provide this to retrieve the subsequent
14596
+ # page. When paginating, all other parameters provided to
14597
+ # `ListSubpropertySyncConfig` must match the call that provided the page
14598
+ # token.
14599
+ #
14600
+ # @yield [response, operation] Access the result along with the RPC operation
14601
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig>]
14602
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
14603
+ #
14604
+ # @return [::Gapic::PagedEnumerable<::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig>]
14605
+ #
14606
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
14607
+ #
14608
+ # @example Basic example
14609
+ # require "google/analytics/admin/v1alpha"
14610
+ #
14611
+ # # Create a client object. The client can be reused for multiple calls.
14612
+ # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
14613
+ #
14614
+ # # Create a request. To set request fields, pass in keyword arguments.
14615
+ # request = Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest.new
14616
+ #
14617
+ # # Call the list_subproperty_sync_configs method.
14618
+ # result = client.list_subproperty_sync_configs request
14619
+ #
14620
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
14621
+ # # over elements, and API calls will be issued to fetch pages as needed.
14622
+ # result.each do |item|
14623
+ # # Each element is of type ::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.
14624
+ # p item
14625
+ # end
14626
+ #
14627
+ def list_subproperty_sync_configs request, options = nil
14628
+ raise ::ArgumentError, "request must be provided" if request.nil?
14629
+
14630
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::ListSubpropertySyncConfigsRequest
14631
+
14632
+ # Converts hash and nil to an options object
14633
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
14634
+
14635
+ # Customize the options with defaults
14636
+ metadata = @config.rpcs.list_subproperty_sync_configs.metadata.to_h
14637
+
14638
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
14639
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
14640
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
14641
+ gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
14642
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
14643
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
14644
+
14645
+ header_params = {}
14646
+ if request.parent
14647
+ header_params["parent"] = request.parent
14648
+ end
14649
+
14650
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
14651
+ metadata[:"x-goog-request-params"] ||= request_params_header
14652
+
14653
+ options.apply_defaults timeout: @config.rpcs.list_subproperty_sync_configs.timeout,
14654
+ metadata: metadata,
14655
+ retry_policy: @config.rpcs.list_subproperty_sync_configs.retry_policy
14656
+
14657
+ options.apply_defaults timeout: @config.timeout,
14658
+ metadata: @config.metadata,
14659
+ retry_policy: @config.retry_policy
14660
+
14661
+ @analytics_admin_service_stub.call_rpc :list_subproperty_sync_configs, request, options: options do |response, operation|
14662
+ response = ::Gapic::PagedEnumerable.new @analytics_admin_service_stub, :list_subproperty_sync_configs, request, response, operation, options
14663
+ yield response, operation if block_given?
14664
+ throw :response, response
14665
+ end
14666
+ rescue ::GRPC::BadStatus => e
14667
+ raise ::Google::Cloud::Error.from_error(e)
14668
+ end
14669
+
14670
+ ##
14671
+ # Updates a Subproperty Sync Config.
14672
+ #
14673
+ # @overload update_subproperty_sync_config(request, options = nil)
14674
+ # Pass arguments to `update_subproperty_sync_config` via a request object, either of type
14675
+ # {::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest} or an equivalent Hash.
14676
+ #
14677
+ # @param request [::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest, ::Hash]
14678
+ # A request object representing the call parameters. Required. To specify no
14679
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
14680
+ # @param options [::Gapic::CallOptions, ::Hash]
14681
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
14682
+ #
14683
+ # @overload update_subproperty_sync_config(subproperty_sync_config: nil, update_mask: nil)
14684
+ # Pass arguments to `update_subproperty_sync_config` via keyword arguments. Note that at
14685
+ # least one keyword argument is required. To specify no parameters, or to keep all
14686
+ # the default parameter values, pass an empty Hash as a request object (see above).
14687
+ #
14688
+ # @param subproperty_sync_config [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig, ::Hash]
14689
+ # Required. The SubpropertySyncConfig to update.
14690
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
14691
+ # Optional. The list of fields to update. Field names must be in snake case
14692
+ # (for example, "field_to_update"). Omitted fields will not be updated. To
14693
+ # replace the entire entity, use one path with the string "*" to match all
14694
+ # fields.
14695
+ #
14696
+ # @yield [response, operation] Access the result along with the RPC operation
14697
+ # @yieldparam response [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig]
14698
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
14699
+ #
14700
+ # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig]
14701
+ #
14702
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
14703
+ #
14704
+ # @example Basic example
14705
+ # require "google/analytics/admin/v1alpha"
14706
+ #
14707
+ # # Create a client object. The client can be reused for multiple calls.
14708
+ # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
14709
+ #
14710
+ # # Create a request. To set request fields, pass in keyword arguments.
14711
+ # request = Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest.new
14712
+ #
14713
+ # # Call the update_subproperty_sync_config method.
14714
+ # result = client.update_subproperty_sync_config request
14715
+ #
14716
+ # # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.
14717
+ # p result
14718
+ #
14719
+ def update_subproperty_sync_config request, options = nil
14720
+ raise ::ArgumentError, "request must be provided" if request.nil?
14721
+
14722
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::UpdateSubpropertySyncConfigRequest
14723
+
14724
+ # Converts hash and nil to an options object
14725
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
14726
+
14727
+ # Customize the options with defaults
14728
+ metadata = @config.rpcs.update_subproperty_sync_config.metadata.to_h
14729
+
14730
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
14731
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
14732
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
14733
+ gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
14734
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
14735
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
14736
+
14737
+ header_params = {}
14738
+ if request.subproperty_sync_config&.name
14739
+ header_params["subproperty_sync_config.name"] = request.subproperty_sync_config.name
14740
+ end
14741
+
14742
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
14743
+ metadata[:"x-goog-request-params"] ||= request_params_header
14744
+
14745
+ options.apply_defaults timeout: @config.rpcs.update_subproperty_sync_config.timeout,
14746
+ metadata: metadata,
14747
+ retry_policy: @config.rpcs.update_subproperty_sync_config.retry_policy
14748
+
14749
+ options.apply_defaults timeout: @config.timeout,
14750
+ metadata: @config.metadata,
14751
+ retry_policy: @config.retry_policy
14752
+
14753
+ @analytics_admin_service_stub.call_rpc :update_subproperty_sync_config, request, options: options do |response, operation|
14754
+ yield response, operation if block_given?
14755
+ end
14756
+ rescue ::GRPC::BadStatus => e
14757
+ raise ::Google::Cloud::Error.from_error(e)
14758
+ end
14759
+
14760
+ ##
14761
+ # Lookup for a single Subproperty Sync Config.
14762
+ #
14763
+ # @overload get_subproperty_sync_config(request, options = nil)
14764
+ # Pass arguments to `get_subproperty_sync_config` via a request object, either of type
14765
+ # {::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest} or an equivalent Hash.
14766
+ #
14767
+ # @param request [::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest, ::Hash]
14768
+ # A request object representing the call parameters. Required. To specify no
14769
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
14770
+ # @param options [::Gapic::CallOptions, ::Hash]
14771
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
14772
+ #
14773
+ # @overload get_subproperty_sync_config(name: nil)
14774
+ # Pass arguments to `get_subproperty_sync_config` via keyword arguments. Note that at
14775
+ # least one keyword argument is required. To specify no parameters, or to keep all
14776
+ # the default parameter values, pass an empty Hash as a request object (see above).
14777
+ #
14778
+ # @param name [::String]
14779
+ # Required. Resource name of the SubpropertySyncConfig to lookup.
14780
+ # Format:
14781
+ # properties/\\{ordinary_property_id}/subpropertySyncConfigs/\\{subproperty_id}
14782
+ # Example: properties/1234/subpropertySyncConfigs/5678
14783
+ #
14784
+ # @yield [response, operation] Access the result along with the RPC operation
14785
+ # @yieldparam response [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig]
14786
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
14787
+ #
14788
+ # @return [::Google::Analytics::Admin::V1alpha::SubpropertySyncConfig]
14789
+ #
14790
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
14791
+ #
14792
+ # @example Basic example
14793
+ # require "google/analytics/admin/v1alpha"
14794
+ #
14795
+ # # Create a client object. The client can be reused for multiple calls.
14796
+ # client = Google::Analytics::Admin::V1alpha::AnalyticsAdminService::Client.new
14797
+ #
14798
+ # # Create a request. To set request fields, pass in keyword arguments.
14799
+ # request = Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest.new
14800
+ #
14801
+ # # Call the get_subproperty_sync_config method.
14802
+ # result = client.get_subproperty_sync_config request
14803
+ #
14804
+ # # The returned object is of type Google::Analytics::Admin::V1alpha::SubpropertySyncConfig.
14805
+ # p result
14806
+ #
14807
+ def get_subproperty_sync_config request, options = nil
14808
+ raise ::ArgumentError, "request must be provided" if request.nil?
14809
+
14810
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Analytics::Admin::V1alpha::GetSubpropertySyncConfigRequest
14811
+
14812
+ # Converts hash and nil to an options object
14813
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
14814
+
14815
+ # Customize the options with defaults
14816
+ metadata = @config.rpcs.get_subproperty_sync_config.metadata.to_h
14817
+
14818
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
14819
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
14820
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
14821
+ gapic_version: ::Google::Analytics::Admin::V1alpha::VERSION
14822
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
14823
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
14824
+
14825
+ header_params = {}
14826
+ if request.name
14827
+ header_params["name"] = request.name
14828
+ end
14829
+
14830
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
14831
+ metadata[:"x-goog-request-params"] ||= request_params_header
14832
+
14833
+ options.apply_defaults timeout: @config.rpcs.get_subproperty_sync_config.timeout,
14834
+ metadata: metadata,
14835
+ retry_policy: @config.rpcs.get_subproperty_sync_config.retry_policy
14836
+
14837
+ options.apply_defaults timeout: @config.timeout,
14838
+ metadata: @config.metadata,
14839
+ retry_policy: @config.retry_policy
14840
+
14841
+ @analytics_admin_service_stub.call_rpc :get_subproperty_sync_config, request, options: options do |response, operation|
14842
+ yield response, operation if block_given?
14843
+ end
14844
+ rescue ::GRPC::BadStatus => e
14845
+ raise ::Google::Cloud::Error.from_error(e)
14846
+ end
14847
+
14563
14848
  ##
14564
14849
  # Configuration class for the AnalyticsAdminService API.
14565
14850
  #
@@ -15506,6 +15791,21 @@ module Google
15506
15791
  # @return [::Gapic::Config::Method]
15507
15792
  #
15508
15793
  attr_reader :submit_user_deletion
15794
+ ##
15795
+ # RPC-specific configuration for `list_subproperty_sync_configs`
15796
+ # @return [::Gapic::Config::Method]
15797
+ #
15798
+ attr_reader :list_subproperty_sync_configs
15799
+ ##
15800
+ # RPC-specific configuration for `update_subproperty_sync_config`
15801
+ # @return [::Gapic::Config::Method]
15802
+ #
15803
+ attr_reader :update_subproperty_sync_config
15804
+ ##
15805
+ # RPC-specific configuration for `get_subproperty_sync_config`
15806
+ # @return [::Gapic::Config::Method]
15807
+ #
15808
+ attr_reader :get_subproperty_sync_config
15509
15809
 
15510
15810
  # @private
15511
15811
  def initialize parent_rpcs = nil
@@ -15821,6 +16121,12 @@ module Google
15821
16121
  @delete_reporting_data_annotation = ::Gapic::Config::Method.new delete_reporting_data_annotation_config
15822
16122
  submit_user_deletion_config = parent_rpcs.submit_user_deletion if parent_rpcs.respond_to? :submit_user_deletion
15823
16123
  @submit_user_deletion = ::Gapic::Config::Method.new submit_user_deletion_config
16124
+ list_subproperty_sync_configs_config = parent_rpcs.list_subproperty_sync_configs if parent_rpcs.respond_to? :list_subproperty_sync_configs
16125
+ @list_subproperty_sync_configs = ::Gapic::Config::Method.new list_subproperty_sync_configs_config
16126
+ update_subproperty_sync_config_config = parent_rpcs.update_subproperty_sync_config if parent_rpcs.respond_to? :update_subproperty_sync_config
16127
+ @update_subproperty_sync_config = ::Gapic::Config::Method.new update_subproperty_sync_config_config
16128
+ get_subproperty_sync_config_config = parent_rpcs.get_subproperty_sync_config if parent_rpcs.respond_to? :get_subproperty_sync_config
16129
+ @get_subproperty_sync_config = ::Gapic::Config::Method.new get_subproperty_sync_config_config
15824
16130
 
15825
16131
  yield self if block_given?
15826
16132
  end
@@ -611,6 +611,23 @@ module Google
611
611
  "properties/#{property}/subpropertyEventFilters/#{sub_property_event_filter}"
612
612
  end
613
613
 
614
+ ##
615
+ # Create a fully-qualified SubpropertySyncConfig resource string.
616
+ #
617
+ # The resource will be in the following format:
618
+ #
619
+ # `properties/{property}/subpropertySyncConfigs/{subproperty_sync_config}`
620
+ #
621
+ # @param property [String]
622
+ # @param subproperty_sync_config [String]
623
+ #
624
+ # @return [::String]
625
+ def subproperty_sync_config_path property:, subproperty_sync_config:
626
+ raise ::ArgumentError, "property cannot contain /" if property.to_s.include? "/"
627
+
628
+ "properties/#{property}/subpropertySyncConfigs/#{subproperty_sync_config}"
629
+ end
630
+
614
631
  extend self
615
632
  end
616
633
  end