# Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: com/daml/ledger/api/v1/package_service.proto

from google.protobuf import (
    descriptor as _descriptor,
    message as _message,
    reflection as _reflection,
    symbol_database as _symbol_database,
)
from google.protobuf.internal import enum_type_wrapper

# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from . import trace_context_pb2 as com_dot_daml_dot_ledger_dot_api_dot_v1_dot_trace__context__pb2

DESCRIPTOR = _descriptor.FileDescriptor(
    name="com/daml/ledger/api/v1/package_service.proto",
    package="com.daml.ledger.api.v1",
    syntax="proto3",
    serialized_options=b"\n\026com.daml.ledger.api.v1B\030PackageServiceOuterClass\252\002\026Com.Daml.Ledger.Api.V1",
    create_key=_descriptor._internal_create_key,
    serialized_pb=b'\n,com/daml/ledger/api/v1/package_service.proto\x12\x16\x63om.daml.ledger.api.v1\x1a*com/daml/ledger/api/v1/trace_context.proto"f\n\x13ListPackagesRequest\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12<\n\rtrace_context\x18\xe8\x07 \x01(\x0b\x32$.com.daml.ledger.api.v1.TraceContext"+\n\x14ListPackagesResponse\x12\x13\n\x0bpackage_ids\x18\x01 \x03(\t"x\n\x11GetPackageRequest\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x12\n\npackage_id\x18\x02 \x01(\t\x12<\n\rtrace_context\x18\xe8\x07 \x01(\x0b\x32$.com.daml.ledger.api.v1.TraceContext"x\n\x12GetPackageResponse\x12;\n\rhash_function\x18\x01 \x01(\x0e\x32$.com.daml.ledger.api.v1.HashFunction\x12\x17\n\x0f\x61rchive_payload\x18\x02 \x01(\x0c\x12\x0c\n\x04hash\x18\x03 \x01(\t"~\n\x17GetPackageStatusRequest\x12\x11\n\tledger_id\x18\x01 \x01(\t\x12\x12\n\npackage_id\x18\x02 \x01(\t\x12<\n\rtrace_context\x18\xe8\x07 \x01(\x0b\x32$.com.daml.ledger.api.v1.TraceContext"Y\n\x18GetPackageStatusResponse\x12=\n\x0epackage_status\x18\x01 \x01(\x0e\x32%.com.daml.ledger.api.v1.PackageStatus*,\n\rPackageStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0e\n\nREGISTERED\x10\x01*\x1a\n\x0cHashFunction\x12\n\n\x06SHA256\x10\x00\x32\xd7\x02\n\x0ePackageService\x12i\n\x0cListPackages\x12+.com.daml.ledger.api.v1.ListPackagesRequest\x1a,.com.daml.ledger.api.v1.ListPackagesResponse\x12\x63\n\nGetPackage\x12).com.daml.ledger.api.v1.GetPackageRequest\x1a*.com.daml.ledger.api.v1.GetPackageResponse\x12u\n\x10GetPackageStatus\x12/.com.daml.ledger.api.v1.GetPackageStatusRequest\x1a\x30.com.daml.ledger.api.v1.GetPackageStatusResponseBK\n\x16\x63om.daml.ledger.api.v1B\x18PackageServiceOuterClass\xaa\x02\x16\x43om.Daml.Ledger.Api.V1b\x06proto3',
    dependencies=[
        com_dot_daml_dot_ledger_dot_api_dot_v1_dot_trace__context__pb2.DESCRIPTOR,
    ],
)

_PACKAGESTATUS = _descriptor.EnumDescriptor(
    name="PackageStatus",
    full_name="com.daml.ledger.api.v1.PackageStatus",
    filename=None,
    file=DESCRIPTOR,
    create_key=_descriptor._internal_create_key,
    values=[
        _descriptor.EnumValueDescriptor(
            name="UNKNOWN",
            index=0,
            number=0,
            serialized_options=None,
            type=None,
            create_key=_descriptor._internal_create_key,
        ),
        _descriptor.EnumValueDescriptor(
            name="REGISTERED",
            index=1,
            number=1,
            serialized_options=None,
            type=None,
            create_key=_descriptor._internal_create_key,
        ),
    ],
    containing_type=None,
    serialized_options=None,
    serialized_start=728,
    serialized_end=772,
)
_sym_db.RegisterEnumDescriptor(_PACKAGESTATUS)

