Current section

Files

Jump to
google_api_vault lib google_api vault v1 api matters.ex
Raw

lib/google_api/vault/v1/api/matters.ex

# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule GoogleApi.Vault.V1.Api.Matters do
@moduledoc """
API calls for all endpoints tagged `Matters`.
"""
alias GoogleApi.Vault.V1.Connection
alias GoogleApi.Gax.{Request, Response}
@doc """
Adds an account as a matter collaborator.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (AddMatterPermissionsRequest):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.MatterPermission{}} on success
{:error, info} on failure
"""
@spec vault_matters_add_permissions(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.MatterPermission.t()} | {:error, Tesla.Env.t()}
def vault_matters_add_permissions(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters/{matterId}:addPermissions", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.MatterPermission{})
end
@doc """
Closes the specified matter. Returns matter with updated state.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (CloseMatterRequest):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.CloseMatterResponse{}} on success
{:error, info} on failure
"""
@spec vault_matters_close(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.CloseMatterResponse.t()} | {:error, Tesla.Env.t()}
def vault_matters_close(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters/{matterId}:close", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.CloseMatterResponse{})
end
@doc """
Creates a new matter with the given name and description. The initial state is open, and the owner is the method caller. Returns the created matter with default view.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (Matter):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Matter{}} on success
{:error, info} on failure
"""
@spec vault_matters_create(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Matter.t()} | {:error, Tesla.Env.t()}
def vault_matters_create(connection, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Matter{})
end
@doc """
Deletes the specified matter. Returns matter with updated state.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Matter{}} on success
{:error, info} on failure
"""
@spec vault_matters_delete(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Matter.t()} | {:error, Tesla.Env.t()}
def vault_matters_delete(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query
}
request =
Request.new()
|> Request.method(:delete)
|> Request.url("/v1/matters/{matterId}", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Matter{})
end
@doc """
Gets the specified matter.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :view (String.t): Specifies which parts of the Matter to return in the response.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Matter{}} on success
{:error, info} on failure
"""
@spec vault_matters_get(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Matter.t()} | {:error, Tesla.Env.t()}
def vault_matters_get(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/matters/{matterId}", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Matter{})
end
@doc """
Adds a HeldAccount to a hold. Accounts can only be added to a hold that has no held_org_unit set. Attempting to add an account to an OU-based hold will result in an error.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- hold_id (String.t): The hold ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (HeldAccount):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.HeldAccount{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_accounts_create(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.HeldAccount.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_accounts_create(connection, matter_id, hold_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters/{matterId}/holds/{holdId}/accounts", %{
"matterId" => URI.encode_www_form(matter_id),
"holdId" => URI.encode_www_form(hold_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.HeldAccount{})
end
@doc """
Removes a HeldAccount from a hold. If this request leaves the hold with no held accounts, the hold will not apply to any accounts.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- hold_id (String.t): The hold ID.
- account_id (String.t): The ID of the account to remove from the hold.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Empty{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_accounts_delete(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword()
) :: {:ok, GoogleApi.Vault.V1.Model.Empty.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_accounts_delete(connection, matter_id, hold_id, account_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query
}
request =
Request.new()
|> Request.method(:delete)
|> Request.url("/v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", %{
"matterId" => URI.encode_www_form(matter_id),
"holdId" => URI.encode_www_form(hold_id),
"accountId" => URI.encode_www_form(account_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Empty{})
end
@doc """
Lists HeldAccounts for a hold. This will only list individually specified held accounts. If the hold is on an OU, then use <a href=\"https://developers.google.com/admin-sdk/\">Admin SDK</a> to enumerate its members.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- hold_id (String.t): The hold ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.ListHeldAccountsResponse{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_accounts_list(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.ListHeldAccountsResponse.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_accounts_list(connection, matter_id, hold_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/matters/{matterId}/holds/{holdId}/accounts", %{
"matterId" => URI.encode_www_form(matter_id),
"holdId" => URI.encode_www_form(hold_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.ListHeldAccountsResponse{})
end
@doc """
Creates a hold in the given matter.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (Hold):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Hold{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_create(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Hold.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_create(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters/{matterId}/holds", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Hold{})
end
@doc """
Removes a hold by ID. This will release any HeldAccounts on this Hold.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- hold_id (String.t): The hold ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Empty{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_delete(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Empty.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_delete(connection, matter_id, hold_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query
}
request =
Request.new()
|> Request.method(:delete)
|> Request.url("/v1/matters/{matterId}/holds/{holdId}", %{
"matterId" => URI.encode_www_form(matter_id),
"holdId" => URI.encode_www_form(hold_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Empty{})
end
@doc """
Gets a hold by ID.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- hold_id (String.t): The hold ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :view (String.t): Specifies which parts of the Hold to return.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Hold{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_get(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Hold.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_get(connection, matter_id, hold_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/matters/{matterId}/holds/{holdId}", %{
"matterId" => URI.encode_www_form(matter_id),
"holdId" => URI.encode_www_form(hold_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Hold{})
end
@doc """
Lists holds within a matter. An empty page token in ListHoldsResponse denotes no more holds to list.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :pageToken (String.t): The pagination token as returned in the response. An empty token means start from the beginning.
- :pageSize (integer()): The number of holds to return in the response, between 0 and 100 inclusive. Leaving this empty, or as 0, is the same as page_size = 100.
- :view (String.t): Specifies which parts of the Hold to return.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.ListHoldsResponse{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_list(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.ListHoldsResponse.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_list(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:pageToken => :query,
:pageSize => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/matters/{matterId}/holds", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.ListHoldsResponse{})
end
@doc """
Updates the OU and/or query parameters of a hold. You cannot add accounts to a hold that covers an OU, nor can you add OUs to a hold that covers individual accounts. Accounts listed in the hold will be ignored.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- hold_id (String.t): The ID of the hold.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (Hold):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Hold{}} on success
{:error, info} on failure
"""
@spec vault_matters_holds_update(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Hold.t()} | {:error, Tesla.Env.t()}
def vault_matters_holds_update(connection, matter_id, hold_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:put)
|> Request.url("/v1/matters/{matterId}/holds/{holdId}", %{
"matterId" => URI.encode_www_form(matter_id),
"holdId" => URI.encode_www_form(hold_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Hold{})
end
@doc """
Lists matters the user has access to.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :state (String.t): If set, list only matters with that specific state. The default is listing matters of all states.
- :pageToken (String.t): The pagination token as returned in the response.
- :pageSize (integer()): The number of matters to return in the response. Default and maximum are 100.
- :view (String.t): Specifies which parts of the matter to return in response.
## Returns
{:ok, %GoogleApi.Vault.V1.Model.ListMattersResponse{}} on success
{:error, info} on failure
"""
@spec vault_matters_list(Tesla.Env.client(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.ListMattersResponse.t()} | {:error, Tesla.Env.t()}
def vault_matters_list(connection, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:state => :query,
:pageToken => :query,
:pageSize => :query,
:view => :query
}
request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/matters")
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.ListMattersResponse{})
end
@doc """
Removes an account as a matter collaborator.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (RemoveMatterPermissionsRequest):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Empty{}} on success
{:error, info} on failure
"""
@spec vault_matters_remove_permissions(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Empty.t()} | {:error, Tesla.Env.t()}
def vault_matters_remove_permissions(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters/{matterId}:removePermissions", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Empty{})
end
@doc """
Reopens the specified matter. Returns matter with updated state.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (ReopenMatterRequest):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.ReopenMatterResponse{}} on success
{:error, info} on failure
"""
@spec vault_matters_reopen(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.ReopenMatterResponse.t()} | {:error, Tesla.Env.t()}
def vault_matters_reopen(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters/{matterId}:reopen", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.ReopenMatterResponse{})
end
@doc """
Undeletes the specified matter. Returns matter with updated state.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (UndeleteMatterRequest):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Matter{}} on success
{:error, info} on failure
"""
@spec vault_matters_undelete(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Matter.t()} | {:error, Tesla.Env.t()}
def vault_matters_undelete(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:post)
|> Request.url("/v1/matters/{matterId}:undelete", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Matter{})
end
@doc """
Updates the specified matter. This updates only the name and description of the matter, identified by matter id. Changes to any other fields are ignored. Returns the default view of the matter.
## Parameters
- connection (GoogleApi.Vault.V1.Connection): Connection to server
- matter_id (String.t): The matter ID.
- opts (KeywordList): [optional] Optional parameters
- :quotaUser (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.
- :pp (boolean()): Pretty-print response.
- :oauth_token (String.t): OAuth 2.0 token for the current user.
- :bearer_token (String.t): OAuth bearer token.
- :upload_protocol (String.t): Upload protocol for media (e.g. \"raw\", \"multipart\").
- :prettyPrint (boolean()): Returns response with indentations and line breaks.
- :fields (String.t): Selector specifying which fields to include in a partial response.
- :uploadType (String.t): Legacy upload protocol for media (e.g. \"media\", \"multipart\").
- :$.xgafv (String.t): V1 error format.
- :callback (String.t): JSONP
- :alt (String.t): Data format for response.
- :access_token (String.t): OAuth access token.
- :key (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.
- :body (Matter):
## Returns
{:ok, %GoogleApi.Vault.V1.Model.Matter{}} on success
{:error, info} on failure
"""
@spec vault_matters_update(Tesla.Env.client(), String.t(), keyword()) ::
{:ok, GoogleApi.Vault.V1.Model.Matter.t()} | {:error, Tesla.Env.t()}
def vault_matters_update(connection, matter_id, opts \\ []) do
optional_params = %{
:quotaUser => :query,
:pp => :query,
:oauth_token => :query,
:bearer_token => :query,
:upload_protocol => :query,
:prettyPrint => :query,
:fields => :query,
:uploadType => :query,
:"$.xgafv" => :query,
:callback => :query,
:alt => :query,
:access_token => :query,
:key => :query,
:body => :body
}
request =
Request.new()
|> Request.method(:put)
|> Request.url("/v1/matters/{matterId}", %{
"matterId" => URI.encode_www_form(matter_id)
})
|> Request.add_optional_params(optional_params, opts)
connection
|> Connection.execute(request)
|> Response.decode(struct: %GoogleApi.Vault.V1.Model.Matter{})
end
end