mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(api types): Add an unused field to empty API types.
Null structs (struct Foo;) cause the following error when trying to
deserialize an empty JSON object `{}` into them:
`JsonDecodeError("{}\n", Syntax(InvalidType(Map), 1, 1))` (also known as
`invalid type: map at line 1 column 1: {}`). The optional struct member
prevents this error.
This commit is contained in:
@@ -170,7 +170,7 @@ impl<'a, C, A> CloudResourceManager<C, A>
|
||||
/// * [undelete projects](struct.ProjectUndeleteCall.html) (request)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct UndeleteProjectRequest;
|
||||
pub struct UndeleteProjectRequest { _never_set: Option<bool> }
|
||||
|
||||
impl RequestValue for UndeleteProjectRequest {}
|
||||
|
||||
@@ -220,7 +220,7 @@ impl ResponseResult for TestIamPermissionsResponse {}
|
||||
/// * [get iam policy projects](struct.ProjectGetIamPolicyCall.html) (request)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct GetIamPolicyRequest;
|
||||
pub struct GetIamPolicyRequest { _never_set: Option<bool> }
|
||||
|
||||
impl RequestValue for GetIamPolicyRequest {}
|
||||
|
||||
@@ -417,7 +417,7 @@ impl ResponseResult for ListProjectsResponse {}
|
||||
/// * [undelete projects](struct.ProjectUndeleteCall.html) (response)
|
||||
///
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct Empty;
|
||||
pub struct Empty { _never_set: Option<bool> }
|
||||
|
||||
impl ResponseResult for Empty {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user