# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/iam/v1/iam_policy.proto

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
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from google.iam.v1 import policy_pb2 as google_dot_iam_dot_v1_dot_policy__pb2


DESCRIPTOR = _descriptor.FileDescriptor(
  name='google/iam/v1/iam_policy.proto',
  package='google.iam.v1',
  syntax='proto3',
  serialized_pb=b'\n\x1egoogle/iam/v1/iam_policy.proto\x12\rgoogle.iam.v1\x1a\x1agoogle/iam/v1/policy.proto\"N\n\x13SetIamPolicyRequest\x12\x10\n\x08resource\x18\x01 \x01(\t\x12%\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.Policy\"\'\n\x13GetIamPolicyRequest\x12\x10\n\x08resource\x18\x01 \x01(\t\"B\n\x19TestIamPermissionsRequest\x12\x10\n\x08resource\x18\x01 \x01(\t\x12\x13\n\x0bpermissions\x18\x02 \x03(\t\"1\n\x1aTestIamPermissionsResponse\x12\x13\n\x0bpermissions\x18\x01 \x03(\t2\x8c\x02\n\tIAMPolicy\x12I\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\x12I\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\x12i\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponseB%\n\x11\x63om.google.iam.v1B\x0eIamPolicyProtoP\x01\x62\x06proto3'
  ,
  dependencies=[google_dot_iam_dot_v1_dot_policy__pb2.DESCRIPTOR,])
_sym_db.RegisterFileDescriptor(DESCRIPTOR)




_SETIAMPOLICYREQUEST = _descriptor.Descriptor(
  name='SetIamPolicyRequest',
  full_name='google.iam.v1.SetIamPolicyRequest',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='resource', full_name='google.iam.v1.SetIamPolicyRequest.resource', 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,
      options=None),
    _descriptor.FieldDescriptor(
      name='policy', full_name='google.iam.v1.SetIamPolicyRequest.policy', 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,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=77,
  serialized_end=155,
)


_GETIAMPOLICYREQUEST = _descriptor.Descriptor(
  name='GetIamPolicyRequest',
  full_name='google.iam.v1.GetIamPolicyRequest',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='resource', full_name='google.iam.v1.GetIamPolicyRequest.resource', 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,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=157,
  serialized_end=196,
)


_TESTIAMPERMISSIONSREQUEST = _descriptor.Descriptor(
  name='TestIamPermissionsRequest',
  full_name='google.iam.v1.TestIamPermissionsRequest',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='resource', full_name='google.iam.v1.TestIamPermissionsRequest.resource', 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,
      options=None),
    _descriptor.FieldDescriptor(
      name='permissions', full_name='google.iam.v1.TestIamPermissionsRequest.permissions', index=1,
      number=2, 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,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=198,
  serialized_end=264,
)


_TESTIAMPERMISSIONSRESPONSE = _descriptor.Descriptor(
  name='TestIamPermissionsResponse',
  full_name='google.iam.v1.TestIamPermissionsResponse',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='permissions', full_name='google.iam.v1.TestIamPermissionsResponse.permissions', 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,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=266,
  serialized_end=315,
)

_SETIAMPOLICYREQUEST.fields_by_name['policy'].message_type = google_dot_iam_dot_v1_dot_policy__pb2._POLICY
DESCRIPTOR.message_types_by_name['SetIamPolicyRequest'] = _SETIAMPOLICYREQUEST
DESCRIPTOR.message_types_by_name['GetIamPolicyRequest'] = _GETIAMPOLICYREQUEST
DESCRIPTOR.message_types_by_name['TestIamPermissionsRequest'] = _TESTIAMPERMISSIONSREQUEST
DESCRIPTOR.message_types_by_name['TestIamPermissionsResponse'] = _TESTIAMPERMISSIONSRESPONSE

SetIamPolicyRequest = _reflection.GeneratedProtocolMessageType('SetIamPolicyRequest', (_message.Message,), dict(
  DESCRIPTOR = _SETIAMPOLICYREQUEST,
  __module__ = 'google.iam.v1.iam_policy_pb2'
  # @@protoc_insertion_point(class_scope:google.iam.v1.SetIamPolicyRequest)
  ))
_sym_db.RegisterMessage(SetIamPolicyRequest)

