diff --git a/ferrtable/src/cell_values.rs b/ferrtable/src/cell_values.rs index 75e48ec..bef178d 100644 --- a/ferrtable/src/cell_values.rs +++ b/ferrtable/src/cell_values.rs @@ -12,12 +12,12 @@ use serde::{Deserialize, Serialize}; /// Read only. #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub struct AiTextValue { - state: String, + pub state: String, #[serde(rename = "isStale")] - is_stale: bool, + pub is_stale: bool, #[serde(rename = "errorType")] - error_type: Option, - value: Option, + pub error_type: Option, + pub value: Option, } /// Attachments allow you to add images, documents, or other files which can @@ -33,27 +33,27 @@ pub struct AiTextValue { #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub struct AttachmentRead { /// Unique attachment id - id: String, + pub id: String, /// Content type, e.g. "image/jpeg" #[serde(rename = "type")] - type_: String, + pub type_: String, /// Filename, e.g. "foo.jpg" - filename: String, + pub filename: String, /// Height, in pixels (these may be available if the attachment is an /// image) - height: Option, + pub height: Option, /// File size, in bytes - size: usize, - /// url, e.g. "https://v5.airtableusercontent.com/foo". + pub size: usize, + /// url, e.g. `"https://v5.airtableusercontent.com/foo"`. /// /// URLs returned will expire 2 hours after being returned from our API. /// If you want to persist the attachments, we recommend downloading /// them instead of saving the URL. See our support article for more /// information. - url: String, + pub url: String, /// Width, in pixels (these may be available if the attachment is an /// image) - width: Option, + pub width: Option, // TODO: Add `thumbnails` field. } @@ -115,9 +115,9 @@ pub struct Barcode { #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub struct Button { /// Button label - label: String, + pub label: String, /// For "Open URL" actions, the computed url value - url: Option, + pub url: Option, } /// A collaborator field lets you add collaborators to your records. @@ -129,23 +129,23 @@ pub struct Button { #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub struct CollaboratorRead { /// User id or group id - id: String, + pub id: String, /// User's email address - email: Option, + pub email: Option, /// User's display name (may be omitted if the user hasn't created an /// account) - name: Option, + pub name: Option, /// User's collaborator permission Level /// /// This is only included if you're observing a webhooks response. #[serde(rename = "permissionLevel")] - permission_level: Option, + pub permission_level: Option, /// User's profile picture /// /// This is only included if it exists for the user and you're observing /// a webhooks response. #[serde(rename = "profilePicUrl")] - profile_pic_url: Option, + pub profile_pic_url: Option, } /// Write only. Use CollaboratorRead for reading from fields. @@ -161,7 +161,8 @@ pub enum CollaboratorWrite { }, } -/// Option should cover all values generated by a formula field. +/// `Option` should cover all values generated by a formula +/// field. /// /// Read only. #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] diff --git a/ferrtable/src/list_bases.rs b/ferrtable/src/list_bases.rs index e56cee2..db81c53 100644 --- a/ferrtable/src/list_bases.rs +++ b/ferrtable/src/list_bases.rs @@ -56,7 +56,7 @@ pub struct Base { } #[derive(Clone, Deserialize)] -pub struct ListBasesResponse { +struct ListBasesResponse { /// If there are more records, the response will contain an offset. Pass /// this offset into the next request to fetch the next page of records. offset: Option, diff --git a/ferrtable/src/list_records.rs b/ferrtable/src/list_records.rs index 65b0657..adf29f9 100644 --- a/ferrtable/src/list_records.rs +++ b/ferrtable/src/list_records.rs @@ -84,7 +84,7 @@ impl ListRecordsQuery { } #[derive(Clone, Deserialize)] -pub struct ListRecordsResponse +struct ListRecordsResponse where T: Clone, {