Struct TransitClass

Source
pub struct TransitClass {
Show 53 fields pub activation_options: Option<ActivationOptions>, pub allow_multiple_users_per_object: Option<bool>, pub app_link_data: Option<AppLinkData>, pub callback_options: Option<CallbackOptions>, pub class_template_info: Option<ClassTemplateInfo>, pub country_code: Option<String>, pub custom_carriage_label: Option<LocalizedString>, pub custom_coach_label: Option<LocalizedString>, pub custom_concession_category_label: Option<LocalizedString>, pub custom_confirmation_code_label: Option<LocalizedString>, pub custom_discount_message_label: Option<LocalizedString>, pub custom_fare_class_label: Option<LocalizedString>, pub custom_fare_name_label: Option<LocalizedString>, pub custom_other_restrictions_label: Option<LocalizedString>, pub custom_platform_label: Option<LocalizedString>, pub custom_purchase_face_value_label: Option<LocalizedString>, pub custom_purchase_price_label: Option<LocalizedString>, pub custom_purchase_receipt_number_label: Option<LocalizedString>, pub custom_route_restrictions_details_label: Option<LocalizedString>, pub custom_route_restrictions_label: Option<LocalizedString>, pub custom_seat_label: Option<LocalizedString>, pub custom_ticket_number_label: Option<LocalizedString>, pub custom_time_restrictions_label: Option<LocalizedString>, pub custom_transit_terminus_name_label: Option<LocalizedString>, pub custom_zone_label: Option<LocalizedString>, pub enable_single_leg_itinerary: Option<bool>, pub enable_smart_tap: Option<bool>, pub hero_image: Option<Image>, pub hex_background_color: Option<String>, pub homepage_uri: Option<Uri>, pub id: Option<String>, pub image_modules_data: Option<Vec<ImageModuleData>>, pub info_module_data: Option<InfoModuleData>, pub issuer_name: Option<String>, pub language_override: Option<String>, pub links_module_data: Option<LinksModuleData>, pub localized_issuer_name: Option<LocalizedString>, pub locations: Option<Vec<LatLongPoint>>, pub logo: Option<Image>, pub messages: Option<Vec<Message>>, pub multiple_devices_and_holders_allowed_status: Option<String>, pub redemption_issuers: Option<Vec<i64>>, pub review: Option<Review>, pub review_status: Option<String>, pub security_animation: Option<SecurityAnimation>, pub text_modules_data: Option<Vec<TextModuleData>>, pub transit_operator_name: Option<LocalizedString>, pub transit_type: Option<String>, pub version: Option<i64>, pub view_unlock_requirement: Option<String>, pub watermark: Option<Image>, pub wide_logo: Option<Image>, pub word_mark: Option<Image>,
}
Expand description

There is no detailed description.

§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).

Fields§

§activation_options: Option<ActivationOptions>

Activation options for an activatable ticket.

§allow_multiple_users_per_object: Option<bool>

Deprecated. Use multipleDevicesAndHoldersAllowedStatus instead.

§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 object that will be used instead.

§callback_options: Option<CallbackOptions>

Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback.

§class_template_info: Option<ClassTemplateInfo>

Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display.

§country_code: Option<String>

Country code used to display the card’s country (when the user is not in that country), as well as to display localized content when content is not available in the user’s locale.

§custom_carriage_label: Option<LocalizedString>

A custom label to use for the carriage value (transitObject.ticketLeg.carriage).

§custom_coach_label: Option<LocalizedString>

A custom label to use for the coach value (transitObject.ticketLeg.ticketSeat.coach).

§custom_concession_category_label: Option<LocalizedString>

A custom label to use for the transit concession category value (transitObject.concessionCategory).

§custom_confirmation_code_label: Option<LocalizedString>

A custom label to use for the confirmation code value (transitObject.purchaseDetails.confirmationCode).

§custom_discount_message_label: Option<LocalizedString>

A custom label to use for the transit discount message value (transitObject.purchaseDetails.ticketCost.discountMessage).

§custom_fare_class_label: Option<LocalizedString>

A custom label to use for the fare class value (transitObject.ticketLeg.ticketSeat.fareClass).

§custom_fare_name_label: Option<LocalizedString>

A custom label to use for the transit fare name value (transitObject.ticketLeg.fareName).

§custom_other_restrictions_label: Option<LocalizedString>

A custom label to use for the other restrictions value (transitObject.ticketRestrictions.otherRestrictions).

§custom_platform_label: Option<LocalizedString>

A custom label to use for the boarding platform value (transitObject.ticketLeg.platform).

§custom_purchase_face_value_label: Option<LocalizedString>

A custom label to use for the purchase face value (transitObject.purchaseDetails.ticketCost.faceValue).