PackageStatus = enum_type_wrapper.EnumTypeWrapper(_PACKAGESTATUS)
_HASHFUNCTION = _descriptor.EnumDescriptor(
    name="HashFunction",
    full_name="com.daml.ledger.api.v1.HashFunction",
    filename=None,
    file=DESCRIPTOR,
    create_key=_descriptor._internal_create_key,
    values=[
        _descriptor.EnumValueDescriptor(
            name="SHA256",
            index=0,
            number=0,
            serialized_options=None,
            type=None,
            create_key=_descriptor._internal_create_key,
        ),
    ],
    containing_type=None,
    serialized_options=None,
    serialized_start=774,
    serialized_end=800,
)
_sym_db.RegisterEnumDescriptor(_HASHFUNCTION)

HashFunction = enum_type_wrapper.EnumTypeWrapper(_HASHFUNCTION)
UNKNOWN = 0
REGISTERED = 1
SHA256 = 0


_LISTPACKAGESREQUEST = _descriptor.Descriptor(
    name="ListPackagesRequest",
    full_name="com.daml.ledger.api.v1.ListPackagesRequest",
    filename=None,
    file=DESCRIPTOR,
    containing_type=None,
    create_key=_descriptor._internal_create_key,
    fields=[
        _descriptor.FieldDescriptor(
            name="ledger_id",
            full_name="com.daml.ledger.api.v1.ListPackagesRequest.ledger_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="trace_context",
            full_name="com.daml.ledger.api.v1.ListPackagesRequest.trace_context",
            index=1,
            number=1000,
            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=116,
    serialized_end=218,
)


_LISTPACKAGESRESPONSE = _descriptor.Descriptor(
    name="ListPackagesResponse",
    full_name="com.daml.ledger.api.v1.ListPackagesResponse",
    filename=None,
    file=DESCRIPTOR,
    containing_type=None,
    create_key=_descriptor._internal_create_key,
    fields=[
        _descriptor.FieldDescriptor(
            name="package_ids",
            full_name="com.daml.ledger.api.v1.ListPackagesResponse.package_ids",
            index=0,
            number=1,
            type=9,
            cpp_type=9,
            label=3,
            has_default_value=False,
            default_value=[],
            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=220,
    serialized_end=263,
)


_GETPACKAGEREQUEST = _descriptor.Descriptor(
    name="GetPackageRequest",
    full_name="com.daml.ledger.api.v1.GetPackageRequest",
    filename=None,
    file=DESCRIPTOR,
    containing_type=None,
    create_key=_descriptor._internal_create_key,
    fields=[
        _descriptor.FieldDescriptor(
            name="ledger_id",
            full_name="com.daml.ledger.api.v1.GetPackageRequest.ledger_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="package_id",
            full_name="com.daml.ledger.api.v1.GetPackageRequest.package_id",
            index=1,
            number=2,
            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="trace_context",
            full_name="com.daml.ledger.api.v1.GetPackageRequest.trace_context",
            index=2,
            number=1000,
            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=265,
    serialized_end=385,
)


_GETPACKAGERESPONSE = _descriptor.Descriptor(
    name="GetPackageResponse",
    full_name="com.daml.ledger.api.v1.GetPackageResponse",
    filename=None,
    file=DESCRIPTOR,
    containing_type=None,
    create_key=_descriptor._internal_create_key,
    fields=[
        _descriptor.FieldDescriptor(
            name="hash_function",
            full_name="com.daml.ledger.api.v1.GetPackageResponse.hash_function",
            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="archive_payload",
            full_name="com.daml.ledger.api.v1.GetPackageResponse.archive_payload",
            index=1,
            number=2,
            type=12,
            cpp_type=9,
            label=1,
            has_default_value=False,
            default_value=b"",
            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="hash",
            full_name="com.daml.ledger.api.v1.GetPackageResponse.hash",
            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,
        ),
    ],
    extensions=[],
    nested_types=[],
    enum_types=[],
    serialized_options=None,
    is_extendable=False,
    syntax="proto3",
    extension_ranges=[],
    oneofs=[],
    serialized_start=387,
    serialized_end=507,
)


_GETPACKAGESTATUSREQUEST = _descriptor.Descriptor(
    name="GetPackageStatusRequest",
    full_name="com.daml.ledger.api.v1.GetPackageStatusRequest",
    filename=None,
    file=DESCRIPTOR,
    containing_type=None,
    create_key=_descriptor._internal_create_key,
    fields=[
        _descriptor.FieldDescriptor(
            name="ledger_id",
            full_name="com.daml.ledger.api.v1.GetPackageStatusRequest.ledger_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="package_id",
            full_name="com.daml.ledger.api.v1.GetPackageStatusRequest.package_id",
            index=1,
            number=2,
            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="trace_context",
            full_name="com.daml.ledger.api.v1.GetPackageStatusRequest.trace_context",
            index=2,
            number=1000,
            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=509,
    serialized_end=635,
)


_GETPACKAGESTATUSRESPONSE = _descriptor.Descriptor(
    name="GetPackageStatusResponse",
    full_name="com.daml.ledger.api.v1.GetPackageStatusResponse",
    filename=None,
    file=DESCRIPTOR,
    containing_type=None,
    create_key=_descriptor._internal_create_key,
    fields=[
        _descriptor.FieldDescriptor(
            name="package_status",
            full_name="com.daml.ledger.api.v1.GetPackageStatusResponse.package_status",
            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,
        ),
    ],
    extensions=[],
    nested_types=[],
    enum_types=[],
    serialized_options=None,
    is_extendable=False,
    syntax="proto3",
    extension_ranges=[],
    oneofs=[],
    serialized_start=637,
    serialized_end=726,
)

_LISTPACKAGESREQUEST.fields_by_name[
    "trace_context"
].message_type = com_dot_daml_dot_ledger_dot_api_dot_v1_dot_trace__context__pb2._TRACECONTEXT
_GETPACKAGEREQUEST.fields_by_name[
    "trace_context"
].message_type = com_dot_daml_dot_ledger_dot_api_dot_v1_dot_trace__context__pb2._TRACECONTEXT
_GETPACKAGERESPONSE.fields_by_name["hash_function"].enum_type = _HASHFUNCTION
_GETPACKAGESTATUSREQUEST.fields_by_name[
    "trace_context"
].message_type = com_dot_daml_dot_ledger_dot_api_dot_v1_dot_trace__context__pb2._TRACECONTEXT
_GETPACKAGESTATUSRESPONSE.fields_by_name["package_status"].enum_type = _PACKAGESTATUS
DESCRIPTOR.message_types_by_name["ListPackagesRequest"] = _LISTPACKAGESREQUEST
DESCRIPTOR.message_types_by_name["ListPackagesResponse"] = _LISTPACKAGESRESPONSE
DESCRIPTOR.message_types_by_name["GetPackageRequest"] = _GETPACKAGEREQUEST
DESCRIPTOR.message_types_by_name["GetPackageResponse"] = _GETPACKAGERESPONSE
DESCRIPTOR.message_types_by_name["GetPackageStatusRequest"] = _GETPACKAGESTATUSREQUEST
DESCRIPTOR.message_types_by_name["GetPackageStatusResponse"] = _GETPACKAGESTATUSRESPONSE
DESCRIPTOR.enum_types_by_name["PackageStatus"] = _PACKAGESTATUS
DESCRIPTOR.enum_types_by_name["HashFunction"] = _HASHFUNCTION
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

ListPackagesRequest = _reflection.GeneratedProtocolMessageType(
    "ListPackagesRequest",
    (_message.Message,),
    {
        "DESCRIPTOR": _LISTPACKAGESREQUEST,
        "__module__": "com.daml.ledger.api.v1.package_service_pb2"
        # @@protoc_insertion_point(class_scope:com.daml.ledger.api.v1.ListPackagesRequest)
    },
)
_sym_db.RegisterMessage(ListPackagesRequest)

ListPackagesResponse = _reflection.GeneratedProtocolMessageType(
    "ListPackagesResponse",
    (_message.Message,),
    {
        "DESCRIPTOR": _LISTPACKAGESRESPONSE,
        "__module__": "com.daml.ledger.api.v1.package_service_pb2"
        # @@protoc_insertion_point(class_scope:com.daml.ledger.api.v1.ListPackagesResponse)
    },
)
_sym_db.RegisterMessage(ListPackagesResponse)

GetPackageRequest = _reflection.GeneratedProtocolMessageType(
    "GetPackageRequest",
    (_message.Message,),
    {
        "DESCRIPTOR": _GETPACKAGEREQUEST,
        "__module__": "com.daml.ledger.api.v1.package_service_pb2"
        # @@protoc_insertion_point(class_scope:com.daml.ledger.api.v1.GetPackageRequest)
    },
)
_sym_db.RegisterMessage(GetPackageRequest)

GetPackageResponse = _reflection.GeneratedProtocolMessageType(
    "GetPackageResponse",
    (_message.Message,),
    {
        "DESCRIPTOR": _GETPACKAGERESPONSE,
        "__module__": "com.daml.ledger.api.v1.package_service_pb2"
        # @@protoc_insertion_point(class_scope:com.daml.ledger.api.v1.GetPackageResponse)
    },
)
_sym_db.RegisterMessage(GetPackageResponse)

GetPackageStatusRequest = _reflection.GeneratedProtocolMessageType(
    "GetPackageStatusRequest",
    (_message.Message,),
    {
        "DESCRIPTOR": _GETPACKAGESTATUSREQUEST,
        "__module__": "com.daml.ledger.api.v1.package_service_pb2"
        # @@protoc_insertion_point(class_scope:com.daml.ledger.api.v1.GetPackageStatusRequest)
    },
)
_sym_db.RegisterMessage(GetPackageStatusRequest)

GetPackageStatusResponse = _reflection.GeneratedProtocolMessageType(
    "GetPackageStatusResponse",
    (_message.Message,),
    {
        "DESCRIPTOR": _GETPACKAGESTATUSRESPONSE,
        "__module__": "com.daml.ledger.api.v1.package_service_pb2"
        # @@protoc_insertion_point(class_scope:com.daml.ledger.api.v1.GetPackageStatusResponse)
    },
)
_sym_db.RegisterMessage(GetPackageStatusResponse)


DESCRIPTOR._options = None

_PACKAGESERVICE = _descriptor.ServiceDescriptor(
    name="PackageService",
    full_name="com.daml.ledger.api.v1.PackageService",
    file=DESCRIPTOR,
    index=0,
    serialized_options=None,
    create_key=_descriptor._internal_create_key,
    serialized_start=803,
    serialized_end=1146,
    methods=[
        _descriptor.MethodDescriptor(
            name="ListPackages",
            full_name="com.daml.ledger.api.v1.PackageService.ListPackages",
            index=0,
            containing_service=None,
            input_type=_LISTPACKAGESREQUEST,
            output_type=_LISTPACKAGESRESPONSE,
            serialized_options=None,
            create_key=_descriptor._internal_create_key,
        ),
        _descriptor.MethodDescriptor(
            name="GetPackage",
            full_name="com.daml.ledger.api.v1.PackageService.GetPackage",
            index=1,
            containing_service=None,
            input_type=_GETPACKAGEREQUEST,
            output_type=_GETPACKAGERESPONSE,
            serialized_options=None,
            create_key=_descriptor._internal_create_key,
        ),
        _descriptor.MethodDescriptor(
            name="GetPackageStatus",
            full_name="com.daml.ledger.api.v1.PackageService.GetPackageStatus",
            index=2,
            containing_service=None,
            input_type=_GETPACKAGESTATUSREQUEST,
            output_type=_GETPACKAGESTATUSRESPONSE,
            serialized_options=None,
            create_key=_descriptor._internal_create_key,
        ),
    ],
)
_sym_db.RegisterServiceDescriptor(_PACKAGESERVICE)

DESCRIPTOR.services_by_name["PackageService"] = _PACKAGESERVICE

# @@protoc_insertion_point(module_scope)
