package iam 

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/yandex-cloud/go-genproto/yandex/cloud/validation"

var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

const _ = proto.ProtoPackageIsVersion2 

type UserAccount struct {

	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`

	UserAccount          isUserAccount_UserAccount `protobuf_oneof:"user_account"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (m *UserAccount) Reset()         { *m = UserAccount{} }
func (m *UserAccount) String() string { return proto.CompactTextString(m) }
func (*UserAccount) ProtoMessage()    {}
func (*UserAccount) Descriptor() ([]byte, []int) {
	return fileDescriptor_user_account_1a28e7bc8da60c3e, []int{0}
}
func (m *UserAccount) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_UserAccount.Unmarshal(m, b)
}
func (m *UserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_UserAccount.Marshal(b, m, deterministic)
}
func (dst *UserAccount) XXX_Merge(src proto.Message) {
	xxx_messageInfo_UserAccount.Merge(dst, src)
}
func (m *UserAccount) XXX_Size() int {
	return xxx_messageInfo_UserAccount.Size(m)
}
func (m *UserAccount) XXX_DiscardUnknown() {
	xxx_messageInfo_UserAccount.DiscardUnknown(m)
}

var xxx_messageInfo_UserAccount proto.InternalMessageInfo

func (m *UserAccount) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

type isUserAccount_UserAccount interface {
	isUserAccount_UserAccount()
}

type UserAccount_YandexPassportUserAccount struct {
	YandexPassportUserAccount *YandexPassportUserAccount `protobuf:"bytes,2,opt,name=yandex_passport_user_account,json=yandexPassportUserAccount,proto3,oneof"`
}

func (*UserAccount_YandexPassportUserAccount) isUserAccount_UserAccount() {}

func (m *UserAccount) GetUserAccount() isUserAccount_UserAccount {
	if m != nil {
		return m.UserAccount
	}
	return nil
}

func (m *UserAccount) GetYandexPassportUserAccount() *YandexPassportUserAccount {
	if x, ok := m.GetUserAccount().(*UserAccount_YandexPassportUserAccount); ok {
		return x.YandexPassportUserAccount
	}
	return nil
}

func (*UserAccount) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _UserAccount_OneofMarshaler, _UserAccount_OneofUnmarshaler, _UserAccount_OneofSizer, []interface{}{
		(*UserAccount_YandexPassportUserAccount)(nil),
	}
}

func _UserAccount_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*UserAccount)

	switch x := m.UserAccount.(type) {
	case *UserAccount_YandexPassportUserAccount:
		b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.YandexPassportUserAccount); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("UserAccount.UserAccount has unexpected type %T", x)
	}
	return nil
}

func _UserAccount_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*UserAccount)
	switch tag {
	case 2: 
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(YandexPassportUserAccount)
		err := b.DecodeMessage(msg)
		m.UserAccount = &UserAccount_YandexPassportUserAccount{msg}
		return true, err
	default:
		return false, nil
	}
}

