Esempio n. 1
0
class TransactionUpdateRequest(messages.Message):
    type = messages.StringField(1)
    payment_type = messages.StringField(2)
    amount = messages.FloatField(3)
    transaction_date = messages.IntegerField(4)
    borrower_id = messages.StringField(5)
    interest_rate = messages.FloatField(6)
Esempio n. 2
0
        class AllTypes(messages.Message):
            """Contains all field types."""
            class SimpleEnum(messages.Enum):
                """Simple enumeration type."""
                VAL1 = 1
                VAL2 = 2

            bool_value = messages.BooleanField(1,
                                               variant=messages.Variant.BOOL)
            bytes_value = messages.BytesField(2,
                                              variant=messages.Variant.BYTES)
            double_value = messages.FloatField(3,
                                               variant=messages.Variant.DOUBLE)
            enum_value = messages.EnumField(SimpleEnum, 4)
            float_value = messages.FloatField(5,
                                              variant=messages.Variant.FLOAT)
            int32_value = messages.IntegerField(6,
                                                variant=messages.Variant.INT32)
            int64_value = messages.IntegerField(7,
                                                variant=messages.Variant.INT64)
            string_value = messages.StringField(
                8, variant=messages.Variant.STRING)
            uint32_value = messages.IntegerField(
                9, variant=messages.Variant.UINT32)
            uint64_value = messages.IntegerField(
                10, variant=messages.Variant.UINT64)
            int_value = messages.IntegerField(11)  # Default variant is INT64.
            datetime_value = message_types.DateTimeField(12)
            repeated_datetime_value = message_types.DateTimeField(
                13, repeated=True)
Esempio n. 3
0
class TransactionResponse(messages.Message):
    type = messages.StringField(1)
    payment_type = messages.StringField(2)
    amount = messages.FloatField(3)
    transaction_date = messages.IntegerField(4)
    borrower_id = messages.StringField(5)
    borrower_name = messages.StringField(6)
    interest_rate = messages.FloatField(7)
    transaction_id = messages.StringField(8)
class OverviewResponse(messages.Message):
    borrower_name = messages.StringField(1)
    outstanding_principal = messages.FloatField(2)
    outstanding_interest = messages.FloatField(3)
    paid_interest = messages.FloatField(4)
    paid_principal = messages.FloatField(5)
    date = messages.IntegerField(6)
    last_transaction_date = messages.IntegerField(7)
    borrower_id = messages.StringField(8)
class AllBasicFields(messages.Message):
    """Contains all field types."""

    bool_value = messages.BooleanField(1, variant=messages.Variant.BOOL)
    bytes_value = messages.BytesField(2, variant=messages.Variant.BYTES)
    double_value = messages.FloatField(3, variant=messages.Variant.DOUBLE)
    float_value = messages.FloatField(5, variant=messages.Variant.FLOAT)
    int32_value = messages.IntegerField(6, variant=messages.Variant.INT32)
    int64_value = messages.IntegerField(7, variant=messages.Variant.INT64)
    string_value = messages.StringField(8, variant=messages.Variant.STRING)
    uint32_value = messages.IntegerField(9, variant=messages.Variant.UINT32)
    uint64_value = messages.IntegerField(10, variant=messages.Variant.UINT64)
    sint32_value = messages.IntegerField(11, variant=messages.Variant.SINT32)
    sint64_value = messages.IntegerField(12, variant=messages.Variant.SINT64)
    datetime_value = message_types.DateTimeField(14)
Esempio n. 6
0
class AddEventRequest(messages.Message):
    """"Request object for addEvent API method"""

    content_id = messages.StringField(1)
    time = messages.FloatField(2)
    user_info = messages.MessageField(UserInfo.__name__, 3)