GetIamPolicyRequest = _reflection.GeneratedProtocolMessageType('GetIamPolicyRequest', (_message.Message,), dict(
  DESCRIPTOR = _GETIAMPOLICYREQUEST,
  __module__ = 'google.iam.v1.iam_policy_pb2'
  # @@protoc_insertion_point(class_scope:google.iam.v1.GetIamPolicyRequest)
  ))
_sym_db.RegisterMessage(GetIamPolicyRequest)

TestIamPermissionsRequest = _reflection.GeneratedProtocolMessageType('TestIamPermissionsRequest', (_message.Message,), dict(
  DESCRIPTOR = _TESTIAMPERMISSIONSREQUEST,
  __module__ = 'google.iam.v1.iam_policy_pb2'
  # @@protoc_insertion_point(class_scope:google.iam.v1.TestIamPermissionsRequest)
  ))
_sym_db.RegisterMessage(TestIamPermissionsRequest)

TestIamPermissionsResponse = _reflection.GeneratedProtocolMessageType('TestIamPermissionsResponse', (_message.Message,), dict(
  DESCRIPTOR = _TESTIAMPERMISSIONSRESPONSE,
  __module__ = 'google.iam.v1.iam_policy_pb2'
  # @@protoc_insertion_point(class_scope:google.iam.v1.TestIamPermissionsResponse)
  ))
_sym_db.RegisterMessage(TestIamPermissionsResponse)


DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\021com.google.iam.v1B\016IamPolicyProtoP\001')
import abc
from grpc.beta import implementations as beta_implementations
from grpc.early_adopter import implementations as early_adopter_implementations
from grpc.framework.alpha import utilities as alpha_utilities
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
class EarlyAdopterIAMPolicyServicer(object):
  """<fill me in later!>"""
  __metaclass__ = abc.ABCMeta
  @abc.abstractmethod
  def SetIamPolicy(self, request, context):
    raise NotImplementedError()
  @abc.abstractmethod
  def GetIamPolicy(self, request, context):
    raise NotImplementedError()
  @abc.abstractmethod
  def TestIamPermissions(self, request, context):
    raise NotImplementedError()
class EarlyAdopterIAMPolicyServer(object):
  """<fill me in later!>"""
  __metaclass__ = abc.ABCMeta
  @abc.abstractmethod
  def start(self):
    raise NotImplementedError()
  @abc.abstractmethod
  def stop(self):
    raise NotImplementedError()
class EarlyAdopterIAMPolicyStub(object):
  """<fill me in later!>"""
  __metaclass__ = abc.ABCMeta
  @abc.abstractmethod
  def SetIamPolicy(self, request):
    raise NotImplementedError()
  SetIamPolicy.async = None
  @abc.abstractmethod
  def GetIamPolicy(self, request):
    raise NotImplementedError()
  GetIamPolicy.async = None
  @abc.abstractmethod
  def TestIamPermissions(self, request):
    raise NotImplementedError()
  TestIamPermissions.async = None
def early_adopter_create_IAMPolicy_server(servicer, port, private_key=None, certificate_chain=None):
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.iam_policy_pb2
  method_service_descriptions = {
    "GetIamPolicy": alpha_utilities.unary_unary_service_description(
      servicer.GetIamPolicy,
      google.iam.v1.iam_policy_pb2.GetIamPolicyRequest.FromString,
      google.iam.v1.policy_pb2.Policy.SerializeToString,
    ),
    "SetIamPolicy": alpha_utilities.unary_unary_service_description(
      servicer.SetIamPolicy,
      google.iam.v1.iam_policy_pb2.SetIamPolicyRequest.FromString,
      google.iam.v1.policy_pb2.Policy.SerializeToString,
    ),
    "TestIamPermissions": alpha_utilities.unary_unary_service_description(
      servicer.TestIamPermissions,
      google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest.FromString,
      google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse.SerializeToString,
    ),
  }
  return early_adopter_implementations.server("google.iam.v1.IAMPolicy", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain)
def early_adopter_create_IAMPolicy_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None):
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.iam_policy_pb2
  method_invocation_descriptions = {
    "GetIamPolicy": alpha_utilities.unary_unary_invocation_description(
      google.iam.v1.iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
      google.iam.v1.policy_pb2.Policy.FromString,
    ),
    "SetIamPolicy": alpha_utilities.unary_unary_invocation_description(
      google.iam.v1.iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
      google.iam.v1.policy_pb2.Policy.FromString,
    ),
    "TestIamPermissions": alpha_utilities.unary_unary_invocation_description(
      google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
      google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse.FromString,
    ),
  }
  return early_adopter_implementations.stub("google.iam.v1.IAMPolicy", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override)

