diff --git a/api/v1/meta.pb.go b/api/v1/meta.pb.go index 863c51b..82c540c 100644 --- a/api/v1/meta.pb.go +++ b/api/v1/meta.pb.go @@ -32,6 +32,7 @@ type Meta struct { UpdatedTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"` Annotations map[string]string `protobuf:"bytes,7,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` Labels []string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty"` + CreatedBy string `protobuf:"bytes,9,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -122,11 +123,18 @@ func (x *Meta) GetLabels() []string { return nil } +func (x *Meta) GetCreatedBy() string { + if x != nil { + return x.CreatedBy + } + return "" +} + var File_v1_meta_proto protoreflect.FileDescriptor const file_v1_meta_proto_rawDesc = "" + "\n" + - "\rv1/meta.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf7\x02\n" + + "\rv1/meta.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x96\x03\n" + "\x04Meta\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + "\x04kind\x18\x02 \x01(\tR\x04kind\x12\x1e\n" + @@ -137,7 +145,9 @@ const file_v1_meta_proto_rawDesc = "" + "\fcreated_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\vcreatedTime\x12=\n" + "\fupdated_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\vupdatedTime\x12;\n" + "\vannotations\x18\a \x03(\v2\x19.v1.Meta.AnnotationsEntryR\vannotations\x12\x16\n" + - "\x06labels\x18\b \x03(\tR\x06labels\x1a>\n" + + "\x06labels\x18\b \x03(\tR\x06labels\x12\x1d\n" + + "\n" + + "created_by\x18\t \x01(\tR\tcreatedBy\x1a>\n" + "\x10AnnotationsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01Be\n" + diff --git a/api/v1/project.pb.go b/api/v1/project.pb.go index cccfebb..b6ed136 100644 --- a/api/v1/project.pb.go +++ b/api/v1/project.pb.go @@ -10,7 +10,6 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" unsafe "unsafe" @@ -329,26 +328,16 @@ func (x *ProjectGetHistoryRequest) GetAt() *timestamppb.Timestamp { } type ProjectFindRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // TODO: remove in next release: - // - // Deprecated: Marked as deprecated in v1/project.proto. - DeprecatedId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=deprecated_id,json=deprecatedId,proto3" json:"deprecated_id,omitempty"` - // Deprecated: Marked as deprecated in v1/project.proto. - DeprecatedName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=deprecated_name,json=deprecatedName,proto3" json:"deprecated_name,omitempty"` - // Deprecated: Marked as deprecated in v1/project.proto. - DeprecatedDescription *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=deprecated_description,json=deprecatedDescription,proto3" json:"deprecated_description,omitempty"` - // Deprecated: Marked as deprecated in v1/project.proto. - DeprecatedTenantId *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=deprecated_tenant_id,json=deprecatedTenantId,proto3" json:"deprecated_tenant_id,omitempty"` - Paging *Paging `protobuf:"bytes,5,opt,name=paging,proto3" json:"paging,omitempty"` - Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Id *string `protobuf:"bytes,7,opt,name=id,proto3,oneof" json:"id,omitempty"` - Name *string `protobuf:"bytes,8,opt,name=name,proto3,oneof" json:"name,omitempty"` - Description *string `protobuf:"bytes,9,opt,name=description,proto3,oneof" json:"description,omitempty"` - TenantId *string `protobuf:"bytes,10,opt,name=tenant_id,json=tenantId,proto3,oneof" json:"tenant_id,omitempty"` - Labels []string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Paging *Paging `protobuf:"bytes,5,opt,name=paging,proto3" json:"paging,omitempty"` + Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Id *string `protobuf:"bytes,7,opt,name=id,proto3,oneof" json:"id,omitempty"` + Name *string `protobuf:"bytes,8,opt,name=name,proto3,oneof" json:"name,omitempty"` + Description *string `protobuf:"bytes,9,opt,name=description,proto3,oneof" json:"description,omitempty"` + TenantId *string `protobuf:"bytes,10,opt,name=tenant_id,json=tenantId,proto3,oneof" json:"tenant_id,omitempty"` + Labels []string `protobuf:"bytes,11,rep,name=labels,proto3" json:"labels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ProjectFindRequest) Reset() { @@ -381,38 +370,6 @@ func (*ProjectFindRequest) Descriptor() ([]byte, []int) { return file_v1_project_proto_rawDescGZIP(), []int{6} } -// Deprecated: Marked as deprecated in v1/project.proto. -func (x *ProjectFindRequest) GetDeprecatedId() *wrapperspb.StringValue { - if x != nil { - return x.DeprecatedId - } - return nil -} - -// Deprecated: Marked as deprecated in v1/project.proto. -func (x *ProjectFindRequest) GetDeprecatedName() *wrapperspb.StringValue { - if x != nil { - return x.DeprecatedName - } - return nil -} - -// Deprecated: Marked as deprecated in v1/project.proto. -func (x *ProjectFindRequest) GetDeprecatedDescription() *wrapperspb.StringValue { - if x != nil { - return x.DeprecatedDescription - } - return nil -} - -// Deprecated: Marked as deprecated in v1/project.proto. -func (x *ProjectFindRequest) GetDeprecatedTenantId() *wrapperspb.StringValue { - if x != nil { - return x.DeprecatedTenantId - } - return nil -} - func (x *ProjectFindRequest) GetPaging() *Paging { if x != nil { return x.Paging @@ -563,7 +520,7 @@ var File_v1_project_proto protoreflect.FileDescriptor const file_v1_project_proto_rawDesc = "" + "\n" + - "\x10v1/project.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x0fv1/common.proto\x1a\rv1/meta.proto\x1a\x0ev1/quota.proto\"\xa0\x01\n" + + "\x10v1/project.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x0fv1/common.proto\x1a\rv1/meta.proto\x1a\x0ev1/quota.proto\"\xa0\x01\n" + "\aProject\x12\x1c\n" + "\x04meta\x18\x01 \x01(\v2\b.v1.MetaR\x04meta\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" + @@ -580,12 +537,8 @@ const file_v1_project_proto_rawDesc = "" + "\x02id\x18\x01 \x01(\tR\x02id\"V\n" + "\x18ProjectGetHistoryRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12*\n" + - "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"\xbf\x05\n" + - "\x12ProjectFindRequest\x12E\n" + - "\rdeprecated_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueB\x02\x18\x01R\fdeprecatedId\x12I\n" + - "\x0fdeprecated_name\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueB\x02\x18\x01R\x0edeprecatedName\x12W\n" + - "\x16deprecated_description\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueB\x02\x18\x01R\x15deprecatedDescription\x12R\n" + - "\x14deprecated_tenant_id\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueB\x02\x18\x01R\x12deprecatedTenantId\x12\"\n" + + "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"\xe6\x03\n" + + "\x12ProjectFindRequest\x12\"\n" + "\x06paging\x18\x05 \x01(\v2\n" + ".v1.PagingR\x06paging\x12I\n" + "\vannotations\x18\x06 \x03(\v2'.v1.ProjectFindRequest.AnnotationsEntryR\vannotations\x12\x13\n" + @@ -602,7 +555,7 @@ const file_v1_project_proto_rawDesc = "" + "\x05_nameB\x0e\n" + "\f_descriptionB\f\n" + "\n" + - "_tenant_id\"8\n" + + "_tenant_idJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03J\x04\b\x03\x10\x04J\x04\b\x04\x10\x05R\rdeprecated_idR\x0fdeprecated_nameR\x16deprecated_descriptionR\x14deprecated_tenant_id\"8\n" + "\x0fProjectResponse\x12%\n" + "\aproject\x18\x01 \x01(\v2\v.v1.ProjectR\aproject\"n\n" + "\x13ProjectListResponse\x12'\n" + @@ -647,8 +600,7 @@ var file_v1_project_proto_goTypes = []any{ (*Meta)(nil), // 10: v1.Meta (*QuotaSet)(nil), // 11: v1.QuotaSet (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp - (*wrapperspb.StringValue)(nil), // 13: google.protobuf.StringValue - (*Paging)(nil), // 14: v1.Paging + (*Paging)(nil), // 13: v1.Paging } var file_v1_project_proto_depIdxs = []int32{ 10, // 0: v1.Project.meta:type_name -> v1.Meta @@ -656,31 +608,27 @@ var file_v1_project_proto_depIdxs = []int32{ 0, // 2: v1.ProjectCreateRequest.project:type_name -> v1.Project 0, // 3: v1.ProjectUpdateRequest.project:type_name -> v1.Project 12, // 4: v1.ProjectGetHistoryRequest.at:type_name -> google.protobuf.Timestamp - 13, // 5: v1.ProjectFindRequest.deprecated_id:type_name -> google.protobuf.StringValue - 13, // 6: v1.ProjectFindRequest.deprecated_name:type_name -> google.protobuf.StringValue - 13, // 7: v1.ProjectFindRequest.deprecated_description:type_name -> google.protobuf.StringValue - 13, // 8: v1.ProjectFindRequest.deprecated_tenant_id:type_name -> google.protobuf.StringValue - 14, // 9: v1.ProjectFindRequest.paging:type_name -> v1.Paging - 9, // 10: v1.ProjectFindRequest.annotations:type_name -> v1.ProjectFindRequest.AnnotationsEntry - 0, // 11: v1.ProjectResponse.project:type_name -> v1.Project - 0, // 12: v1.ProjectListResponse.projects:type_name -> v1.Project - 1, // 13: v1.ProjectService.Create:input_type -> v1.ProjectCreateRequest - 2, // 14: v1.ProjectService.Update:input_type -> v1.ProjectUpdateRequest - 3, // 15: v1.ProjectService.Delete:input_type -> v1.ProjectDeleteRequest - 4, // 16: v1.ProjectService.Get:input_type -> v1.ProjectGetRequest - 5, // 17: v1.ProjectService.GetHistory:input_type -> v1.ProjectGetHistoryRequest - 6, // 18: v1.ProjectService.Find:input_type -> v1.ProjectFindRequest - 7, // 19: v1.ProjectService.Create:output_type -> v1.ProjectResponse - 7, // 20: v1.ProjectService.Update:output_type -> v1.ProjectResponse - 7, // 21: v1.ProjectService.Delete:output_type -> v1.ProjectResponse - 7, // 22: v1.ProjectService.Get:output_type -> v1.ProjectResponse - 7, // 23: v1.ProjectService.GetHistory:output_type -> v1.ProjectResponse - 8, // 24: v1.ProjectService.Find:output_type -> v1.ProjectListResponse - 19, // [19:25] is the sub-list for method output_type - 13, // [13:19] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 13, // 5: v1.ProjectFindRequest.paging:type_name -> v1.Paging + 9, // 6: v1.ProjectFindRequest.annotations:type_name -> v1.ProjectFindRequest.AnnotationsEntry + 0, // 7: v1.ProjectResponse.project:type_name -> v1.Project + 0, // 8: v1.ProjectListResponse.projects:type_name -> v1.Project + 1, // 9: v1.ProjectService.Create:input_type -> v1.ProjectCreateRequest + 2, // 10: v1.ProjectService.Update:input_type -> v1.ProjectUpdateRequest + 3, // 11: v1.ProjectService.Delete:input_type -> v1.ProjectDeleteRequest + 4, // 12: v1.ProjectService.Get:input_type -> v1.ProjectGetRequest + 5, // 13: v1.ProjectService.GetHistory:input_type -> v1.ProjectGetHistoryRequest + 6, // 14: v1.ProjectService.Find:input_type -> v1.ProjectFindRequest + 7, // 15: v1.ProjectService.Create:output_type -> v1.ProjectResponse + 7, // 16: v1.ProjectService.Update:output_type -> v1.ProjectResponse + 7, // 17: v1.ProjectService.Delete:output_type -> v1.ProjectResponse + 7, // 18: v1.ProjectService.Get:output_type -> v1.ProjectResponse + 7, // 19: v1.ProjectService.GetHistory:output_type -> v1.ProjectResponse + 8, // 20: v1.ProjectService.Find:output_type -> v1.ProjectListResponse + 15, // [15:21] is the sub-list for method output_type + 9, // [9:15] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_v1_project_proto_init() } diff --git a/api/v1/quota.pb.go b/api/v1/quota.pb.go index 630427c..6af7c09 100644 --- a/api/v1/quota.pb.go +++ b/api/v1/quota.pb.go @@ -9,7 +9,6 @@ package v1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" unsafe "unsafe" @@ -101,10 +100,6 @@ func (x *QuotaSet) GetProject() *Quota { // Quota is the actual maximum amount type Quota struct { state protoimpl.MessageState `protogen:"open.v1"` - // TODO: remove in next release: - // - // Deprecated: Marked as deprecated in v1/quota.proto. - Quota *wrapperspb.Int32Value `protobuf:"bytes,1,opt,name=quota,proto3" json:"quota,omitempty"` // max is the maximum amount for the current QuotaSet, can be nil Max *int32 `protobuf:"varint,2,opt,name=max,proto3,oneof" json:"max,omitempty"` unknownFields protoimpl.UnknownFields @@ -141,14 +136,6 @@ func (*Quota) Descriptor() ([]byte, []int) { return file_v1_quota_proto_rawDescGZIP(), []int{1} } -// Deprecated: Marked as deprecated in v1/quota.proto. -func (x *Quota) GetQuota() *wrapperspb.Int32Value { - if x != nil { - return x.Quota - } - return nil -} - func (x *Quota) GetMax() int32 { if x != nil && x.Max != nil { return *x.Max @@ -160,16 +147,15 @@ var File_v1_quota_proto protoreflect.FileDescriptor const file_v1_quota_proto_rawDesc = "" + "\n" + - "\x0ev1/quota.proto\x12\x02v1\x1a\x1egoogle/protobuf/wrappers.proto\"\x94\x01\n" + + "\x0ev1/quota.proto\x12\x02v1\"\x94\x01\n" + "\bQuotaSet\x12#\n" + "\acluster\x18\x01 \x01(\v2\t.v1.QuotaR\acluster\x12#\n" + "\amachine\x18\x02 \x01(\v2\t.v1.QuotaR\amachine\x12\x19\n" + "\x02ip\x18\x03 \x01(\v2\t.v1.QuotaR\x02ip\x12#\n" + - "\aproject\x18\x04 \x01(\v2\t.v1.QuotaR\aproject\"]\n" + - "\x05Quota\x125\n" + - "\x05quota\x18\x01 \x01(\v2\x1b.google.protobuf.Int32ValueB\x02\x18\x01R\x05quota\x12\x15\n" + + "\aproject\x18\x04 \x01(\v2\t.v1.QuotaR\aproject\"3\n" + + "\x05Quota\x12\x15\n" + "\x03max\x18\x02 \x01(\x05H\x00R\x03max\x88\x01\x01B\x06\n" + - "\x04_maxBf\n" + + "\x04_maxJ\x04\b\x01\x10\x02R\x05quotaBf\n" + "\x06com.v1B\n" + "QuotaProtoP\x01Z(github.com/metal-stack/masterdata-api/v1\xa2\x02\x03VXX\xaa\x02\x02V1\xca\x02\x02V1\xe2\x02\x0eV1\\GPBMetadata\xea\x02\x02V1b\x06proto3" @@ -187,21 +173,19 @@ func file_v1_quota_proto_rawDescGZIP() []byte { var file_v1_quota_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_v1_quota_proto_goTypes = []any{ - (*QuotaSet)(nil), // 0: v1.QuotaSet - (*Quota)(nil), // 1: v1.Quota - (*wrapperspb.Int32Value)(nil), // 2: google.protobuf.Int32Value + (*QuotaSet)(nil), // 0: v1.QuotaSet + (*Quota)(nil), // 1: v1.Quota } var file_v1_quota_proto_depIdxs = []int32{ 1, // 0: v1.QuotaSet.cluster:type_name -> v1.Quota 1, // 1: v1.QuotaSet.machine:type_name -> v1.Quota 1, // 2: v1.QuotaSet.ip:type_name -> v1.Quota 1, // 3: v1.QuotaSet.project:type_name -> v1.Quota - 2, // 4: v1.Quota.quota:type_name -> google.protobuf.Int32Value - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_v1_quota_proto_init() } diff --git a/api/v1/tenant.pb.go b/api/v1/tenant.pb.go index 4b0c73e..beb5cab 100644 --- a/api/v1/tenant.pb.go +++ b/api/v1/tenant.pb.go @@ -7,10 +7,10 @@ package v1 import ( + postaladdress "google.golang.org/genproto/googleapis/type/postaladdress" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" sync "sync" unsafe "unsafe" @@ -441,15 +441,17 @@ func (x *TenantWithMembershipAnnotations) GetProjectIds() []string { } type Tenant struct { - state protoimpl.MessageState `protogen:"open.v1"` - Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - DefaultQuotas *QuotaSet `protobuf:"bytes,4,opt,name=default_quotas,json=defaultQuotas,proto3" json:"default_quotas,omitempty"` - Quotas *QuotaSet `protobuf:"bytes,5,opt,name=quotas,proto3" json:"quotas,omitempty"` - IamConfig *IAMConfig `protobuf:"bytes,6,opt,name=iam_config,json=iamConfig,proto3" json:"iam_config,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Meta *Meta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + DefaultQuotas *QuotaSet `protobuf:"bytes,4,opt,name=default_quotas,json=defaultQuotas,proto3" json:"default_quotas,omitempty"` + Quotas *QuotaSet `protobuf:"bytes,5,opt,name=quotas,proto3" json:"quotas,omitempty"` + IamConfig *IAMConfig `protobuf:"bytes,6,opt,name=iam_config,json=iamConfig,proto3" json:"iam_config,omitempty"` + Payment *PaymentDetails `protobuf:"bytes,7,opt,name=payment,proto3" json:"payment,omitempty"` + ContactDetails *ContactDetails `protobuf:"bytes,8,opt,name=contact_details,json=contactDetails,proto3" json:"contact_details,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Tenant) Reset() { @@ -524,6 +526,20 @@ func (x *Tenant) GetIamConfig() *IAMConfig { return nil } +func (x *Tenant) GetPayment() *PaymentDetails { + if x != nil { + return x.Payment + } + return nil +} + +func (x *Tenant) GetContactDetails() *ContactDetails { + if x != nil { + return x.ContactDetails + } + return nil +} + type TenantCreateRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Tenant *Tenant `protobuf:"bytes,1,opt,name=tenant,proto3" json:"tenant,omitempty"` @@ -753,20 +769,14 @@ func (x *TenantGetHistoryRequest) GetAt() *timestamppb.Timestamp { } type TenantFindRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // TODO: remove in next release: - // - // Deprecated: Marked as deprecated in v1/tenant.proto. - DeprecatedId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=deprecated_id,json=deprecatedId,proto3" json:"deprecated_id,omitempty"` - // Deprecated: Marked as deprecated in v1/tenant.proto. - DeprecatedName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=deprecated_name,json=deprecatedName,proto3" json:"deprecated_name,omitempty"` - Paging *Paging `protobuf:"bytes,3,opt,name=paging,proto3" json:"paging,omitempty"` - Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Id *string `protobuf:"bytes,5,opt,name=id,proto3,oneof" json:"id,omitempty"` - Name *string `protobuf:"bytes,6,opt,name=name,proto3,oneof" json:"name,omitempty"` - Labels []string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Paging *Paging `protobuf:"bytes,3,opt,name=paging,proto3" json:"paging,omitempty"` + Annotations map[string]string `protobuf:"bytes,4,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Id *string `protobuf:"bytes,5,opt,name=id,proto3,oneof" json:"id,omitempty"` + Name *string `protobuf:"bytes,6,opt,name=name,proto3,oneof" json:"name,omitempty"` + Labels []string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TenantFindRequest) Reset() { @@ -799,22 +809,6 @@ func (*TenantFindRequest) Descriptor() ([]byte, []int) { return file_v1_tenant_proto_rawDescGZIP(), []int{14} } -// Deprecated: Marked as deprecated in v1/tenant.proto. -func (x *TenantFindRequest) GetDeprecatedId() *wrapperspb.StringValue { - if x != nil { - return x.DeprecatedId - } - return nil -} - -// Deprecated: Marked as deprecated in v1/tenant.proto. -func (x *TenantFindRequest) GetDeprecatedName() *wrapperspb.StringValue { - if x != nil { - return x.DeprecatedName - } - return nil -} - func (x *TenantFindRequest) GetPaging() *Paging { if x != nil { return x.Paging @@ -947,11 +941,166 @@ func (x *TenantListResponse) GetNextPage() uint64 { return 0 } +// PaymentDetails describe payment specific configurations of a tenant +type PaymentDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Details stored as key value pairs + Details map[string]string `protobuf:"bytes,1,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Annotations of this payment details + Annotations map[string]string `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Labels of this payment details + Labels []string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentDetails) Reset() { + *x = PaymentDetails{} + mi := &file_v1_tenant_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentDetails) ProtoMessage() {} + +func (x *PaymentDetails) ProtoReflect() protoreflect.Message { + mi := &file_v1_tenant_proto_msgTypes[17] + 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 PaymentDetails.ProtoReflect.Descriptor instead. +func (*PaymentDetails) Descriptor() ([]byte, []int) { + return file_v1_tenant_proto_rawDescGZIP(), []int{17} +} + +func (x *PaymentDetails) GetDetails() map[string]string { + if x != nil { + return x.Details + } + return nil +} + +func (x *PaymentDetails) GetAnnotations() map[string]string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *PaymentDetails) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + +// ContactDetails contain more properties of a tenant +type ContactDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Email of this tenant + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + // Phone Number of this tenant + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` + // Address of this tenant + Address *postaladdress.PostalAddress `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + // Avatar URL + AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` + // Annotations of this payment details + Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Labels of this payment details + Labels []string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ContactDetails) Reset() { + *x = ContactDetails{} + mi := &file_v1_tenant_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ContactDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContactDetails) ProtoMessage() {} + +func (x *ContactDetails) ProtoReflect() protoreflect.Message { + mi := &file_v1_tenant_proto_msgTypes[18] + 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 ContactDetails.ProtoReflect.Descriptor instead. +func (*ContactDetails) Descriptor() ([]byte, []int) { + return file_v1_tenant_proto_rawDescGZIP(), []int{18} +} + +func (x *ContactDetails) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ContactDetails) GetPhoneNumber() string { + if x != nil { + return x.PhoneNumber + } + return "" +} + +func (x *ContactDetails) GetAddress() *postaladdress.PostalAddress { + if x != nil { + return x.Address + } + return nil +} + +func (x *ContactDetails) GetAvatarUrl() string { + if x != nil { + return x.AvatarUrl + } + return "" +} + +func (x *ContactDetails) GetAnnotations() map[string]string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *ContactDetails) GetLabels() []string { + if x != nil { + return x.Labels + } + return nil +} + var File_v1_tenant_proto protoreflect.FileDescriptor const file_v1_tenant_proto_rawDesc = "" + "\n" + - "\x0fv1/tenant.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x0fv1/common.proto\x1a\fv1/iam.proto\x1a\rv1/meta.proto\x1a\x10v1/project.proto\x1a\x0ev1/quota.proto\"\x87\x01\n" + + "\x0fv1/tenant.proto\x12\x02v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/type/postal_address.proto\x1a\x0fv1/common.proto\x1a\fv1/iam.proto\x1a\rv1/meta.proto\x1a\x10v1/project.proto\x1a\x0ev1/quota.proto\"\x87\x01\n" + " FindParticipatingProjectsRequest\x12\x1b\n" + "\ttenant_id\x18\x01 \x01(\tR\btenantId\x120\n" + "\x11include_inherited\x18\x02 \x01(\bH\x00R\x10includeInherited\x88\x01\x01B\x14\n" + @@ -992,7 +1141,7 @@ const file_v1_tenant_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aD\n" + "\x16TenantAnnotationsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xe5\x01\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xd0\x02\n" + "\x06Tenant\x12\x1c\n" + "\x04meta\x18\x01 \x01(\v2\b.v1.MetaR\x04meta\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" + @@ -1000,7 +1149,9 @@ const file_v1_tenant_proto_rawDesc = "" + "\x0edefault_quotas\x18\x04 \x01(\v2\f.v1.QuotaSetR\rdefaultQuotas\x12$\n" + "\x06quotas\x18\x05 \x01(\v2\f.v1.QuotaSetR\x06quotas\x12,\n" + "\n" + - "iam_config\x18\x06 \x01(\v2\r.v1.IAMConfigR\tiamConfig\"9\n" + + "iam_config\x18\x06 \x01(\v2\r.v1.IAMConfigR\tiamConfig\x12,\n" + + "\apayment\x18\a \x01(\v2\x12.v1.PaymentDetailsR\apayment\x12;\n" + + "\x0fcontact_details\x18\b \x01(\v2\x12.v1.ContactDetailsR\x0econtactDetails\"9\n" + "\x13TenantCreateRequest\x12\"\n" + "\x06tenant\x18\x01 \x01(\v2\n" + ".v1.TenantR\x06tenant\"9\n" + @@ -1013,10 +1164,8 @@ const file_v1_tenant_proto_rawDesc = "" + "\x02id\x18\x01 \x01(\tR\x02id\"U\n" + "\x17TenantGetHistoryRequest\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12*\n" + - "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"\xa9\x03\n" + - "\x11TenantFindRequest\x12E\n" + - "\rdeprecated_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueB\x02\x18\x01R\fdeprecatedId\x12I\n" + - "\x0fdeprecated_name\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueB\x02\x18\x01R\x0edeprecatedName\x12\"\n" + + "\x02at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02at\"\xc3\x02\n" + + "\x11TenantFindRequest\x12\"\n" + "\x06paging\x18\x03 \x01(\v2\n" + ".v1.PagingR\x06paging\x12H\n" + "\vannotations\x18\x04 \x03(\v2&.v1.TenantFindRequest.AnnotationsEntryR\vannotations\x12\x13\n" + @@ -1027,7 +1176,7 @@ const file_v1_tenant_proto_rawDesc = "" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x05\n" + "\x03_idB\a\n" + - "\x05_name\"4\n" + + "\x05_nameJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\rdeprecated_idR\x0fdeprecated_name\"4\n" + "\x0eTenantResponse\x12\"\n" + "\x06tenant\x18\x01 \x01(\v2\n" + ".v1.TenantR\x06tenant\"j\n" + @@ -1036,7 +1185,28 @@ const file_v1_tenant_proto_rawDesc = "" + ".v1.TenantR\atenants\x12 \n" + "\tnext_page\x18\x02 \x01(\x04H\x00R\bnextPage\x88\x01\x01B\f\n" + "\n" + - "_next_page2\xfe\x04\n" + + "_next_page\"\xa6\x02\n" + + "\x0ePaymentDetails\x129\n" + + "\adetails\x18\x01 \x03(\v2\x1f.v1.PaymentDetails.DetailsEntryR\adetails\x12E\n" + + "\vannotations\x18\x02 \x03(\v2#.v1.PaymentDetails.AnnotationsEntryR\vannotations\x12\x16\n" + + "\x06labels\x18\x03 \x03(\tR\x06labels\x1a:\n" + + "\fDetailsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" + + "\x10AnnotationsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbd\x02\n" + + "\x0eContactDetails\x12\x14\n" + + "\x05email\x18\x01 \x01(\tR\x05email\x12!\n" + + "\fphone_number\x18\x02 \x01(\tR\vphoneNumber\x124\n" + + "\aaddress\x18\x03 \x01(\v2\x1a.google.type.PostalAddressR\aaddress\x12\x1d\n" + + "\n" + + "avatar_url\x18\x04 \x01(\tR\tavatarUrl\x12E\n" + + "\vannotations\x18\x05 \x03(\v2#.v1.ContactDetails.AnnotationsEntryR\vannotations\x12\x16\n" + + "\x06labels\x18\x06 \x03(\tR\x06labels\x1a>\n" + + "\x10AnnotationsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xfe\x04\n" + "\rTenantService\x125\n" + "\x06Create\x12\x17.v1.TenantCreateRequest\x1a\x12.v1.TenantResponse\x125\n" + "\x06Update\x12\x17.v1.TenantUpdateRequest\x1a\x12.v1.TenantResponse\x125\n" + @@ -1062,7 +1232,7 @@ func file_v1_tenant_proto_rawDescGZIP() []byte { return file_v1_tenant_proto_rawDescData } -var file_v1_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_v1_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_v1_tenant_proto_goTypes = []any{ (*FindParticipatingProjectsRequest)(nil), // 0: v1.FindParticipatingProjectsRequest (*FindParticipatingTenantsRequest)(nil), // 1: v1.FindParticipatingTenantsRequest @@ -1081,65 +1251,74 @@ var file_v1_tenant_proto_goTypes = []any{ (*TenantFindRequest)(nil), // 14: v1.TenantFindRequest (*TenantResponse)(nil), // 15: v1.TenantResponse (*TenantListResponse)(nil), // 16: v1.TenantListResponse - nil, // 17: v1.ProjectWithMembershipAnnotations.ProjectAnnotationsEntry - nil, // 18: v1.ProjectWithMembershipAnnotations.TenantAnnotationsEntry - nil, // 19: v1.TenantWithMembershipAnnotations.ProjectAnnotationsEntry - nil, // 20: v1.TenantWithMembershipAnnotations.TenantAnnotationsEntry - nil, // 21: v1.TenantFindRequest.AnnotationsEntry - (*Project)(nil), // 22: v1.Project - (*Meta)(nil), // 23: v1.Meta - (*QuotaSet)(nil), // 24: v1.QuotaSet - (*IAMConfig)(nil), // 25: v1.IAMConfig - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*wrapperspb.StringValue)(nil), // 27: google.protobuf.StringValue - (*Paging)(nil), // 28: v1.Paging + (*PaymentDetails)(nil), // 17: v1.PaymentDetails + (*ContactDetails)(nil), // 18: v1.ContactDetails + nil, // 19: v1.ProjectWithMembershipAnnotations.ProjectAnnotationsEntry + nil, // 20: v1.ProjectWithMembershipAnnotations.TenantAnnotationsEntry + nil, // 21: v1.TenantWithMembershipAnnotations.ProjectAnnotationsEntry + nil, // 22: v1.TenantWithMembershipAnnotations.TenantAnnotationsEntry + nil, // 23: v1.TenantFindRequest.AnnotationsEntry + nil, // 24: v1.PaymentDetails.DetailsEntry + nil, // 25: v1.PaymentDetails.AnnotationsEntry + nil, // 26: v1.ContactDetails.AnnotationsEntry + (*Project)(nil), // 27: v1.Project + (*Meta)(nil), // 28: v1.Meta + (*QuotaSet)(nil), // 29: v1.QuotaSet + (*IAMConfig)(nil), // 30: v1.IAMConfig + (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp + (*Paging)(nil), // 32: v1.Paging + (*postaladdress.PostalAddress)(nil), // 33: google.type.PostalAddress } var file_v1_tenant_proto_depIdxs = []int32{ 7, // 0: v1.ListTenantMembersResponse.tenants:type_name -> v1.TenantWithMembershipAnnotations 6, // 1: v1.FindParticipatingProjectsResponse.projects:type_name -> v1.ProjectWithMembershipAnnotations 7, // 2: v1.FindParticipatingTenantsResponse.tenants:type_name -> v1.TenantWithMembershipAnnotations - 22, // 3: v1.ProjectWithMembershipAnnotations.project:type_name -> v1.Project - 17, // 4: v1.ProjectWithMembershipAnnotations.project_annotations:type_name -> v1.ProjectWithMembershipAnnotations.ProjectAnnotationsEntry - 18, // 5: v1.ProjectWithMembershipAnnotations.tenant_annotations:type_name -> v1.ProjectWithMembershipAnnotations.TenantAnnotationsEntry + 27, // 3: v1.ProjectWithMembershipAnnotations.project:type_name -> v1.Project + 19, // 4: v1.ProjectWithMembershipAnnotations.project_annotations:type_name -> v1.ProjectWithMembershipAnnotations.ProjectAnnotationsEntry + 20, // 5: v1.ProjectWithMembershipAnnotations.tenant_annotations:type_name -> v1.ProjectWithMembershipAnnotations.TenantAnnotationsEntry 8, // 6: v1.TenantWithMembershipAnnotations.tenant:type_name -> v1.Tenant - 19, // 7: v1.TenantWithMembershipAnnotations.project_annotations:type_name -> v1.TenantWithMembershipAnnotations.ProjectAnnotationsEntry - 20, // 8: v1.TenantWithMembershipAnnotations.tenant_annotations:type_name -> v1.TenantWithMembershipAnnotations.TenantAnnotationsEntry - 23, // 9: v1.Tenant.meta:type_name -> v1.Meta - 24, // 10: v1.Tenant.default_quotas:type_name -> v1.QuotaSet - 24, // 11: v1.Tenant.quotas:type_name -> v1.QuotaSet - 25, // 12: v1.Tenant.iam_config:type_name -> v1.IAMConfig - 8, // 13: v1.TenantCreateRequest.tenant:type_name -> v1.Tenant - 8, // 14: v1.TenantUpdateRequest.tenant:type_name -> v1.Tenant - 26, // 15: v1.TenantGetHistoryRequest.at:type_name -> google.protobuf.Timestamp - 27, // 16: v1.TenantFindRequest.deprecated_id:type_name -> google.protobuf.StringValue - 27, // 17: v1.TenantFindRequest.deprecated_name:type_name -> google.protobuf.StringValue - 28, // 18: v1.TenantFindRequest.paging:type_name -> v1.Paging - 21, // 19: v1.TenantFindRequest.annotations:type_name -> v1.TenantFindRequest.AnnotationsEntry + 21, // 7: v1.TenantWithMembershipAnnotations.project_annotations:type_name -> v1.TenantWithMembershipAnnotations.ProjectAnnotationsEntry + 22, // 8: v1.TenantWithMembershipAnnotations.tenant_annotations:type_name -> v1.TenantWithMembershipAnnotations.TenantAnnotationsEntry + 28, // 9: v1.Tenant.meta:type_name -> v1.Meta + 29, // 10: v1.Tenant.default_quotas:type_name -> v1.QuotaSet + 29, // 11: v1.Tenant.quotas:type_name -> v1.QuotaSet + 30, // 12: v1.Tenant.iam_config:type_name -> v1.IAMConfig + 17, // 13: v1.Tenant.payment:type_name -> v1.PaymentDetails + 18, // 14: v1.Tenant.contact_details:type_name -> v1.ContactDetails + 8, // 15: v1.TenantCreateRequest.tenant:type_name -> v1.Tenant + 8, // 16: v1.TenantUpdateRequest.tenant:type_name -> v1.Tenant + 31, // 17: v1.TenantGetHistoryRequest.at:type_name -> google.protobuf.Timestamp + 32, // 18: v1.TenantFindRequest.paging:type_name -> v1.Paging + 23, // 19: v1.TenantFindRequest.annotations:type_name -> v1.TenantFindRequest.AnnotationsEntry 8, // 20: v1.TenantResponse.tenant:type_name -> v1.Tenant 8, // 21: v1.TenantListResponse.tenants:type_name -> v1.Tenant - 9, // 22: v1.TenantService.Create:input_type -> v1.TenantCreateRequest - 10, // 23: v1.TenantService.Update:input_type -> v1.TenantUpdateRequest - 11, // 24: v1.TenantService.Delete:input_type -> v1.TenantDeleteRequest - 12, // 25: v1.TenantService.Get:input_type -> v1.TenantGetRequest - 13, // 26: v1.TenantService.GetHistory:input_type -> v1.TenantGetHistoryRequest - 14, // 27: v1.TenantService.Find:input_type -> v1.TenantFindRequest - 2, // 28: v1.TenantService.ListTenantMembers:input_type -> v1.ListTenantMembersRequest - 0, // 29: v1.TenantService.FindParticipatingProjects:input_type -> v1.FindParticipatingProjectsRequest - 1, // 30: v1.TenantService.FindParticipatingTenants:input_type -> v1.FindParticipatingTenantsRequest - 15, // 31: v1.TenantService.Create:output_type -> v1.TenantResponse - 15, // 32: v1.TenantService.Update:output_type -> v1.TenantResponse - 15, // 33: v1.TenantService.Delete:output_type -> v1.TenantResponse - 15, // 34: v1.TenantService.Get:output_type -> v1.TenantResponse - 15, // 35: v1.TenantService.GetHistory:output_type -> v1.TenantResponse - 16, // 36: v1.TenantService.Find:output_type -> v1.TenantListResponse - 3, // 37: v1.TenantService.ListTenantMembers:output_type -> v1.ListTenantMembersResponse - 4, // 38: v1.TenantService.FindParticipatingProjects:output_type -> v1.FindParticipatingProjectsResponse - 5, // 39: v1.TenantService.FindParticipatingTenants:output_type -> v1.FindParticipatingTenantsResponse - 31, // [31:40] is the sub-list for method output_type - 22, // [22:31] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 24, // 22: v1.PaymentDetails.details:type_name -> v1.PaymentDetails.DetailsEntry + 25, // 23: v1.PaymentDetails.annotations:type_name -> v1.PaymentDetails.AnnotationsEntry + 33, // 24: v1.ContactDetails.address:type_name -> google.type.PostalAddress + 26, // 25: v1.ContactDetails.annotations:type_name -> v1.ContactDetails.AnnotationsEntry + 9, // 26: v1.TenantService.Create:input_type -> v1.TenantCreateRequest + 10, // 27: v1.TenantService.Update:input_type -> v1.TenantUpdateRequest + 11, // 28: v1.TenantService.Delete:input_type -> v1.TenantDeleteRequest + 12, // 29: v1.TenantService.Get:input_type -> v1.TenantGetRequest + 13, // 30: v1.TenantService.GetHistory:input_type -> v1.TenantGetHistoryRequest + 14, // 31: v1.TenantService.Find:input_type -> v1.TenantFindRequest + 2, // 32: v1.TenantService.ListTenantMembers:input_type -> v1.ListTenantMembersRequest + 0, // 33: v1.TenantService.FindParticipatingProjects:input_type -> v1.FindParticipatingProjectsRequest + 1, // 34: v1.TenantService.FindParticipatingTenants:input_type -> v1.FindParticipatingTenantsRequest + 15, // 35: v1.TenantService.Create:output_type -> v1.TenantResponse + 15, // 36: v1.TenantService.Update:output_type -> v1.TenantResponse + 15, // 37: v1.TenantService.Delete:output_type -> v1.TenantResponse + 15, // 38: v1.TenantService.Get:output_type -> v1.TenantResponse + 15, // 39: v1.TenantService.GetHistory:output_type -> v1.TenantResponse + 16, // 40: v1.TenantService.Find:output_type -> v1.TenantListResponse + 3, // 41: v1.TenantService.ListTenantMembers:output_type -> v1.ListTenantMembersResponse + 4, // 42: v1.TenantService.FindParticipatingProjects:output_type -> v1.FindParticipatingProjectsResponse + 5, // 43: v1.TenantService.FindParticipatingTenants:output_type -> v1.FindParticipatingTenantsResponse + 35, // [35:44] is the sub-list for method output_type + 26, // [26:35] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_v1_tenant_proto_init() } @@ -1163,7 +1342,7 @@ func file_v1_tenant_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_tenant_proto_rawDesc), len(file_v1_tenant_proto_rawDesc)), NumEnums: 0, - NumMessages: 22, + NumMessages: 27, NumExtensions: 0, NumServices: 1, }, diff --git a/go.mod b/go.mod index 7bc5fdf..0b36b51 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( github.com/testcontainers/testcontainers-go/modules/postgres v0.38.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 go.opentelemetry.io/otel/trace v1.38.0 + google.golang.org/genproto v0.0.0-20250826171959-ef028d996bc1 google.golang.org/grpc v1.75.0 google.golang.org/protobuf v1.36.8 sigs.k8s.io/yaml v1.5.0 diff --git a/go.sum b/go.sum index e995a6d..7a6d2f4 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +cloud.google.com/go/compute v1.44.0 h1:jE7DWf3k1Yqt/6fxFiG0B3DAZ3kk2H9+V5LIoTqYVvc= cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= @@ -388,6 +389,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto v0.0.0-20250826171959-ef028d996bc1 h1:Nm5SEGIguOIBDXs5rhfz2aKwEVWlgwC58UcmEnLDc8Y= +google.golang.org/genproto v0.0.0-20250826171959-ef028d996bc1/go.mod h1:Jz9LrroM7Mcm+a0QrLh4UpZ1B/WhjIbqwEcUf4y08nQ= google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY= google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE= google.golang.org/genproto/googleapis/rpc v0.0.0-20250826171959-ef028d996bc1 h1:pmJpJEvT846VzausCQ5d7KreSROcDqmO388w5YbnltA= diff --git a/pkg/datastore/migrate.go b/pkg/datastore/migrate.go index 2d8bf23..e7a585e 100644 --- a/pkg/datastore/migrate.go +++ b/pkg/datastore/migrate.go @@ -59,10 +59,12 @@ func MigrateDB(log *slog.Logger, db *sqlx.DB, healthServer *health.Server) error continue } - if q.Quota != nil { // nolint:staticcheck - q.Max = &q.Quota.Value // nolint:staticcheck - log.Info("migrating deprecated quota field of tenant", "tenant", tenant.Meta.Id, "value", *q.Max) - } + // We rely on a already deployed v0.12.0 of masterdata-api + // + // if q.Quota != nil { // nolint:staticcheck + // q.Max = &q.Quota.Value // nolint:staticcheck + // log.Info("migrating deprecated quota field of tenant", "tenant", tenant.Meta.Id, "value", *q.Max) + // } } err := ts.Update(ctx, tenant) diff --git a/pkg/service/project.go b/pkg/service/project.go index 6d49d25..965f898 100644 --- a/pkg/service/project.go +++ b/pkg/service/project.go @@ -125,19 +125,6 @@ func (s *projectService) GetHistory(ctx context.Context, req *v1.ProjectGetHisto return project.NewProjectResponse(), nil } func (s *projectService) Find(ctx context.Context, req *v1.ProjectFindRequest) (*v1.ProjectListResponse, error) { - // TODO: remove in next release - if req.DeprecatedId != nil && req.Id == nil { // nolint:staticcheck - req.Id = &req.DeprecatedId.Value // nolint:staticcheck - } - if req.DeprecatedDescription != nil && req.Description == nil { // nolint:staticcheck - req.Description = &req.DeprecatedDescription.Value // nolint:staticcheck - } - if req.DeprecatedName != nil && req.Name == nil { // nolint:staticcheck - req.Name = &req.DeprecatedName.Value // nolint:staticcheck - } - if req.DeprecatedTenantId != nil && req.TenantId == nil { // nolint:staticcheck - req.TenantId = &req.DeprecatedTenantId.Value // nolint:staticcheck - } var filters []any diff --git a/pkg/service/tenant.go b/pkg/service/tenant.go index 95ecff0..a366b9b 100644 --- a/pkg/service/tenant.go +++ b/pkg/service/tenant.go @@ -119,17 +119,10 @@ func (s *tenantService) GetHistory(ctx context.Context, req *v1.TenantGetHistory } func (s *tenantService) Find(ctx context.Context, req *v1.TenantFindRequest) (*v1.TenantListResponse, error) { - // TODO: remove in next release - if req.DeprecatedId != nil && req.Id == nil { // nolint:staticcheck - req.Id = &req.DeprecatedId.Value // nolint:staticcheck - } - if req.DeprecatedName != nil && req.Name == nil { // nolint:staticcheck - req.Name = &req.DeprecatedName.Value // nolint:staticcheck - } - var filters []any mapFilter := make(map[string]any) + if req.Id != nil { mapFilter["id"] = req.GetId() } diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index b128f6f..4854202 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -1,6 +1,9 @@ version: v2 managed: enabled: true + disable: + - file_option: go_package + module: buf.build/googleapis/googleapis override: - file_option: go_package_prefix value: github.com/metal-stack/masterdata-api diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 0000000..9a4fa6c --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,6 @@ +# Generated by buf. DO NOT EDIT. +version: v2 +deps: + - name: buf.build/googleapis/googleapis + commit: 61b203b9a9164be9a834f58c37be6f62 + digest: b5:7811a98b35bd2e4ae5c3ac73c8b3d9ae429f3a790da15de188dc98fc2b77d6bb10e45711f14903af9553fa9821dff256054f2e4b7795789265bc476bec2f088c diff --git a/proto/buf.yaml b/proto/buf.yaml index f49e32b..01c0351 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,4 +1,6 @@ version: v2 +deps: + - buf.build/googleapis/googleapis lint: use: - STANDARD diff --git a/proto/v1/meta.proto b/proto/v1/meta.proto index 855f0c8..eae73c9 100644 --- a/proto/v1/meta.proto +++ b/proto/v1/meta.proto @@ -13,4 +13,5 @@ message Meta { google.protobuf.Timestamp updated_time = 6; map annotations = 7; repeated string labels = 8; + string created_by = 9; } diff --git a/proto/v1/project.proto b/proto/v1/project.proto index ccbd73d..8165861 100644 --- a/proto/v1/project.proto +++ b/proto/v1/project.proto @@ -3,7 +3,6 @@ syntax = "proto3"; package v1; import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; import "v1/common.proto"; import "v1/meta.proto"; import "v1/quota.proto"; @@ -48,11 +47,8 @@ message ProjectGetHistoryRequest { } message ProjectFindRequest { - // TODO: remove in next release: - google.protobuf.StringValue deprecated_id = 1 [deprecated = true]; - google.protobuf.StringValue deprecated_name = 2 [deprecated = true]; - google.protobuf.StringValue deprecated_description = 3 [deprecated = true]; - google.protobuf.StringValue deprecated_tenant_id = 4 [deprecated = true]; + reserved 1, 2, 3, 4; + reserved "deprecated_id", "deprecated_name", "deprecated_description", "deprecated_tenant_id"; Paging paging = 5; map annotations = 6; diff --git a/proto/v1/quota.proto b/proto/v1/quota.proto index 5734668..f4fe0cf 100644 --- a/proto/v1/quota.proto +++ b/proto/v1/quota.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package v1; -import "google/protobuf/wrappers.proto"; - // QuotaSet defines the types of possible Quotas // might be specified by project or tenant // whatever quota is reached first counts @@ -21,8 +19,8 @@ message QuotaSet { // Quota is the actual maximum amount message Quota { - // TODO: remove in next release: - google.protobuf.Int32Value quota = 1 [deprecated = true]; + reserved 1; + reserved "quota"; // max is the maximum amount for the current QuotaSet, can be nil optional int32 max = 2; diff --git a/proto/v1/tenant.proto b/proto/v1/tenant.proto index b1f808c..c7e5bb7 100644 --- a/proto/v1/tenant.proto +++ b/proto/v1/tenant.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package v1; import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; +import "google/type/postal_address.proto"; import "v1/common.proto"; import "v1/iam.proto"; import "v1/meta.proto"; @@ -70,6 +70,8 @@ message Tenant { QuotaSet default_quotas = 4; QuotaSet quotas = 5; IAMConfig iam_config = 6; + PaymentDetails payment = 7; + ContactDetails contact_details = 8; } message TenantCreateRequest { @@ -94,9 +96,8 @@ message TenantGetHistoryRequest { } message TenantFindRequest { - // TODO: remove in next release: - google.protobuf.StringValue deprecated_id = 1 [deprecated = true]; - google.protobuf.StringValue deprecated_name = 2 [deprecated = true]; + reserved 1, 2; + reserved "deprecated_id", "deprecated_name"; Paging paging = 3; map annotations = 4; @@ -115,3 +116,29 @@ message TenantListResponse { // next_page is used for pagination, returns the next page to be fetched and must then be provided in the list request. optional uint64 next_page = 2; } + +// PaymentDetails describe payment specific configurations of a tenant +message PaymentDetails { + // Details stored as key value pairs + map details = 1; + // Annotations of this payment details + map annotations = 2; + // Labels of this payment details + repeated string labels = 3; +} + +// ContactDetails contain more properties of a tenant +message ContactDetails { + // Email of this tenant + string email = 1; + // Phone Number of this tenant + string phone_number = 2; + // Address of this tenant + google.type.PostalAddress address = 3; + // Avatar URL + string avatar_url = 4; + // Annotations of this payment details + map annotations = 5; + // Labels of this payment details + repeated string labels = 6; +}