// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: yandex/cloud/iam/v1/iam_token_service.proto

package iam

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type CreateIamTokenRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Identity:
	//
	//	*CreateIamTokenRequest_YandexPassportOauthToken
	//	*CreateIamTokenRequest_Jwt
	Identity      isCreateIamTokenRequest_Identity `protobuf_oneof:"identity"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CreateIamTokenRequest) Reset() {
	*x = CreateIamTokenRequest{}
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CreateIamTokenRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateIamTokenRequest) ProtoMessage() {}

func (x *CreateIamTokenRequest) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CreateIamTokenRequest.ProtoReflect.Descriptor instead.
func (*CreateIamTokenRequest) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescGZIP(), []int{0}
}

func (x *CreateIamTokenRequest) GetIdentity() isCreateIamTokenRequest_Identity {
	if x != nil {
		return x.Identity
	}
	return nil
}

func (x *CreateIamTokenRequest) GetYandexPassportOauthToken() string {
	if x != nil {
		if x, ok := x.Identity.(*CreateIamTokenRequest_YandexPassportOauthToken); ok {
			return x.YandexPassportOauthToken
		}
	}
	return ""
}

func (x *CreateIamTokenRequest) GetJwt() string {
	if x != nil {
		if x, ok := x.Identity.(*CreateIamTokenRequest_Jwt); ok {
			return x.Jwt
		}
	}
	return ""
}

type isCreateIamTokenRequest_Identity interface {
	isCreateIamTokenRequest_Identity()
}

type CreateIamTokenRequest_YandexPassportOauthToken struct {
	// OAuth token for a Yandex account.
	// For more information, see [OAuth token](/docs/iam/concepts/authorization/oauth-token).
	YandexPassportOauthToken string `protobuf:"bytes,1,opt,name=yandex_passport_oauth_token,json=yandexPassportOauthToken,proto3,oneof"`
}

type CreateIamTokenRequest_Jwt struct {
	// JSON Web Token (JWT) for a service account.
	// For more information, see [Get IAM token for a service account](/docs/iam/operations/iam-token/create-for-sa).
	Jwt string `protobuf:"bytes,2,opt,name=jwt,proto3,oneof"`
}

func (*CreateIamTokenRequest_YandexPassportOauthToken) isCreateIamTokenRequest_Identity() {}

func (*CreateIamTokenRequest_Jwt) isCreateIamTokenRequest_Identity() {}

type CreateIamTokenResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// IAM token for the specified identity.
	//
	// You should pass the token in the `Authorization` header for any further API requests.
	// For example, `Authorization: Bearer [iam_token]`.
	IamToken string `protobuf:"bytes,1,opt,name=iam_token,json=iamToken,proto3" json:"iam_token,omitempty"`
	// IAM token expiration time.
	ExpiresAt     *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CreateIamTokenResponse) Reset() {
	*x = CreateIamTokenResponse{}
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CreateIamTokenResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateIamTokenResponse) ProtoMessage() {}

func (x *CreateIamTokenResponse) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CreateIamTokenResponse.ProtoReflect.Descriptor instead.
func (*CreateIamTokenResponse) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescGZIP(), []int{1}
}

func (x *CreateIamTokenResponse) GetIamToken() string {
	if x != nil {
		return x.IamToken
	}
	return ""
}

func (x *CreateIamTokenResponse) GetExpiresAt() *timestamppb.Timestamp {
	if x != nil {
		return x.ExpiresAt
	}
	return nil
}

type CreateIamTokenForServiceAccountRequest struct {
	state            protoimpl.MessageState `protogen:"open.v1"`
	ServiceAccountId string                 `protobuf:"bytes,1,opt,name=service_account_id,json=serviceAccountId,proto3" json:"service_account_id,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

func (x *CreateIamTokenForServiceAccountRequest) Reset() {
	*x = CreateIamTokenForServiceAccountRequest{}
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CreateIamTokenForServiceAccountRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateIamTokenForServiceAccountRequest) ProtoMessage() {}

func (x *CreateIamTokenForServiceAccountRequest) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CreateIamTokenForServiceAccountRequest.ProtoReflect.Descriptor instead.
func (*CreateIamTokenForServiceAccountRequest) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescGZIP(), []int{2}
}

func (x *CreateIamTokenForServiceAccountRequest) GetServiceAccountId() string {
	if x != nil {
		return x.ServiceAccountId
	}
	return ""
}

type RevokeIamTokenRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	IamToken      string                 `protobuf:"bytes,1,opt,name=iam_token,json=iamToken,proto3" json:"iam_token,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RevokeIamTokenRequest) Reset() {
	*x = RevokeIamTokenRequest{}
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RevokeIamTokenRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RevokeIamTokenRequest) ProtoMessage() {}

func (x *RevokeIamTokenRequest) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RevokeIamTokenRequest.ProtoReflect.Descriptor instead.
func (*RevokeIamTokenRequest) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescGZIP(), []int{3}
}

func (x *RevokeIamTokenRequest) GetIamToken() string {
	if x != nil {
		return x.IamToken
	}
	return ""
}

type RevokeIamTokenResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	SubjectId     string                 `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RevokeIamTokenResponse) Reset() {
	*x = RevokeIamTokenResponse{}
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RevokeIamTokenResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RevokeIamTokenResponse) ProtoMessage() {}

func (x *RevokeIamTokenResponse) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RevokeIamTokenResponse.ProtoReflect.Descriptor instead.
func (*RevokeIamTokenResponse) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescGZIP(), []int{4}
}

func (x *RevokeIamTokenResponse) GetSubjectId() string {
	if x != nil {
		return x.SubjectId
	}
	return ""
}

var File_yandex_cloud_iam_v1_iam_token_service_proto protoreflect.FileDescriptor

const file_yandex_cloud_iam_v1_iam_token_service_proto_rawDesc = "" +
	"\n" +
	"+yandex/cloud/iam/v1/iam_token_service.proto\x12\x13yandex.cloud.iam.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dyandex/cloud/validation.proto\"~\n" +
	"\x15CreateIamTokenRequest\x12?\n" +
	"\x1byandex_passport_oauth_token\x18\x01 \x01(\tH\x00R\x18yandexPassportOauthToken\x12\x12\n" +
	"\x03jwt\x18\x02 \x01(\tH\x00R\x03jwtB\x10\n" +
	"\bidentity\x12\x04\xc0\xc11\x01\"p\n" +
	"\x16CreateIamTokenResponse\x12\x1b\n" +
	"\tiam_token\x18\x01 \x01(\tR\biamToken\x129\n" +
	"\n" +
	"expires_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\"d\n" +
	"&CreateIamTokenForServiceAccountRequest\x12:\n" +
	"\x12service_account_id\x18\x01 \x01(\tB\f\xe8\xc71\x01\x8a\xc81\x04<=50R\x10serviceAccountId\":\n" +
	"\x15RevokeIamTokenRequest\x12!\n" +
	"\tiam_token\x18\x01 \x01(\tB\x04\xe8\xc71\x01R\biamToken\"7\n" +
	"\x16RevokeIamTokenResponse\x12\x1d\n" +
	"\n" +
	"subject_id\x18\x01 \x01(\tR\tsubjectId2\xce\x03\n" +
	"\x0fIamTokenService\x12|\n" +
	"\x06Create\x12*.yandex.cloud.iam.v1.CreateIamTokenRequest\x1a+.yandex.cloud.iam.v1.CreateIamTokenResponse\"\x19\x82\xd3\xe4\x93\x02\x13:\x01*\"\x0e/iam/v1/tokens\x12\xb6\x01\n" +
	"\x17CreateForServiceAccount\x12;.yandex.cloud.iam.v1.CreateIamTokenForServiceAccountRequest\x1a+.yandex.cloud.iam.v1.CreateIamTokenResponse\"1\x82\xd3\xe4\x93\x02+:\x01*\"&/iam/v1/tokens:createForServiceAccount\x12\x83\x01\n" +
	"\x06Revoke\x12*.yandex.cloud.iam.v1.RevokeIamTokenRequest\x1a+.yandex.cloud.iam.v1.RevokeIamTokenResponse\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/iam/v1/tokens:revokeBV\n" +
	"\x17yandex.cloud.api.iam.v1Z;github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1;iamb\x06proto3"

