Class: Google::Apis::DataportabilityV1::DataPortabilityService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DataportabilityV1::DataPortabilityService
- Defined in:
- lib/google/apis/dataportability_v1/service.rb
Overview
Data Portability API
The Data Portability API lets you build applications that request authorization from a user to move a copy of data from Google services into your application. This enables data portability and facilitates switching services.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://dataportability.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#cancel_archive_job_portability_archive(name, cancel_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::CancelPortabilityArchiveResponse
Cancels a Portability Archive job.
-
#check_access_type(check_access_type_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::CheckAccessTypeResponse
Gets the access type of the token.
-
#get_archive_job_portability_archive_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::PortabilityArchiveState
Retrieves the state of an Archive job for the Portability API.
-
#initialize ⇒ DataPortabilityService
constructor
A new instance of DataPortabilityService.
-
#initiate_portability_archive(initiate_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::InitiatePortabilityArchiveResponse
Initiates a new Archive job for the Portability API.
-
#reset_authorization(reset_authorization_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::Empty
Revokes OAuth tokens and resets exhausted scopes for a user/project pair.
-
#retry_archive_job_portability_archive(name, retry_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::RetryPortabilityArchiveResponse
Retries a failed Portability Archive job.
Constructor Details
#initialize ⇒ DataPortabilityService
Returns a new instance of DataPortabilityService.
50 51 52 53 54 55 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 50 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-dataportability_v1', client_version: Google::Apis::DataportabilityV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
43 44 45 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 43 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
48 49 50 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 48 def quota_user @quota_user end |
Instance Method Details
#cancel_archive_job_portability_archive(name, cancel_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::CancelPortabilityArchiveResponse
Cancels a Portability Archive job.
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 110 def cancel_archive_job_portability_archive(name, cancel_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', ) command.request_representation = Google::Apis::DataportabilityV1::CancelPortabilityArchiveRequest::Representation command.request_object = cancel_portability_archive_request_object command.response_representation = Google::Apis::DataportabilityV1::CancelPortabilityArchiveResponse::Representation command.response_class = Google::Apis::DataportabilityV1::CancelPortabilityArchiveResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#check_access_type(check_access_type_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::CheckAccessTypeResponse
Gets the access type of the token.
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 76 def check_access_type(check_access_type_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/accessType:check', ) command.request_representation = Google::Apis::DataportabilityV1::CheckAccessTypeRequest::Representation command.request_object = check_access_type_request_object command.response_representation = Google::Apis::DataportabilityV1::CheckAccessTypeResponse::Representation command.response_class = Google::Apis::DataportabilityV1::CheckAccessTypeResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_archive_job_portability_archive_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::PortabilityArchiveState
Retrieves the state of an Archive job for the Portability API.
144 145 146 147 148 149 150 151 152 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 144 def get_archive_job_portability_archive_state(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DataportabilityV1::PortabilityArchiveState::Representation command.response_class = Google::Apis::DataportabilityV1::PortabilityArchiveState command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#initiate_portability_archive(initiate_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::InitiatePortabilityArchiveResponse
Initiates a new Archive job for the Portability API.
242 243 244 245 246 247 248 249 250 251 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 242 def initiate_portability_archive(initiate_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/portabilityArchive:initiate', ) command.request_representation = Google::Apis::DataportabilityV1::InitiatePortabilityArchiveRequest::Representation command.request_object = initiate_portability_archive_request_object command.response_representation = Google::Apis::DataportabilityV1::InitiatePortabilityArchiveResponse::Representation command.response_class = Google::Apis::DataportabilityV1::InitiatePortabilityArchiveResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reset_authorization(reset_authorization_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::Empty
Revokes OAuth tokens and resets exhausted scopes for a user/project pair. This method allows you to initiate a request after a new consent is granted. This method also indicates that previous archives can be garbage collected. You should call this method when all jobs are complete and all archives are downloaded. Do not call it only when you start a new job.
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 212 def ( = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/authorization:reset', ) command.request_representation = Google::Apis::DataportabilityV1::ResetAuthorizationRequest::Representation command.request_object = command.response_representation = Google::Apis::DataportabilityV1::Empty::Representation command.response_class = Google::Apis::DataportabilityV1::Empty command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#retry_archive_job_portability_archive(name, retry_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1::RetryPortabilityArchiveResponse
Retries a failed Portability Archive job.
177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/google/apis/dataportability_v1/service.rb', line 177 def retry_archive_job_portability_archive(name, retry_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:retry', ) command.request_representation = Google::Apis::DataportabilityV1::RetryPortabilityArchiveRequest::Representation command.request_object = retry_portability_archive_request_object command.response_representation = Google::Apis::DataportabilityV1::RetryPortabilityArchiveResponse::Representation command.response_class = Google::Apis::DataportabilityV1::RetryPortabilityArchiveResponse command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |