From f1cde2dee3d84387e74089f6eb5a5d1597716c36 Mon Sep 17 00:00:00 2001 From: Patrick Stephen Date: Thu, 21 Jan 2021 12:37:28 -0600 Subject: [PATCH] Merge commit GitOrigin-RevId: 52e12649316b8b4228a0aafd0a948e6d8d59eaba --- internal/v1/resources.pb.go | 544 +++++++++++++++++++++---------- internal/v1/resources_grpc.pb.go | 38 +++ internal/v1/spec.pb.go | 166 ++++++++-- internal/v1/tags.pb.go | 101 +++++- models.go | 22 ++ plumbing.go | 81 +++++ svc.go | 47 +++ 7 files changed, 777 insertions(+), 222 deletions(-) diff --git a/internal/v1/resources.pb.go b/internal/v1/resources.pb.go index ca50cc0..8ec1d4a 100644 --- a/internal/v1/resources.pb.go +++ b/internal/v1/resources.pb.go @@ -669,44 +669,194 @@ func (x *ResourceListResponse) GetRateLimit() *RateLimitMetadata { return nil } +// EnumerateTagsRequest specifies criteria for retrieving a list of Resources. +type EnumerateTagsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Paging parameters for the query. + Meta *ListRequestMetadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + // A human-readable filter query string. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *EnumerateTagsRequest) Reset() { + *x = EnumerateTagsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_resources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnumerateTagsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumerateTagsRequest) ProtoMessage() {} + +func (x *EnumerateTagsRequest) ProtoReflect() protoreflect.Message { + mi := &file_resources_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumerateTagsRequest.ProtoReflect.Descriptor instead. +func (*EnumerateTagsRequest) Descriptor() ([]byte, []int) { + return file_resources_proto_rawDescGZIP(), []int{10} +} + +func (x *EnumerateTagsRequest) GetMeta() *ListRequestMetadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *EnumerateTagsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// EnumerateTagsResponse returns a list of Resources that meet the criteria of a +// ResourceListRequest. +type EnumerateTagsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Paging information for the query. + Meta *ListResponseMetadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` + // A single page of results matching the list request criteria. + Matches []*Tag `protobuf:"bytes,2,rep,name=matches,proto3" json:"matches,omitempty"` + // Rate limit information. + RateLimit *RateLimitMetadata `protobuf:"bytes,3,opt,name=rate_limit,json=rateLimit,proto3" json:"rate_limit,omitempty"` +} + +func (x *EnumerateTagsResponse) Reset() { + *x = EnumerateTagsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_resources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnumerateTagsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumerateTagsResponse) ProtoMessage() {} + +func (x *EnumerateTagsResponse) ProtoReflect() protoreflect.Message { + mi := &file_resources_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumerateTagsResponse.ProtoReflect.Descriptor instead. +func (*EnumerateTagsResponse) Descriptor() ([]byte, []int) { + return file_resources_proto_rawDescGZIP(), []int{11} +} + +func (x *EnumerateTagsResponse) GetMeta() *ListResponseMetadata { + if x != nil { + return x.Meta + } + return nil +} + +func (x *EnumerateTagsResponse) GetMatches() []*Tag { + if x != nil { + return x.Matches + } + return nil +} + +func (x *EnumerateTagsResponse) GetRateLimit() *RateLimitMetadata { + if x != nil { + return x.RateLimit + } + return nil +} + var File_resources_proto protoreflect.FileDescriptor var file_resources_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x1a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x7c, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, - 0xb3, 0x07, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xe2, 0x01, - 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x61, - 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, - 0x01, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, 0x05, 0xa8, 0xf3, 0xb3, - 0x07, 0x01, 0x22, 0x5c, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x1a, 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x0a, 0x74, 0x61, 0x67, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7c, 0x0a, 0x15, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, + 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x16, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, + 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0xf2, 0xf8, 0xb3, + 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, 0x05, 0xa8, 0xf3, 0xb3, 0x07, 0x01, 0x22, 0x5c, + 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, + 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0xdc, 0x01, 0x0a, + 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, + 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, + 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, + 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, + 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, + 0x0a, 0xfa, 0xf8, 0xb3, 0x07, 0x05, 0xa8, 0xf3, 0xb3, 0x07, 0x01, 0x22, 0x8c, 0x01, 0x0a, 0x15, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x02, 0x69, 0x64, - 0x22, 0xdc, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x6d, 0x65, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, + 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x16, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, @@ -718,108 +868,110 @@ var file_resources_proto_rawDesc = []byte{ 0x74, 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, 0x05, 0xa8, 0xf3, 0xb3, 0x07, 0x01, 0x22, - 0x8c, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, - 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0xe2, - 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x65, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, - 0x01, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, - 0x07, 0x01, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, 0x05, 0xa8, 0xf3, - 0xb3, 0x07, 0x01, 0x22, 0x62, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, - 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, - 0xb3, 0x07, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0xac, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, 0xf2, 0xf8, - 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x4a, - 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, - 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, - 0x09, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, - 0x05, 0xa8, 0xf3, 0xb3, 0x07, 0x01, 0x22, 0x66, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, + 0x62, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, + 0x02, 0x69, 0x64, 0x22, 0xac, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, + 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, + 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, + 0x01, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, 0x05, 0xa8, 0xf3, 0xb3, + 0x07, 0x01, 0x22, 0x66, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, + 0x07, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb8, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, + 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x67, 0x0a, 0x14, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, - 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xc8, - 0x01, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, - 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x36, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb8, 0xf3, 0xb3, - 0x07, 0x01, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x4a, 0x0a, - 0x0a, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, - 0xf3, 0xb3, 0x07, 0x01, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, - 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x32, 0xa6, 0x04, 0x0a, 0x09, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x66, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xf9, 0xb3, 0x07, 0x09, 0xa2, - 0xf3, 0xb3, 0x07, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x82, 0xf9, 0xb3, 0x07, 0x12, 0xaa, 0xf3, 0xb3, - 0x07, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, - 0x61, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xf9, 0xb3, 0x07, 0x08, 0xa2, 0xf3, - 0xb3, 0x07, 0x03, 0x67, 0x65, 0x74, 0x82, 0xf9, 0xb3, 0x07, 0x17, 0xaa, 0xf3, 0xb3, 0x07, 0x12, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0x6a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xf9, 0xb3, 0x07, 0x08, 0xa2, 0xf3, 0xb3, 0x07, 0x03, 0x70, - 0x75, 0x74, 0x82, 0xf9, 0xb3, 0x07, 0x17, 0xaa, 0xf3, 0xb3, 0x07, 0x12, 0x2f, 0x76, 0x31, 0x2f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6d, - 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2c, 0x82, 0xf9, 0xb3, 0x07, 0x0b, 0xa2, 0xf3, 0xb3, 0x07, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x82, 0xf9, 0xb3, 0x07, 0x17, 0xaa, 0xf3, 0xb3, 0x07, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x5f, 0x0a, - 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xf9, 0xb3, 0x07, 0x08, 0xa2, - 0xf3, 0xb3, 0x07, 0x03, 0x67, 0x65, 0x74, 0x82, 0xf9, 0xb3, 0x07, 0x12, 0xaa, 0xf3, 0xb3, 0x07, - 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x12, - 0xca, 0xf9, 0xb3, 0x07, 0x0d, 0xc2, 0xf9, 0xb3, 0x07, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x65, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, - 0x64, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, - 0x6e, 0x67, 0x42, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x6c, 0x75, - 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, - 0x67, 0x64, 0x6d, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xc0, + 0x01, 0x0a, 0x15, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x67, + 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb8, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x07, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x42, 0x14, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0xf2, 0xf8, 0xb3, 0x07, + 0x05, 0x90, 0xf4, 0xb3, 0x07, 0x01, 0x52, 0x09, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x32, 0x98, 0x05, 0x0a, 0x09, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x70, 0x0a, 0x0d, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x73, + 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, + 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xf9, 0xb3, 0x07, 0x08, 0xa2, 0xf3, 0xb3, 0x07, + 0x03, 0x67, 0x65, 0x74, 0x82, 0xf9, 0xb3, 0x07, 0x18, 0xaa, 0xf3, 0xb3, 0x07, 0x13, 0x2f, 0x76, + 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x61, 0x67, 0x73, + 0x2f, 0x12, 0x66, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x25, 0x82, 0xf9, 0xb3, 0x07, 0x09, 0xa2, 0xf3, 0xb3, 0x07, 0x04, 0x70, 0x6f, + 0x73, 0x74, 0x82, 0xf9, 0xb3, 0x07, 0x12, 0xaa, 0xf3, 0xb3, 0x07, 0x0d, 0x2f, 0x76, 0x31, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x03, 0x47, 0x65, 0x74, + 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x29, 0x82, 0xf9, 0xb3, 0x07, 0x08, 0xa2, 0xf3, 0xb3, 0x07, 0x03, 0x67, 0x65, 0x74, + 0x82, 0xf9, 0xb3, 0x07, 0x17, 0xaa, 0xf3, 0xb3, 0x07, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6a, 0x0a, 0x06, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, + 0xf9, 0xb3, 0x07, 0x08, 0xa2, 0xf3, 0xb3, 0x07, 0x03, 0x70, 0x75, 0x74, 0x82, 0xf9, 0xb3, 0x07, + 0x17, 0xaa, 0xf3, 0xb3, 0x07, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xf9, 0xb3, 0x07, 0x0b, + 0xa2, 0xf3, 0xb3, 0x07, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x82, 0xf9, 0xb3, 0x07, 0x17, + 0xaa, 0xf3, 0xb3, 0x07, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x5f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x24, 0x82, 0xf9, 0xb3, 0x07, 0x08, 0xa2, 0xf3, 0xb3, 0x07, 0x03, 0x67, 0x65, + 0x74, 0x82, 0xf9, 0xb3, 0x07, 0x12, 0xaa, 0xf3, 0xb3, 0x07, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x12, 0xca, 0xf9, 0xb3, 0x07, 0x0d, 0xc2, + 0xf9, 0xb3, 0x07, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x65, 0x0a, 0x1c, + 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x42, 0x11, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x5a, + 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, + 0x6e, 0x67, 0x64, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2d, 0x73, 0x64, + 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x76, 0x31, + 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -834,7 +986,7 @@ func file_resources_proto_rawDescGZIP() []byte { return file_resources_proto_rawDescData } -var file_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_resources_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_resources_proto_goTypes = []interface{}{ (*ResourceCreateRequest)(nil), // 0: v1.ResourceCreateRequest (*ResourceCreateResponse)(nil), // 1: v1.ResourceCreateResponse @@ -846,56 +998,65 @@ var file_resources_proto_goTypes = []interface{}{ (*ResourceDeleteResponse)(nil), // 7: v1.ResourceDeleteResponse (*ResourceListRequest)(nil), // 8: v1.ResourceListRequest (*ResourceListResponse)(nil), // 9: v1.ResourceListResponse - (*CreateRequestMetadata)(nil), // 10: v1.CreateRequestMetadata - (*Resource)(nil), // 11: v1.Resource - (*CreateResponseMetadata)(nil), // 12: v1.CreateResponseMetadata - (*RateLimitMetadata)(nil), // 13: v1.RateLimitMetadata - (*GetRequestMetadata)(nil), // 14: v1.GetRequestMetadata - (*GetResponseMetadata)(nil), // 15: v1.GetResponseMetadata - (*UpdateRequestMetadata)(nil), // 16: v1.UpdateRequestMetadata - (*UpdateResponseMetadata)(nil), // 17: v1.UpdateResponseMetadata - (*DeleteRequestMetadata)(nil), // 18: v1.DeleteRequestMetadata - (*DeleteResponseMetadata)(nil), // 19: v1.DeleteResponseMetadata - (*ListRequestMetadata)(nil), // 20: v1.ListRequestMetadata - (*ListResponseMetadata)(nil), // 21: v1.ListResponseMetadata + (*EnumerateTagsRequest)(nil), // 10: v1.EnumerateTagsRequest + (*EnumerateTagsResponse)(nil), // 11: v1.EnumerateTagsResponse + (*CreateRequestMetadata)(nil), // 12: v1.CreateRequestMetadata + (*Resource)(nil), // 13: v1.Resource + (*CreateResponseMetadata)(nil), // 14: v1.CreateResponseMetadata + (*RateLimitMetadata)(nil), // 15: v1.RateLimitMetadata + (*GetRequestMetadata)(nil), // 16: v1.GetRequestMetadata + (*GetResponseMetadata)(nil), // 17: v1.GetResponseMetadata + (*UpdateRequestMetadata)(nil), // 18: v1.UpdateRequestMetadata + (*UpdateResponseMetadata)(nil), // 19: v1.UpdateResponseMetadata + (*DeleteRequestMetadata)(nil), // 20: v1.DeleteRequestMetadata + (*DeleteResponseMetadata)(nil), // 21: v1.DeleteResponseMetadata + (*ListRequestMetadata)(nil), // 22: v1.ListRequestMetadata + (*ListResponseMetadata)(nil), // 23: v1.ListResponseMetadata + (*Tag)(nil), // 24: v1.Tag } var file_resources_proto_depIdxs = []int32{ - 10, // 0: v1.ResourceCreateRequest.meta:type_name -> v1.CreateRequestMetadata - 11, // 1: v1.ResourceCreateRequest.resource:type_name -> v1.Resource - 12, // 2: v1.ResourceCreateResponse.meta:type_name -> v1.CreateResponseMetadata - 11, // 3: v1.ResourceCreateResponse.resource:type_name -> v1.Resource - 13, // 4: v1.ResourceCreateResponse.rate_limit:type_name -> v1.RateLimitMetadata - 14, // 5: v1.ResourceGetRequest.meta:type_name -> v1.GetRequestMetadata - 15, // 6: v1.ResourceGetResponse.meta:type_name -> v1.GetResponseMetadata - 11, // 7: v1.ResourceGetResponse.resource:type_name -> v1.Resource - 13, // 8: v1.ResourceGetResponse.rate_limit:type_name -> v1.RateLimitMetadata - 16, // 9: v1.ResourceUpdateRequest.meta:type_name -> v1.UpdateRequestMetadata - 11, // 10: v1.ResourceUpdateRequest.resource:type_name -> v1.Resource - 17, // 11: v1.ResourceUpdateResponse.meta:type_name -> v1.UpdateResponseMetadata - 11, // 12: v1.ResourceUpdateResponse.resource:type_name -> v1.Resource - 13, // 13: v1.ResourceUpdateResponse.rate_limit:type_name -> v1.RateLimitMetadata - 18, // 14: v1.ResourceDeleteRequest.meta:type_name -> v1.DeleteRequestMetadata - 19, // 15: v1.ResourceDeleteResponse.meta:type_name -> v1.DeleteResponseMetadata - 13, // 16: v1.ResourceDeleteResponse.rate_limit:type_name -> v1.RateLimitMetadata - 20, // 17: v1.ResourceListRequest.meta:type_name -> v1.ListRequestMetadata - 21, // 18: v1.ResourceListResponse.meta:type_name -> v1.ListResponseMetadata - 11, // 19: v1.ResourceListResponse.resources:type_name -> v1.Resource - 13, // 20: v1.ResourceListResponse.rate_limit:type_name -> v1.RateLimitMetadata - 0, // 21: v1.Resources.Create:input_type -> v1.ResourceCreateRequest - 2, // 22: v1.Resources.Get:input_type -> v1.ResourceGetRequest - 4, // 23: v1.Resources.Update:input_type -> v1.ResourceUpdateRequest - 6, // 24: v1.Resources.Delete:input_type -> v1.ResourceDeleteRequest - 8, // 25: v1.Resources.List:input_type -> v1.ResourceListRequest - 1, // 26: v1.Resources.Create:output_type -> v1.ResourceCreateResponse - 3, // 27: v1.Resources.Get:output_type -> v1.ResourceGetResponse - 5, // 28: v1.Resources.Update:output_type -> v1.ResourceUpdateResponse - 7, // 29: v1.Resources.Delete:output_type -> v1.ResourceDeleteResponse - 9, // 30: v1.Resources.List:output_type -> v1.ResourceListResponse - 26, // [26:31] is the sub-list for method output_type - 21, // [21:26] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 12, // 0: v1.ResourceCreateRequest.meta:type_name -> v1.CreateRequestMetadata + 13, // 1: v1.ResourceCreateRequest.resource:type_name -> v1.Resource + 14, // 2: v1.ResourceCreateResponse.meta:type_name -> v1.CreateResponseMetadata + 13, // 3: v1.ResourceCreateResponse.resource:type_name -> v1.Resource + 15, // 4: v1.ResourceCreateResponse.rate_limit:type_name -> v1.RateLimitMetadata + 16, // 5: v1.ResourceGetRequest.meta:type_name -> v1.GetRequestMetadata + 17, // 6: v1.ResourceGetResponse.meta:type_name -> v1.GetResponseMetadata + 13, // 7: v1.ResourceGetResponse.resource:type_name -> v1.Resource + 15, // 8: v1.ResourceGetResponse.rate_limit:type_name -> v1.RateLimitMetadata + 18, // 9: v1.ResourceUpdateRequest.meta:type_name -> v1.UpdateRequestMetadata + 13, // 10: v1.ResourceUpdateRequest.resource:type_name -> v1.Resource + 19, // 11: v1.ResourceUpdateResponse.meta:type_name -> v1.UpdateResponseMetadata + 13, // 12: v1.ResourceUpdateResponse.resource:type_name -> v1.Resource + 15, // 13: v1.ResourceUpdateResponse.rate_limit:type_name -> v1.RateLimitMetadata + 20, // 14: v1.ResourceDeleteRequest.meta:type_name -> v1.DeleteRequestMetadata + 21, // 15: v1.ResourceDeleteResponse.meta:type_name -> v1.DeleteResponseMetadata + 15, // 16: v1.ResourceDeleteResponse.rate_limit:type_name -> v1.RateLimitMetadata + 22, // 17: v1.ResourceListRequest.meta:type_name -> v1.ListRequestMetadata + 23, // 18: v1.ResourceListResponse.meta:type_name -> v1.ListResponseMetadata + 13, // 19: v1.ResourceListResponse.resources:type_name -> v1.Resource + 15, // 20: v1.ResourceListResponse.rate_limit:type_name -> v1.RateLimitMetadata + 22, // 21: v1.EnumerateTagsRequest.meta:type_name -> v1.ListRequestMetadata + 23, // 22: v1.EnumerateTagsResponse.meta:type_name -> v1.ListResponseMetadata + 24, // 23: v1.EnumerateTagsResponse.matches:type_name -> v1.Tag + 15, // 24: v1.EnumerateTagsResponse.rate_limit:type_name -> v1.RateLimitMetadata + 10, // 25: v1.Resources.EnumerateTags:input_type -> v1.EnumerateTagsRequest + 0, // 26: v1.Resources.Create:input_type -> v1.ResourceCreateRequest + 2, // 27: v1.Resources.Get:input_type -> v1.ResourceGetRequest + 4, // 28: v1.Resources.Update:input_type -> v1.ResourceUpdateRequest + 6, // 29: v1.Resources.Delete:input_type -> v1.ResourceDeleteRequest + 8, // 30: v1.Resources.List:input_type -> v1.ResourceListRequest + 11, // 31: v1.Resources.EnumerateTags:output_type -> v1.EnumerateTagsResponse + 1, // 32: v1.Resources.Create:output_type -> v1.ResourceCreateResponse + 3, // 33: v1.Resources.Get:output_type -> v1.ResourceGetResponse + 5, // 34: v1.Resources.Update:output_type -> v1.ResourceUpdateResponse + 7, // 35: v1.Resources.Delete:output_type -> v1.ResourceDeleteResponse + 9, // 36: v1.Resources.List:output_type -> v1.ResourceListResponse + 31, // [31:37] is the sub-list for method output_type + 25, // [25:31] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_resources_proto_init() } @@ -906,6 +1067,7 @@ func file_resources_proto_init() { file_options_proto_init() file_spec_proto_init() file_drivers_proto_init() + file_tags_proto_init() if !protoimpl.UnsafeEnabled { file_resources_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResourceCreateRequest); i { @@ -1027,6 +1189,30 @@ func file_resources_proto_init() { return nil } } + file_resources_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumerateTagsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resources_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumerateTagsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1034,7 +1220,7 @@ func file_resources_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_resources_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/internal/v1/resources_grpc.pb.go b/internal/v1/resources_grpc.pb.go index ec6f082..6f0446e 100644 --- a/internal/v1/resources_grpc.pb.go +++ b/internal/v1/resources_grpc.pb.go @@ -31,6 +31,8 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ResourcesClient interface { + // EnumerateTags gets a list of the filter matching tags. + EnumerateTags(ctx context.Context, in *EnumerateTagsRequest, opts ...grpc.CallOption) (*EnumerateTagsResponse, error) // Create registers a new Resource. Create(ctx context.Context, in *ResourceCreateRequest, opts ...grpc.CallOption) (*ResourceCreateResponse, error) // Get reads one Resource by ID. @@ -51,6 +53,15 @@ func NewResourcesClient(cc grpc.ClientConnInterface) ResourcesClient { return &resourcesClient{cc} } +func (c *resourcesClient) EnumerateTags(ctx context.Context, in *EnumerateTagsRequest, opts ...grpc.CallOption) (*EnumerateTagsResponse, error) { + out := new(EnumerateTagsResponse) + err := c.cc.Invoke(ctx, "/v1.Resources/EnumerateTags", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *resourcesClient) Create(ctx context.Context, in *ResourceCreateRequest, opts ...grpc.CallOption) (*ResourceCreateResponse, error) { out := new(ResourceCreateResponse) err := c.cc.Invoke(ctx, "/v1.Resources/Create", in, out, opts...) @@ -100,6 +111,8 @@ func (c *resourcesClient) List(ctx context.Context, in *ResourceListRequest, opt // All implementations must embed UnimplementedResourcesServer // for forward compatibility type ResourcesServer interface { + // EnumerateTags gets a list of the filter matching tags. + EnumerateTags(context.Context, *EnumerateTagsRequest) (*EnumerateTagsResponse, error) // Create registers a new Resource. Create(context.Context, *ResourceCreateRequest) (*ResourceCreateResponse, error) // Get reads one Resource by ID. @@ -117,6 +130,9 @@ type ResourcesServer interface { type UnimplementedResourcesServer struct { } +func (UnimplementedResourcesServer) EnumerateTags(context.Context, *EnumerateTagsRequest) (*EnumerateTagsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnumerateTags not implemented") +} func (UnimplementedResourcesServer) Create(context.Context, *ResourceCreateRequest) (*ResourceCreateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } @@ -145,6 +161,24 @@ func RegisterResourcesServer(s grpc.ServiceRegistrar, srv ResourcesServer) { s.RegisterService(&_Resources_serviceDesc, srv) } +func _Resources_EnumerateTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnumerateTagsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourcesServer).EnumerateTags(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Resources/EnumerateTags", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourcesServer).EnumerateTags(ctx, req.(*EnumerateTagsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Resources_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResourceCreateRequest) if err := dec(in); err != nil { @@ -239,6 +273,10 @@ var _Resources_serviceDesc = grpc.ServiceDesc{ ServiceName: "v1.Resources", HandlerType: (*ResourcesServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "EnumerateTags", + Handler: _Resources_EnumerateTags_Handler, + }, { MethodName: "Create", Handler: _Resources_Create_Handler, diff --git a/internal/v1/spec.pb.go b/internal/v1/spec.pb.go index 37de7cb..6d6e6da 100644 --- a/internal/v1/spec.pb.go +++ b/internal/v1/spec.pb.go @@ -866,6 +866,85 @@ func (x *RateLimitMetadata) GetBucket() string { return "" } +// GenericRequestMetadata contains common headers for generic requests. +type GenericRequestMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GenericRequestMetadata) Reset() { + *x = GenericRequestMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_spec_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenericRequestMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericRequestMetadata) ProtoMessage() {} + +func (x *GenericRequestMetadata) ProtoReflect() protoreflect.Message { + mi := &file_spec_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericRequestMetadata.ProtoReflect.Descriptor instead. +func (*GenericRequestMetadata) Descriptor() ([]byte, []int) { + return file_spec_proto_rawDescGZIP(), []int{18} +} + +// GenericResponseMetadata contains common headers for generic request +// responses. +type GenericResponseMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GenericResponseMetadata) Reset() { + *x = GenericResponseMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_spec_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenericResponseMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenericResponseMetadata) ProtoMessage() {} + +func (x *GenericResponseMetadata) ProtoReflect() protoreflect.Message { + mi := &file_spec_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GenericResponseMetadata.ProtoReflect.Descriptor instead. +func (*GenericResponseMetadata) Descriptor() ([]byte, []int) { + return file_spec_proto_rawDescGZIP(), []int{19} +} + var File_spec_proto protoreflect.FileDescriptor var file_spec_proto_rawDesc = []byte{ @@ -945,13 +1024,16 @@ var file_spec_proto_rawDesc = []byte{ 0x65, 0x73, 0x65, 0x74, 0x41, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, - 0x05, 0xa8, 0xf3, 0xb3, 0x07, 0x01, 0x42, 0x52, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, - 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x6c, - 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, - 0x6e, 0x67, 0x64, 0x6d, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x05, 0xa8, 0xf3, 0xb3, 0x07, 0x01, 0x22, 0x18, 0x0a, 0x16, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x52, 0x0a, 0x1c, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x5a, 0x32, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, + 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -966,31 +1048,33 @@ func file_spec_proto_rawDescGZIP() []byte { return file_spec_proto_rawDescData } -var file_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_spec_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_spec_proto_goTypes = []interface{}{ - (*AlreadyExistsError)(nil), // 0: v1.AlreadyExistsError - (*NotFoundError)(nil), // 1: v1.NotFoundError - (*BadRequestError)(nil), // 2: v1.BadRequestError - (*AuthenticationError)(nil), // 3: v1.AuthenticationError - (*PermissionError)(nil), // 4: v1.PermissionError - (*InternalError)(nil), // 5: v1.InternalError - (*RateLimitError)(nil), // 6: v1.RateLimitError - (*CreateRequestMetadata)(nil), // 7: v1.CreateRequestMetadata - (*CreateResponseMetadata)(nil), // 8: v1.CreateResponseMetadata - (*GetRequestMetadata)(nil), // 9: v1.GetRequestMetadata - (*GetResponseMetadata)(nil), // 10: v1.GetResponseMetadata - (*UpdateRequestMetadata)(nil), // 11: v1.UpdateRequestMetadata - (*UpdateResponseMetadata)(nil), // 12: v1.UpdateResponseMetadata - (*DeleteRequestMetadata)(nil), // 13: v1.DeleteRequestMetadata - (*DeleteResponseMetadata)(nil), // 14: v1.DeleteResponseMetadata - (*ListRequestMetadata)(nil), // 15: v1.ListRequestMetadata - (*ListResponseMetadata)(nil), // 16: v1.ListResponseMetadata - (*RateLimitMetadata)(nil), // 17: v1.RateLimitMetadata - (*timestamp.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*AlreadyExistsError)(nil), // 0: v1.AlreadyExistsError + (*NotFoundError)(nil), // 1: v1.NotFoundError + (*BadRequestError)(nil), // 2: v1.BadRequestError + (*AuthenticationError)(nil), // 3: v1.AuthenticationError + (*PermissionError)(nil), // 4: v1.PermissionError + (*InternalError)(nil), // 5: v1.InternalError + (*RateLimitError)(nil), // 6: v1.RateLimitError + (*CreateRequestMetadata)(nil), // 7: v1.CreateRequestMetadata + (*CreateResponseMetadata)(nil), // 8: v1.CreateResponseMetadata + (*GetRequestMetadata)(nil), // 9: v1.GetRequestMetadata + (*GetResponseMetadata)(nil), // 10: v1.GetResponseMetadata + (*UpdateRequestMetadata)(nil), // 11: v1.UpdateRequestMetadata + (*UpdateResponseMetadata)(nil), // 12: v1.UpdateResponseMetadata + (*DeleteRequestMetadata)(nil), // 13: v1.DeleteRequestMetadata + (*DeleteResponseMetadata)(nil), // 14: v1.DeleteResponseMetadata + (*ListRequestMetadata)(nil), // 15: v1.ListRequestMetadata + (*ListResponseMetadata)(nil), // 16: v1.ListResponseMetadata + (*RateLimitMetadata)(nil), // 17: v1.RateLimitMetadata + (*GenericRequestMetadata)(nil), // 18: v1.GenericRequestMetadata + (*GenericResponseMetadata)(nil), // 19: v1.GenericResponseMetadata + (*timestamp.Timestamp)(nil), // 20: google.protobuf.Timestamp } var file_spec_proto_depIdxs = []int32{ 17, // 0: v1.RateLimitError.rate_limit:type_name -> v1.RateLimitMetadata - 18, // 1: v1.RateLimitMetadata.reset_at:type_name -> google.protobuf.Timestamp + 20, // 1: v1.RateLimitMetadata.reset_at:type_name -> google.protobuf.Timestamp 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 @@ -1221,6 +1305,30 @@ func file_spec_proto_init() { return nil } } + file_spec_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericRequestMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_spec_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenericResponseMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1228,7 +1336,7 @@ func file_spec_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_spec_proto_rawDesc, NumEnums: 0, - NumMessages: 18, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/v1/tags.pb.go b/internal/v1/tags.pb.go index 42d6f8a..19fa335 100644 --- a/internal/v1/tags.pb.go +++ b/internal/v1/tags.pb.go @@ -89,6 +89,61 @@ func (x *Tags) GetPairs() []*Tags_Pair { return nil } +type Tag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Tag) Reset() { + *x = Tag{} + if protoimpl.UnsafeEnabled { + mi := &file_tags_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_tags_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_tags_proto_rawDescGZIP(), []int{1} +} + +func (x *Tag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tag) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + type Tags_Pair struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -101,7 +156,7 @@ type Tags_Pair struct { func (x *Tags_Pair) Reset() { *x = Tags_Pair{} if protoimpl.UnsafeEnabled { - mi := &file_tags_proto_msgTypes[1] + mi := &file_tags_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -114,7 +169,7 @@ func (x *Tags_Pair) String() string { func (*Tags_Pair) ProtoMessage() {} func (x *Tags_Pair) ProtoReflect() protoreflect.Message { - mi := &file_tags_proto_msgTypes[1] + mi := &file_tags_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -164,14 +219,19 @@ var file_tags_proto_rawDesc = []byte{ 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x2c, 0x20, 0x22, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, - 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x7d, 0x7d, 0xf0, 0xf3, 0xb3, 0x07, 0x01, 0x42, - 0x60, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x42, - 0x0c, 0x54, 0x61, 0x67, 0x73, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x5a, 0x32, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, - 0x64, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2d, 0x73, 0x64, 0x6b, 0x2d, - 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x7d, 0x7d, 0xf0, 0xf3, 0xb3, 0x07, 0x01, 0x22, + 0x53, 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0a, 0xf2, 0xf8, 0xb3, 0x07, 0x05, 0xb0, 0xf3, 0xb3, 0x07, + 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x0a, 0xfa, 0xf8, 0xb3, 0x07, 0x05, 0xa8, + 0xf3, 0xb3, 0x07, 0x01, 0x42, 0x60, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x6f, + 0x6e, 0x67, 0x64, 0x6d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x6c, 0x75, 0x6d, + 0x62, 0x69, 0x6e, 0x67, 0x42, 0x0c, 0x54, 0x61, 0x67, 0x73, 0x50, 0x6c, 0x75, 0x6d, 0x62, 0x69, + 0x6e, 0x67, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x64, 0x6d, + 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -186,13 +246,14 @@ func file_tags_proto_rawDescGZIP() []byte { return file_tags_proto_rawDescData } -var file_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_tags_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_tags_proto_goTypes = []interface{}{ (*Tags)(nil), // 0: v1.Tags - (*Tags_Pair)(nil), // 1: v1.Tags.Pair + (*Tag)(nil), // 1: v1.Tag + (*Tags_Pair)(nil), // 2: v1.Tags.Pair } var file_tags_proto_depIdxs = []int32{ - 1, // 0: v1.Tags.pairs:type_name -> v1.Tags.Pair + 2, // 0: v1.Tags.pairs:type_name -> v1.Tags.Pair 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -220,6 +281,18 @@ func file_tags_proto_init() { } } file_tags_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tags_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Tags_Pair); i { case 0: return &v.state @@ -238,7 +311,7 @@ func file_tags_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_tags_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/models.go b/models.go index f5d6830..44989de 100644 --- a/models.go +++ b/models.go @@ -62,6 +62,12 @@ type RateLimitMetadata struct { Bucket string `json:"bucket"` } +type Tag struct { + Name string `json:"name"` + + Value string `json:"value"` +} + // AccountAttachmentCreateResponse reports how the AccountAttachments were created in the system. type AccountAttachmentCreateResponse struct { // Reserved for future use. @@ -3726,6 +3732,22 @@ type NodeIterator interface { Err() error } +// TagIterator provides read access to a list of Tag. +// Use it like so: +// for iterator.Next() { +// tag := iterator.Value() +// // ... +// } +type TagIterator interface { + // Next advances the iterator to the next item in the list. It returns + // true if an item is available to retrieve via the `Value()` function. + Next() bool + // Value returns the current item, if one is available. + Value() *Tag + // Err returns the first error encountered during iteration, if any. + Err() error +} + // ResourceIterator provides read access to a list of Resource. // Use it like so: // for iterator.Next() { diff --git a/plumbing.go b/plumbing.go index 4e9819f..69bc93b 100644 --- a/plumbing.go +++ b/plumbing.go @@ -248,6 +248,42 @@ func convertRepeatedRateLimitMetadataToPorcelain(plumbings []*proto.RateLimitMet } return items } +func convertTagToPorcelain(plumbing *proto.Tag) *Tag { + if plumbing == nil { + return nil + } + porcelain := &Tag{} + porcelain.Name = (plumbing.Name) + porcelain.Value = (plumbing.Value) + return porcelain +} + +func convertTagToPlumbing(porcelain *Tag) *proto.Tag { + if porcelain == nil { + return nil + } + plumbing := &proto.Tag{} + plumbing.Name = (porcelain.Name) + plumbing.Value = (porcelain.Value) + return plumbing +} +func convertRepeatedTagToPlumbing( + porcelains []*Tag, +) []*proto.Tag { + var items []*proto.Tag + for _, porcelain := range porcelains { + items = append(items, convertTagToPlumbing(porcelain)) + } + return items +} + +func convertRepeatedTagToPorcelain(plumbings []*proto.Tag) []*Tag { + var items []*Tag + for _, plumbing := range plumbings { + items = append(items, convertTagToPorcelain(plumbing)) + } + return items +} func convertAccountAttachmentCreateResponseToPorcelain(plumbing *proto.AccountAttachmentCreateResponse) *AccountAttachmentCreateResponse { if plumbing == nil { return nil @@ -5263,6 +5299,51 @@ func (n *nodeIteratorImpl) Err() error { return n.err } +type tagIteratorImplFetchFunc func() ( + []*Tag, + bool, error) +type tagIteratorImpl struct { + buffer []*Tag + index int + hasNextPage bool + err error + fetch tagIteratorImplFetchFunc +} + +func newTagIteratorImpl(f tagIteratorImplFetchFunc) *tagIteratorImpl { + return &tagIteratorImpl{ + hasNextPage: true, + fetch: f, + } +} + +func (t *tagIteratorImpl) Next() bool { + if t.index < len(t.buffer)-1 { + t.index++ + return true + } + + // reached end of buffer + if !t.hasNextPage { + return false + } + + t.index = 0 + t.buffer, t.hasNextPage, t.err = t.fetch() + return len(t.buffer) > 0 +} + +func (t *tagIteratorImpl) Value() *Tag { + if t.index >= len(t.buffer) { + return nil + } + return t.buffer[t.index] +} + +func (t *tagIteratorImpl) Err() error { + return t.err +} + type resourceIteratorImplFetchFunc func() ( []Resource, bool, error) diff --git a/svc.go b/svc.go index cb458fe..16c2a13 100644 --- a/svc.go +++ b/svc.go @@ -726,6 +726,53 @@ type Resources struct { parent *Client } +// EnumerateTags gets a list of the filter matching tags. +func (svc *Resources) EnumerateTags( + ctx context.Context, + filter string, + args ...interface{}) ( + TagIterator, + error) { + req := &plumbing.EnumerateTagsRequest{} + + var filterErr error + req.Filter, filterErr = quoteFilterArgs(filter, args...) + if filterErr != nil { + return nil, filterErr + } + req.Meta = &plumbing.ListRequestMetadata{} + if value := svc.parent.testOption("PageLimit"); value != nil { + v, ok := value.(int) + if ok { + req.Meta.Limit = int32(v) + } + } + return newTagIteratorImpl( + func() ( + []*Tag, + bool, error) { + var plumbingResponse *plumbing.EnumerateTagsResponse + var err error + i := 0 + for { + plumbingResponse, err = svc.client.EnumerateTags(svc.parent.wrapContext(ctx, req, "Resources.EnumerateTags"), req) + if err != nil { + if !svc.parent.shouldRetry(i, err) { + return nil, false, convertErrorToPorcelain(err) + } + i++ + svc.parent.jitterSleep(i) + continue + } + break + } + result := convertRepeatedTagToPorcelain(plumbingResponse.Matches) + req.Meta.Cursor = plumbingResponse.Meta.NextCursor + return result, req.Meta.Cursor != "", nil + }, + ), nil +} + // Create registers a new Resource. func (svc *Resources) Create( ctx context.Context,