google-apis-datamanager_v1 0.1.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.
@@ -0,0 +1,184 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module DatamanagerV1
23
+ # Data Manager API
24
+ #
25
+ # A unified ingestion API for data partners, agencies and advertisers to connect
26
+ # first-party data across Google advertising products.
27
+ #
28
+ # @example
29
+ # require 'google/apis/datamanager_v1'
30
+ #
31
+ # Datamanager = Google::Apis::DatamanagerV1 # Alias the module
32
+ # service = Datamanager::DataManagerService.new
33
+ #
34
+ # @see https://developers.google.com/data-manager
35
+ class DataManagerService < Google::Apis::Core::BaseService
36
+ DEFAULT_ENDPOINT_TEMPLATE = "https://datamanager.$UNIVERSE_DOMAIN$/"
37
+
38
+ # @return [String]
39
+ # API key. Your API key identifies your project and provides you with API access,
40
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
41
+ attr_accessor :key
42
+
43
+ # @return [String]
44
+ # Available to use for quota purposes for server-side applications. Can be any
45
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
46
+ attr_accessor :quota_user
47
+
48
+ def initialize
49
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
50
+ client_name: 'google-apis-datamanager_v1',
51
+ client_version: Google::Apis::DatamanagerV1::GEM_VERSION)
52
+ @batch_path = 'batch'
53
+ end
54
+
55
+ # Uploads a list of AudienceMember resources to the provided Destination.
56
+ # @param [Google::Apis::DatamanagerV1::IngestAudienceMembersRequest] ingest_audience_members_request_object
57
+ # @param [String] fields
58
+ # Selector specifying which fields to include in a partial response.
59
+ # @param [String] quota_user
60
+ # Available to use for quota purposes for server-side applications. Can be any
61
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
62
+ # @param [Google::Apis::RequestOptions] options
63
+ # Request-specific options
64
+ #
65
+ # @yield [result, err] Result & error if block supplied
66
+ # @yieldparam result [Google::Apis::DatamanagerV1::IngestAudienceMembersResponse] parsed result object
67
+ # @yieldparam err [StandardError] error object if request failed
68
+ #
69
+ # @return [Google::Apis::DatamanagerV1::IngestAudienceMembersResponse]
70
+ #
71
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
72
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
73
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
74
+ def ingest_audience_members(ingest_audience_members_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
75
+ command = make_simple_command(:post, 'v1/audienceMembers:ingest', options)
76
+ command.request_representation = Google::Apis::DatamanagerV1::IngestAudienceMembersRequest::Representation
77
+ command.request_object = ingest_audience_members_request_object
78
+ command.response_representation = Google::Apis::DatamanagerV1::IngestAudienceMembersResponse::Representation
79
+ command.response_class = Google::Apis::DatamanagerV1::IngestAudienceMembersResponse
80
+ command.query['fields'] = fields unless fields.nil?
81
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
82
+ execute_or_queue_command(command, &block)
83
+ end
84
+
85
+ # Removes a list of AudienceMember resources from the provided Destination.
86
+ # @param [Google::Apis::DatamanagerV1::RemoveAudienceMembersRequest] remove_audience_members_request_object
87
+ # @param [String] fields
88
+ # Selector specifying which fields to include in a partial response.
89
+ # @param [String] quota_user
90
+ # Available to use for quota purposes for server-side applications. Can be any
91
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
92
+ # @param [Google::Apis::RequestOptions] options
93
+ # Request-specific options
94
+ #
95
+ # @yield [result, err] Result & error if block supplied
96
+ # @yieldparam result [Google::Apis::DatamanagerV1::RemoveAudienceMembersResponse] parsed result object
97
+ # @yieldparam err [StandardError] error object if request failed
98
+ #
99
+ # @return [Google::Apis::DatamanagerV1::RemoveAudienceMembersResponse]
100
+ #
101
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
102
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
103
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
104
+ def remove_audience_members(remove_audience_members_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
105
+ command = make_simple_command(:post, 'v1/audienceMembers:remove', options)
106
+ command.request_representation = Google::Apis::DatamanagerV1::RemoveAudienceMembersRequest::Representation
107
+ command.request_object = remove_audience_members_request_object
108
+ command.response_representation = Google::Apis::DatamanagerV1::RemoveAudienceMembersResponse::Representation
109
+ command.response_class = Google::Apis::DatamanagerV1::RemoveAudienceMembersResponse
110
+ command.query['fields'] = fields unless fields.nil?
111
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
112
+ execute_or_queue_command(command, &block)
113
+ end
114
+
115
+ # Uploads a list of Event resources from the provided Destination.
116
+ # @param [Google::Apis::DatamanagerV1::IngestEventsRequest] ingest_events_request_object
117
+ # @param [String] fields
118
+ # Selector specifying which fields to include in a partial response.
119
+ # @param [String] quota_user
120
+ # Available to use for quota purposes for server-side applications. Can be any
121
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
122
+ # @param [Google::Apis::RequestOptions] options
123
+ # Request-specific options
124
+ #
125
+ # @yield [result, err] Result & error if block supplied
126
+ # @yieldparam result [Google::Apis::DatamanagerV1::IngestEventsResponse] parsed result object
127
+ # @yieldparam err [StandardError] error object if request failed
128
+ #
129
+ # @return [Google::Apis::DatamanagerV1::IngestEventsResponse]
130
+ #
131
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
132
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
133
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
134
+ def ingest_events(ingest_events_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
135
+ command = make_simple_command(:post, 'v1/events:ingest', options)
136
+ command.request_representation = Google::Apis::DatamanagerV1::IngestEventsRequest::Representation
137
+ command.request_object = ingest_events_request_object
138
+ command.response_representation = Google::Apis::DatamanagerV1::IngestEventsResponse::Representation
139
+ command.response_class = Google::Apis::DatamanagerV1::IngestEventsResponse
140
+ command.query['fields'] = fields unless fields.nil?
141
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
142
+ execute_or_queue_command(command, &block)
143
+ end
144
+
145
+ # Gets the status of a request given request id.
146
+ # @param [String] request_id
147
+ # Required. Required. The request ID of the Data Manager API request.
148
+ # @param [String] fields
149
+ # Selector specifying which fields to include in a partial response.
150
+ # @param [String] quota_user
151
+ # Available to use for quota purposes for server-side applications. Can be any
152
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
153
+ # @param [Google::Apis::RequestOptions] options
154
+ # Request-specific options
155
+ #
156
+ # @yield [result, err] Result & error if block supplied
157
+ # @yieldparam result [Google::Apis::DatamanagerV1::RetrieveRequestStatusResponse] parsed result object
158
+ # @yieldparam err [StandardError] error object if request failed
159
+ #
160
+ # @return [Google::Apis::DatamanagerV1::RetrieveRequestStatusResponse]
161
+ #
162
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
163
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
164
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
165
+ def retrieve_request_status(request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
166
+ command = make_simple_command(:get, 'v1/requestStatus:retrieve', options)
167
+ command.response_representation = Google::Apis::DatamanagerV1::RetrieveRequestStatusResponse::Representation
168
+ command.response_class = Google::Apis::DatamanagerV1::RetrieveRequestStatusResponse
169
+ command.query['requestId'] = request_id unless request_id.nil?
170
+ command.query['fields'] = fields unless fields.nil?
171
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
172
+ execute_or_queue_command(command, &block)
173
+ end
174
+
175
+ protected
176
+
177
+ def apply_command_defaults(command)
178
+ command.query['key'] = key unless key.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ end
181
+ end
182
+ end
183
+ end
184
+ end
@@ -0,0 +1,37 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/datamanager_v1/service.rb'
16
+ require 'google/apis/datamanager_v1/classes.rb'
17
+ require 'google/apis/datamanager_v1/representations.rb'
18
+ require 'google/apis/datamanager_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # Data Manager API
23
+ #
24
+ # A unified ingestion API for data partners, agencies and advertisers to connect
25
+ # first-party data across Google advertising products.
26
+ #
27
+ # @see https://developers.google.com/data-manager
28
+ module DatamanagerV1
29
+ # Version of the Data Manager API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V1'
32
+
33
+ # See, edit, create, import, or delete your customer data in Google Ads, Google Marketing Platform (Campaign Manager 360, Search Ads 360, Display & Video 360), and Google Analytics
34
+ AUTH_DATAMANAGER = 'https://www.googleapis.com/auth/datamanager'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,15 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require "google/apis/datamanager_v1"
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-datamanager_v1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: google-apis-core
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 0.15.0
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: 2.a
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 0.15.0
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: 2.a
32
+ description: This is the simple REST client for Data Manager API V1. Simple REST clients
33
+ are Ruby client libraries that provide access to Google services via their HTTP
34
+ REST API endpoints. These libraries are generated and updated automatically based
35
+ on the discovery documents published by the service, and they handle most concerns
36
+ such as authentication, pagination, retry, timeouts, and logging. You can use this
37
+ client to access the Data Manager API, but note that some services may provide a
38
+ separate modern client that is easier to use.
39
+ email: googleapis-packages@google.com
40
+ executables: []
41
+ extensions: []
42
+ extra_rdoc_files: []
43
+ files:
44
+ - ".yardopts"
45
+ - CHANGELOG.md
46
+ - LICENSE.md
47
+ - OVERVIEW.md
48
+ - lib/google-apis-datamanager_v1.rb
49
+ - lib/google/apis/datamanager_v1.rb
50
+ - lib/google/apis/datamanager_v1/classes.rb
51
+ - lib/google/apis/datamanager_v1/gem_version.rb
52
+ - lib/google/apis/datamanager_v1/representations.rb
53
+ - lib/google/apis/datamanager_v1/service.rb
54
+ homepage: https://github.com/google/google-api-ruby-client
55
+ licenses:
56
+ - Apache-2.0
57
+ metadata:
58
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-datamanager_v1/CHANGELOG.md
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-datamanager_v1/v0.1.0
61
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-datamanager_v1
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '3.1'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubygems_version: 3.6.9
77
+ specification_version: 4
78
+ summary: Simple REST client for Data Manager API V1
79
+ test_files: []