# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: google/type/date.proto, google/type/money.proto
# plugin: python-betterproto
# This file has been @generated

__all__ = (
    "Money",
    "Date",
)


from dataclasses import dataclass

import betterproto


@dataclass(eq=False, repr=False)
class Money(betterproto.Message):
    """Represents an amount of money with its currency type."""

    currency_code: str = betterproto.string_field(1)
    """The three-letter currency code defined in ISO 4217."""

    units: int = betterproto.int64_field(2)
    """
    The whole units of the amount.
    For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
    """

    nanos: int = betterproto.int32_field(3)
    """
    Number of nano (10^-9) units of the amount.
    The value must be between -999,999,999 and +999,999,999 inclusive.
    If `units` is positive, `nanos` must be positive or zero.
    If `units` is zero, `nanos` can be positive, zero, or negative.
    If `units` is negative, `nanos` must be negative or zero.
    For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
    """


@dataclass(eq=False, repr=False)
class Date(betterproto.Message):
    """
    Represents a whole or partial calendar date, such as a birthday. The time of
    day and time zone are either specified elsewhere or are insignificant. The
    date is relative to the Gregorian Calendar. This can represent one of the
    following:

    * A full date, with non-zero year, month, and day values
    * A month and day value, with a zero year, such as an anniversary
    * A year on its own, with zero month and day values
    * A year and month value, with a zero day, such as a credit card expiration
    date

    Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
    `google.protobuf.Timestamp`.
    """

    year: int = betterproto.int32_field(1)
    """
    Year of the date. Must be from 1 to 9999, or 0 to specify a date without
    a year.
    """

    month: int = betterproto.int32_field(2)
    """
    Month of a year. Must be from 1 to 12, or 0 to specify a year without a
    month and day.
    """

    day: int = betterproto.int32_field(3)
    """
    Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
    to specify a year by itself or a year and month where the day isn't
    significant.
    """