var (
	file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescOnce sync.Once
	file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescData []byte
)

func file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescGZIP() []byte {
	file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_iam_v1_iam_token_service_proto_rawDesc), len(file_yandex_cloud_iam_v1_iam_token_service_proto_rawDesc)))
	})
	return file_yandex_cloud_iam_v1_iam_token_service_proto_rawDescData
}

var file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_yandex_cloud_iam_v1_iam_token_service_proto_goTypes = []any{
	(*CreateIamTokenRequest)(nil),                  // 0: yandex.cloud.iam.v1.CreateIamTokenRequest
	(*CreateIamTokenResponse)(nil),                 // 1: yandex.cloud.iam.v1.CreateIamTokenResponse
	(*CreateIamTokenForServiceAccountRequest)(nil), // 2: yandex.cloud.iam.v1.CreateIamTokenForServiceAccountRequest
	(*RevokeIamTokenRequest)(nil),                  // 3: yandex.cloud.iam.v1.RevokeIamTokenRequest
	(*RevokeIamTokenResponse)(nil),                 // 4: yandex.cloud.iam.v1.RevokeIamTokenResponse
	(*timestamppb.Timestamp)(nil),                  // 5: google.protobuf.Timestamp
}
var file_yandex_cloud_iam_v1_iam_token_service_proto_depIdxs = []int32{
	5, // 0: yandex.cloud.iam.v1.CreateIamTokenResponse.expires_at:type_name -> google.protobuf.Timestamp
	0, // 1: yandex.cloud.iam.v1.IamTokenService.Create:input_type -> yandex.cloud.iam.v1.CreateIamTokenRequest
	2, // 2: yandex.cloud.iam.v1.IamTokenService.CreateForServiceAccount:input_type -> yandex.cloud.iam.v1.CreateIamTokenForServiceAccountRequest
	3, // 3: yandex.cloud.iam.v1.IamTokenService.Revoke:input_type -> yandex.cloud.iam.v1.RevokeIamTokenRequest
	1, // 4: yandex.cloud.iam.v1.IamTokenService.Create:output_type -> yandex.cloud.iam.v1.CreateIamTokenResponse
	1, // 5: yandex.cloud.iam.v1.IamTokenService.CreateForServiceAccount:output_type -> yandex.cloud.iam.v1.CreateIamTokenResponse
	4, // 6: yandex.cloud.iam.v1.IamTokenService.Revoke:output_type -> yandex.cloud.iam.v1.RevokeIamTokenResponse
	4, // [4:7] is the sub-list for method output_type
	1, // [1:4] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_yandex_cloud_iam_v1_iam_token_service_proto_init() }
func file_yandex_cloud_iam_v1_iam_token_service_proto_init() {
	if File_yandex_cloud_iam_v1_iam_token_service_proto != nil {
		return
	}
	file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes[0].OneofWrappers = []any{
		(*CreateIamTokenRequest_YandexPassportOauthToken)(nil),
		(*CreateIamTokenRequest_Jwt)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_iam_v1_iam_token_service_proto_rawDesc), len(file_yandex_cloud_iam_v1_iam_token_service_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_yandex_cloud_iam_v1_iam_token_service_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_iam_v1_iam_token_service_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_iam_v1_iam_token_service_proto_msgTypes,
	}.Build()
	File_yandex_cloud_iam_v1_iam_token_service_proto = out.File
	file_yandex_cloud_iam_v1_iam_token_service_proto_goTypes = nil
	file_yandex_cloud_iam_v1_iam_token_service_proto_depIdxs = nil
}
