# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: opencannabis/commerce/Discounts.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from opencannabis.temporal import Instant_pb2 as opencannabis_dot_temporal_dot_Instant__pb2


DESCRIPTOR = _descriptor.FileDescriptor(
  name='opencannabis/commerce/Discounts.proto',
  package='opencannabis.commerce',
  syntax='proto3',
  serialized_options=b'\n!io.opencannabis.schema.accountingB\023CommercialDiscountsH\001P\000\242\002\003OCS',
  create_key=_descriptor._internal_create_key,
  serialized_pb=b'\n%opencannabis/commerce/Discounts.proto\x12\x15opencannabis.commerce\x1a#opencannabis/temporal/Instant.proto\"\xac\x01\n\x0c\x44iscountSpec\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32#.opencannabis.commerce.DiscountType\x12\x33\n\x05\x62\x61sis\x18\x02 \x01(\x0e\x32$.opencannabis.commerce.DiscountBasis\x12\x14\n\npercentage\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstatic_value\x18\x04 \x01(\x01H\x00\x42\x06\n\x04rate\"\xe4\x01\n\x08\x44iscount\x12\n\n\x02id\x18\x01 \x01(\t\x12\x31\n\x04spec\x18\x02 \x01(\x0b\x32#.opencannabis.commerce.DiscountSpec\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\r\n\x05label\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x33\n\x0bmodified_at\x18\x07 \x01(\x0b\x32\x1e.opencannabis.temporal.Instant\x12\x32\n\ncreated_at\x18\x06 \x01(\x0b\x32\x1e.opencannabis.temporal.Instant*9\n\x0c\x44iscountType\x12\n\n\x06\x43USTOM\x10\x00\x12\r\n\tSTATUTORY\x10\x01\x12\x0e\n\nCOMMERCIAL\x10\x02*>\n\rDiscountBasis\x12\x08\n\x04ITEM\x10\x00\x12\x12\n\x0eORDER_SUBTOTAL\x10\x01\x12\x0f\n\x0bORDER_TOTAL\x10\x02\x42\x42\n!io.opencannabis.schema.accountingB\x13\x43ommercialDiscountsH\x01P\x00\xa2\x02\x03OCSb\x06proto3'
  ,
  dependencies=[opencannabis_dot_temporal_dot_Instant__pb2.DESCRIPTOR,])

