pub struct CodeImport(/* private fields */);Expand description
A code import to a Bazaar branch or Git repository.
Implementations§
Source§impl CodeImport
impl CodeImport
pub fn get<'a>(&self, client: &'a dyn Client) -> Result<CodeImportFull, Error>
pub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>
pub fn put<'a>( &self, client: &'a dyn Client, representation: &CodeImportFull, ) -> Result<(), Error>
pub fn patch<'a>( &self, client: &'a dyn Client, representation: &CodeImportDiff, ) -> Result<(), Error>
Sourcepub fn request_import<'a>(&self, client: &'a dyn Client) -> Result<(), Error>
pub fn request_import<'a>(&self, client: &'a dyn Client) -> Result<(), Error>
Request that an import be tried soon.
This method will schedule an import to happen soon for this branch.
The import must be in the Reviewed state, if not then a CodeImportNotInReviewedState error will be thrown. If using the API then a status code of 400 will result.
If the import is already running then a CodeImportAlreadyRunning error will be thrown. If using the API then a status code of 400 will result.
The two cases can be distinguished over the API by seeing if the exception names appear in the body of the response.
If used over the API and the request has already been made then this method will silently do nothing. If called internally then the error_if_already_requested parameter controls whether a CodeImportAlreadyRequested exception will be thrown in that situation.