pub struct GenericObject {Show 23 fields
pub app_link_data: Option<AppLinkData>,
pub barcode: Option<Barcode>,
pub card_title: Option<LocalizedString>,
pub class_id: Option<String>,
pub generic_type: Option<String>,
pub grouping_info: Option<GroupingInfo>,
pub has_users: Option<bool>,
pub header: Option<LocalizedString>,
pub hero_image: Option<Image>,
pub hex_background_color: Option<String>,
pub id: Option<String>,
pub image_modules_data: Option<Vec<ImageModuleData>>,
pub links_module_data: Option<LinksModuleData>,
pub logo: Option<Image>,
pub notifications: Option<Notifications>,
pub pass_constraints: Option<PassConstraints>,
pub rotating_barcode: Option<RotatingBarcode>,
pub smart_tap_redemption_value: Option<String>,
pub state: Option<String>,
pub subheader: Option<LocalizedString>,
pub text_modules_data: Option<Vec<TextModuleData>>,
pub valid_time_interval: Option<TimeInterval>,
pub wide_logo: Option<Image>,
}
Expand description
Generic Object
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- get genericobject (response)
- insert genericobject (request|response)
- patch genericobject (request|response)
- update genericobject (request|response)
Fields§
§app_link_data: Option<AppLinkData>
Optional app or website link that will be displayed as a button on the front of the pass. If AppLinkData is provided for the corresponding class only object AppLinkData will be displayed.
barcode: Option<Barcode>
The barcode type and value. If pass does not have a barcode, we can allow the issuer to set Barcode.alternate_text and display just that.
card_title: Option<LocalizedString>
Required. The header of the pass. This is usually the Business name such as “XXX Gym”, “AAA Insurance”. This field is required and appears in the header row at the very top of the pass.
class_id: Option<String>
Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format issuerID.identifier
where issuerID
is issued by Google and identifier
is chosen by you.
generic_type: Option<String>
Specify which GenericType
the card belongs to.
grouping_info: Option<GroupingInfo>
Information that controls how passes are grouped together.
has_users: Option<bool>
Indicates if the object has users. This field is set by the platform.
header: Option<LocalizedString>
Required. The title of the pass, such as “50% off coupon” or “Library card” or “Voucher”. This field is required and appears in the title row of the pass detail view.
hero_image: Option<Image>
Banner image displayed on the front of the card if present. The image will be displayed at 100% width.
hex_background_color: Option<String>
The background color for the card. If not set, the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used and if logo is not set, a color would be chosen by Google.
id: Option<String>
Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value needs to follow the format issuerID.identifier
where issuerID
is issued by Google and identifier
is chosen by you. The unique identifier can only include alphanumeric characters, .
, _
, or -
.
image_modules_data: Option<Vec<ImageModuleData>>
Image module data. Only one of the image from class and one from object level will be rendered when both set.
links_module_data: Option<LinksModuleData>
Links module data. If linksModuleData
is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object.
logo: Option<Image>
The logo image of the pass. This image is displayed in the card detail view in upper left, and also on the list/thumbnail view. If the logo is not present, the first letter of cardTitle
would be shown as logo.
notifications: Option<Notifications>
The notification settings that are enabled for this object.
pass_constraints: Option<PassConstraints>
Pass constraints for the object. Includes limiting NFC and screenshot behaviors.
rotating_barcode: Option<RotatingBarcode>
The rotating barcode settings/details.
smart_tap_redemption_value: Option<String>
The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields enableSmartTap
and redemptionIssuers
must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.
state: Option<String>
The state of the object. This field is used to determine how an object is displayed in the app. For example, an inactive
object is moved to the “Expired passes” section. If this is not provided, the object would be considered ACTIVE
.
subheader: Option<LocalizedString>
The title label of the pass, such as location where this pass can be used. Appears right above the title in the title row in the pass detail view.
text_modules_data: Option<Vec<TextModuleData>>
Text module data. If textModulesData
is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object.
valid_time_interval: Option<TimeInterval>
The time period this object will be considered valid or usable. When the time period is passed, the object will be considered expired, which will affect the rendering on user’s devices.
wide_logo: Option<Image>
The wide logo of the pass. When provided, this will be used in place of the logo in the top left of the card view.
Trait Implementations§
Source§impl Clone for GenericObject
impl Clone for GenericObject
Source§fn clone(&self) -> GenericObject
fn clone(&self) -> GenericObject
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GenericObject
impl Debug for GenericObject
Source§impl Default for GenericObject
impl Default for GenericObject
Source§fn default() -> GenericObject
fn default() -> GenericObject
Source§impl<'de> Deserialize<'de> for GenericObject
impl<'de> Deserialize<'de> for GenericObject
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for GenericObject
impl Serialize for GenericObject
impl RequestValue for GenericObject
impl ResponseResult for GenericObject
Auto Trait Implementations§
impl Freeze for GenericObject
impl RefUnwindSafe for GenericObject
impl Send for GenericObject
impl Sync for GenericObject
impl Unpin for GenericObject
impl UnwindSafe for GenericObject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more