key.pb.go raw

   1  // Code generated by protoc-gen-go. DO NOT EDIT.
   2  // versions:
   3  // 	protoc-gen-go v1.36.6
   4  // 	protoc        v3.21.12
   5  // source: yandex/cloud/iam/v1/key.proto
   6  
   7  package iam
   8  
   9  import (
  10  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  11  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  12  	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
  13  	reflect "reflect"
  14  	sync "sync"
  15  	unsafe "unsafe"
  16  )
  17  
  18  const (
  19  	// Verify that this generated code is sufficiently up-to-date.
  20  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21  	// Verify that runtime/protoimpl is sufficiently up-to-date.
  22  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23  )
  24  
  25  type Key_Algorithm int32
  26  
  27  const (
  28  	Key_ALGORITHM_UNSPECIFIED Key_Algorithm = 0
  29  	// RSA with a 2048-bit key size. Default value.
  30  	Key_RSA_2048 Key_Algorithm = 1
  31  	// RSA with a 4096-bit key size.
  32  	Key_RSA_4096 Key_Algorithm = 2
  33  )
  34  
  35  // Enum value maps for Key_Algorithm.
  36  var (
  37  	Key_Algorithm_name = map[int32]string{
  38  		0: "ALGORITHM_UNSPECIFIED",
  39  		1: "RSA_2048",
  40  		2: "RSA_4096",
  41  	}
  42  	Key_Algorithm_value = map[string]int32{
  43  		"ALGORITHM_UNSPECIFIED": 0,
  44  		"RSA_2048":              1,
  45  		"RSA_4096":              2,
  46  	}
  47  )
  48  
  49  func (x Key_Algorithm) Enum() *Key_Algorithm {
  50  	p := new(Key_Algorithm)
  51  	*p = x
  52  	return p
  53  }
  54  
  55  func (x Key_Algorithm) String() string {
  56  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  57  }
  58  
  59  func (Key_Algorithm) Descriptor() protoreflect.EnumDescriptor {
  60  	return file_yandex_cloud_iam_v1_key_proto_enumTypes[0].Descriptor()
  61  }
  62  
  63  func (Key_Algorithm) Type() protoreflect.EnumType {
  64  	return &file_yandex_cloud_iam_v1_key_proto_enumTypes[0]
  65  }
  66  
  67  func (x Key_Algorithm) Number() protoreflect.EnumNumber {
  68  	return protoreflect.EnumNumber(x)
  69  }
  70  
  71  // Deprecated: Use Key_Algorithm.Descriptor instead.
  72  func (Key_Algorithm) EnumDescriptor() ([]byte, []int) {
  73  	return file_yandex_cloud_iam_v1_key_proto_rawDescGZIP(), []int{0, 0}
  74  }
  75  
  76  // A Key resource. For more information, see [Authorized keys](/docs/iam/concepts/authorization/key).
  77  type Key struct {
  78  	state protoimpl.MessageState `protogen:"open.v1"`
  79  	// ID of the Key resource.
  80  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  81  	// Types that are valid to be assigned to Subject:
  82  	//
  83  	//	*Key_UserAccountId
  84  	//	*Key_ServiceAccountId
  85  	Subject isKey_Subject `protobuf_oneof:"subject"`
  86  	// Creation timestamp.
  87  	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
  88  	// Description of the Key resource. 0-256 characters long.
  89  	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
  90  	// An algorithm used to generate a key pair of the Key resource.
  91  	KeyAlgorithm Key_Algorithm `protobuf:"varint,6,opt,name=key_algorithm,json=keyAlgorithm,proto3,enum=yandex.cloud.iam.v1.Key_Algorithm" json:"key_algorithm,omitempty"`
  92  	// A public key of the Key resource.
  93  	PublicKey string `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
  94  	// Timestamp for the last use of this key.
  95  	LastUsedAt    *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"`
  96  	unknownFields protoimpl.UnknownFields
  97  	sizeCache     protoimpl.SizeCache
  98  }
  99  
 100  func (x *Key) Reset() {
 101  	*x = Key{}
 102  	mi := &file_yandex_cloud_iam_v1_key_proto_msgTypes[0]
 103  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 104  	ms.StoreMessageInfo(mi)
 105  }
 106  
 107  func (x *Key) String() string {
 108  	return protoimpl.X.MessageStringOf(x)
 109  }
 110  
 111  func (*Key) ProtoMessage() {}
 112  
 113  func (x *Key) ProtoReflect() protoreflect.Message {
 114  	mi := &file_yandex_cloud_iam_v1_key_proto_msgTypes[0]
 115  	if x != nil {
 116  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 117  		if ms.LoadMessageInfo() == nil {
 118  			ms.StoreMessageInfo(mi)
 119  		}
 120  		return ms
 121  	}
 122  	return mi.MessageOf(x)
 123  }
 124  
 125  // Deprecated: Use Key.ProtoReflect.Descriptor instead.
 126  func (*Key) Descriptor() ([]byte, []int) {
 127  	return file_yandex_cloud_iam_v1_key_proto_rawDescGZIP(), []int{0}
 128  }
 129  
 130  func (x *Key) GetId() string {
 131  	if x != nil {
 132  		return x.Id
 133  	}
 134  	return ""
 135  }
 136  
 137  func (x *Key) GetSubject() isKey_Subject {
 138  	if x != nil {
 139  		return x.Subject
 140  	}
 141  	return nil
 142  }
 143  
 144  func (x *Key) GetUserAccountId() string {
 145  	if x != nil {
 146  		if x, ok := x.Subject.(*Key_UserAccountId); ok {
 147  			return x.UserAccountId
 148  		}
 149  	}
 150  	return ""
 151  }
 152  
 153  func (x *Key) GetServiceAccountId() string {
 154  	if x != nil {
 155  		if x, ok := x.Subject.(*Key_ServiceAccountId); ok {
 156  			return x.ServiceAccountId
 157  		}
 158  	}
 159  	return ""
 160  }
 161  
 162  func (x *Key) GetCreatedAt() *timestamppb.Timestamp {
 163  	if x != nil {
 164  		return x.CreatedAt
 165  	}
 166  	return nil
 167  }
 168  
 169  func (x *Key) GetDescription() string {
 170  	if x != nil {
 171  		return x.Description
 172  	}
 173  	return ""
 174  }
 175  
 176  func (x *Key) GetKeyAlgorithm() Key_Algorithm {
 177  	if x != nil {
 178  		return x.KeyAlgorithm
 179  	}
 180  	return Key_ALGORITHM_UNSPECIFIED
 181  }
 182  
 183  func (x *Key) GetPublicKey() string {
 184  	if x != nil {
 185  		return x.PublicKey
 186  	}
 187  	return ""
 188  }
 189  
 190  func (x *Key) GetLastUsedAt() *timestamppb.Timestamp {
 191  	if x != nil {
 192  		return x.LastUsedAt
 193  	}
 194  	return nil
 195  }
 196  
 197  type isKey_Subject interface {
 198  	isKey_Subject()
 199  }
 200  
 201  type Key_UserAccountId struct {
 202  	// ID of the user account that the Key resource belongs to.
 203  	UserAccountId string `protobuf:"bytes,2,opt,name=user_account_id,json=userAccountId,proto3,oneof"`
 204  }
 205  
 206  type Key_ServiceAccountId struct {
 207  	// ID of the service account that the Key resource belongs to.
 208  	ServiceAccountId string `protobuf:"bytes,3,opt,name=service_account_id,json=serviceAccountId,proto3,oneof"`
 209  }
 210  
 211  func (*Key_UserAccountId) isKey_Subject() {}
 212  
 213  func (*Key_ServiceAccountId) isKey_Subject() {}
 214  
 215  var File_yandex_cloud_iam_v1_key_proto protoreflect.FileDescriptor
 216  
 217  const file_yandex_cloud_iam_v1_key_proto_rawDesc = "" +
 218  	"\n" +
 219  	"\x1dyandex/cloud/iam/v1/key.proto\x12\x13yandex.cloud.iam.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc7\x03\n" +
 220  	"\x03Key\x12\x0e\n" +
 221  	"\x02id\x18\x01 \x01(\tR\x02id\x12(\n" +
 222  	"\x0fuser_account_id\x18\x02 \x01(\tH\x00R\ruserAccountId\x12.\n" +
 223  	"\x12service_account_id\x18\x03 \x01(\tH\x00R\x10serviceAccountId\x129\n" +
 224  	"\n" +
 225  	"created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12 \n" +
 226  	"\vdescription\x18\x05 \x01(\tR\vdescription\x12G\n" +
 227  	"\rkey_algorithm\x18\x06 \x01(\x0e2\".yandex.cloud.iam.v1.Key.AlgorithmR\fkeyAlgorithm\x12\x1d\n" +
 228  	"\n" +
 229  	"public_key\x18\a \x01(\tR\tpublicKey\x12<\n" +
 230  	"\flast_used_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\n" +
 231  	"lastUsedAt\"B\n" +
 232  	"\tAlgorithm\x12\x19\n" +
 233  	"\x15ALGORITHM_UNSPECIFIED\x10\x00\x12\f\n" +
 234  	"\bRSA_2048\x10\x01\x12\f\n" +
 235  	"\bRSA_4096\x10\x02B\t\n" +
 236  	"\asubjectJ\x04\b\b\x10\tBV\n" +
 237  	"\x17yandex.cloud.api.iam.v1Z;github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1;iamb\x06proto3"
 238  
 239  var (
 240  	file_yandex_cloud_iam_v1_key_proto_rawDescOnce sync.Once
 241  	file_yandex_cloud_iam_v1_key_proto_rawDescData []byte
 242  )
 243  
 244  func file_yandex_cloud_iam_v1_key_proto_rawDescGZIP() []byte {
 245  	file_yandex_cloud_iam_v1_key_proto_rawDescOnce.Do(func() {
 246  		file_yandex_cloud_iam_v1_key_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_iam_v1_key_proto_rawDesc), len(file_yandex_cloud_iam_v1_key_proto_rawDesc)))
 247  	})
 248  	return file_yandex_cloud_iam_v1_key_proto_rawDescData
 249  }
 250  
 251  var file_yandex_cloud_iam_v1_key_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
 252  var file_yandex_cloud_iam_v1_key_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
 253  var file_yandex_cloud_iam_v1_key_proto_goTypes = []any{
 254  	(Key_Algorithm)(0),            // 0: yandex.cloud.iam.v1.Key.Algorithm
 255  	(*Key)(nil),                   // 1: yandex.cloud.iam.v1.Key
 256  	(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
 257  }
 258  var file_yandex_cloud_iam_v1_key_proto_depIdxs = []int32{
 259  	2, // 0: yandex.cloud.iam.v1.Key.created_at:type_name -> google.protobuf.Timestamp
 260  	0, // 1: yandex.cloud.iam.v1.Key.key_algorithm:type_name -> yandex.cloud.iam.v1.Key.Algorithm
 261  	2, // 2: yandex.cloud.iam.v1.Key.last_used_at:type_name -> google.protobuf.Timestamp
 262  	3, // [3:3] is the sub-list for method output_type
 263  	3, // [3:3] is the sub-list for method input_type
 264  	3, // [3:3] is the sub-list for extension type_name
 265  	3, // [3:3] is the sub-list for extension extendee
 266  	0, // [0:3] is the sub-list for field type_name
 267  }
 268  
 269  func init() { file_yandex_cloud_iam_v1_key_proto_init() }
 270  func file_yandex_cloud_iam_v1_key_proto_init() {
 271  	if File_yandex_cloud_iam_v1_key_proto != nil {
 272  		return
 273  	}
 274  	file_yandex_cloud_iam_v1_key_proto_msgTypes[0].OneofWrappers = []any{
 275  		(*Key_UserAccountId)(nil),
 276  		(*Key_ServiceAccountId)(nil),
 277  	}
 278  	type x struct{}
 279  	out := protoimpl.TypeBuilder{
 280  		File: protoimpl.DescBuilder{
 281  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 282  			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_iam_v1_key_proto_rawDesc), len(file_yandex_cloud_iam_v1_key_proto_rawDesc)),
 283  			NumEnums:      1,
 284  			NumMessages:   1,
 285  			NumExtensions: 0,
 286  			NumServices:   0,
 287  		},
 288  		GoTypes:           file_yandex_cloud_iam_v1_key_proto_goTypes,
 289  		DependencyIndexes: file_yandex_cloud_iam_v1_key_proto_depIdxs,
 290  		EnumInfos:         file_yandex_cloud_iam_v1_key_proto_enumTypes,
 291  		MessageInfos:      file_yandex_cloud_iam_v1_key_proto_msgTypes,
 292  	}.Build()
 293  	File_yandex_cloud_iam_v1_key_proto = out.File
 294  	file_yandex_cloud_iam_v1_key_proto_goTypes = nil
 295  	file_yandex_cloud_iam_v1_key_proto_depIdxs = nil
 296  }
 297