# frozen_string_literal: true
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/identity/v1/keyapis_identity_oauth2_v1.proto

require 'google/protobuf'

require 'google/api/annotations_pb'
require 'google/api/field_behavior_pb'
require 'google/protobuf/timestamp_pb'
require 'keyapis/identity/v1/keyapis_identity_authorization_v1_pb'


descriptor_data = "\n4keyapis/identity/v1/keyapis_identity_oauth2_v1.proto\x12\x13keyapis.identity.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a;keyapis/identity/v1/keyapis_identity_authorization_v1.proto\"j\n\x10\x41uthServiceError\x12?\n\x04\x61uth\x18\x01 \x01(\x0b\x32/.keyapis.identity.v1.AuthServiceError.AuthErrorH\x00\x1a\x0b\n\tAuthErrorB\x08\n\x06reason\"e\n\x1cPostOauth2LoginByCodeRequest\x12\x14\n\x07\x63ode_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04\x63ode\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0flogin_challenge\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xd9\x02\n\x1dPostOauth2LoginByCodeResponse\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.keyapis.identity.v1.PostOauth2LoginByCodeResponse.ErrorH\x00\x1a\xe4\x01\n\x05\x45rror\x12\x36\n\x08otp_code\x18\x01 \x01(\x0b\x32\".keyapis.identity.v1.OtpCode.ErrorH\x00\x12,\n\x03sso\x18\x02 \x01(\x0b\x32\x1d.keyapis.identity.v1.SsoErrorH\x00\x12,\n\x03key\x18\x03 \x01(\x0b\x32\x1d.keyapis.identity.v1.KeyErrorH\x00\x12=\n\x0c\x61uth_service\x18\x04 \x01(\x0b\x32%.keyapis.identity.v1.AuthServiceErrorH\x00\x42\x08\n\x06reasonB\x06\n\x04type\"\xda\x01\n PostOauth2LoginByPasswordRequest\x12\x16\n\x0cphone_number\x18\x01 \x01(\tH\x00\x12\x0f\n\x05\x65mail\x18\x02 \x01(\tH\x00\x12\x0f\n\x05login\x18\x03 \x01(\tH\x00\x12\x15\n\x08password\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0e\x63\x61ptcha_answer\x18\x05 \x01(\x0b\x32\".keyapis.identity.v1.CaptchaAnswerB\x03\xe0\x41\x01\x12\x1c\n\x0flogin_challenge\x18\x06 \x01(\tB\x03\xe0\x41\x02\x42\x06\n\x04type\"\xed\x02\n!PostOauth2LoginByPasswordResponse\x12M\n\x05\x65rror\x18\x01 \x01(\x0b\x32<.keyapis.identity.v1.PostOauth2LoginByPasswordResponse.ErrorH\x00\x1a\xf0\x01\n\x05\x45rror\x12\x42\n\x0e\x63\x61ptcha_answer\x18\x01 \x01(\x0b\x32(.keyapis.identity.v1.CaptchaAnswer.ErrorH\x00\x12,\n\x03sso\x18\x02 \x01(\x0b\x32\x1d.keyapis.identity.v1.SsoErrorH\x00\x12,\n\x03key\x18\x03 \x01(\x0b\x32\x1d.keyapis.identity.v1.KeyErrorH\x00\x12=\n\x0c\x61uth_service\x18\x04 \x01(\x0b\x32%.keyapis.identity.v1.AuthServiceErrorH\x00\x42\x08\n\x06reasonB\x06\n\x04type\"9\n\x17GetOauth2ConsentRequest\x12\x1e\n\x11\x63onsent_challenge\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\xba\x01\n\x18GetOauth2ConsentResponse\x12\x44\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x33.keyapis.identity.v1.GetOauth2ConsentResponse.ErrorH\x00\x1aP\n\x05\x45rror\x12=\n\x0c\x61uth_service\x18\x01 \x01(\x0b\x32%.keyapis.identity.v1.AuthServiceErrorH\x00\x42\x08\n\x06reasonB\x06\n\x04type2\xa0\x04\n\rOauth2Service\x12\xb0\x01\n\x15PostOauth2LoginByCode\x12\x31.keyapis.identity.v1.PostOauth2LoginByCodeRequest\x1a\x32.keyapis.identity.v1.PostOauth2LoginByCodeResponse\"0\x82\xd3\xe4\x93\x02*\"%/identity/api/v1/oauth2/login_by_code:\x01*\x12\xc0\x01\n\x19PostOauth2LoginByPassword\x12\x35.keyapis.identity.v1.PostOauth2LoginByPasswordRequest\x1a\x36.keyapis.identity.v1.PostOauth2LoginByPasswordResponse\"4\x82\xd3\xe4\x93\x02.\")/identity/api/v1/oauth2/login_by_password:\x01*\x12\x98\x01\n\x10GetOauth2Consent\x12,.keyapis.identity.v1.GetOauth2ConsentRequest\x1a-.keyapis.identity.v1.GetOauth2ConsentResponse\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/identity/api/v1/oauth2/consentB\xa8\x01\n\x16ru.keyapis.identity.v1B\x16KeyapisIdentityV1ProtoH\x03P\x00Z\x14/keyapis_identity_v1\xd8\x01\x01\xf8\x01\x01\xa2\x02\x11KEYAPISIDENTITYV1\xaa\x02\x13Keyapis.Identity.V1\xca\x02\x13Keyapis\\Identity\\V1\xea\x02\x15Keyapis::Identity::V1b\x06proto3"

pool = Google::Protobuf::DescriptorPool.generated_pool

begin
  pool.add_serialized_file(descriptor_data)
rescue TypeError => e
  # Compatibility code: will be removed in the next major version.
  require 'google/protobuf/descriptor_pb'
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
  parsed.clear_dependency
  serialized = parsed.class.encode(parsed)
  file = pool.add_serialized_file(serialized)
  warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
  imports = [
    ["keyapis.identity.v1.OtpCode.Error", "keyapis/identity/v1/keyapis_identity_authorization_v1.proto"],
  ]
  imports.each do |type_name, expected_filename|
    import_file = pool.lookup(type_name).file_descriptor
    if import_file.name != expected_filename
      warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
    end
  end
  warn "Each proto file must use a consistent fully-qualified name."
  warn "This will become an error in the next major version."
end

module Keyapis
  module Identity
    module V1
      AuthServiceError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.AuthServiceError").msgclass
      AuthServiceError::AuthError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.AuthServiceError.AuthError").msgclass
      PostOauth2LoginByCodeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.PostOauth2LoginByCodeRequest").msgclass
      PostOauth2LoginByCodeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.PostOauth2LoginByCodeResponse").msgclass
      PostOauth2LoginByCodeResponse::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.PostOauth2LoginByCodeResponse.Error").msgclass
      PostOauth2LoginByPasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.PostOauth2LoginByPasswordRequest").msgclass
      PostOauth2LoginByPasswordResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.PostOauth2LoginByPasswordResponse").msgclass
      PostOauth2LoginByPasswordResponse::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.PostOauth2LoginByPasswordResponse.Error").msgclass
      GetOauth2ConsentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.GetOauth2ConsentRequest").msgclass
      GetOauth2ConsentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.GetOauth2ConsentResponse").msgclass
      GetOauth2ConsentResponse::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("keyapis.identity.v1.GetOauth2ConsentResponse.Error").msgclass
    end
  end
end
