ibm_watson/text-to-speech/speaker-models/
errors.rs1use thiserror::Error;
2#[derive(Debug, Error)]
3pub enum ListSpeakersError {
4 #[error("The service experienced an internal error.")]
5 InternalServerError500, #[error("The service is currently unavailable.")]
8 ServiceUnavailable503, #[error("{0}")]
11 ConnectionError(String),
13 #[error("The request failed. Possible failure causes include. Invalid service credentials were passed with the request")]
15 BadRequest400,
16}
17
18#[derive(Debug, Error)]
19pub enum CreateSpeakerError {
20 #[error("")]
21 BadRequest400,
22 #[error("The service is currently unavailable")]
23 ServiceUnavailable503,
25 #[error("The service experienced an internal error")]
27 InternalServerError500,
28 #[error("There was an error reading the file: {0}")]
30 FileReadError(String),
31 #[error("The request passed an unacceptable media type with the Content-Type header. The header must pass a value of multipart/form-data")]
33 UnsupportedMediaType415,
34 #[error("The specified customisation_id {0} is invalid for the requesting credentials")]
36 Unauthorised401(String),
37}
38
39#[derive(Debug, Error)]
40pub enum GetSpeakerError {
41 #[error("{0}")]
43 ConnectionError(String),
44 #[error("A required input parameter is null or a specified input parameter or header value is invalid or not supported")]
45 BadRequest400,
46 #[error("The service is currently unavailable")]
47 ServiceUnavailable503,
49 #[error("The service experienced an internal error")]
51 InternalServerError500,
52 #[error("The specified speaker_id: {0} is invalid for the requesting credentials")]
54 Unauthorised401(String),
55 #[error("The requested resource has not been modified since the time specified by the If-Modified-Since header, as documented in the HTTP specification")]
57 NotModified304,
58}
59
60#[derive(Error, Debug)]
61pub enum DeleteSpeakerError {
62 #[error("{0}")]
64 ConnectionError(String),
65 #[error("A required input parameter is null or a specified input parameter or header value is invalid or not supported")]
67 BadRequest400(String),
68 #[error("The service is currently unavailable")]
69 ServiceUnavailable503,
71 #[error("The service experienced an internal error")]
72 InternalServerError500,
74 #[error("The specified speaker_id {0} is invalid for the requesting credentials")]
75 Unauthorised401(String),
77}