diff --git a/example/roblox/v2.pb.go b/example/roblox/v2.pb.go new file mode 100644 index 0000000..8e67f37 --- /dev/null +++ b/example/roblox/v2.pb.go @@ -0,0 +1,985 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: example/roblox/v2.proto + +package cloud + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A CreatorStoreProduct. +type CreatorStoreProduct struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field for path. + Path string `protobuf:"bytes,10000,opt,name=path,proto3" json:"path,omitempty"` + // Field for id. + Id string `protobuf:"bytes,10001,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *CreatorStoreProduct) Reset() { + *x = CreatorStoreProduct{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreatorStoreProduct) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreatorStoreProduct) ProtoMessage() {} + +func (x *CreatorStoreProduct) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[0] + 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 CreatorStoreProduct.ProtoReflect.Descriptor instead. +func (*CreatorStoreProduct) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{0} +} + +func (x *CreatorStoreProduct) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CreatorStoreProduct) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// A Create request for a CreatorStoreProduct resource. +type CreateCreatorStoreProductRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A field for the parent of CreatorStoreProduct + Parent string `protobuf:"bytes,10013,opt,name=parent,proto3" json:"parent,omitempty"` + // An id that uniquely identifies the resource within the collection + Id string `protobuf:"bytes,10014,opt,name=id,proto3" json:"id,omitempty"` + // The resource to perform the operation on. + Creatorstoreproduct *CreatorStoreProduct `protobuf:"bytes,10015,opt,name=creatorstoreproduct,proto3" json:"creatorstoreproduct,omitempty"` +} + +func (x *CreateCreatorStoreProductRequest) Reset() { + *x = CreateCreatorStoreProductRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateCreatorStoreProductRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateCreatorStoreProductRequest) ProtoMessage() {} + +func (x *CreateCreatorStoreProductRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_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 CreateCreatorStoreProductRequest.ProtoReflect.Descriptor instead. +func (*CreateCreatorStoreProductRequest) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateCreatorStoreProductRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateCreatorStoreProductRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateCreatorStoreProductRequest) GetCreatorstoreproduct() *CreatorStoreProduct { + if x != nil { + return x.Creatorstoreproduct + } + return nil +} + +// Request message for the GetCreatorStoreProduct method +type GetCreatorStoreProductRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The globally unique identifier for the resource + Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *GetCreatorStoreProductRequest) Reset() { + *x = GetCreatorStoreProductRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCreatorStoreProductRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCreatorStoreProductRequest) ProtoMessage() {} + +func (x *GetCreatorStoreProductRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[2] + 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 GetCreatorStoreProductRequest.ProtoReflect.Descriptor instead. +func (*GetCreatorStoreProductRequest) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{2} +} + +func (x *GetCreatorStoreProductRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Request message for the UpdateCreatorStoreProduct method +type UpdateCreatorStoreProductRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The globally unique identifier for the resource + Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` + // The resource to perform the operation on. + Creatorstoreproduct *CreatorStoreProduct `protobuf:"bytes,10015,opt,name=creatorstoreproduct,proto3" json:"creatorstoreproduct,omitempty"` + // The update mask for the resource + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,10012,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateCreatorStoreProductRequest) Reset() { + *x = UpdateCreatorStoreProductRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateCreatorStoreProductRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateCreatorStoreProductRequest) ProtoMessage() {} + +func (x *UpdateCreatorStoreProductRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[3] + 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 UpdateCreatorStoreProductRequest.ProtoReflect.Descriptor instead. +func (*UpdateCreatorStoreProductRequest) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{3} +} + +func (x *UpdateCreatorStoreProductRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *UpdateCreatorStoreProductRequest) GetCreatorstoreproduct() *CreatorStoreProduct { + if x != nil { + return x.Creatorstoreproduct + } + return nil +} + +func (x *UpdateCreatorStoreProductRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// A Universe. +type Universe struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field for path. + Path string `protobuf:"bytes,10000,opt,name=path,proto3" json:"path,omitempty"` + // Field for id. + Id string `protobuf:"bytes,10001,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Universe) Reset() { + *x = Universe{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Universe) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Universe) ProtoMessage() {} + +func (x *Universe) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[4] + 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 Universe.ProtoReflect.Descriptor instead. +func (*Universe) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{4} +} + +func (x *Universe) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *Universe) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// A Create request for a Universe resource. +type CreateUniverseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A field for the parent of Universe + Parent string `protobuf:"bytes,10013,opt,name=parent,proto3" json:"parent,omitempty"` + // An id that uniquely identifies the resource within the collection + Id string `protobuf:"bytes,10014,opt,name=id,proto3" json:"id,omitempty"` + // The resource to perform the operation on. + Universe *Universe `protobuf:"bytes,10015,opt,name=universe,proto3" json:"universe,omitempty"` +} + +func (x *CreateUniverseRequest) Reset() { + *x = CreateUniverseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateUniverseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateUniverseRequest) ProtoMessage() {} + +func (x *CreateUniverseRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[5] + 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 CreateUniverseRequest.ProtoReflect.Descriptor instead. +func (*CreateUniverseRequest) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateUniverseRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateUniverseRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateUniverseRequest) GetUniverse() *Universe { + if x != nil { + return x.Universe + } + return nil +} + +// Request message for the GetUniverse method +type GetUniverseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The globally unique identifier for the resource + Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *GetUniverseRequest) Reset() { + *x = GetUniverseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUniverseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUniverseRequest) ProtoMessage() {} + +func (x *GetUniverseRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[6] + 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 GetUniverseRequest.ProtoReflect.Descriptor instead. +func (*GetUniverseRequest) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{6} +} + +func (x *GetUniverseRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Request message for the UpdateUniverse method +type UpdateUniverseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The globally unique identifier for the resource + Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` + // The resource to perform the operation on. + Universe *Universe `protobuf:"bytes,10015,opt,name=universe,proto3" json:"universe,omitempty"` + // The update mask for the resource + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,10012,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateUniverseRequest) Reset() { + *x = UpdateUniverseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateUniverseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateUniverseRequest) ProtoMessage() {} + +func (x *UpdateUniverseRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[7] + 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 UpdateUniverseRequest.ProtoReflect.Descriptor instead. +func (*UpdateUniverseRequest) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateUniverseRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *UpdateUniverseRequest) GetUniverse() *Universe { + if x != nil { + return x.Universe + } + return nil +} + +func (x *UpdateUniverseRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// A User. +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field for displayName. + DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"` + // Field for path. + Path string `protobuf:"bytes,10000,opt,name=path,proto3" json:"path,omitempty"` + // Field for id. + Id string `protobuf:"bytes,10001,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[8] + 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 User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{8} +} + +func (x *User) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *User) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *User) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Request message for the GetUser method +type GetUserRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The globally unique identifier for the resource + Path string `protobuf:"bytes,10018,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *GetUserRequest) Reset() { + *x = GetUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_example_roblox_v2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserRequest) ProtoMessage() {} + +func (x *GetUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_example_roblox_v2_proto_msgTypes[9] + 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 GetUserRequest.ProtoReflect.Descriptor instead. +func (*GetUserRequest) Descriptor() ([]byte, []int) { + return file_example_roblox_v2_proto_rawDescGZIP(), []int{9} +} + +func (x *GetUserRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +var File_example_roblox_v2_proto protoreflect.FileDescriptor + +var file_example_roblox_v2_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, + 0x2f, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x13, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x90, 0x4e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x20, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x9d, 0x4e, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x9e, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x5b, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x9f, 0x4e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, + 0x78, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x13, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, + 0x62, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, 0x24, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, + 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x22, 0x80, 0x02, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x26, 0x0a, + 0x24, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x5b, 0x0a, 0x13, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x18, 0x9f, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x9c, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x30, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x12, 0x13, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x90, 0x4e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x91, 0x4e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x9d, 0x4e, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x12, 0x0f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x9e, 0x4e, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x18, 0x9f, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x22, 0x4c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, + 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1b, 0x0a, 0x19, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xc9, + 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1b, 0x0a, + 0x19, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x12, 0x3a, 0x0a, 0x08, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x9f, 0x4e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, + 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x08, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0b, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x9c, 0x4e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x53, 0x0a, 0x04, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x64, 0x69, + 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x90, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x0f, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x91, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x44, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x32, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0xa2, 0x4e, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x1d, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x17, 0x0a, 0x15, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x32, 0xbf, 0x08, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, + 0xce, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x30, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x22, 0x5a, 0xda, 0x41, 0x1a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x20, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x2d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x7d, + 0x12, 0x9d, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x2d, 0x2e, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, + 0x2f, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, + 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, + 0x12, 0xd3, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x12, 0x30, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, + 0x78, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x5f, 0xda, 0x41, 0x1f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2c, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, + 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x70, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x74, 0x32, 0x20, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, + 0x78, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x37, 0xda, 0x41, 0x0f, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x08, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x13, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x73, 0x7d, 0x12, 0x6f, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x12, 0x22, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, + 0x6c, 0x6f, 0x78, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x22, 0x22, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, + 0x13, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x2e, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x3c, 0xda, 0x41, 0x14, 0x75, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x08, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x32, 0x13, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x5f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, + 0x6f, 0x78, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x72, 0x6f, 0x62, 0x6c, + 0x6f, 0x78, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1e, 0xda, 0x41, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x08, 0x5a, 0x06, 0x2f, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_example_roblox_v2_proto_rawDescOnce sync.Once + file_example_roblox_v2_proto_rawDescData = file_example_roblox_v2_proto_rawDesc +) + +func file_example_roblox_v2_proto_rawDescGZIP() []byte { + file_example_roblox_v2_proto_rawDescOnce.Do(func() { + file_example_roblox_v2_proto_rawDescData = protoimpl.X.CompressGZIP(file_example_roblox_v2_proto_rawDescData) + }) + return file_example_roblox_v2_proto_rawDescData +} + +var file_example_roblox_v2_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_example_roblox_v2_proto_goTypes = []interface{}{ + (*CreatorStoreProduct)(nil), // 0: example.roblox.CreatorStoreProduct + (*CreateCreatorStoreProductRequest)(nil), // 1: example.roblox.CreateCreatorStoreProductRequest + (*GetCreatorStoreProductRequest)(nil), // 2: example.roblox.GetCreatorStoreProductRequest + (*UpdateCreatorStoreProductRequest)(nil), // 3: example.roblox.UpdateCreatorStoreProductRequest + (*Universe)(nil), // 4: example.roblox.Universe + (*CreateUniverseRequest)(nil), // 5: example.roblox.CreateUniverseRequest + (*GetUniverseRequest)(nil), // 6: example.roblox.GetUniverseRequest + (*UpdateUniverseRequest)(nil), // 7: example.roblox.UpdateUniverseRequest + (*User)(nil), // 8: example.roblox.User + (*GetUserRequest)(nil), // 9: example.roblox.GetUserRequest + (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask +} +var file_example_roblox_v2_proto_depIdxs = []int32{ + 0, // 0: example.roblox.CreateCreatorStoreProductRequest.creatorstoreproduct:type_name -> example.roblox.CreatorStoreProduct + 0, // 1: example.roblox.UpdateCreatorStoreProductRequest.creatorstoreproduct:type_name -> example.roblox.CreatorStoreProduct + 10, // 2: example.roblox.UpdateCreatorStoreProductRequest.update_mask:type_name -> google.protobuf.FieldMask + 4, // 3: example.roblox.CreateUniverseRequest.universe:type_name -> example.roblox.Universe + 4, // 4: example.roblox.UpdateUniverseRequest.universe:type_name -> example.roblox.Universe + 10, // 5: example.roblox.UpdateUniverseRequest.update_mask:type_name -> google.protobuf.FieldMask + 1, // 6: example.roblox.Cloud.CreateCreatorStoreProduct:input_type -> example.roblox.CreateCreatorStoreProductRequest + 2, // 7: example.roblox.Cloud.GetCreatorStoreProduct:input_type -> example.roblox.GetCreatorStoreProductRequest + 3, // 8: example.roblox.Cloud.UpdateCreatorStoreProduct:input_type -> example.roblox.UpdateCreatorStoreProductRequest + 5, // 9: example.roblox.Cloud.CreateUniverse:input_type -> example.roblox.CreateUniverseRequest + 6, // 10: example.roblox.Cloud.GetUniverse:input_type -> example.roblox.GetUniverseRequest + 7, // 11: example.roblox.Cloud.UpdateUniverse:input_type -> example.roblox.UpdateUniverseRequest + 9, // 12: example.roblox.Cloud.GetUser:input_type -> example.roblox.GetUserRequest + 0, // 13: example.roblox.Cloud.CreateCreatorStoreProduct:output_type -> example.roblox.CreatorStoreProduct + 0, // 14: example.roblox.Cloud.GetCreatorStoreProduct:output_type -> example.roblox.CreatorStoreProduct + 0, // 15: example.roblox.Cloud.UpdateCreatorStoreProduct:output_type -> example.roblox.CreatorStoreProduct + 4, // 16: example.roblox.Cloud.CreateUniverse:output_type -> example.roblox.Universe + 4, // 17: example.roblox.Cloud.GetUniverse:output_type -> example.roblox.Universe + 4, // 18: example.roblox.Cloud.UpdateUniverse:output_type -> example.roblox.Universe + 8, // 19: example.roblox.Cloud.GetUser:output_type -> example.roblox.User + 13, // [13:20] is the sub-list for method output_type + 6, // [6:13] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_example_roblox_v2_proto_init() } +func file_example_roblox_v2_proto_init() { + if File_example_roblox_v2_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_example_roblox_v2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreatorStoreProduct); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateCreatorStoreProductRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCreatorStoreProductRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateCreatorStoreProductRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Universe); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateUniverseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUniverseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateUniverseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_example_roblox_v2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetUserRequest); 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{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_example_roblox_v2_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_example_roblox_v2_proto_goTypes, + DependencyIndexes: file_example_roblox_v2_proto_depIdxs, + MessageInfos: file_example_roblox_v2_proto_msgTypes, + }.Build() + File_example_roblox_v2_proto = out.File + file_example_roblox_v2_proto_rawDesc = nil + file_example_roblox_v2_proto_goTypes = nil + file_example_roblox_v2_proto_depIdxs = nil +} diff --git a/example/roblox/v2.pb.gw.go b/example/roblox/v2.pb.gw.go new file mode 100644 index 0000000..e5a0a57 --- /dev/null +++ b/example/roblox/v2.pb.gw.go @@ -0,0 +1,971 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: example/roblox/v2.proto + +/* +Package cloud is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package cloud + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_Cloud_CreateCreatorStoreProduct_0 = &utilities.DoubleArray{Encoding: map[string]int{"creatorstoreproduct": 0, "parent": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} +) + +func request_Cloud_CreateCreatorStoreProduct_0(ctx context.Context, marshaler runtime.Marshaler, client CloudClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateCreatorStoreProductRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Creatorstoreproduct); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_CreateCreatorStoreProduct_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateCreatorStoreProduct(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cloud_CreateCreatorStoreProduct_0(ctx context.Context, marshaler runtime.Marshaler, server CloudServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateCreatorStoreProductRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Creatorstoreproduct); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_CreateCreatorStoreProduct_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateCreatorStoreProduct(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Cloud_GetCreatorStoreProduct_0(ctx context.Context, marshaler runtime.Marshaler, client CloudClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCreatorStoreProductRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := client.GetCreatorStoreProduct(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cloud_GetCreatorStoreProduct_0(ctx context.Context, marshaler runtime.Marshaler, server CloudServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCreatorStoreProductRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := server.GetCreatorStoreProduct(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Cloud_UpdateCreatorStoreProduct_0 = &utilities.DoubleArray{Encoding: map[string]int{"creatorstoreproduct": 0, "path": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} +) + +func request_Cloud_UpdateCreatorStoreProduct_0(ctx context.Context, marshaler runtime.Marshaler, client CloudClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateCreatorStoreProductRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Creatorstoreproduct); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Creatorstoreproduct); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_UpdateCreatorStoreProduct_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateCreatorStoreProduct(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cloud_UpdateCreatorStoreProduct_0(ctx context.Context, marshaler runtime.Marshaler, server CloudServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateCreatorStoreProductRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Creatorstoreproduct); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Creatorstoreproduct); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_UpdateCreatorStoreProduct_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateCreatorStoreProduct(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Cloud_CreateUniverse_0 = &utilities.DoubleArray{Encoding: map[string]int{"universe": 0, "parent": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} +) + +func request_Cloud_CreateUniverse_0(ctx context.Context, marshaler runtime.Marshaler, client CloudClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateUniverseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Universe); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_CreateUniverse_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateUniverse(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cloud_CreateUniverse_0(ctx context.Context, marshaler runtime.Marshaler, server CloudServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateUniverseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Universe); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_CreateUniverse_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateUniverse(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Cloud_GetUniverse_0(ctx context.Context, marshaler runtime.Marshaler, client CloudClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUniverseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := client.GetUniverse(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cloud_GetUniverse_0(ctx context.Context, marshaler runtime.Marshaler, server CloudServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUniverseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := server.GetUniverse(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Cloud_UpdateUniverse_0 = &utilities.DoubleArray{Encoding: map[string]int{"universe": 0, "path": 1}, Base: []int{1, 2, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 2, 3, 3}} +) + +func request_Cloud_UpdateUniverse_0(ctx context.Context, marshaler runtime.Marshaler, client CloudClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateUniverseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Universe); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Universe); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_UpdateUniverse_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateUniverse(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cloud_UpdateUniverse_0(ctx context.Context, marshaler runtime.Marshaler, server CloudServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateUniverseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Universe); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Universe); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Cloud_UpdateUniverse_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateUniverse(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Cloud_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client CloudClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Cloud_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server CloudServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetUserRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["path"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path") + } + + protoReq.Path, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err) + } + + msg, err := server.GetUser(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterCloudHandlerServer registers the http handlers for service Cloud to "mux". +// UnaryRPC :call CloudServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCloudHandlerFromEndpoint instead. +func RegisterCloudHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CloudServer) error { + + mux.Handle("POST", pattern_Cloud_CreateCreatorStoreProduct_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.roblox.Cloud/CreateCreatorStoreProduct", runtime.WithHTTPPathPattern("/{parent=creator-store-products}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cloud_CreateCreatorStoreProduct_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_CreateCreatorStoreProduct_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Cloud_GetCreatorStoreProduct_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.roblox.Cloud/GetCreatorStoreProduct", runtime.WithHTTPPathPattern("/{path=creator-store-products/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cloud_GetCreatorStoreProduct_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_GetCreatorStoreProduct_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_Cloud_UpdateCreatorStoreProduct_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.roblox.Cloud/UpdateCreatorStoreProduct", runtime.WithHTTPPathPattern("/{path=creator-store-products/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cloud_UpdateCreatorStoreProduct_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_UpdateCreatorStoreProduct_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Cloud_CreateUniverse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.roblox.Cloud/CreateUniverse", runtime.WithHTTPPathPattern("/{parent=universes}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cloud_CreateUniverse_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_CreateUniverse_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Cloud_GetUniverse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.roblox.Cloud/GetUniverse", runtime.WithHTTPPathPattern("/{path=universes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cloud_GetUniverse_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_GetUniverse_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_Cloud_UpdateUniverse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.roblox.Cloud/UpdateUniverse", runtime.WithHTTPPathPattern("/{path=universes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cloud_UpdateUniverse_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_UpdateUniverse_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Cloud_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/example.roblox.Cloud/GetUser", runtime.WithHTTPPathPattern("/{path=users/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Cloud_GetUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterCloudHandlerFromEndpoint is same as RegisterCloudHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCloudHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterCloudHandler(ctx, mux, conn) +} + +// RegisterCloudHandler registers the http handlers for service Cloud to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCloudHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCloudHandlerClient(ctx, mux, NewCloudClient(conn)) +} + +// RegisterCloudHandlerClient registers the http handlers for service Cloud +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CloudClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CloudClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "CloudClient" to call the correct interceptors. +func RegisterCloudHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CloudClient) error { + + mux.Handle("POST", pattern_Cloud_CreateCreatorStoreProduct_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.roblox.Cloud/CreateCreatorStoreProduct", runtime.WithHTTPPathPattern("/{parent=creator-store-products}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cloud_CreateCreatorStoreProduct_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_CreateCreatorStoreProduct_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Cloud_GetCreatorStoreProduct_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.roblox.Cloud/GetCreatorStoreProduct", runtime.WithHTTPPathPattern("/{path=creator-store-products/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cloud_GetCreatorStoreProduct_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_GetCreatorStoreProduct_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_Cloud_UpdateCreatorStoreProduct_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.roblox.Cloud/UpdateCreatorStoreProduct", runtime.WithHTTPPathPattern("/{path=creator-store-products/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cloud_UpdateCreatorStoreProduct_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_UpdateCreatorStoreProduct_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Cloud_CreateUniverse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.roblox.Cloud/CreateUniverse", runtime.WithHTTPPathPattern("/{parent=universes}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cloud_CreateUniverse_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_CreateUniverse_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Cloud_GetUniverse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.roblox.Cloud/GetUniverse", runtime.WithHTTPPathPattern("/{path=universes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cloud_GetUniverse_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_GetUniverse_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_Cloud_UpdateUniverse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.roblox.Cloud/UpdateUniverse", runtime.WithHTTPPathPattern("/{path=universes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cloud_UpdateUniverse_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_UpdateUniverse_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Cloud_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/example.roblox.Cloud/GetUser", runtime.WithHTTPPathPattern("/{path=users/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cloud_GetUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cloud_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Cloud_CreateCreatorStoreProduct_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 4, 1, 5, 1}, []string{"creator-store-products", "parent"}, "")) + + pattern_Cloud_GetCreatorStoreProduct_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"creator-store-products", "path"}, "")) + + pattern_Cloud_UpdateCreatorStoreProduct_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"creator-store-products", "path"}, "")) + + pattern_Cloud_CreateUniverse_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 4, 1, 5, 1}, []string{"universes", "parent"}, "")) + + pattern_Cloud_GetUniverse_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"universes", "path"}, "")) + + pattern_Cloud_UpdateUniverse_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"universes", "path"}, "")) + + pattern_Cloud_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 2, 5, 1}, []string{"users", "path"}, "")) +) + +var ( + forward_Cloud_CreateCreatorStoreProduct_0 = runtime.ForwardResponseMessage + + forward_Cloud_GetCreatorStoreProduct_0 = runtime.ForwardResponseMessage + + forward_Cloud_UpdateCreatorStoreProduct_0 = runtime.ForwardResponseMessage + + forward_Cloud_CreateUniverse_0 = runtime.ForwardResponseMessage + + forward_Cloud_GetUniverse_0 = runtime.ForwardResponseMessage + + forward_Cloud_UpdateUniverse_0 = runtime.ForwardResponseMessage + + forward_Cloud_GetUser_0 = runtime.ForwardResponseMessage +) diff --git a/example/roblox/v2.proto b/example/roblox/v2.proto new file mode 100644 index 0000000..5d260e1 --- /dev/null +++ b/example/roblox/v2.proto @@ -0,0 +1,190 @@ +syntax = "proto3"; + +package example.roblox; + +import "google/api/annotations.proto"; + +import "google/api/client.proto"; + +import "google/api/field_behavior.proto"; + +import "google/api/resource.proto"; + +import "google/protobuf/field_mask.proto"; + +option go_package = "/cloud"; + +// A service. +service Cloud { + // An aep-compliant Create method for CreatorStoreProduct. + rpc CreateCreatorStoreProduct ( CreateCreatorStoreProductRequest ) returns ( CreatorStoreProduct ) { + option (google.api.http) = { + post: "/{parent=creator-store-products}", + body: "creatorstoreproduct" + }; + + option (google.api.method_signature) = "parent,creatorstoreproduct"; + } + + // An aep-compliant Get method for CreatorStoreProduct. + rpc GetCreatorStoreProduct ( GetCreatorStoreProductRequest ) returns ( CreatorStoreProduct ) { + option (google.api.http) = { get: "/{path=creator-store-products/*}" }; + + option (google.api.method_signature) = "path"; + } + + // An aep-compliant Update method for CreatorStoreProduct. + rpc UpdateCreatorStoreProduct ( UpdateCreatorStoreProductRequest ) returns ( CreatorStoreProduct ) { + option (google.api.http) = { + patch: "/{path=creator-store-products/*}", + body: "creatorstoreproduct" + }; + + option (google.api.method_signature) = "creatorstoreproduct,update_mask"; + } + + // An aep-compliant Create method for Universe. + rpc CreateUniverse ( CreateUniverseRequest ) returns ( Universe ) { + option (google.api.http) = { post: "/{parent=universes}", body: "universe" }; + + option (google.api.method_signature) = "parent,universe"; + } + + // An aep-compliant Get method for Universe. + rpc GetUniverse ( GetUniverseRequest ) returns ( Universe ) { + option (google.api.http) = { get: "/{path=universes/*}" }; + + option (google.api.method_signature) = "path"; + } + + // An aep-compliant Update method for Universe. + rpc UpdateUniverse ( UpdateUniverseRequest ) returns ( Universe ) { + option (google.api.http) = { patch: "/{path=universes/*}", body: "universe" }; + + option (google.api.method_signature) = "universe,update_mask"; + } + + // An aep-compliant Get method for User. + rpc GetUser ( GetUserRequest ) returns ( User ) { + option (google.api.http) = { get: "/{path=users/*}" }; + + option (google.api.method_signature) = "path"; + } +} + +// A CreatorStoreProduct. +message CreatorStoreProduct { + // Field for path. + string path = 10000; + + // Field for id. + string id = 10001; +} + +// A Create request for a CreatorStoreProduct resource. +message CreateCreatorStoreProductRequest { + // A field for the parent of CreatorStoreProduct + string parent = 10013 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { } + ]; + + // An id that uniquely identifies the resource within the collection + string id = 10014; + + // The resource to perform the operation on. + CreatorStoreProduct creatorstoreproduct = 10015 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the GetCreatorStoreProduct method +message GetCreatorStoreProductRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloud.roblox.com/CreatorStoreProduct" } + ]; +} + +// Request message for the UpdateCreatorStoreProduct method +message UpdateCreatorStoreProductRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloud.roblox.com/CreatorStoreProduct" } + ]; + + // The resource to perform the operation on. + CreatorStoreProduct creatorstoreproduct = 10015 [(google.api.field_behavior) = REQUIRED]; + + // The update mask for the resource + google.protobuf.FieldMask update_mask = 10012; +} + +// A Universe. +message Universe { + // Field for path. + string path = 10000; + + // Field for id. + string id = 10001; +} + +// A Create request for a Universe resource. +message CreateUniverseRequest { + // A field for the parent of Universe + string parent = 10013 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { } + ]; + + // An id that uniquely identifies the resource within the collection + string id = 10014; + + // The resource to perform the operation on. + Universe universe = 10015 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the GetUniverse method +message GetUniverseRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloud.roblox.com/Universe" } + ]; +} + +// Request message for the UpdateUniverse method +message UpdateUniverseRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloud.roblox.com/Universe" } + ]; + + // The resource to perform the operation on. + Universe universe = 10015 [(google.api.field_behavior) = REQUIRED]; + + // The update mask for the resource + google.protobuf.FieldMask update_mask = 10012; +} + +// A User. +message User { + // Field for displayName. + string displayName = 2 [(google.api.field_behavior) = REQUIRED]; + + // Field for path. + string path = 10000; + + // Field for id. + string id = 10001; +} + +// Request message for the GetUser method +message GetUserRequest { + // The globally unique identifier for the resource + string path = 10018 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "cloud.roblox.com/User" } + ]; +} diff --git a/example/roblox/v2.swagger.json b/example/roblox/v2.swagger.json new file mode 100644 index 0000000..fa3c7dc --- /dev/null +++ b/example/roblox/v2.swagger.json @@ -0,0 +1,388 @@ +{ + "swagger": "2.0", + "info": { + "title": "example/roblox/v2.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Cloud" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/{parent_1}": { + "post": { + "summary": "An aep-compliant Create method for Universe.", + "operationId": "Cloud_CreateUniverse", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/robloxUniverse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "parent_1", + "description": "A field for the parent of Universe", + "in": "path", + "required": true, + "type": "string", + "pattern": "universes" + }, + { + "name": "universe", + "description": "The resource to perform the operation on.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/robloxUniverse", + "required": [ + "universe" + ] + } + }, + { + "name": "id", + "description": "An id that uniquely identifies the resource within the collection", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Cloud" + ] + } + }, + "/{parent}": { + "post": { + "summary": "An aep-compliant Create method for CreatorStoreProduct.", + "operationId": "Cloud_CreateCreatorStoreProduct", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/robloxCreatorStoreProduct" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "parent", + "description": "A field for the parent of CreatorStoreProduct", + "in": "path", + "required": true, + "type": "string", + "pattern": "creator-store-products" + }, + { + "name": "creatorstoreproduct", + "description": "The resource to perform the operation on.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/robloxCreatorStoreProduct", + "required": [ + "creatorstoreproduct" + ] + } + }, + { + "name": "id", + "description": "An id that uniquely identifies the resource within the collection", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Cloud" + ] + } + }, + "/{path_1}": { + "get": { + "summary": "An aep-compliant Get method for Universe.", + "operationId": "Cloud_GetUniverse", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/robloxUniverse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "path_1", + "description": "The globally unique identifier for the resource", + "in": "path", + "required": true, + "type": "string", + "pattern": "universes/[^/]+" + } + ], + "tags": [ + "Cloud" + ] + }, + "patch": { + "summary": "An aep-compliant Update method for Universe.", + "operationId": "Cloud_UpdateUniverse", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/robloxUniverse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "path_1", + "description": "The globally unique identifier for the resource", + "in": "path", + "required": true, + "type": "string", + "pattern": "universes/[^/]+" + }, + { + "name": "universe", + "description": "The resource to perform the operation on.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/robloxUniverse", + "required": [ + "universe" + ] + } + } + ], + "tags": [ + "Cloud" + ] + } + }, + "/{path_2}": { + "get": { + "summary": "An aep-compliant Get method for User.", + "operationId": "Cloud_GetUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/robloxUser" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "path_2", + "description": "The globally unique identifier for the resource", + "in": "path", + "required": true, + "type": "string", + "pattern": "users/[^/]+" + } + ], + "tags": [ + "Cloud" + ] + } + }, + "/{path}": { + "get": { + "summary": "An aep-compliant Get method for CreatorStoreProduct.", + "operationId": "Cloud_GetCreatorStoreProduct", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/robloxCreatorStoreProduct" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "path", + "description": "The globally unique identifier for the resource", + "in": "path", + "required": true, + "type": "string", + "pattern": "creator-store-products/[^/]+" + } + ], + "tags": [ + "Cloud" + ] + }, + "patch": { + "summary": "An aep-compliant Update method for CreatorStoreProduct.", + "operationId": "Cloud_UpdateCreatorStoreProduct", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/robloxCreatorStoreProduct" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "path", + "description": "The globally unique identifier for the resource", + "in": "path", + "required": true, + "type": "string", + "pattern": "creator-store-products/[^/]+" + }, + { + "name": "creatorstoreproduct", + "description": "The resource to perform the operation on.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/robloxCreatorStoreProduct", + "required": [ + "creatorstoreproduct" + ] + } + } + ], + "tags": [ + "Cloud" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "robloxCreatorStoreProduct": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Field for path." + }, + "id": { + "type": "string", + "description": "Field for id." + } + }, + "description": "A CreatorStoreProduct." + }, + "robloxUniverse": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Field for path." + }, + "id": { + "type": "string", + "description": "Field for id." + } + }, + "description": "A Universe." + }, + "robloxUser": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Field for displayName." + }, + "path": { + "type": "string", + "description": "Field for path." + }, + "id": { + "type": "string", + "description": "Field for id." + } + }, + "description": "A User.", + "required": [ + "displayName" + ] + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/example/roblox/v2.yaml b/example/roblox/v2.yaml new file mode 100644 index 0000000..a43585f --- /dev/null +++ b/example/roblox/v2.yaml @@ -0,0 +1,33 @@ +# normally this would be suffixed with the domain (.com) +name: "cloud.roblox.com" +url: "https://apis.roblox.com/cloud/v2" +resources: + - kind: "User" + plural: "users" + properties: + displayName: + type: STRING + number: 2 + required: true + methods: + read: {} + - kind: "CreatorStoreProduct" + plural: "creator-store-products" + properties: {} + methods: + read: {} + create: {} + update: {} + - kind: "Universe" + plural: "universes" + properties: {} + methods: + read: {} + create: {} + update: {} + # needs support for parents + # - kind: "DataStore" + # plural: "data-stores" + # properties: {} + # methods: + # list: {} diff --git a/example/roblox/v2_grpc.pb.go b/example/roblox/v2_grpc.pb.go new file mode 100644 index 0000000..e3e1f5f --- /dev/null +++ b/example/roblox/v2_grpc.pb.go @@ -0,0 +1,345 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: example/roblox/v2.proto + +package cloud + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Cloud_CreateCreatorStoreProduct_FullMethodName = "/example.roblox.Cloud/CreateCreatorStoreProduct" + Cloud_GetCreatorStoreProduct_FullMethodName = "/example.roblox.Cloud/GetCreatorStoreProduct" + Cloud_UpdateCreatorStoreProduct_FullMethodName = "/example.roblox.Cloud/UpdateCreatorStoreProduct" + Cloud_CreateUniverse_FullMethodName = "/example.roblox.Cloud/CreateUniverse" + Cloud_GetUniverse_FullMethodName = "/example.roblox.Cloud/GetUniverse" + Cloud_UpdateUniverse_FullMethodName = "/example.roblox.Cloud/UpdateUniverse" + Cloud_GetUser_FullMethodName = "/example.roblox.Cloud/GetUser" +) + +// CloudClient is the client API for Cloud service. +// +// 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 CloudClient interface { + // An aep-compliant Create method for CreatorStoreProduct. + CreateCreatorStoreProduct(ctx context.Context, in *CreateCreatorStoreProductRequest, opts ...grpc.CallOption) (*CreatorStoreProduct, error) + // An aep-compliant Get method for CreatorStoreProduct. + GetCreatorStoreProduct(ctx context.Context, in *GetCreatorStoreProductRequest, opts ...grpc.CallOption) (*CreatorStoreProduct, error) + // An aep-compliant Update method for CreatorStoreProduct. + UpdateCreatorStoreProduct(ctx context.Context, in *UpdateCreatorStoreProductRequest, opts ...grpc.CallOption) (*CreatorStoreProduct, error) + // An aep-compliant Create method for Universe. + CreateUniverse(ctx context.Context, in *CreateUniverseRequest, opts ...grpc.CallOption) (*Universe, error) + // An aep-compliant Get method for Universe. + GetUniverse(ctx context.Context, in *GetUniverseRequest, opts ...grpc.CallOption) (*Universe, error) + // An aep-compliant Update method for Universe. + UpdateUniverse(ctx context.Context, in *UpdateUniverseRequest, opts ...grpc.CallOption) (*Universe, error) + // An aep-compliant Get method for User. + GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) +} + +type cloudClient struct { + cc grpc.ClientConnInterface +} + +func NewCloudClient(cc grpc.ClientConnInterface) CloudClient { + return &cloudClient{cc} +} + +func (c *cloudClient) CreateCreatorStoreProduct(ctx context.Context, in *CreateCreatorStoreProductRequest, opts ...grpc.CallOption) (*CreatorStoreProduct, error) { + out := new(CreatorStoreProduct) + err := c.cc.Invoke(ctx, Cloud_CreateCreatorStoreProduct_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudClient) GetCreatorStoreProduct(ctx context.Context, in *GetCreatorStoreProductRequest, opts ...grpc.CallOption) (*CreatorStoreProduct, error) { + out := new(CreatorStoreProduct) + err := c.cc.Invoke(ctx, Cloud_GetCreatorStoreProduct_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudClient) UpdateCreatorStoreProduct(ctx context.Context, in *UpdateCreatorStoreProductRequest, opts ...grpc.CallOption) (*CreatorStoreProduct, error) { + out := new(CreatorStoreProduct) + err := c.cc.Invoke(ctx, Cloud_UpdateCreatorStoreProduct_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudClient) CreateUniverse(ctx context.Context, in *CreateUniverseRequest, opts ...grpc.CallOption) (*Universe, error) { + out := new(Universe) + err := c.cc.Invoke(ctx, Cloud_CreateUniverse_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudClient) GetUniverse(ctx context.Context, in *GetUniverseRequest, opts ...grpc.CallOption) (*Universe, error) { + out := new(Universe) + err := c.cc.Invoke(ctx, Cloud_GetUniverse_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudClient) UpdateUniverse(ctx context.Context, in *UpdateUniverseRequest, opts ...grpc.CallOption) (*Universe, error) { + out := new(Universe) + err := c.cc.Invoke(ctx, Cloud_UpdateUniverse_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) { + out := new(User) + err := c.cc.Invoke(ctx, Cloud_GetUser_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CloudServer is the server API for Cloud service. +// All implementations must embed UnimplementedCloudServer +// for forward compatibility +type CloudServer interface { + // An aep-compliant Create method for CreatorStoreProduct. + CreateCreatorStoreProduct(context.Context, *CreateCreatorStoreProductRequest) (*CreatorStoreProduct, error) + // An aep-compliant Get method for CreatorStoreProduct. + GetCreatorStoreProduct(context.Context, *GetCreatorStoreProductRequest) (*CreatorStoreProduct, error) + // An aep-compliant Update method for CreatorStoreProduct. + UpdateCreatorStoreProduct(context.Context, *UpdateCreatorStoreProductRequest) (*CreatorStoreProduct, error) + // An aep-compliant Create method for Universe. + CreateUniverse(context.Context, *CreateUniverseRequest) (*Universe, error) + // An aep-compliant Get method for Universe. + GetUniverse(context.Context, *GetUniverseRequest) (*Universe, error) + // An aep-compliant Update method for Universe. + UpdateUniverse(context.Context, *UpdateUniverseRequest) (*Universe, error) + // An aep-compliant Get method for User. + GetUser(context.Context, *GetUserRequest) (*User, error) + mustEmbedUnimplementedCloudServer() +} + +// UnimplementedCloudServer must be embedded to have forward compatible implementations. +type UnimplementedCloudServer struct { +} + +func (UnimplementedCloudServer) CreateCreatorStoreProduct(context.Context, *CreateCreatorStoreProductRequest) (*CreatorStoreProduct, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateCreatorStoreProduct not implemented") +} +func (UnimplementedCloudServer) GetCreatorStoreProduct(context.Context, *GetCreatorStoreProductRequest) (*CreatorStoreProduct, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCreatorStoreProduct not implemented") +} +func (UnimplementedCloudServer) UpdateCreatorStoreProduct(context.Context, *UpdateCreatorStoreProductRequest) (*CreatorStoreProduct, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateCreatorStoreProduct not implemented") +} +func (UnimplementedCloudServer) CreateUniverse(context.Context, *CreateUniverseRequest) (*Universe, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateUniverse not implemented") +} +func (UnimplementedCloudServer) GetUniverse(context.Context, *GetUniverseRequest) (*Universe, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUniverse not implemented") +} +func (UnimplementedCloudServer) UpdateUniverse(context.Context, *UpdateUniverseRequest) (*Universe, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUniverse not implemented") +} +func (UnimplementedCloudServer) GetUser(context.Context, *GetUserRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") +} +func (UnimplementedCloudServer) mustEmbedUnimplementedCloudServer() {} + +// UnsafeCloudServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CloudServer will +// result in compilation errors. +type UnsafeCloudServer interface { + mustEmbedUnimplementedCloudServer() +} + +func RegisterCloudServer(s grpc.ServiceRegistrar, srv CloudServer) { + s.RegisterService(&Cloud_ServiceDesc, srv) +} + +func _Cloud_CreateCreatorStoreProduct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateCreatorStoreProductRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudServer).CreateCreatorStoreProduct(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cloud_CreateCreatorStoreProduct_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudServer).CreateCreatorStoreProduct(ctx, req.(*CreateCreatorStoreProductRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cloud_GetCreatorStoreProduct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCreatorStoreProductRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudServer).GetCreatorStoreProduct(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cloud_GetCreatorStoreProduct_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudServer).GetCreatorStoreProduct(ctx, req.(*GetCreatorStoreProductRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cloud_UpdateCreatorStoreProduct_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateCreatorStoreProductRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudServer).UpdateCreatorStoreProduct(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cloud_UpdateCreatorStoreProduct_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudServer).UpdateCreatorStoreProduct(ctx, req.(*UpdateCreatorStoreProductRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cloud_CreateUniverse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateUniverseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudServer).CreateUniverse(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cloud_CreateUniverse_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudServer).CreateUniverse(ctx, req.(*CreateUniverseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cloud_GetUniverse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUniverseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudServer).GetUniverse(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cloud_GetUniverse_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudServer).GetUniverse(ctx, req.(*GetUniverseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cloud_UpdateUniverse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateUniverseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudServer).UpdateUniverse(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cloud_UpdateUniverse_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudServer).UpdateUniverse(ctx, req.(*UpdateUniverseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Cloud_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudServer).GetUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Cloud_GetUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudServer).GetUser(ctx, req.(*GetUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Cloud_ServiceDesc is the grpc.ServiceDesc for Cloud service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Cloud_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "example.roblox.Cloud", + HandlerType: (*CloudServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateCreatorStoreProduct", + Handler: _Cloud_CreateCreatorStoreProduct_Handler, + }, + { + MethodName: "GetCreatorStoreProduct", + Handler: _Cloud_GetCreatorStoreProduct_Handler, + }, + { + MethodName: "UpdateCreatorStoreProduct", + Handler: _Cloud_UpdateCreatorStoreProduct_Handler, + }, + { + MethodName: "CreateUniverse", + Handler: _Cloud_CreateUniverse_Handler, + }, + { + MethodName: "GetUniverse", + Handler: _Cloud_GetUniverse_Handler, + }, + { + MethodName: "UpdateUniverse", + Handler: _Cloud_UpdateUniverse_Handler, + }, + { + MethodName: "GetUser", + Handler: _Cloud_GetUser_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "example/roblox/v2.proto", +} diff --git a/example/roblox/v2_openapi.json b/example/roblox/v2_openapi.json new file mode 100644 index 0000000..95249fe --- /dev/null +++ b/example/roblox/v2_openapi.json @@ -0,0 +1,216 @@ +{ + "swagger": "2.0", + "servers": [ + { + "url": "https://apis.roblox.com/cloud/v2" + } + ], + "info": { + "title": "cloud.roblox.com", + "version": "version not set" + }, + "schemes": [ + "http" + ], + "paths": { + "/creator-store-products": { + "post": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/CreatorStoreProduct" + } + } + }, + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/components/schemas/CreatorStoreProduct" + } + }, + { + "in": "path", + "name": "id", + "schema": {}, + "required": true, + "type": "string" + } + ] + } + }, + "/creator-store-products/{id}": { + "get": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/CreatorStoreProduct" + } + } + }, + "parameters": null + }, + "patch": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/CreatorStoreProduct" + } + } + }, + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/components/schemas/CreatorStoreProduct" + } + } + ] + } + }, + "/universes": { + "post": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/Universe" + } + } + }, + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/components/schemas/Universe" + } + }, + { + "in": "path", + "name": "id", + "schema": {}, + "required": true, + "type": "string" + } + ] + } + }, + "/universes/{id}": { + "get": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/Universe" + } + } + }, + "parameters": null + }, + "patch": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/Universe" + } + } + }, + "parameters": [ + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/components/schemas/Universe" + } + } + ] + } + }, + "/users/{id}": { + "get": { + "responses": { + "200": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "parameters": null + } + } + }, + "components": { + "schemas": { + "CreatorStoreProduct": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "x-terraform-id": true + }, + "path": { + "type": "string", + "readOnly": true + } + }, + "x-aep-resource": { + "singular": "CreatorStoreProduct", + "plural": "creator-store-products", + "patterns": [ + "/creator-store-products/{creatorstoreproduct}" + ] + } + }, + "Universe": { + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "x-terraform-id": true + }, + "path": { + "type": "string", + "readOnly": true + } + }, + "x-aep-resource": { + "singular": "Universe", + "plural": "universes", + "patterns": [ + "/universes/{universe}" + ] + } + }, + "User": { + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "type": "string" + }, + "id": { + "type": "string", + "readOnly": true, + "x-terraform-id": true + }, + "path": { + "type": "string", + "readOnly": true + } + }, + "x-aep-resource": { + "singular": "User", + "plural": "users", + "patterns": [ + "/users/{user}" + ] + } + } + } + } +} \ No newline at end of file