§custom_purchase_price_label: Option<LocalizedString>

A custom label to use for the purchase price value (transitObject.purchaseDetails.ticketCost.purchasePrice).

§custom_purchase_receipt_number_label: Option<LocalizedString>

A custom label to use for the purchase receipt number value (transitObject.purchaseDetails.purchaseReceiptNumber).

§custom_route_restrictions_details_label: Option<LocalizedString>

A custom label to use for the route restrictions details value (transitObject.ticketRestrictions.routeRestrictionsDetails).

§custom_route_restrictions_label: Option<LocalizedString>

A custom label to use for the route restrictions value (transitObject.ticketRestrictions.routeRestrictions).

§custom_seat_label: Option<LocalizedString>

A custom label to use for the seat location value (transitObject.ticketLeg.ticketSeat.seat).

§custom_ticket_number_label: Option<LocalizedString>

A custom label to use for the ticket number value (transitObject.ticketNumber).

§custom_time_restrictions_label: Option<LocalizedString>

A custom label to use for the time restrictions details value (transitObject.ticketRestrictions.timeRestrictions).

§custom_transit_terminus_name_label: Option<LocalizedString>

A custom label to use for the transit terminus name value (transitObject.ticketLeg.transitTerminusName).

§custom_zone_label: Option<LocalizedString>

A custom label to use for the boarding zone value (transitObject.ticketLeg.zone).

§enable_single_leg_itinerary: Option<bool>

Controls the display of the single-leg itinerary for this class. By default, an itinerary will only display for multi-leg trips.

§enable_smart_tap: Option<bool>

Identifies whether this class supports Smart Tap. The redemptionIssuers and object level smartTapRedemptionLevel fields must also be set up correctly in order for a pass to support Smart Tap.

§hero_image: Option<Image>

Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display 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. The format is #rrggbb where rrggbb is a hex RGB triplet, such as #ffcc00. You can also use the shorthand version of the RGB triplet which is #rgb, such as #fc0.

§homepage_uri: Option<Uri>

The URI of your application’s home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object).

§id: Option<String>

Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, ‘.’, ‘_’, or ‘-’.

§image_modules_data: Option<Vec<ImageModuleData>>

Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.

§info_module_data: Option<InfoModuleData>

Deprecated. Use textModulesData instead.

§issuer_name: Option<String>

Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.

§language_override: Option<String>

If this field is present, transit tickets served to a user’s device will always be in this language. Represents the BCP 47 language tag. Example values are “en-US”, “en-GB”, “de”, or “de-AT”.

§links_module_data: Option<LinksModuleData>

Links module data. If links module data is also defined on the object, both will be displayed.

§localized_issuer_name: Option<LocalizedString>

Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.

§locations: Option<Vec<LatLongPoint>>

Note: This field is currently not supported to trigger geo notifications.

Required. The logo image of the ticket. This image is displayed in the card detail view of the app.

§messages: Option<Vec<Message>>

An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.

§multiple_devices_and_holders_allowed_status: Option<String>

Identifies whether multiple users and devices will save the same object referencing this class.

§redemption_issuers: Option<Vec<i64>>

Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The enableSmartTap and object level smartTapRedemptionLevel fields must also be set up correctly in order for a pass to support Smart Tap.

§review: Option<Review>

The review comments set by the platform when a class is marked approved or rejected.

§review_status: Option<String>

Required. The status of the class. This field can be set to draft or underReview using the insert, patch, or update API calls. Once the review state is changed from draft it may not be changed back to draft. You should keep this field to draft when the class is under development. A draft class cannot be used to create any object. You should set this field to underReview when you believe the class is ready for use. The platform will automatically set this field to approved and it can be immediately used to create or migrate objects. When updating an already approved class you should keep setting this field to underReview.

§security_animation: Option<SecurityAnimation>

Optional information about the security animation. If this is set a security animation will be rendered on pass details.

§text_modules_data: Option<Vec<TextModuleData>>

Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.

§transit_operator_name: Option<LocalizedString>

The name of the transit operator.

§transit_type: Option<String>

Required. The type of transit this class represents, such as “bus”.

§version: Option<i64>

Deprecated

§view_unlock_requirement: Option<String>

View Unlock Requirement options for the transit ticket.

§watermark: Option<Image>

Watermark image to display on the user’s device.

The wide logo of the ticket. When provided, this will be used in place of the logo in the top left of the card view.

§word_mark: Option<Image>

Deprecated.

Trait Implementations§

Source§

impl Clone for TransitClass

Source§

fn clone(&self) -> TransitClass

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TransitClass

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TransitClass

Source§

fn default() -> TransitClass

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TransitClass

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TransitClass

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl RequestValue for TransitClass

Source§

impl ResponseResult for TransitClass

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,