google-ads-data_manager-v1 0.8.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c4a133ecbaed63fa287267a932ecaf5a759c0c43e9e69f3bef6e5f00d8ec886
4
- data.tar.gz: 52e36bc99791e5dfa32403ee148b680c946659053753e29b3754594be0ce7cb5
3
+ metadata.gz: 6a5e1aae8dd667b2fbd959b7076cbdcf54b95fc1e20a670f7bf63a2ebdbc696c
4
+ data.tar.gz: e1fbb07ec8293ee8e1cf754e0c431b028339d852706713a9d1169d3361d6c234
5
5
  SHA512:
6
- metadata.gz: ace93a31945313a7d50ce33f288052e76ef80ef2fef9d4c7b296df873252578506ce184980e0033b46f275d8086a47a722e11d9bd582f67d8f66e3fcabc98b0a
7
- data.tar.gz: 267d93d142d0326ad88b1089221de0f2106269f53b6fc7036e4931018464bd56c3cdc6f72d463b30f4d159129bed8ca1368f7852219d761e502076b77ab4a028
6
+ metadata.gz: 03bb3e17e1ab57f19057865ea311eb750227b58d7ea32d98d41838a9f4861113a2957da10c1adaa33f24be8cd4813308e160adf6e60f2e5e95f0ceff9eee4daf
7
+ data.tar.gz: efb706fdb752f3b7ae5c4137ea58b4eb366baeb03209e3e527405458ba44f1208d3b52a557112cb6cd160845f6afb8a0e7bf0784f8bc651128fcd8fd7f16ebba
@@ -68,6 +68,36 @@ module Google
68
68
  end
69
69
  default_config = Client::Configuration.new parent_config
70
70
 
71
+ default_config.rpcs.ingest_audience_members.timeout = 120.0
72
+ default_config.rpcs.ingest_audience_members.retry_policy = {
73
+ initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
74
+ }
75
+
76
+ default_config.rpcs.remove_audience_members.timeout = 120.0
77
+ default_config.rpcs.remove_audience_members.retry_policy = {
78
+ initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
79
+ }
80
+
81
+ default_config.rpcs.ingest_events.timeout = 120.0
82
+ default_config.rpcs.ingest_events.retry_policy = {
83
+ initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
84
+ }
85
+
86
+ default_config.rpcs.ingest_users.timeout = 120.0
87
+ default_config.rpcs.ingest_users.retry_policy = {
88
+ initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
89
+ }
90
+
91
+ default_config.rpcs.remove_users.timeout = 120.0
92
+ default_config.rpcs.remove_users.retry_policy = {
93
+ initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
94
+ }
95
+
96
+ default_config.rpcs.retrieve_request_status.timeout = 60.0
97
+ default_config.rpcs.retrieve_request_status.retry_policy = {
98
+ initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
99
+ }
100
+
71
101
  default_config
72
102
  end
73
103
  yield @configure if block_given?
@@ -215,13 +245,14 @@ module Google
215
245
  # Optional. For testing purposes. If `true`, the request is validated but not
216
246
  # executed. Only errors are returned, not results.
217
247
  # @param encoding [::Google::Ads::DataManager::V1::Encoding]
218
- # Optional. Required for {::Google::Ads::DataManager::V1::UserData UserData}
219
- # uploads. The encoding type of the user identifiers. For hashed user
220
- # identifiers, this is the encoding type of the hashed string. For encrypted
221
- # hashed user identifiers, this is the encoding type of the outer encrypted
222
- # string, but not necessarily the inner hashed string, meaning the inner
223
- # hashed string could be encoded in a different way than the outer encrypted
224
- # string. For non `UserData` uploads, this field is ignored.
248
+ # Optional. Must be provided for
249
+ # {::Google::Ads::DataManager::V1::UserData UserData} uploads. The encoding type
250
+ # of the user identifiers. For hashed user identifiers, this is the encoding
251
+ # type of the hashed string. For encrypted hashed user identifiers, this is
252
+ # the encoding type of the outer encrypted string, but not necessarily the
253
+ # inner hashed string, meaning the inner hashed string could be encoded in a
254
+ # different way than the outer encrypted string. For non `UserData` uploads,
255
+ # this field is ignored.
225
256
  # @param encryption_info [::Google::Ads::DataManager::V1::EncryptionInfo, ::Hash]
226
257
  # Optional. Encryption information for
227
258
  # {::Google::Ads::DataManager::V1::UserData UserData} uploads. If not set, it's
@@ -314,10 +345,10 @@ module Google
314
345
  # Optional. For testing purposes. If `true`, the request is validated but not
315
346
  # executed. Only errors are returned, not results.
