google-apis-drivelabels_v2 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.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google/apis/drivelabels_v2/classes.rb +1609 -0
- data/lib/google/apis/drivelabels_v2/gem_version.rb +28 -0
- data/lib/google/apis/drivelabels_v2/representations.rb +583 -0
- data/lib/google/apis/drivelabels_v2/service.rb +168 -0
- data/lib/google/apis/drivelabels_v2.rb +33 -0
- data/lib/google-apis-drivelabels_v2.rb +15 -0
- metadata +82 -0
@@ -0,0 +1,168 @@
|
|
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 DrivelabelsV2
|
23
|
+
# Drive Labels API
|
24
|
+
#
|
25
|
+
# An API for managing Drive Labels
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/drivelabels_v2'
|
29
|
+
#
|
30
|
+
# Drivelabels = Google::Apis::DrivelabelsV2 # Alias the module
|
31
|
+
# service = Drivelabels::DriveLabelsService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/drive/labels
|
34
|
+
class DriveLabelsService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://drivelabels.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-drivelabels_v2',
|
48
|
+
client_version: Google::Apis::DrivelabelsV2::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Get a Label by its resource name. Resource name may be any of: * `labels/`id``
|
53
|
+
# - See to `labels/`id`@latest` * `labels/`id`@latest` - Gets the latest
|
54
|
+
# revision of the Label. * `labels/`id`@published` - Gets the current published
|
55
|
+
# revision of the Label. * `labels/`id`@`revision_id`` - Gets the Label at the
|
56
|
+
# specified revision ID.
|
57
|
+
# @param [String] name
|
58
|
+
# Required. Label resource name. May be any of: * `labels/`id`` (equivalent to
|
59
|
+
# labels/`id`@latest) * `labels/`id`@latest` * `labels/`id`@published` * `labels/
|
60
|
+
# `id`@`revision_id``
|
61
|
+
# @param [String] language_code
|
62
|
+
# The BCP-47 language code to use for evaluating localized Field labels. When
|
63
|
+
# not specified, values in the default configured language will be used.
|
64
|
+
# @param [Boolean] use_admin_access
|
65
|
+
# Set to `true` in order to use the user's admin credentials. The server will
|
66
|
+
# verify the user is an admin for the Label before allowing access.
|
67
|
+
# @param [String] view
|
68
|
+
# When specified, only certain Fields belonging to the indicated view will be
|
69
|
+
# returned.
|
70
|
+
# @param [String] fields
|
71
|
+
# Selector specifying which fields to include in a partial response.
|
72
|
+
# @param [String] quota_user
|
73
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
74
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
75
|
+
# @param [Google::Apis::RequestOptions] options
|
76
|
+
# Request-specific options
|
77
|
+
#
|
78
|
+
# @yield [result, err] Result & error if block supplied
|
79
|
+
# @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label] parsed result object
|
80
|
+
# @yieldparam err [StandardError] error object if request failed
|
81
|
+
#
|
82
|
+
# @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label]
|
83
|
+
#
|
84
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
85
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
86
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
87
|
+
def get_label(name, language_code: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
88
|
+
command = make_simple_command(:get, 'v2/{+name}', options)
|
89
|
+
command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label::Representation
|
90
|
+
command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label
|
91
|
+
command.params['name'] = name unless name.nil?
|
92
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
93
|
+
command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
|
94
|
+
command.query['view'] = view unless view.nil?
|
95
|
+
command.query['fields'] = fields unless fields.nil?
|
96
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
97
|
+
execute_or_queue_command(command, &block)
|
98
|
+
end
|
99
|
+
|
100
|
+
# -------------------------------------------------------------------------- ##
|
101
|
+
# Label APIs ---------------------------------------------------------------
|
102
|
+
# List Labels.
|
103
|
+
# @param [String] language_code
|
104
|
+
# The BCP-47 language code to use for evaluating localized field labels. When
|
105
|
+
# not specified, values in the default configured language will be used.
|
106
|
+
# @param [String] minimum_role
|
107
|
+
# Specifies the level of access the user must have on the returned Labels. The
|
108
|
+
# minimum role a user must have on a label. Defaults to `READER`.
|
109
|
+
# @param [Fixnum] page_size
|
110
|
+
# Maximum number of Labels to return per page. Default: 50. Max: 200.
|
111
|
+
# @param [String] page_token
|
112
|
+
# The token of the page to return.
|
113
|
+
# @param [Boolean] published_only
|
114
|
+
# Whether to include only published labels in the results. * When `true`, only
|
115
|
+
# the current published label revisions will be returned. Disabled labels will
|
116
|
+
# be included. Returned Label resource names will reference the published
|
117
|
+
# revision (`labels/`id`/`revision_id``). * When `false`, the current label
|
118
|
+
# revisions will be returned, which may not by published. Returned Label
|
119
|
+
# resource names will not reference a specific revision (`labels/`id``).
|
120
|
+
# @param [Boolean] use_admin_access
|
121
|
+
# Set to `true` in order to use the user's admin credentials. This will return
|
122
|
+
# all Labels within the customer.
|
123
|
+
# @param [String] view
|
124
|
+
# When specified, only certain fields belonging to the indicated view will be
|
125
|
+
# returned.
|
126
|
+
# @param [String] fields
|
127
|
+
# Selector specifying which fields to include in a partial response.
|
128
|
+
# @param [String] quota_user
|
129
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
130
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
131
|
+
# @param [Google::Apis::RequestOptions] options
|
132
|
+
# Request-specific options
|
133
|
+
#
|
134
|
+
# @yield [result, err] Result & error if block supplied
|
135
|
+
# @yieldparam result [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse] parsed result object
|
136
|
+
# @yieldparam err [StandardError] error object if request failed
|
137
|
+
#
|
138
|
+
# @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse]
|
139
|
+
#
|
140
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
141
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
142
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
143
|
+
def list_labels(language_code: nil, minimum_role: nil, page_size: nil, page_token: nil, published_only: nil, use_admin_access: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
|
144
|
+
command = make_simple_command(:get, 'v2/labels', options)
|
145
|
+
command.response_representation = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse::Representation
|
146
|
+
command.response_class = Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2ListLabelsResponse
|
147
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
148
|
+
command.query['minimumRole'] = minimum_role unless minimum_role.nil?
|
149
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
150
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
151
|
+
command.query['publishedOnly'] = published_only unless published_only.nil?
|
152
|
+
command.query['useAdminAccess'] = use_admin_access unless use_admin_access.nil?
|
153
|
+
command.query['view'] = view unless view.nil?
|
154
|
+
command.query['fields'] = fields unless fields.nil?
|
155
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
156
|
+
execute_or_queue_command(command, &block)
|
157
|
+
end
|
158
|
+
|
159
|
+
protected
|
160
|
+
|
161
|
+
def apply_command_defaults(command)
|
162
|
+
command.query['key'] = key unless key.nil?
|
163
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,33 @@
|
|
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/drivelabels_v2/service.rb'
|
16
|
+
require 'google/apis/drivelabels_v2/classes.rb'
|
17
|
+
require 'google/apis/drivelabels_v2/representations.rb'
|
18
|
+
require 'google/apis/drivelabels_v2/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# Drive Labels API
|
23
|
+
#
|
24
|
+
# An API for managing Drive Labels
|
25
|
+
#
|
26
|
+
# @see https://developers.google.com/drive/labels
|
27
|
+
module DrivelabelsV2
|
28
|
+
# Version of the Drive Labels API this client connects to.
|
29
|
+
# This is NOT the gem version.
|
30
|
+
VERSION = 'V2'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
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/drivelabels_v2"
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-apis-drivelabels_v2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Google LLC
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-07-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: google-apis-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.a
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.7'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.a
|
33
|
+
description: This is the simple REST client for Drive Labels API V2. Simple REST clients
|
34
|
+
are Ruby client libraries that provide access to Google services via their HTTP
|
35
|
+
REST API endpoints. These libraries are generated and updated automatically based
|
36
|
+
on the discovery documents published by the service, and they handle most concerns
|
37
|
+
such as authentication, pagination, retry, timeouts, and logging. You can use this
|
38
|
+
client to access the Drive Labels API, but note that some services may provide a
|
39
|
+
separate modern client that is easier to use.
|
40
|
+
email: googleapis-packages@google.com
|
41
|
+
executables: []
|
42
|
+
extensions: []
|
43
|
+
extra_rdoc_files: []
|
44
|
+
files:
|
45
|
+
- ".yardopts"
|
46
|
+
- CHANGELOG.md
|
47
|
+
- LICENSE.md
|
48
|
+
- OVERVIEW.md
|
49
|
+
- lib/google-apis-drivelabels_v2.rb
|
50
|
+
- lib/google/apis/drivelabels_v2.rb
|
51
|
+
- lib/google/apis/drivelabels_v2/classes.rb
|
52
|
+
- lib/google/apis/drivelabels_v2/gem_version.rb
|
53
|
+
- lib/google/apis/drivelabels_v2/representations.rb
|
54
|
+
- lib/google/apis/drivelabels_v2/service.rb
|
55
|
+
homepage: https://github.com/google/google-api-ruby-client
|
56
|
+
licenses:
|
57
|
+
- Apache-2.0
|
58
|
+
metadata:
|
59
|
+
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
|
+
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-drivelabels_v2/CHANGELOG.md
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-drivelabels_v2/v0.1.0
|
62
|
+
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-drivelabels_v2
|
63
|
+
post_install_message:
|
64
|
+
rdoc_options: []
|
65
|
+
require_paths:
|
66
|
+
- lib
|
67
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '2.5'
|
72
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
requirements: []
|
78
|
+
rubygems_version: 3.3.14
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: Simple REST client for Drive Labels API V2
|
82
|
+
test_files: []
|