Skip to content

Commit 95900f5

Browse files
feat: Automated regeneration of Drive client (googleapis#12520)
Auto-created at 2024-11-13 13:16:20 +0000 using the toys pull request generator.
1 parent 0a4d151 commit 95900f5

File tree

6 files changed

+295
-145
lines changed

6 files changed

+295
-145
lines changed

clients/drive/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_drive, "~> 0.31"}]
14+
[{:google_api_drive, "~> 0.32"}]
1515
end
1616
```
1717

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
# Copyright 2019 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+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Drive.V3.Api.Accessproposals do
19+
@moduledoc """
20+
API calls for all endpoints tagged `Accessproposals`.
21+
"""
22+
23+
alias GoogleApi.Drive.V3.Connection
24+
alias GoogleApi.Gax.{Request, Response}
25+
26+
@library_version Mix.Project.config() |> Keyword.get(:version, "")
27+
28+
@doc """
29+
Retrieves an AccessProposal by ID.
30+
31+
## Parameters
32+
33+
* `connection` (*type:* `GoogleApi.Drive.V3.Connection.t`) - Connection to server
34+
* `file_id` (*type:* `String.t`) - Required. The id of the item the request is on.
35+
* `proposal_id` (*type:* `String.t`) - Required. The id of the access proposal to resolve.
36+
* `optional_params` (*type:* `keyword()`) - Optional parameters
37+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
38+
* `:access_token` (*type:* `String.t`) - OAuth access token.
39+
* `:alt` (*type:* `String.t`) - Data format for response.
40+
* `:callback` (*type:* `String.t`) - JSONP
41+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
42+
* `:key` (*type:* `String.t`) - 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+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
44+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
45+
* `:quotaUser` (*type:* `String.t`) - 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.
46+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
47+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
48+
* `opts` (*type:* `keyword()`) - Call options
49+
50+
## Returns
51+
52+
* `{:ok, %GoogleApi.Drive.V3.Model.AccessProposal{}}` on success
53+
* `{:error, info}` on failure
54+
"""
55+
@spec drive_accessproposals_get(
56+
Tesla.Env.client(),
57+
String.t(),
58+
String.t(),
59+
keyword(),
60+
keyword()
61+
) ::
62+
{:ok, GoogleApi.Drive.V3.Model.AccessProposal.t()}
63+
| {:ok, Tesla.Env.t()}
64+
| {:ok, list()}
65+
| {:error, any()}
66+
def drive_accessproposals_get(
67+
connection,
68+
file_id,
69+
proposal_id,
70+
optional_params \\ [],
71+
opts \\ []
72+
) do
73+
optional_params_config = %{
74+
:"$.xgafv" => :query,
75+
:access_token => :query,
76+
:alt => :query,
77+
:callback => :query,
78+
:fields => :query,
79+
:key => :query,
80+
:oauth_token => :query,
81+
:prettyPrint => :query,
82+
:quotaUser => :query,
83+
:uploadType => :query,
84+
:upload_protocol => :query
85+
}
86+
87+
request =
88+
Request.new()
89+
|> Request.method(:get)
90+
|> Request.url("/drive/v3/files/{fileId}/accessproposals/{proposalId}", %{
91+
"fileId" => URI.encode(file_id, &URI.char_unreserved?/1),
92+
"proposalId" => URI.encode(proposal_id, &(URI.char_unreserved?(&1) || &1 == ?/))
93+
})
94+
|> Request.add_optional_params(optional_params_config, optional_params)
95+
|> Request.library_version(@library_version)
96+
97+
connection
98+
|> Connection.execute(request)
99+
|> Response.decode(opts ++ [struct: %GoogleApi.Drive.V3.Model.AccessProposal{}])
100+
end
101+
102+
@doc """
103+
List the AccessProposals on a file. Note: Only approvers are able to list AccessProposals on a file. If the user is not an approver, returns a 403.
104+
105+
## Parameters
106+
107+
* `connection` (*type:* `GoogleApi.Drive.V3.Connection.t`) - Connection to server
108+
* `file_id` (*type:* `String.t`) - Required. The id of the item the request is on.
109+
* `optional_params` (*type:* `keyword()`) - Optional parameters
110+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
111+
* `:access_token` (*type:* `String.t`) - OAuth access token.
112+
* `:alt` (*type:* `String.t`) - Data format for response.
113+
* `:callback` (*type:* `String.t`) - JSONP
114+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
115+
* `:key` (*type:* `String.t`) - 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.
116+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
117+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
118+
* `:quotaUser` (*type:* `String.t`) - 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.
119+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
120+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
121+
* `:pageSize` (*type:* `integer()`) - Optional. The number of results per page
122+
* `:pageToken` (*type:* `String.t`) - Optional. The continuation token on the list of access requests.
123+
* `opts` (*type:* `keyword()`) - Call options
124+
125+
## Returns
126+
127+
* `{:ok, %GoogleApi.Drive.V3.Model.ListAccessProposalsResponse{}}` on success
128+
* `{:error, info}` on failure
129+
"""
130+
@spec drive_accessproposals_list(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
131+
{:ok, GoogleApi.Drive.V3.Model.ListAccessProposalsResponse.t()}
132+
| {:ok, Tesla.Env.t()}
133+
| {:ok, list()}
134+
| {:error, any()}
135+
def drive_accessproposals_list(connection, file_id, optional_params \\ [], opts \\ []) do
136+
optional_params_config = %{
137+
:"$.xgafv" => :query,
138+
:access_token => :query,
139+
:alt => :query,
140+
:callback => :query,
141+
:fields => :query,
142+
:key => :query,
143+
:oauth_token => :query,
144+
:prettyPrint => :query,
145+
:quotaUser => :query,
146+
:uploadType => :query,
147+
:upload_protocol => :query,
148+
:pageSize => :query,
149+
:pageToken => :query
150+
}
151+
152+
request =
153+
Request.new()
154+
|> Request.method(:get)
155+
|> Request.url("/drive/v3/files/{fileId}/accessproposals", %{
156+
"fileId" => URI.encode(file_id, &URI.char_unreserved?/1)
157+
})
158+
|> Request.add_optional_params(optional_params_config, optional_params)
159+
|> Request.library_version(@library_version)
160+
161+
connection
162+
|> Connection.execute(request)
163+
|> Response.decode(opts ++ [struct: %GoogleApi.Drive.V3.Model.ListAccessProposalsResponse{}])
164+
end
165+
166+
@doc """
167+
Used to approve or deny an Access Proposal.
168+
169+
## Parameters
170+
171+
* `connection` (*type:* `GoogleApi.Drive.V3.Connection.t`) - Connection to server
172+
* `file_id` (*type:* `String.t`) - Required. The id of the item the request is on.
173+
* `proposal_id` (*type:* `String.t`) - Required. The id of the access proposal to resolve.
174+
* `optional_params` (*type:* `keyword()`) - Optional parameters
175+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
176+
* `:access_token` (*type:* `String.t`) - OAuth access token.
177+
* `:alt` (*type:* `String.t`) - Data format for response.
178+
* `:callback` (*type:* `String.t`) - JSONP
179+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
180+
* `:key` (*type:* `String.t`) - 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.
181+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
182+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
183+
* `:quotaUser` (*type:* `String.t`) - 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.
184+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
185+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
186+
* `:body` (*type:* `GoogleApi.Drive.V3.Model.ResolveAccessProposalRequest.t`) -
187+
* `opts` (*type:* `keyword()`) - Call options
188+
189+
## Returns
190+
191+
* `{:ok, %{}}` on success
192+
* `{:error, info}` on failure
193+
"""
194+
@spec drive_accessproposals_resolve(
195+
Tesla.Env.client(),
196+
String.t(),
197+
String.t(),
198+
keyword(),
199+
keyword()
200+
) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
201+
def drive_accessproposals_resolve(
202+
connection,
203+
file_id,
204+
proposal_id,
205+
optional_params \\ [],
206+
opts \\ []
207+
) do
208+
optional_params_config = %{
209+
:"$.xgafv" => :query,
210+
:access_token => :query,
211+
:alt => :query,
212+
:callback => :query,
213+
:fields => :query,
214+
:key => :query,
215+
:oauth_token => :query,
216+
:prettyPrint => :query,
217+
:quotaUser => :query,
218+
:uploadType => :query,
219+
:upload_protocol => :query,
220+
:body => :body
221+
}
222+
223+
request =
224+
Request.new()
225+
|> Request.method(:post)
226+
|> Request.url("/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve", %{
227+
"fileId" => URI.encode(file_id, &URI.char_unreserved?/1),
228+
"proposalId" => URI.encode(proposal_id, &URI.char_unreserved?/1)
229+
})
230+
|> Request.add_optional_params(optional_params_config, optional_params)
231+
|> Request.library_version(@library_version)
232+
233+
connection
234+
|> Connection.execute(request)
235+
|> Response.decode(opts ++ [decode: false])
236+
end
237+
end

clients/drive/lib/google_api/drive/v3/api/files.ex

Lines changed: 0 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,146 +1495,4 @@ defmodule GoogleApi.Drive.V3.Api.Files do
14951495
|> Connection.execute(request)
14961496
|> Response.decode(opts ++ [struct: %GoogleApi.Drive.V3.Model.Channel{}])
14971497
end
1498-
1499-
@doc """
1500-
List the AccessProposals on a file. Note: Only approvers are able to list AccessProposals on a file. If the user is not an approver, returns a 403.
1501-
1502-
## Parameters
1503-
1504-
* `connection` (*type:* `GoogleApi.Drive.V3.Connection.t`) - Connection to server
1505-
* `file_id` (*type:* `String.t`) - Required. The id of the item the request is on.
1506-
* `optional_params` (*type:* `keyword()`) - Optional parameters
1507-
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
1508-
* `:access_token` (*type:* `String.t`) - OAuth access token.
1509-
* `:alt` (*type:* `String.t`) - Data format for response.
1510-
* `:callback` (*type:* `String.t`) - JSONP
1511-
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
1512-
* `:key` (*type:* `String.t`) - 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.
1513-
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
1514-
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
1515-
* `:quotaUser` (*type:* `String.t`) - 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.
1516-
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
1517-
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
1518-
* `:pageSize` (*type:* `integer()`) - Optional. The number of results per page
1519-
* `:pageToken` (*type:* `String.t`) - Optional. The continuation token on the list of access requests.
1520-
* `opts` (*type:* `keyword()`) - Call options
1521-
1522-
## Returns
1523-
1524-
* `{:ok, %GoogleApi.Drive.V3.Model.ListAccessProposalsResponse{}}` on success
1525-
* `{:error, info}` on failure
1526-
"""
1527-
@spec drive_files_accessproposals_list(Tesla.Env.client(), String.t(), keyword(), keyword()) ::
1528-
{:ok, GoogleApi.Drive.V3.Model.ListAccessProposalsResponse.t()}
1529-
| {:ok, Tesla.Env.t()}
1530-
| {:ok, list()}
1531-
| {:error, any()}
1532-
def drive_files_accessproposals_list(connection, file_id, optional_params \\ [], opts \\ []) do
1533-
optional_params_config = %{
1534-
:"$.xgafv" => :query,
1535-
:access_token => :query,
1536-
:alt => :query,
1537-
:callback => :query,
1538-
:fields => :query,
1539-
:key => :query,
1540-
:oauth_token => :query,
1541-
:prettyPrint => :query,
1542-
:quotaUser => :query,
1543-
:uploadType => :query,
1544-
:upload_protocol => :query,
1545-
:pageSize => :query,
1546-
:pageToken => :query
1547-
}
1548-
1549-
request =
1550-
Request.new()
1551-
|> Request.method(:get)
1552-
|> Request.url("/drive/v3/files/{fileId}/accessproposals", %{
1553-
"fileId" => URI.encode(file_id, &URI.char_unreserved?/1)
1554-
})
1555-
|> Request.add_optional_params(optional_params_config, optional_params)
1556-
|> Request.library_version(@library_version)
1557-
1558-
connection
1559-
|> Connection.execute(request)
1560-
|> Response.decode(opts ++ [struct: %GoogleApi.Drive.V3.Model.ListAccessProposalsResponse{}])
1561-
end
1562-
1563-
@doc """
1564-
Used to approve or deny an Access Proposal.
1565-
1566-
## Parameters
1567-
1568-
* `connection` (*type:* `GoogleApi.Drive.V3.Connection.t`) - Connection to server
1569-
* `file_id` (*type:* `String.t`) - Required. The id of the item the request is on.
1570-
* `proposal_id` (*type:* `String.t`) - Required. The id of the access proposal to resolve.
1571-
* `optional_params` (*type:* `keyword()`) - Optional parameters
1572-
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
1573-
* `:access_token` (*type:* `String.t`) - OAuth access token.
1574-
* `:alt` (*type:* `String.t`) - Data format for response.
1575-
* `:callback` (*type:* `String.t`) - JSONP
1576-
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
1577-
* `:key` (*type:* `String.t`) - 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.
1578-
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
1579-
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
1580-
* `:quotaUser` (*type:* `String.t`) - 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.
1581-
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
1582-
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
1583-
* `:action` (*type:* `String.t`) - Required. The action to take on the AccessProposal.
1584-
* `:role` (*type:* `list(String.t)`) - Optional. The roles the approver has allowed, if any. Note: This field is required for the `ACCEPT` action.
1585-
* `:sendNotification` (*type:* `boolean()`) - Optional. Whether to send an email to the requester when the AccessProposal is denied or accepted.
1586-
* `:view` (*type:* `String.t`) - Optional. Indicates the view for this access proposal. This should only be set when the proposal belongs to a view. `published` is the only supported value.
1587-
* `opts` (*type:* `keyword()`) - Call options
1588-
1589-
## Returns
1590-
1591-
* `{:ok, %{}}` on success
1592-
* `{:error, info}` on failure
1593-
"""
1594-
@spec drive_files_accessproposals_resolve(
1595-
Tesla.Env.client(),
1596-
String.t(),
1597-
String.t(),
1598-
keyword(),
1599-
keyword()
1600-
) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
1601-
def drive_files_accessproposals_resolve(
1602-
connection,
1603-
file_id,
1604-
proposal_id,
1605-
optional_params \\ [],
1606-
opts \\ []
1607-
) do
1608-
optional_params_config = %{
1609-
:"$.xgafv" => :query,
1610-
:access_token => :query,
1611-
:alt => :query,
1612-
:callback => :query,
1613-
:fields => :query,
1614-
:key => :query,
1615-
:oauth_token => :query,
1616-
:prettyPrint => :query,
1617-
:quotaUser => :query,
1618-
:uploadType => :query,
1619-
:upload_protocol => :query,
1620-
:action => :query,
1621-
:role => :query,
1622-
:sendNotification => :query,
1623-
:view => :query
1624-
}
1625-
1626-
request =
1627-
Request.new()
1628-
|> Request.method(:post)
1629-
|> Request.url("/drive/v3/files/{fileId}/accessproposals/{proposalId}:resolve", %{
1630-
"fileId" => URI.encode(file_id, &URI.char_unreserved?/1),
1631-
"proposalId" => URI.encode(proposal_id, &URI.char_unreserved?/1)
1632-
})
1633-
|> Request.add_optional_params(optional_params_config, optional_params)
1634-
|> Request.library_version(@library_version)
1635-
1636-
connection
1637-
|> Connection.execute(request)
1638-
|> Response.decode(opts ++ [decode: false])
1639-
end
16401498
end

0 commit comments

Comments
 (0)