316
347
  # @param encoding [::Google::Ads::DataManager::V1::Encoding]
317
- # Optional. Required for {::Google::Ads::DataManager::V1::UserData UserData}
318
- # uploads. The encoding type of the user identifiers. Applies to only the
319
- # outer encoding for encrypted user identifiers. For non `UserData` uploads,
320
- # this field is ignored.
348
+ # Optional. Must be provided for
349
+ # {::Google::Ads::DataManager::V1::UserData UserData} uploads. The encoding type
350
+ # of the user identifiers. Applies to only the outer encoding for encrypted
351
+ # user identifiers. For non `UserData` uploads, this field is ignored.
321
352
  # @param encryption_info [::Google::Ads::DataManager::V1::EncryptionInfo, ::Hash]
322
353
  # Optional. Encryption information for
323
354
  # {::Google::Ads::DataManager::V1::UserData UserData} uploads. If not set, it's
@@ -498,13 +529,14 @@ module Google
498
529
  # Optional. For testing purposes. If `true`, the request is validated but not
499
530
  # executed. Only errors are returned, not results.
500
531
  # @param encoding [::Google::Ads::DataManager::V1::Encoding]
501
- # Optional. Required for {::Google::Ads::DataManager::V1::UserData UserData}
502
- # uploads. The encoding type of the user identifiers. For hashed user
503
- # identifiers, this is the encoding type of the hashed string. For encrypted
504
- # hashed user identifiers, this is the encoding type of the outer encrypted
505
- # string, but not necessarily the inner hashed string, meaning the inner
506
- # hashed string could be encoded in a different way than the outer encrypted
507
- # string. For non `UserData` uploads, this field is ignored.
532
+ # Optional. Must be provided for
533
+ # {::Google::Ads::DataManager::V1::UserData UserData} uploads. The encoding type
534
+ # of the user identifiers. For hashed user identifiers, this is the encoding
535
+ # type of the hashed string. For encrypted hashed user identifiers, this is
536
+ # the encoding type of the outer encrypted string, but not necessarily the
537
+ # inner hashed string, meaning the inner hashed string could be encoded in a
538
+ # different way than the outer encrypted string. For non `UserData` uploads,
539
+ # this field is ignored.
508
540
  # @param encryption_info [::Google::Ads::DataManager::V1::EncryptionInfo, ::Hash]
509
541
  # Optional. Encryption information for
510
542
  # {::Google::Ads::DataManager::V1::UserData UserData} uploads. If not set, it's
@@ -567,6 +599,190 @@ module Google
567
599
  raise ::Google::Cloud::Error.from_error(e)
568
600
  end
569
601
 