_DISCOUNTTYPE = _descriptor.EnumDescriptor(
  name='DiscountType',
  full_name='opencannabis.commerce.DiscountType',
  filename=None,
  file=DESCRIPTOR,
  create_key=_descriptor._internal_create_key,
  values=[
    _descriptor.EnumValueDescriptor(
      name='CUSTOM', index=0, number=0,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='STATUTORY', index=1, number=1,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='COMMERCIAL', index=2, number=2,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
  ],
  containing_type=None,
  serialized_options=None,
  serialized_start=507,
  serialized_end=564,
)
_sym_db.RegisterEnumDescriptor(_DISCOUNTTYPE)

DiscountType = enum_type_wrapper.EnumTypeWrapper(_DISCOUNTTYPE)
_DISCOUNTBASIS = _descriptor.EnumDescriptor(
  name='DiscountBasis',
  full_name='opencannabis.commerce.DiscountBasis',
  filename=None,
  file=DESCRIPTOR,
  create_key=_descriptor._internal_create_key,
  values=[
    _descriptor.EnumValueDescriptor(
      name='ITEM', index=0, number=0,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='ORDER_SUBTOTAL', index=1, number=1,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='ORDER_TOTAL', index=2, number=2,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
  ],
  containing_type=None,
  serialized_options=None,
  serialized_start=566,
  serialized_end=628,
)
_sym_db.RegisterEnumDescriptor(_DISCOUNTBASIS)

DiscountBasis = enum_type_wrapper.EnumTypeWrapper(_DISCOUNTBASIS)
CUSTOM = 0
STATUTORY = 1
COMMERCIAL = 2
ITEM = 0
ORDER_SUBTOTAL = 1
ORDER_TOTAL = 2



_DISCOUNTSPEC = _descriptor.Descriptor(
  name='DiscountSpec',
  full_name='opencannabis.commerce.DiscountSpec',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='type', full_name='opencannabis.commerce.DiscountSpec.type', index=0,
      number=1, type=14, cpp_type=8, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='basis', full_name='opencannabis.commerce.DiscountSpec.basis', index=1,
      number=2, type=14, cpp_type=8, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='percentage', full_name='opencannabis.commerce.DiscountSpec.percentage', index=2,
      number=3, type=1, cpp_type=5, label=1,
      has_default_value=False, default_value=float(0),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='static_value', full_name='opencannabis.commerce.DiscountSpec.static_value', index=3,
      number=4, type=1, cpp_type=5, label=1,
      has_default_value=False, default_value=float(0),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
    _descriptor.OneofDescriptor(
      name='rate', full_name='opencannabis.commerce.DiscountSpec.rate',
      index=0, containing_type=None,
      create_key=_descriptor._internal_create_key,
    fields=[]),
  ],
  serialized_start=102,
  serialized_end=274,
)


_DISCOUNT = _descriptor.Descriptor(
  name='Discount',
  full_name='opencannabis.commerce.Discount',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='id', full_name='opencannabis.commerce.Discount.id', index=0,
      number=1, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='spec', full_name='opencannabis.commerce.Discount.spec', index=1,
      number=2, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='name', full_name='opencannabis.commerce.Discount.name', index=2,
      number=3, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='label', full_name='opencannabis.commerce.Discount.label', index=3,
      number=4, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='description', full_name='opencannabis.commerce.Discount.description', index=4,
      number=5, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='modified_at', full_name='opencannabis.commerce.Discount.modified_at', index=5,
      number=7, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='created_at', full_name='opencannabis.commerce.Discount.created_at', index=6,
      number=6, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=277,
  serialized_end=505,
)

_DISCOUNTSPEC.fields_by_name['type'].enum_type = _DISCOUNTTYPE
_DISCOUNTSPEC.fields_by_name['basis'].enum_type = _DISCOUNTBASIS
_DISCOUNTSPEC.oneofs_by_name['rate'].fields.append(
  _DISCOUNTSPEC.fields_by_name['percentage'])
_DISCOUNTSPEC.fields_by_name['percentage'].containing_oneof = _DISCOUNTSPEC.oneofs_by_name['rate']
_DISCOUNTSPEC.oneofs_by_name['rate'].fields.append(
  _DISCOUNTSPEC.fields_by_name['static_value'])
_DISCOUNTSPEC.fields_by_name['static_value'].containing_oneof = _DISCOUNTSPEC.oneofs_by_name['rate']
_DISCOUNT.fields_by_name['spec'].message_type = _DISCOUNTSPEC
_DISCOUNT.fields_by_name['modified_at'].message_type = opencannabis_dot_temporal_dot_Instant__pb2._INSTANT
_DISCOUNT.fields_by_name['created_at'].message_type = opencannabis_dot_temporal_dot_Instant__pb2._INSTANT
DESCRIPTOR.message_types_by_name['DiscountSpec'] = _DISCOUNTSPEC
DESCRIPTOR.message_types_by_name['Discount'] = _DISCOUNT
DESCRIPTOR.enum_types_by_name['DiscountType'] = _DISCOUNTTYPE
DESCRIPTOR.enum_types_by_name['DiscountBasis'] = _DISCOUNTBASIS
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

DiscountSpec = _reflection.GeneratedProtocolMessageType('DiscountSpec', (_message.Message,), {
  'DESCRIPTOR' : _DISCOUNTSPEC,
  '__module__' : 'opencannabis.commerce.Discounts_pb2'
  # @@protoc_insertion_point(class_scope:opencannabis.commerce.DiscountSpec)
  })
_sym_db.RegisterMessage(DiscountSpec)

Discount = _reflection.GeneratedProtocolMessageType('Discount', (_message.Message,), {
  'DESCRIPTOR' : _DISCOUNT,
  '__module__' : 'opencannabis.commerce.Discounts_pb2'
  # @@protoc_insertion_point(class_scope:opencannabis.commerce.Discount)
  })
_sym_db.RegisterMessage(Discount)


DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)