func _UserAccount_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*UserAccount)

	switch x := m.UserAccount.(type) {
	case *UserAccount_YandexPassportUserAccount:
		s := proto.Size(x.YandexPassportUserAccount)
		n += 1 
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

type YandexPassportUserAccount struct {

	Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`

	DefaultEmail         string   `protobuf:"bytes,2,opt,name=default_email,json=defaultEmail,proto3" json:"default_email,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *YandexPassportUserAccount) Reset()         { *m = YandexPassportUserAccount{} }
func (m *YandexPassportUserAccount) String() string { return proto.CompactTextString(m) }
func (*YandexPassportUserAccount) ProtoMessage()    {}
func (*YandexPassportUserAccount) Descriptor() ([]byte, []int) {
	return fileDescriptor_user_account_1a28e7bc8da60c3e, []int{1}
}
func (m *YandexPassportUserAccount) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_YandexPassportUserAccount.Unmarshal(m, b)
}
func (m *YandexPassportUserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_YandexPassportUserAccount.Marshal(b, m, deterministic)
}
func (dst *YandexPassportUserAccount) XXX_Merge(src proto.Message) {
	xxx_messageInfo_YandexPassportUserAccount.Merge(dst, src)
}
func (m *YandexPassportUserAccount) XXX_Size() int {
	return xxx_messageInfo_YandexPassportUserAccount.Size(m)
}
func (m *YandexPassportUserAccount) XXX_DiscardUnknown() {
	xxx_messageInfo_YandexPassportUserAccount.DiscardUnknown(m)
}

var xxx_messageInfo_YandexPassportUserAccount proto.InternalMessageInfo

func (m *YandexPassportUserAccount) GetLogin() string {
	if m != nil {
		return m.Login
	}
	return ""
}

func (m *YandexPassportUserAccount) GetDefaultEmail() string {
	if m != nil {
		return m.DefaultEmail
	}
	return ""
}

func init() {
	proto.RegisterType((*UserAccount)(nil), "yandex.cloud.iam.v1.UserAccount")
	proto.RegisterType((*YandexPassportUserAccount)(nil), "yandex.cloud.iam.v1.YandexPassportUserAccount")
}

func init() {
	proto.RegisterFile("yandex/cloud/iam/v1/user_account.proto", fileDescriptor_user_account_1a28e7bc8da60c3e)
}

var fileDescriptor_user_account_1a28e7bc8da60c3e = []byte{

	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x50, 0xc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0x53, 0x21, 0x3f, 0xc0, 0x2b, 0x97, 0x4b, 0x0d, 0xa8, 0x42, 0xcd, 0x41, 0x36,
	0xea, 0xc0, 0xc7, 0x3f, 0x6c, 0x73, 0xff, 0xbe, 0x2e, 0xd1, 0x7d, 0xfa, 0x2d, 0x2b, 0xac, 0xe6,
	0xb1, 0xcf, 0x32, 0xce, 0x54, 0xda, 0x65, 0x29, 0x4d, 0x58, 0x88, 0xef, 0x19, 0x7f, 0x8d, 0xa0,
	0xb7, 0x27, 0xe1, 0x7d, 0xf7, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xdc, 0xc7, 0x2e, 0x9e, 0x01,
	0x00, 0x00,
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/iam/v1/user_account.proto

package iam // import "github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/yandex-cloud/go-genproto/yandex/cloud/validation"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// A UserAccount resource. For more information, see [Users](/docs/iam/concepts/users/users).
type UserAccount struct {
	// ID of the user account.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are valid to be assigned to UserAccount:
	//	*UserAccount_YandexPassportUserAccount
	UserAccount          isUserAccount_UserAccount `protobuf_oneof:"user_account"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (m *UserAccount) Reset()         { *m = UserAccount{} }
func (m *UserAccount) String() string { return proto.CompactTextString(m) }
func (*UserAccount) ProtoMessage()    {}
func (*UserAccount) Descriptor() ([]byte, []int) {
	return fileDescriptor_user_account_1a28e7bc8da60c3e, []int{0}
}
func (m *UserAccount) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_UserAccount.Unmarshal(m, b)
}
func (m *UserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_UserAccount.Marshal(b, m, deterministic)
}
func (dst *UserAccount) XXX_Merge(src proto.Message) {
	xxx_messageInfo_UserAccount.Merge(dst, src)
}
func (m *UserAccount) XXX_Size() int {
	return xxx_messageInfo_UserAccount.Size(m)
}
func (m *UserAccount) XXX_DiscardUnknown() {
	xxx_messageInfo_UserAccount.DiscardUnknown(m)
}

var xxx_messageInfo_UserAccount proto.InternalMessageInfo

func (m *UserAccount) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

type isUserAccount_UserAccount interface {
	isUserAccount_UserAccount()
}

type UserAccount_YandexPassportUserAccount struct {
	YandexPassportUserAccount *YandexPassportUserAccount `protobuf:"bytes,2,opt,name=yandex_passport_user_account,json=yandexPassportUserAccount,proto3,oneof"`
}

func (*UserAccount_YandexPassportUserAccount) isUserAccount_UserAccount() {}

func (m *UserAccount) GetUserAccount() isUserAccount_UserAccount {
	if m != nil {
		return m.UserAccount
	}
	return nil
}

func (m *UserAccount) GetYandexPassportUserAccount() *YandexPassportUserAccount {
	if x, ok := m.GetUserAccount().(*UserAccount_YandexPassportUserAccount); ok {
		return x.YandexPassportUserAccount
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*UserAccount) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _UserAccount_OneofMarshaler, _UserAccount_OneofUnmarshaler, _UserAccount_OneofSizer, []interface{}{
		(*UserAccount_YandexPassportUserAccount)(nil),
	}
}

func _UserAccount_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*UserAccount)
	// user_account
	switch x := m.UserAccount.(type) {
	case *UserAccount_YandexPassportUserAccount:
		b.EncodeVarint(2<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.YandexPassportUserAccount); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("UserAccount.UserAccount has unexpected type %T", x)
	}
	return nil
}

func _UserAccount_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*UserAccount)
	switch tag {
	case 2: // user_account.yandex_passport_user_account
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(YandexPassportUserAccount)
		err := b.DecodeMessage(msg)
		m.UserAccount = &UserAccount_YandexPassportUserAccount{msg}
		return true, err
	default:
		return false, nil
	}
}

func _UserAccount_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*UserAccount)
	// user_account
	switch x := m.UserAccount.(type) {
	case *UserAccount_YandexPassportUserAccount:
		s := proto.Size(x.YandexPassportUserAccount)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

// A YandexPassportUserAccount resource. For more information, see [Passport users](/docs/iam/concepts/users/users#passport).
type YandexPassportUserAccount struct {
	// Login of the Yandex.Passport user account.
	Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	// Default email of the Yandex.Passport user account.
	DefaultEmail         string   `protobuf:"bytes,2,opt,name=default_email,json=defaultEmail,proto3" json:"default_email,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *YandexPassportUserAccount) Reset()         { *m = YandexPassportUserAccount{} }
func (m *YandexPassportUserAccount) String() string { return proto.CompactTextString(m) }
func (*YandexPassportUserAccount) ProtoMessage()    {}
func (*YandexPassportUserAccount) Descriptor() ([]byte, []int) {
	return fileDescriptor_user_account_1a28e7bc8da60c3e, []int{1}
}
func (m *YandexPassportUserAccount) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_YandexPassportUserAccount.Unmarshal(m, b)
}
func (m *YandexPassportUserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_YandexPassportUserAccount.Marshal(b, m, deterministic)
}
func (dst *YandexPassportUserAccount) XXX_Merge(src proto.Message) {
	xxx_messageInfo_YandexPassportUserAccount.Merge(dst, src)
}
func (m *YandexPassportUserAccount) XXX_Size() int {
	return xxx_messageInfo_YandexPassportUserAccount.Size(m)
}
func (m *YandexPassportUserAccount) XXX_DiscardUnknown() {
	xxx_messageInfo_YandexPassportUserAccount.DiscardUnknown(m)
}

var xxx_messageInfo_YandexPassportUserAccount proto.InternalMessageInfo

func (m *YandexPassportUserAccount) GetLogin() string {
	if m != nil {
		return m.Login
	}
	return ""
}

func (m *YandexPassportUserAccount) GetDefaultEmail() string {
	if m != nil {
		return m.DefaultEmail
	}
	return ""
}

func init() {
	proto.RegisterType((*UserAccount)(nil), "yandex.cloud.iam.v1.UserAccount")
	proto.RegisterType((*YandexPassportUserAccount)(nil), "yandex.cloud.iam.v1.YandexPassportUserAccount")
}

func init() {
	proto.RegisterFile("yandex/cloud/iam/v1/user_account.proto", fileDescriptor_user_account_1a28e7bc8da60c3e)
}

var fileDescriptor_user_account_1a28e7bc8da60c3e = []byte{
	// 258 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x50, 0xcf, 0x4b, 0xc3, 0x30,
	0x14, 0xb6, 0x05, 0x85, 0x65, 0x73, 0x87, 0xe8, 0x61, 0x13, 0x85, 0x31, 0x41, 0x76, 0x59, 0xc2,
	0xf4, 0x38, 0x3c, 0x38, 0x10, 0x3c, 0x4a, 0x41, 0x41, 0x2f, 0xe5, 0xad, 0x89, 0xf5, 0x41, 0x7e,
	0xd4, 0x36, 0x29, 0xee, 0xbf, 0xf1, 0x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