class BetaIAMPolicyServicer(object):
  """<fill me in later!>"""
  __metaclass__ = abc.ABCMeta
  @abc.abstractmethod
  def SetIamPolicy(self, request, context):
    raise NotImplementedError()
  @abc.abstractmethod
  def GetIamPolicy(self, request, context):
    raise NotImplementedError()
  @abc.abstractmethod
  def TestIamPermissions(self, request, context):
    raise NotImplementedError()

class BetaIAMPolicyStub(object):
  """The interface to which stubs will conform."""
  __metaclass__ = abc.ABCMeta
  @abc.abstractmethod
  def SetIamPolicy(self, request, timeout):
    raise NotImplementedError()
  SetIamPolicy.future = None
  @abc.abstractmethod
  def GetIamPolicy(self, request, timeout):
    raise NotImplementedError()
  GetIamPolicy.future = None
  @abc.abstractmethod
  def TestIamPermissions(self, request, timeout):
    raise NotImplementedError()
  TestIamPermissions.future = None

def beta_create_IAMPolicy_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.iam_policy_pb2
  request_deserializers = {
    ('google.iam.v1.IAMPolicy', 'GetIamPolicy'): google.iam.v1.iam_policy_pb2.GetIamPolicyRequest.FromString,
    ('google.iam.v1.IAMPolicy', 'SetIamPolicy'): google.iam.v1.iam_policy_pb2.SetIamPolicyRequest.FromString,
    ('google.iam.v1.IAMPolicy', 'TestIamPermissions'): google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest.FromString,
  }
  response_serializers = {
    ('google.iam.v1.IAMPolicy', 'GetIamPolicy'): google.iam.v1.policy_pb2.Policy.SerializeToString,
    ('google.iam.v1.IAMPolicy', 'SetIamPolicy'): google.iam.v1.policy_pb2.Policy.SerializeToString,
    ('google.iam.v1.IAMPolicy', 'TestIamPermissions'): google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse.SerializeToString,
  }
  method_implementations = {
    ('google.iam.v1.IAMPolicy', 'GetIamPolicy'): face_utilities.unary_unary_inline(servicer.GetIamPolicy),
    ('google.iam.v1.IAMPolicy', 'SetIamPolicy'): face_utilities.unary_unary_inline(servicer.SetIamPolicy),
    ('google.iam.v1.IAMPolicy', 'TestIamPermissions'): face_utilities.unary_unary_inline(servicer.TestIamPermissions),
  }
  server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
  return beta_implementations.server(method_implementations, options=server_options)

def beta_create_IAMPolicy_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.policy_pb2
  import google.iam.v1.iam_policy_pb2
  import google.iam.v1.iam_policy_pb2
  request_serializers = {
    ('google.iam.v1.IAMPolicy', 'GetIamPolicy'): google.iam.v1.iam_policy_pb2.GetIamPolicyRequest.SerializeToString,
    ('google.iam.v1.IAMPolicy', 'SetIamPolicy'): google.iam.v1.iam_policy_pb2.SetIamPolicyRequest.SerializeToString,
    ('google.iam.v1.IAMPolicy', 'TestIamPermissions'): google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest.SerializeToString,
  }
  response_deserializers = {
    ('google.iam.v1.IAMPolicy', 'GetIamPolicy'): google.iam.v1.policy_pb2.Policy.FromString,
    ('google.iam.v1.IAMPolicy', 'SetIamPolicy'): google.iam.v1.policy_pb2.Policy.FromString,
    ('google.iam.v1.IAMPolicy', 'TestIamPermissions'): google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse.FromString,
  }
  cardinalities = {
    'GetIamPolicy': cardinality.Cardinality.UNARY_UNARY,
    'SetIamPolicy': cardinality.Cardinality.UNARY_UNARY,
    'TestIamPermissions': cardinality.Cardinality.UNARY_UNARY,
  }
  stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
  return beta_implementations.dynamic_stub(channel, 'google.iam.v1.IAMPolicy', cardinalities, options=stub_options)
# @@protoc_insertion_point(module_scope)
