// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v3.20.3 // source: iamkey.proto package iamkey import ( v1 "github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1" 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) ) // Key is resource managed by IAM Key Service. // Can be issued for User or Service Account, but key authorization is supported only for Service Accounts. // Issued key contains private part that is not saved on server side, and should be saved by client. type Key struct { state protoimpl.MessageState `protogen:"open.v1"` // ID of the Key resource. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are valid to be assigned to Subject: // // *Key_UserAccountId // *Key_ServiceAccountId Subject isKey_Subject `protobuf_oneof:"subject"` // Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Description of the Key resource. 0-256 characters long. Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // An algorithm used to generate a key pair of the Key resource. KeyAlgorithm v1.Key_Algorithm `protobuf:"varint,6,opt,name=key_algorithm,json=keyAlgorithm,proto3,enum=yandex.cloud.iam.v1.Key_Algorithm" json:"key_algorithm,omitempty"` // A public key of the Key resource. PublicKey string `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // A public key of the Key resource. PrivateKey string `protobuf:"bytes,8,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Key) Reset() { *x = Key{} mi := &file_iamkey_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Key) String() string { return protoimpl.X.MessageStringOf(x) } func (*Key) ProtoMessage() {} func (x *Key) ProtoReflect() protoreflect.Message { mi := &file_iamkey_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 Key.ProtoReflect.Descriptor instead. func (*Key) Descriptor() ([]byte, []int) { return file_iamkey_proto_rawDescGZIP(), []int{0} } func (x *Key) GetId() string { if x != nil { return x.Id } return "" } func (x *Key) GetSubject() isKey_Subject { if x != nil { return x.Subject } return nil } func (x *Key) GetUserAccountId() string { if x != nil { if x, ok := x.Subject.(*Key_UserAccountId); ok { return x.UserAccountId } } return "" } func (x *Key) GetServiceAccountId() string { if x != nil { if x, ok := x.Subject.(*Key_ServiceAccountId); ok { return x.ServiceAccountId } } return "" } func (x *Key) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } func (x *Key) GetDescription() string { if x != nil { return x.Description } return "" } func (x *Key) GetKeyAlgorithm() v1.Key_Algorithm { if x != nil { return x.KeyAlgorithm } return v1.Key_Algorithm(0) } func (x *Key) GetPublicKey() string { if x != nil { return x.PublicKey } return "" } func (x *Key) GetPrivateKey() string { if x != nil { return x.PrivateKey } return "" } type isKey_Subject interface { isKey_Subject() } type Key_UserAccountId struct { // ID of the user account that the Key resource belongs to. UserAccountId string `protobuf:"bytes,2,opt,name=user_account_id,json=userAccountId,proto3,oneof"` } type Key_ServiceAccountId struct { // ID of the service account that the Key resource belongs to. ServiceAccountId string `protobuf:"bytes,3,opt,name=service_account_id,json=serviceAccountId,proto3,oneof"` } func (*Key_UserAccountId) isKey_Subject() {} func (*Key_ServiceAccountId) isKey_Subject() {} var File_iamkey_proto protoreflect.FileDescriptor const file_iamkey_proto_rawDesc = "" + "\n" + "\fiamkey.proto\x12\x13yandex.cloud.sdk.v2\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1dyandex/cloud/iam/v1/key.proto\"\xe0\x02\n" + "\x03Key\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12(\n" + "\x0fuser_account_id\x18\x02 \x01(\tH\x00R\ruserAccountId\x12.\n" + "\x12service_account_id\x18\x03 \x01(\tH\x00R\x10serviceAccountId\x129\n" + "\n" + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12 \n" + "\vdescription\x18\x05 \x01(\tR\vdescription\x12G\n" + "\rkey_algorithm\x18\x06 \x01(\x0e2\".yandex.cloud.iam.v1.Key.AlgorithmR\fkeyAlgorithm\x12\x1d\n" + "\n" + "public_key\x18\a \x01(\tR\tpublicKey\x12\x1f\n" + "\vprivate_key\x18\b \x01(\tR\n" + "privateKeyB\t\n" + "\asubjectB\x0fZ\rsdk/v2/iamkeyb\x06proto3" var ( file_iamkey_proto_rawDescOnce sync.Once file_iamkey_proto_rawDescData []byte ) func file_iamkey_proto_rawDescGZIP() []byte { file_iamkey_proto_rawDescOnce.Do(func() { file_iamkey_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_iamkey_proto_rawDesc), len(file_iamkey_proto_rawDesc))) }) return file_iamkey_proto_rawDescData } var file_iamkey_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_iamkey_proto_goTypes = []any{ (*Key)(nil), // 0: yandex.cloud.sdk.v2.Key (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp (v1.Key_Algorithm)(0), // 2: yandex.cloud.iam.v1.Key.Algorithm } var file_iamkey_proto_depIdxs = []int32{ 1, // 0: yandex.cloud.sdk.v2.Key.created_at:type_name -> google.protobuf.Timestamp 2, // 1: yandex.cloud.sdk.v2.Key.key_algorithm:type_name -> yandex.cloud.iam.v1.Key.Algorithm 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_iamkey_proto_init() } func file_iamkey_proto_init() { if File_iamkey_proto != nil { return } file_iamkey_proto_msgTypes[0].OneofWrappers = []any{ (*Key_UserAccountId)(nil), (*Key_ServiceAccountId)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_iamkey_proto_rawDesc), len(file_iamkey_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_iamkey_proto_goTypes, DependencyIndexes: file_iamkey_proto_depIdxs, MessageInfos: file_iamkey_proto_msgTypes, }.Build() File_iamkey_proto = out.File file_iamkey_proto_goTypes = nil file_iamkey_proto_depIdxs = nil }