Class Accounts.NotImplemented
- java.lang.Object
-
- com.google.gerrit.extensions.api.accounts.Accounts.NotImplemented
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.gerrit.extensions.api.accounts.Accounts
Accounts.NotImplemented, Accounts.QueryRequest, Accounts.SuggestAccountsRequest
-
-
Constructor Summary
Constructors Constructor Description NotImplemented()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountApi
create(AccountInput input)
Create a new account.AccountApi
create(String username)
Create a new account with the given username and default options.AccountApi
id(int id)
AccountApi
id(String id)
Look up an account by ID.Accounts.QueryRequest
query()
Query users.Accounts.QueryRequest
query(String query)
Query users.AccountApi
self()
Look up the account of the current in-scope user.Accounts.SuggestAccountsRequest
suggestAccounts()
Suggest users for a given query.Accounts.SuggestAccountsRequest
suggestAccounts(String query)
Suggest users for a given query.
-
-
-
Method Detail
-
id
public AccountApi id(String id) throws RestApiException
Description copied from interface:Accounts
Look up an account by ID.Note: This method eagerly reads the account. Methods that mutate the account do not necessarily re-read the account. Therefore, calling a getter method on an instance after calling a mutation method on that same instance is not guaranteed to reflect the mutation. It is not recommended to store references to
AccountApi
instances.- Specified by:
id
in interfaceAccounts
- Parameters:
id
- any identifier supported by the REST API, including numeric ID, email, or username.- Returns:
- API for accessing the account.
- Throws:
RestApiException
- if an error occurred.
-
id
public AccountApi id(int id) throws RestApiException
- Specified by:
id
in interfaceAccounts
- Throws:
RestApiException
- See Also:
Accounts.id(String)
-
self
public AccountApi self() throws RestApiException
Description copied from interface:Accounts
Look up the account of the current in-scope user.- Specified by:
self
in interfaceAccounts
- Throws:
RestApiException
- See Also:
Accounts.id(String)
-
create
public AccountApi create(String username) throws RestApiException
Description copied from interface:Accounts
Create a new account with the given username and default options.- Specified by:
create
in interfaceAccounts
- Throws:
RestApiException
-
create
public AccountApi create(AccountInput input) throws RestApiException
Description copied from interface:Accounts
Create a new account.- Specified by:
create
in interfaceAccounts
- Throws:
RestApiException
-
suggestAccounts
public Accounts.SuggestAccountsRequest suggestAccounts() throws RestApiException
Description copied from interface:Accounts
Suggest users for a given query.Example code:
suggestAccounts().withQuery("Reviewer").withLimit(5).get()
- Specified by:
suggestAccounts
in interfaceAccounts
- Returns:
- API for setting parameters and getting result.
- Throws:
RestApiException
-
suggestAccounts
public Accounts.SuggestAccountsRequest suggestAccounts(String query) throws RestApiException
Description copied from interface:Accounts
Suggest users for a given query.Shortcut API for
suggestAccounts().withQuery(String)
.- Specified by:
suggestAccounts
in interfaceAccounts
- Throws:
RestApiException
- See Also:
Accounts.suggestAccounts()
-
query
public Accounts.QueryRequest query() throws RestApiException
Description copied from interface:Accounts
Query users.Example code:
query().withQuery("name:John email:example.com").withLimit(5).get()
- Specified by:
query
in interfaceAccounts
- Returns:
- API for setting parameters and getting result.
- Throws:
RestApiException
-
query
public Accounts.QueryRequest query(String query) throws RestApiException
Description copied from interface:Accounts
Query users.Shortcut API for
query().withQuery(String)
.- Specified by:
query
in interfaceAccounts
- Throws:
RestApiException
- See Also:
Accounts.query()
-
-