Class: Google::Apis::DataportabilityV1beta::DataPortabilityService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DataportabilityV1beta::DataPortabilityService
- Defined in:
- lib/google/apis/dataportability_v1beta/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
-
#get_archive_job_portability_archive_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1beta::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::DataportabilityV1beta::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::DataportabilityV1beta::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::DataportabilityV1beta::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_v1beta/service.rb', line 50 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-dataportability_v1beta', client_version: Google::Apis::DataportabilityV1beta::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_v1beta/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_v1beta/service.rb', line 48 def quota_user @quota_user end |
Instance Method Details
#get_archive_job_portability_archive_state(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DataportabilityV1beta::PortabilityArchiveState
Retrieves the state of an Archive job for the Portability API.
79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/dataportability_v1beta/service.rb', line 79 def get_archive_job_portability_archive_state(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta/{+name}', ) command.response_representation = Google::Apis::DataportabilityV1beta::PortabilityArchiveState::Representation command.response_class = Google::Apis::DataportabilityV1beta::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::DataportabilityV1beta::InitiatePortabilityArchiveResponse
Initiates a new Archive job for the Portability API.
177 178 179 180 181 182 183 184 185 186 |
# File 'lib/google/apis/dataportability_v1beta/service.rb', line 177 def initiate_portability_archive(initiate_portability_archive_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/portabilityArchive:initiate', ) command.request_representation = Google::Apis::DataportabilityV1beta::InitiatePortabilityArchiveRequest::Representation command.request_object = initiate_portability_archive_request_object command.response_representation = Google::Apis::DataportabilityV1beta::InitiatePortabilityArchiveResponse::Representation command.response_class = Google::Apis::DataportabilityV1beta::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::DataportabilityV1beta::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.
147 148 149 150 151 152 153 154 155 156 |
# File 'lib/google/apis/dataportability_v1beta/service.rb', line 147 def ( = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta/authorization:reset', ) command.request_representation = Google::Apis::DataportabilityV1beta::ResetAuthorizationRequest::Representation command.request_object = command.response_representation = Google::Apis::DataportabilityV1beta::Empty::Representation command.response_class = Google::Apis::DataportabilityV1beta::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::DataportabilityV1beta::RetryPortabilityArchiveResponse
Retries a failed Portability Archive job.
112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/google/apis/dataportability_v1beta/service.rb', line 112 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, 'v1beta/{+name}:retry', ) command.request_representation = Google::Apis::DataportabilityV1beta::RetryPortabilityArchiveRequest::Representation command.request_object = retry_portability_archive_request_object command.response_representation = Google::Apis::DataportabilityV1beta::RetryPortabilityArchiveResponse::Representation command.response_class = Google::Apis::DataportabilityV1beta::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 |