use serde::{Deserialize, Serialize}; /*
* Cloud Resource Manager API
*
* Creates, reads, and updates metadata for Google Cloud Platform resource containers.
*
* The version of the OpenAPI document: v3
*
* Generated by: https://openapi-generator.tech
*/
use crate::google_rest_apis::cloudresourcemanager_v3::models;
/// Status : The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Status {
/// The status code, which should be an enum value of google.rpc.Code.
#[serde(rename = "code", skip_serializing_if = "Option::is_none")]
pub code: Option<i32>,
/// A list of messages that carry the error details. There is a common set of message types for APIs to use.
#[serde(rename = "details", skip_serializing_if = "Option::is_none")]
pub details: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
/// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
impl Status {
/// The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
pub fn new() -> Status {
Status {
code: None,
details: None,
message: None,
}
}
}