602
+ ##
603
+ # Uploads a list of users to the provided destinations. Unlike
604
+ # {::Google::Ads::DataManager::V1::IngestionService::Client#ingest_audience_members IngestAudienceMembers}
605
+ # (which adds users to specific advertiser audience lists for targeting),
606
+ # `IngestUsers` ingests account level identity linkage data (for example,
607
+ # user identifiers linked to mobile IDs) independent of specific audience
608
+ # segments.
609
+ #
610
+ # This feature is only available to accounts on an allowlist.
611
+ #
612
+ # @overload ingest_users(request, options = nil)
613
+ # Pass arguments to `ingest_users` via a request object, either of type
614
+ # {::Google::Ads::DataManager::V1::IngestUsersRequest} or an equivalent Hash.
615
+ #
616
+ # @param request [::Google::Ads::DataManager::V1::IngestUsersRequest, ::Hash]
617
+ # A request object representing the call parameters. Required. To specify no
618
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
619
+ # @param options [::Gapic::CallOptions, ::Hash]
620
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
621
+ #
622
+ # @overload ingest_users(destinations: nil, users: nil, encryption_info: nil, validate_only: nil, encoding: nil)
623
+ # Pass arguments to `ingest_users` via keyword arguments. Note that at
624
+ # least one keyword argument is required. To specify no parameters, or to keep all
625
+ # the default parameter values, pass an empty Hash as a request object (see above).
626
+ #
627
+ # @param destinations [::Array<::Google::Ads::DataManager::V1::Destination, ::Hash>]
628
+ # Required. The list of possible ingestion destinations.
629
+ # @param users [::Array<::Google::Ads::DataManager::V1::User, ::Hash>]
630
+ # Required. The list of users to ingest.
631
+ # @param encryption_info [::Google::Ads::DataManager::V1::EncryptionInfo, ::Hash]
632
+ # Optional. Encryption information about encryption keys which are used to
633
+ # encrypt the data.
634
+ # @param validate_only [::Boolean]
635
+ # Optional. If `true`, the request is validated but not executed.
636
+ # @param encoding [::Google::Ads::DataManager::V1::Encoding]
637
+ # Required. The encoding type of the user identifiers. For encrypted user
638
+ # identifiers, this only applies to the outer encoding.
639
+ #
640
+ # @yield [response, operation] Access the result along with the RPC operation
641
+ # @yieldparam response [::Google::Ads::DataManager::V1::IngestUsersResponse]
642
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
643
+ #
644
+ # @return [::Google::Ads::DataManager::V1::IngestUsersResponse]
645
+ #
646
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
647
+ #
648
+ # @example Basic example
649
+ # require "google/ads/data_manager/v1"
650
+ #
651
+ # # Create a client object. The client can be reused for multiple calls.
652
+ # client = Google::Ads::DataManager::V1::IngestionService::Client.new
653
+ #
654
+ # # Create a request. To set request fields, pass in keyword arguments.
655
+ # request = Google::Ads::DataManager::V1::IngestUsersRequest.new
656
+ #
657
+ # # Call the ingest_users method.
658
+ # result = client.ingest_users request
659
+ #
660
+ # # The returned object is of type Google::Ads::DataManager::V1::IngestUsersResponse.
661
+ # p result
662
+ #
663
+ def ingest_users request, options = nil
664
+ raise ::ArgumentError, "request must be provided" if request.nil?
665
+
666
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::IngestUsersRequest
667
+
668
+ # Converts hash and nil to an options object
669
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
670
+
671
+ # Customize the options with defaults
672
+ metadata = @config.rpcs.ingest_users.metadata.to_h
673
+
674
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
675
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
676
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
677
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
678
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
679
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
680
+
681
+ options.apply_defaults timeout: @config.rpcs.ingest_users.timeout,
682
+ metadata: metadata,
683
+ retry_policy: @config.rpcs.ingest_users.retry_policy
684
+
685
+ options.apply_defaults timeout: @config.timeout,
686
+ metadata: @config.metadata,
687
+ retry_policy: @config.retry_policy
688
+
689
+ @ingestion_service_stub.call_rpc :ingest_users, request, options: options do |response, operation|
690
+ yield response, operation if block_given?
691
+ end
692
+ rescue ::GRPC::BadStatus => e
693
+ raise ::Google::Cloud::Error.from_error(e)
694
+ end
695
+
696
+ ##
697
+ # Removes a list of users from the provided destinations.
698
+ #
699
+ # This feature is only available to accounts on an allowlist.
700
+ #
701
+ # @overload remove_users(request, options = nil)
702
+ # Pass arguments to `remove_users` via a request object, either of type
703
+ # {::Google::Ads::DataManager::V1::RemoveUsersRequest} or an equivalent Hash.
704
+ #
705
+ # @param request [::Google::Ads::DataManager::V1::RemoveUsersRequest, ::Hash]
706
+ # A request object representing the call parameters. Required. To specify no
707
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
708
+ # @param options [::Gapic::CallOptions, ::Hash]
709
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
710
+ #
711
+ # @overload remove_users(destinations: nil, user_data: nil, encryption_info: nil, validate_only: nil, encoding: nil)
712
+ # Pass arguments to `remove_users` via keyword arguments. Note that at
713
+ # least one keyword argument is required. To specify no parameters, or to keep all
714
+ # the default parameter values, pass an empty Hash as a request object (see above).
715
+ #
716
+ # @param destinations [::Array<::Google::Ads::DataManager::V1::Destination, ::Hash>]
717
+ # Required. The list of possible ingestion destinations.
718
+ # @param user_data [::Array<::Google::Ads::DataManager::V1::UserData, ::Hash>]
719
+ # Required. The individual bits of UserData that act as keys for the users to
720
+ # remove.
721
+ # @param encryption_info [::Google::Ads::DataManager::V1::EncryptionInfo, ::Hash]
722
+ # Optional. Encryption information about encryption keys which are used to
723
+ # encrypt the data.
724
+ # @param validate_only [::Boolean]
725
+ # Optional. If `true`, the request is validated but not executed.
726
+ # @param encoding [::Google::Ads::DataManager::V1::Encoding]
727
+ # Required. The encoding type of the user identifiers. For encrypted user
728
+ # identifiers, this only applies to the outer encoding.
729
+ #
730
+ # @yield [response, operation] Access the result along with the RPC operation
731
+ # @yieldparam response [::Google::Ads::DataManager::V1::RemoveUsersResponse]
732
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
733
+ #
734
+ # @return [::Google::Ads::DataManager::V1::RemoveUsersResponse]
735
+ #
736
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
737
+ #
738
+ # @example Basic example
739
+ # require "google/ads/data_manager/v1"
740
+ #
741
+ # # Create a client object. The client can be reused for multiple calls.
742
+ # client = Google::Ads::DataManager::V1::IngestionService::Client.new
743
+ #
744
+ # # Create a request. To set request fields, pass in keyword arguments.
745
+ # request = Google::Ads::DataManager::V1::RemoveUsersRequest.new
746
+ #
747
+ # # Call the remove_users method.
748
+ # result = client.remove_users request
749
+ #
750
+ # # The returned object is of type Google::Ads::DataManager::V1::RemoveUsersResponse.
751
+ # p result
752
+ #
753
+ def remove_users request, options = nil
754
+ raise ::ArgumentError, "request must be provided" if request.nil?
755
+
756
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::DataManager::V1::RemoveUsersRequest
757
+
758
+ # Converts hash and nil to an options object
759
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
760
+
761
+ # Customize the options with defaults
762
+ metadata = @config.rpcs.remove_users.metadata.to_h
763
+
764
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
765
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
766
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
767
+ gapic_version: ::Google::Ads::DataManager::V1::VERSION
768
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
769
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
770
+
771
+ options.apply_defaults timeout: @config.rpcs.remove_users.timeout,
772
+ metadata: metadata,
773
+ retry_policy: @config.rpcs.remove_users.retry_policy
774
+
775
+ options.apply_defaults timeout: @config.timeout,
776
+ metadata: @config.metadata,
777
+ retry_policy: @config.retry_policy
778
+
779
+ @ingestion_service_stub.call_rpc :remove_users, request, options: options do |response, operation|
780
+ yield response, operation if block_given?
781
+ end
782
+ rescue ::GRPC::BadStatus => e
783
+ raise ::Google::Cloud::Error.from_error(e)
784
+ end
785
+
570
786
  ##
571
787
  # Uploads a list of
572
788
  # {::Google::Ads::DataManager::V1::AdEvent AdEvent} resources to Google
@@ -592,8 +808,9 @@ module Google
592
808
  # @param ad_events [::Array<::Google::Ads::DataManager::V1::AdEvent, ::Hash>]
593
809
  # Required. Required (at least 1). A list of ad events.
594
810
  # @param encryption_info [::Google::Ads::DataManager::V1::EncryptionInfo, ::Hash]
595
- # Required. Information about encryption keys which are used to encrypt the
596
- # data.
811
+ # Optional. Information about encryption keys which are used to encrypt the
812
+ # data. This field must be provided when ad events contain
813
+ # {::Google::Ads::DataManager::V1::UserData UserData}.
597
814
  # @param validate_only [::Boolean]
598
815
  # Optional. If true, the request is validated, but not executed.
599
816
  #
@@ -936,6 +1153,16 @@ module Google
936
1153
  #
937
1154
  attr_reader :ingest_events
938
1155
  ##
1156
+ # RPC-specific configuration for `ingest_users`
1157
+ # @return [::Gapic::Config::Method]
1158
+ #
1159
+ attr_reader :ingest_users
1160
+ ##
1161
+ # RPC-specific configuration for `remove_users`
1162
+ # @return [::Gapic::Config::Method]
1163
+ #
1164
+ attr_reader :remove_users
1165
+ ##
939
1166
  # RPC-specific configuration for `ingest_ad_events`
940
1167
  # @return [::Gapic::Config::Method]
941
1168
  #
@@ -956,6 +1183,10 @@ module Google
956
1183
  @remove_all_audience_members = ::Gapic::Config::Method.new remove_all_audience_members_config
957
1184
  ingest_events_config = parent_rpcs.ingest_events if parent_rpcs.respond_to? :ingest_events
958
1185
  @ingest_events = ::Gapic::Config::Method.new ingest_events_config
1186
+ ingest_users_config = parent_rpcs.ingest_users if parent_rpcs.respond_to? :ingest_users
1187
+ @ingest_users = ::Gapic::Config::Method.new ingest_users_config
1188
+ remove_users_config = parent_rpcs.remove_users if parent_rpcs.respond_to? :remove_users
1189
+ @remove_users = ::Gapic::Config::Method.new remove_users_config
959
1190
  ingest_ad_events_config = parent_rpcs.ingest_ad_events if parent_rpcs.respond_to? :ingest_ad_events
960
1191
  @ingest_ad_events = ::Gapic::Config::Method.new ingest_ad_events_config
961
1192
  retrieve_request_status_config = parent_rpcs.retrieve_request_status if parent_rpcs.respond_to? :retrieve_request_status