From e7e23c1e8c2d70439c2b52523f724190aacc06ea Mon Sep 17 00:00:00 2001 From: charles Date: Tue, 24 Mar 2026 22:56:04 -0700 Subject: [PATCH] add: story, actor, and scenes --- pkg/api/webstory/v1/api.pb.go | 1202 +++++++++++++++++++++++++++- pkg/api/webstory/v1/api_grpc.pb.go | 400 +++++++++ proto/webstory/v1/api.proto | 331 ++++++++ 3 files changed, 1902 insertions(+), 31 deletions(-) diff --git a/pkg/api/webstory/v1/api.pb.go b/pkg/api/webstory/v1/api.pb.go index c6ebc85..e7d6dc5 100644 --- a/pkg/api/webstory/v1/api.pb.go +++ b/pkg/api/webstory/v1/api.pb.go @@ -46,7 +46,11 @@ type Story struct { // Output only. The time when the story was last updated. UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` // Output only. The version of the story for concurrency control. - Etag string `protobuf:"bytes,9,opt,name=etag,proto3" json:"etag,omitempty"` + Etag string `protobuf:"bytes,9,opt,name=etag,proto3" json:"etag,omitempty"` + // The scenes contained in this story. + Scenes []*Scene `protobuf:"bytes,10,rep,name=scenes,proto3" json:"scenes,omitempty"` + // The actors in this story. + Actors []*Actor `protobuf:"bytes,11,rep,name=actors,proto3" json:"actors,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -144,6 +148,20 @@ func (x *Story) GetEtag() string { return "" } +func (x *Story) GetScenes() []*Scene { + if x != nil { + return x.Scenes + } + return nil +} + +func (x *Story) GetActors() []*Actor { + if x != nil { + return x.Actors + } + return nil +} + // GetStoryRequest is the request message for GetStory RPC. type GetStoryRequest struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -500,11 +518,992 @@ func (x *DeleteStoryRequest) GetName() string { return "" } +// Scene represents a scene resource in the webstory service. +type Scene struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The resource name of the scene. + // Format: stories/{story}/scenes/{scene} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The ID of the scene, used as the final component of the resource name. + SceneId string `protobuf:"bytes,2,opt,name=scene_id,json=sceneId,proto3" json:"scene_id,omitempty"` + // The scene number within the story. + SceneNumber int32 `protobuf:"varint,3,opt,name=scene_number,json=sceneNumber,proto3" json:"scene_number,omitempty"` + // The title of the scene. + Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"` + // The content of the scene. + Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` + // The description of the scene. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + // Output only. The time when the scene was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The time when the scene was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. The version of the scene for concurrency control. + Etag string `protobuf:"bytes,9,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Scene) Reset() { + *x = Scene{} + mi := &file_webstory_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Scene) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scene) ProtoMessage() {} + +func (x *Scene) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Scene.ProtoReflect.Descriptor instead. +func (*Scene) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{7} +} + +func (x *Scene) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Scene) GetSceneId() string { + if x != nil { + return x.SceneId + } + return "" +} + +func (x *Scene) GetSceneNumber() int32 { + if x != nil { + return x.SceneNumber + } + return 0 +} + +func (x *Scene) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Scene) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *Scene) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Scene) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Scene) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Scene) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// GetSceneRequest is the request message for GetScene RPC. +type GetSceneRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The resource name of the scene to retrieve. + // Format: stories/{story}/scenes/{scene} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSceneRequest) Reset() { + *x = GetSceneRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSceneRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSceneRequest) ProtoMessage() {} + +func (x *GetSceneRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSceneRequest.ProtoReflect.Descriptor instead. +func (*GetSceneRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *GetSceneRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// ListScenesRequest is the request message for ListScenes RPC. +type ListScenesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The parent story that owns this collection of scenes. + // Format: stories/{story} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of scenes to return. The service may return fewer than + // this value. If unspecified, at most 50 scenes will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous ListScenes call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to ListScenes must match + // the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. A filter expression that filters the scenes listed in the response. + // Supported fields: scene_number, title. + // Example: scene_number:>5 AND title:"climax" + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. The field to order the results by. + // Supported fields: scene_number, create_time, title. + // Default: scene_number (ascending order). + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListScenesRequest) Reset() { + *x = ListScenesRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListScenesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListScenesRequest) ProtoMessage() {} + +func (x *ListScenesRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListScenesRequest.ProtoReflect.Descriptor instead. +func (*ListScenesRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{9} +} + +func (x *ListScenesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListScenesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListScenesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListScenesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListScenesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// ListScenesResponse is the response message for ListScenes RPC. +type ListScenesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The list of scenes. + Scenes []*Scene `protobuf:"bytes,1,rep,name=scenes,proto3" json:"scenes,omitempty"` + // A token, which can be sent as page_token to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // The total number of scenes matching the filter. + // This value may be an estimate. + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListScenesResponse) Reset() { + *x = ListScenesResponse{} + mi := &file_webstory_v1_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListScenesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListScenesResponse) ProtoMessage() {} + +func (x *ListScenesResponse) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListScenesResponse.ProtoReflect.Descriptor instead. +func (*ListScenesResponse) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{10} +} + +func (x *ListScenesResponse) GetScenes() []*Scene { + if x != nil { + return x.Scenes + } + return nil +} + +func (x *ListScenesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListScenesResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +// CreateSceneRequest is the request message for CreateScene RPC. +type CreateSceneRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The parent story where this scene will be created. + // Format: stories/{story} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The ID to use for the scene, which will become the final component of + // the scene's resource name. + // This value should be 4-63 characters, and valid characters are + // /[a-z][0-9]-/. + SceneId string `protobuf:"bytes,2,opt,name=scene_id,json=sceneId,proto3" json:"scene_id,omitempty"` + // The scene to create. + Scene *Scene `protobuf:"bytes,3,opt,name=scene,proto3" json:"scene,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateSceneRequest) Reset() { + *x = CreateSceneRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSceneRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSceneRequest) ProtoMessage() {} + +func (x *CreateSceneRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSceneRequest.ProtoReflect.Descriptor instead. +func (*CreateSceneRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{11} +} + +func (x *CreateSceneRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateSceneRequest) GetSceneId() string { + if x != nil { + return x.SceneId + } + return "" +} + +func (x *CreateSceneRequest) GetScene() *Scene { + if x != nil { + return x.Scene + } + return nil +} + +// UpdateSceneRequest is the request message for UpdateScene RPC. +type UpdateSceneRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The scene to update. + // The scene's name field is used to specify the resource to update. + Scene *Scene `protobuf:"bytes,1,opt,name=scene,proto3" json:"scene,omitempty"` + // The list of fields to update. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateSceneRequest) Reset() { + *x = UpdateSceneRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateSceneRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSceneRequest) ProtoMessage() {} + +func (x *UpdateSceneRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSceneRequest.ProtoReflect.Descriptor instead. +func (*UpdateSceneRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateSceneRequest) GetScene() *Scene { + if x != nil { + return x.Scene + } + return nil +} + +func (x *UpdateSceneRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// DeleteSceneRequest is the request message for DeleteScene RPC. +type DeleteSceneRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The resource name of the scene to delete. + // Format: stories/{story}/scenes/{scene} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSceneRequest) Reset() { + *x = DeleteSceneRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSceneRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSceneRequest) ProtoMessage() {} + +func (x *DeleteSceneRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSceneRequest.ProtoReflect.Descriptor instead. +func (*DeleteSceneRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteSceneRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Actor represents an actor resource in the webstory service. +type Actor struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The resource name of the actor. + // Format: stories/{story}/actors/{actor} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The ID of the actor, used as the final component of the resource name. + ActorId string `protobuf:"bytes,2,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` + // The name of the actor. + NameValue string `protobuf:"bytes,3,opt,name=name_value,json=nameValue,proto3" json:"name_value,omitempty"` + // The role or character name this actor plays in the story. + Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"` + // Optional notes about the actor. + Notes string `protobuf:"bytes,5,opt,name=notes,proto3" json:"notes,omitempty"` + // Output only. The time when the actor was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The time when the actor was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. The version of the actor for concurrency control. + Etag string `protobuf:"bytes,8,opt,name=etag,proto3" json:"etag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Actor) Reset() { + *x = Actor{} + mi := &file_webstory_v1_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Actor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Actor) ProtoMessage() {} + +func (x *Actor) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Actor.ProtoReflect.Descriptor instead. +func (*Actor) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{14} +} + +func (x *Actor) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Actor) GetActorId() string { + if x != nil { + return x.ActorId + } + return "" +} + +func (x *Actor) GetNameValue() string { + if x != nil { + return x.NameValue + } + return "" +} + +func (x *Actor) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +func (x *Actor) GetNotes() string { + if x != nil { + return x.Notes + } + return "" +} + +func (x *Actor) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Actor) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Actor) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// GetActorRequest is the request message for GetActor RPC. +type GetActorRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The resource name of the actor to retrieve. + // Format: stories/{story}/actors/{actor} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetActorRequest) Reset() { + *x = GetActorRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetActorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetActorRequest) ProtoMessage() {} + +func (x *GetActorRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetActorRequest.ProtoReflect.Descriptor instead. +func (*GetActorRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{15} +} + +func (x *GetActorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// ListActorsRequest is the request message for ListActors RPC. +type ListActorsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The parent story that owns this collection of actors. + // Format: stories/{story} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of actors to return. The service may return fewer than + // this value. If unspecified, at most 50 actors will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, received from a previous ListActors call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to ListActors must match + // the call that provided the page token. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. A filter expression that filters the actors listed in the response. + // Supported fields: name_value, role. + // Example: role:"protagonist" + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` + // Optional. The field to order the results by. + // Supported fields: name_value, create_time. + // Default: name_value (ascending order). + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActorsRequest) Reset() { + *x = ListActorsRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActorsRequest) ProtoMessage() {} + +func (x *ListActorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActorsRequest.ProtoReflect.Descriptor instead. +func (*ListActorsRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{16} +} + +func (x *ListActorsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListActorsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListActorsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListActorsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListActorsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// ListActorsResponse is the response message for ListActors RPC. +type ListActorsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The list of actors. + Actors []*Actor `protobuf:"bytes,1,rep,name=actors,proto3" json:"actors,omitempty"` + // A token, which can be sent as page_token to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // The total number of actors matching the filter. + // This value may be an estimate. + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActorsResponse) Reset() { + *x = ListActorsResponse{} + mi := &file_webstory_v1_api_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActorsResponse) ProtoMessage() {} + +func (x *ListActorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActorsResponse.ProtoReflect.Descriptor instead. +func (*ListActorsResponse) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{17} +} + +func (x *ListActorsResponse) GetActors() []*Actor { + if x != nil { + return x.Actors + } + return nil +} + +func (x *ListActorsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListActorsResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +// CreateActorRequest is the request message for CreateActor RPC. +type CreateActorRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The parent story where this actor will be created. + // Format: stories/{story} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The ID to use for the actor, which will become the final component of + // the actor's resource name. + // This value should be 4-63 characters, and valid characters are + // /[a-z][0-9]-/. + ActorId string `protobuf:"bytes,2,opt,name=actor_id,json=actorId,proto3" json:"actor_id,omitempty"` + // The actor to create. + Actor *Actor `protobuf:"bytes,3,opt,name=actor,proto3" json:"actor,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateActorRequest) Reset() { + *x = CreateActorRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateActorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateActorRequest) ProtoMessage() {} + +func (x *CreateActorRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateActorRequest.ProtoReflect.Descriptor instead. +func (*CreateActorRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{18} +} + +func (x *CreateActorRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateActorRequest) GetActorId() string { + if x != nil { + return x.ActorId + } + return "" +} + +func (x *CreateActorRequest) GetActor() *Actor { + if x != nil { + return x.Actor + } + return nil +} + +// UpdateActorRequest is the request message for UpdateActor RPC. +type UpdateActorRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The actor to update. + // The actor's name field is used to specify the resource to update. + Actor *Actor `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` + // The list of fields to update. + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateActorRequest) Reset() { + *x = UpdateActorRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateActorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateActorRequest) ProtoMessage() {} + +func (x *UpdateActorRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateActorRequest.ProtoReflect.Descriptor instead. +func (*UpdateActorRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{19} +} + +func (x *UpdateActorRequest) GetActor() *Actor { + if x != nil { + return x.Actor + } + return nil +} + +func (x *UpdateActorRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// DeleteActorRequest is the request message for DeleteActor RPC. +type DeleteActorRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The resource name of the actor to delete. + // Format: stories/{story}/actors/{actor} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteActorRequest) Reset() { + *x = DeleteActorRequest{} + mi := &file_webstory_v1_api_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteActorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteActorRequest) ProtoMessage() {} + +func (x *DeleteActorRequest) ProtoReflect() protoreflect.Message { + mi := &file_webstory_v1_api_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteActorRequest.ProtoReflect.Descriptor instead. +func (*DeleteActorRequest) Descriptor() ([]byte, []int) { + return file_webstory_v1_api_proto_rawDescGZIP(), []int{20} +} + +func (x *DeleteActorRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + var File_webstory_v1_api_proto protoreflect.FileDescriptor const file_webstory_v1_api_proto_rawDesc = "" + "\n" + - "\x15webstory/v1/api.proto\x12\vwebstory.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x84\x03\n" + + "\x15webstory/v1/api.proto\x12\vwebstory.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe6\x03\n" + "\x05Story\x12\x1a\n" + "\x04name\x18\x01 \x01(\tB\x06\xe0A\x03\xe0A\bR\x04name\x12\x1e\n" + "\bstory_id\x18\x02 \x01(\tB\x03\xe0A\x02R\astoryId\x12\x19\n" + @@ -516,7 +1515,10 @@ const file_webstory_v1_api_proto_rawDesc = "" + "createTime\x12@\n" + "\vupdate_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + "updateTime\x12\x17\n" + - "\x04etag\x18\t \x01(\tB\x03\xe0A\x03R\x04etag:3\xeaA0\n" + + "\x04etag\x18\t \x01(\tB\x03\xe0A\x03R\x04etag\x12/\n" + + "\x06scenes\x18\n" + + " \x03(\v2\x12.webstory.v1.SceneB\x03\xe0A\x03R\x06scenes\x12/\n" + + "\x06actors\x18\v \x03(\v2\x12.webstory.v1.ActorB\x03\xe0A\x03R\x06actors:3\xeaA0\n" + "\x1dwebstory.googleapis.com/Story\x12\x0fstories/{story}\"L\n" + "\x0fGetStoryRequest\x129\n" + "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" + @@ -541,13 +1543,103 @@ const file_webstory_v1_api_proto_rawDesc = "" + "updateMask\"O\n" + "\x12DeleteStoryRequest\x129\n" + "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" + - "\x1dwebstory.googleapis.com/StoryR\x04name2\xa9\x04\n" + + "\x1dwebstory.googleapis.com/StoryR\x04name\"\xab\x03\n" + + "\x05Scene\x12\x1a\n" + + "\x04name\x18\x01 \x01(\tB\x06\xe0A\x03\xe0A\bR\x04name\x12\x1e\n" + + "\bscene_id\x18\x02 \x01(\tB\x03\xe0A\x02R\asceneId\x12&\n" + + "\fscene_number\x18\x03 \x01(\x05B\x03\xe0A\x02R\vsceneNumber\x12\x19\n" + + "\x05title\x18\x04 \x01(\tB\x03\xe0A\x02R\x05title\x12\x18\n" + + "\acontent\x18\x05 \x01(\tR\acontent\x12 \n" + + "\vdescription\x18\x06 \x01(\tR\vdescription\x12@\n" + + "\vcreate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + + "createTime\x12@\n" + + "\vupdate_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + + "updateTime\x12\x17\n" + + "\x04etag\x18\t \x01(\tB\x03\xe0A\x03R\x04etag:J\xeaAG\n" + + "\x1dwebstory.googleapis.com/Scene\x12\x1estories/{story}/scenes/{scene}*\x06scenes\"L\n" + + "\x0fGetSceneRequest\x129\n" + + "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" + + "\x1dwebstory.googleapis.com/SceneR\x04name\"\x9f\x01\n" + + "\x11ListScenesRequest\x12\x1b\n" + + "\x06parent\x18\x01 \x01(\tB\x03\xe0A\x02R\x06parent\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x03 \x01(\tR\tpageToken\x12\x16\n" + + "\x06filter\x18\x04 \x01(\tR\x06filter\x12\x19\n" + + "\border_by\x18\x05 \x01(\tR\aorderBy\"\x87\x01\n" + + "\x12ListScenesResponse\x12*\n" + + "\x06scenes\x18\x01 \x03(\v2\x12.webstory.v1.SceneR\x06scenes\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\"\x80\x01\n" + + "\x12CreateSceneRequest\x12\x1b\n" + + "\x06parent\x18\x01 \x01(\tB\x03\xe0A\x02R\x06parent\x12\x1e\n" + + "\bscene_id\x18\x02 \x01(\tB\x03\xe0A\x02R\asceneId\x12-\n" + + "\x05scene\x18\x03 \x01(\v2\x12.webstory.v1.SceneB\x03\xe0A\x02R\x05scene\"\x80\x01\n" + + "\x12UpdateSceneRequest\x12-\n" + + "\x05scene\x18\x01 \x01(\v2\x12.webstory.v1.SceneB\x03\xe0A\x02R\x05scene\x12;\n" + + "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + + "updateMask\"O\n" + + "\x12DeleteSceneRequest\x129\n" + + "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" + + "\x1dwebstory.googleapis.com/SceneR\x04name\"\xfa\x02\n" + + "\x05Actor\x12\x1a\n" + + "\x04name\x18\x01 \x01(\tB\x06\xe0A\x03\xe0A\bR\x04name\x12\x1e\n" + + "\bactor_id\x18\x02 \x01(\tB\x03\xe0A\x02R\aactorId\x12\"\n" + + "\n" + + "name_value\x18\x03 \x01(\tB\x03\xe0A\x02R\tnameValue\x12\x12\n" + + "\x04role\x18\x04 \x01(\tR\x04role\x12\x14\n" + + "\x05notes\x18\x05 \x01(\tR\x05notes\x12@\n" + + "\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + + "createTime\x12@\n" + + "\vupdate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + + "updateTime\x12\x17\n" + + "\x04etag\x18\b \x01(\tB\x03\xe0A\x03R\x04etag:J\xeaAG\n" + + "\x1dwebstory.googleapis.com/Actor\x12\x1estories/{story}/actors/{actor}*\x06actors\"L\n" + + "\x0fGetActorRequest\x129\n" + + "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" + + "\x1dwebstory.googleapis.com/ActorR\x04name\"\x9f\x01\n" + + "\x11ListActorsRequest\x12\x1b\n" + + "\x06parent\x18\x01 \x01(\tB\x03\xe0A\x02R\x06parent\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x03 \x01(\tR\tpageToken\x12\x16\n" + + "\x06filter\x18\x04 \x01(\tR\x06filter\x12\x19\n" + + "\border_by\x18\x05 \x01(\tR\aorderBy\"\x87\x01\n" + + "\x12ListActorsResponse\x12*\n" + + "\x06actors\x18\x01 \x03(\v2\x12.webstory.v1.ActorR\x06actors\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\"\x80\x01\n" + + "\x12CreateActorRequest\x12\x1b\n" + + "\x06parent\x18\x01 \x01(\tB\x03\xe0A\x02R\x06parent\x12\x1e\n" + + "\bactor_id\x18\x02 \x01(\tB\x03\xe0A\x02R\aactorId\x12-\n" + + "\x05actor\x18\x03 \x01(\v2\x12.webstory.v1.ActorB\x03\xe0A\x02R\x05actor\"\x80\x01\n" + + "\x12UpdateActorRequest\x12-\n" + + "\x05actor\x18\x01 \x01(\v2\x12.webstory.v1.ActorB\x03\xe0A\x02R\x05actor\x12;\n" + + "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + + "updateMask\"O\n" + + "\x12DeleteActorRequest\x129\n" + + "\x04name\x18\x01 \x01(\tB%\xe0A\x02\xfaA\x1f\n" + + "\x1dwebstory.googleapis.com/ActorR\x04name2\xdb\r\n" + "\x0fWebstoryService\x12a\n" + "\bGetStory\x12\x1c.webstory.v1.GetStoryRequest\x1a\x12.webstory.v1.Story\"#\xdaA\x04name\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/{name=stories/*}\x12h\n" + "\vListStories\x12\x1f.webstory.v1.ListStoriesRequest\x1a .webstory.v1.ListStoriesResponse\"\x16\xdaA\x00\x82\xd3\xe4\x93\x02\r\x12\v/v1/stories\x12o\n" + "\vCreateStory\x12\x1f.webstory.v1.CreateStoryRequest\x1a\x12.webstory.v1.Story\"+\xdaA\x0estory_id,story\x82\xd3\xe4\x93\x02\x14:\x05story\"\v/v1/stories\x12k\n" + "\vUpdateStory\x12\x1f.webstory.v1.UpdateStoryRequest\x1a\x12.webstory.v1.Story\"'\xdaA\x05story\x82\xd3\xe4\x93\x02\x19:\x05story\x1a\x10/v1/{story.name}\x12k\n" + - "\vDeleteStory\x12\x1f.webstory.v1.DeleteStoryRequest\x1a\x16.google.protobuf.Empty\"#\xdaA\x04name\x82\xd3\xe4\x93\x02\x16*\x14/v1/{name=stories/*}B*Z(git.tipsy.codes/charles/webstory/pkg/apib\x06proto3" + "\vDeleteStory\x12\x1f.webstory.v1.DeleteStoryRequest\x1a\x16.google.protobuf.Empty\"#\xdaA\x04name\x82\xd3\xe4\x93\x02\x16*\x14/v1/{name=stories/*}\x12j\n" + + "\bGetScene\x12\x1c.webstory.v1.GetSceneRequest\x1a\x12.webstory.v1.Scene\",\xdaA\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=stories/*/scenes/*}\x12}\n" + + "\n" + + "ListScenes\x12\x1e.webstory.v1.ListScenesRequest\x1a\x1f.webstory.v1.ListScenesResponse\".\xdaA\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=stories/*}/scenes\x12\x88\x01\n" + + "\vCreateScene\x12\x1f.webstory.v1.CreateSceneRequest\x1a\x12.webstory.v1.Scene\"D\xdaA\x15parent,scene_id,scene\x82\xd3\xe4\x93\x02&:\x05scene\"\x1d/v1/{parent=stories/*}/scenes\x12k\n" + + "\vUpdateScene\x12\x1f.webstory.v1.UpdateSceneRequest\x1a\x12.webstory.v1.Scene\"'\xdaA\x05scene\x82\xd3\xe4\x93\x02\x19:\x05scene\x1a\x10/v1/{scene.name}\x12t\n" + + "\vDeleteScene\x12\x1f.webstory.v1.DeleteSceneRequest\x1a\x16.google.protobuf.Empty\",\xdaA\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=stories/*/scenes/*}\x12j\n" + + "\bGetActor\x12\x1c.webstory.v1.GetActorRequest\x1a\x12.webstory.v1.Actor\",\xdaA\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=stories/*/actors/*}\x12}\n" + + "\n" + + "ListActors\x12\x1e.webstory.v1.ListActorsRequest\x1a\x1f.webstory.v1.ListActorsResponse\".\xdaA\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=stories/*}/actors\x12\x88\x01\n" + + "\vCreateActor\x12\x1f.webstory.v1.CreateActorRequest\x1a\x12.webstory.v1.Actor\"D\xdaA\x15parent,actor_id,actor\x82\xd3\xe4\x93\x02&:\x05actor\"\x1d/v1/{parent=stories/*}/actors\x12k\n" + + "\vUpdateActor\x12\x1f.webstory.v1.UpdateActorRequest\x1a\x12.webstory.v1.Actor\"'\xdaA\x05actor\x82\xd3\xe4\x93\x02\x19:\x05actor\x1a\x10/v1/{actor.name}\x12t\n" + + "\vDeleteActor\x12\x1f.webstory.v1.DeleteActorRequest\x1a\x16.google.protobuf.Empty\",\xdaA\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=stories/*/actors/*}B*Z(git.tipsy.codes/charles/webstory/pkg/apib\x06proto3" var ( file_webstory_v1_api_proto_rawDescOnce sync.Once @@ -561,7 +1653,7 @@ func file_webstory_v1_api_proto_rawDescGZIP() []byte { return file_webstory_v1_api_proto_rawDescData } -var file_webstory_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_webstory_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_webstory_v1_api_proto_goTypes = []any{ (*Story)(nil), // 0: webstory.v1.Story (*GetStoryRequest)(nil), // 1: webstory.v1.GetStoryRequest @@ -570,32 +1662,80 @@ var file_webstory_v1_api_proto_goTypes = []any{ (*CreateStoryRequest)(nil), // 4: webstory.v1.CreateStoryRequest (*UpdateStoryRequest)(nil), // 5: webstory.v1.UpdateStoryRequest (*DeleteStoryRequest)(nil), // 6: webstory.v1.DeleteStoryRequest - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*fieldmaskpb.FieldMask)(nil), // 8: google.protobuf.FieldMask - (*emptypb.Empty)(nil), // 9: google.protobuf.Empty + (*Scene)(nil), // 7: webstory.v1.Scene + (*GetSceneRequest)(nil), // 8: webstory.v1.GetSceneRequest + (*ListScenesRequest)(nil), // 9: webstory.v1.ListScenesRequest + (*ListScenesResponse)(nil), // 10: webstory.v1.ListScenesResponse + (*CreateSceneRequest)(nil), // 11: webstory.v1.CreateSceneRequest + (*UpdateSceneRequest)(nil), // 12: webstory.v1.UpdateSceneRequest + (*DeleteSceneRequest)(nil), // 13: webstory.v1.DeleteSceneRequest + (*Actor)(nil), // 14: webstory.v1.Actor + (*GetActorRequest)(nil), // 15: webstory.v1.GetActorRequest + (*ListActorsRequest)(nil), // 16: webstory.v1.ListActorsRequest + (*ListActorsResponse)(nil), // 17: webstory.v1.ListActorsResponse + (*CreateActorRequest)(nil), // 18: webstory.v1.CreateActorRequest + (*UpdateActorRequest)(nil), // 19: webstory.v1.UpdateActorRequest + (*DeleteActorRequest)(nil), // 20: webstory.v1.DeleteActorRequest + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp + (*fieldmaskpb.FieldMask)(nil), // 22: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 23: google.protobuf.Empty } var file_webstory_v1_api_proto_depIdxs = []int32{ - 7, // 0: webstory.v1.Story.create_time:type_name -> google.protobuf.Timestamp - 7, // 1: webstory.v1.Story.update_time:type_name -> google.protobuf.Timestamp - 0, // 2: webstory.v1.ListStoriesResponse.stories:type_name -> webstory.v1.Story - 0, // 3: webstory.v1.CreateStoryRequest.story:type_name -> webstory.v1.Story - 0, // 4: webstory.v1.UpdateStoryRequest.story:type_name -> webstory.v1.Story - 8, // 5: webstory.v1.UpdateStoryRequest.update_mask:type_name -> google.protobuf.FieldMask - 1, // 6: webstory.v1.WebstoryService.GetStory:input_type -> webstory.v1.GetStoryRequest - 2, // 7: webstory.v1.WebstoryService.ListStories:input_type -> webstory.v1.ListStoriesRequest - 4, // 8: webstory.v1.WebstoryService.CreateStory:input_type -> webstory.v1.CreateStoryRequest - 5, // 9: webstory.v1.WebstoryService.UpdateStory:input_type -> webstory.v1.UpdateStoryRequest - 6, // 10: webstory.v1.WebstoryService.DeleteStory:input_type -> webstory.v1.DeleteStoryRequest - 0, // 11: webstory.v1.WebstoryService.GetStory:output_type -> webstory.v1.Story - 3, // 12: webstory.v1.WebstoryService.ListStories:output_type -> webstory.v1.ListStoriesResponse - 0, // 13: webstory.v1.WebstoryService.CreateStory:output_type -> webstory.v1.Story - 0, // 14: webstory.v1.WebstoryService.UpdateStory:output_type -> webstory.v1.Story - 9, // 15: webstory.v1.WebstoryService.DeleteStory:output_type -> google.protobuf.Empty - 11, // [11:16] is the sub-list for method output_type - 6, // [6:11] 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 + 21, // 0: webstory.v1.Story.create_time:type_name -> google.protobuf.Timestamp + 21, // 1: webstory.v1.Story.update_time:type_name -> google.protobuf.Timestamp + 7, // 2: webstory.v1.Story.scenes:type_name -> webstory.v1.Scene + 14, // 3: webstory.v1.Story.actors:type_name -> webstory.v1.Actor + 0, // 4: webstory.v1.ListStoriesResponse.stories:type_name -> webstory.v1.Story + 0, // 5: webstory.v1.CreateStoryRequest.story:type_name -> webstory.v1.Story + 0, // 6: webstory.v1.UpdateStoryRequest.story:type_name -> webstory.v1.Story + 22, // 7: webstory.v1.UpdateStoryRequest.update_mask:type_name -> google.protobuf.FieldMask + 21, // 8: webstory.v1.Scene.create_time:type_name -> google.protobuf.Timestamp + 21, // 9: webstory.v1.Scene.update_time:type_name -> google.protobuf.Timestamp + 7, // 10: webstory.v1.ListScenesResponse.scenes:type_name -> webstory.v1.Scene + 7, // 11: webstory.v1.CreateSceneRequest.scene:type_name -> webstory.v1.Scene + 7, // 12: webstory.v1.UpdateSceneRequest.scene:type_name -> webstory.v1.Scene + 22, // 13: webstory.v1.UpdateSceneRequest.update_mask:type_name -> google.protobuf.FieldMask + 21, // 14: webstory.v1.Actor.create_time:type_name -> google.protobuf.Timestamp + 21, // 15: webstory.v1.Actor.update_time:type_name -> google.protobuf.Timestamp + 14, // 16: webstory.v1.ListActorsResponse.actors:type_name -> webstory.v1.Actor + 14, // 17: webstory.v1.CreateActorRequest.actor:type_name -> webstory.v1.Actor + 14, // 18: webstory.v1.UpdateActorRequest.actor:type_name -> webstory.v1.Actor + 22, // 19: webstory.v1.UpdateActorRequest.update_mask:type_name -> google.protobuf.FieldMask + 1, // 20: webstory.v1.WebstoryService.GetStory:input_type -> webstory.v1.GetStoryRequest + 2, // 21: webstory.v1.WebstoryService.ListStories:input_type -> webstory.v1.ListStoriesRequest + 4, // 22: webstory.v1.WebstoryService.CreateStory:input_type -> webstory.v1.CreateStoryRequest + 5, // 23: webstory.v1.WebstoryService.UpdateStory:input_type -> webstory.v1.UpdateStoryRequest + 6, // 24: webstory.v1.WebstoryService.DeleteStory:input_type -> webstory.v1.DeleteStoryRequest + 8, // 25: webstory.v1.WebstoryService.GetScene:input_type -> webstory.v1.GetSceneRequest + 9, // 26: webstory.v1.WebstoryService.ListScenes:input_type -> webstory.v1.ListScenesRequest + 11, // 27: webstory.v1.WebstoryService.CreateScene:input_type -> webstory.v1.CreateSceneRequest + 12, // 28: webstory.v1.WebstoryService.UpdateScene:input_type -> webstory.v1.UpdateSceneRequest + 13, // 29: webstory.v1.WebstoryService.DeleteScene:input_type -> webstory.v1.DeleteSceneRequest + 15, // 30: webstory.v1.WebstoryService.GetActor:input_type -> webstory.v1.GetActorRequest + 16, // 31: webstory.v1.WebstoryService.ListActors:input_type -> webstory.v1.ListActorsRequest + 18, // 32: webstory.v1.WebstoryService.CreateActor:input_type -> webstory.v1.CreateActorRequest + 19, // 33: webstory.v1.WebstoryService.UpdateActor:input_type -> webstory.v1.UpdateActorRequest + 20, // 34: webstory.v1.WebstoryService.DeleteActor:input_type -> webstory.v1.DeleteActorRequest + 0, // 35: webstory.v1.WebstoryService.GetStory:output_type -> webstory.v1.Story + 3, // 36: webstory.v1.WebstoryService.ListStories:output_type -> webstory.v1.ListStoriesResponse + 0, // 37: webstory.v1.WebstoryService.CreateStory:output_type -> webstory.v1.Story + 0, // 38: webstory.v1.WebstoryService.UpdateStory:output_type -> webstory.v1.Story + 23, // 39: webstory.v1.WebstoryService.DeleteStory:output_type -> google.protobuf.Empty + 7, // 40: webstory.v1.WebstoryService.GetScene:output_type -> webstory.v1.Scene + 10, // 41: webstory.v1.WebstoryService.ListScenes:output_type -> webstory.v1.ListScenesResponse + 7, // 42: webstory.v1.WebstoryService.CreateScene:output_type -> webstory.v1.Scene + 7, // 43: webstory.v1.WebstoryService.UpdateScene:output_type -> webstory.v1.Scene + 23, // 44: webstory.v1.WebstoryService.DeleteScene:output_type -> google.protobuf.Empty + 14, // 45: webstory.v1.WebstoryService.GetActor:output_type -> webstory.v1.Actor + 17, // 46: webstory.v1.WebstoryService.ListActors:output_type -> webstory.v1.ListActorsResponse + 14, // 47: webstory.v1.WebstoryService.CreateActor:output_type -> webstory.v1.Actor + 14, // 48: webstory.v1.WebstoryService.UpdateActor:output_type -> webstory.v1.Actor + 23, // 49: webstory.v1.WebstoryService.DeleteActor:output_type -> google.protobuf.Empty + 35, // [35:50] is the sub-list for method output_type + 20, // [20:35] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_webstory_v1_api_proto_init() } @@ -609,7 +1749,7 @@ func file_webstory_v1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_webstory_v1_api_proto_rawDesc), len(file_webstory_v1_api_proto_rawDesc)), NumEnums: 0, - NumMessages: 7, + NumMessages: 21, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/api/webstory/v1/api_grpc.pb.go b/pkg/api/webstory/v1/api_grpc.pb.go index a592a66..28afa41 100644 --- a/pkg/api/webstory/v1/api_grpc.pb.go +++ b/pkg/api/webstory/v1/api_grpc.pb.go @@ -25,6 +25,16 @@ const ( WebstoryService_CreateStory_FullMethodName = "/webstory.v1.WebstoryService/CreateStory" WebstoryService_UpdateStory_FullMethodName = "/webstory.v1.WebstoryService/UpdateStory" WebstoryService_DeleteStory_FullMethodName = "/webstory.v1.WebstoryService/DeleteStory" + WebstoryService_GetScene_FullMethodName = "/webstory.v1.WebstoryService/GetScene" + WebstoryService_ListScenes_FullMethodName = "/webstory.v1.WebstoryService/ListScenes" + WebstoryService_CreateScene_FullMethodName = "/webstory.v1.WebstoryService/CreateScene" + WebstoryService_UpdateScene_FullMethodName = "/webstory.v1.WebstoryService/UpdateScene" + WebstoryService_DeleteScene_FullMethodName = "/webstory.v1.WebstoryService/DeleteScene" + WebstoryService_GetActor_FullMethodName = "/webstory.v1.WebstoryService/GetActor" + WebstoryService_ListActors_FullMethodName = "/webstory.v1.WebstoryService/ListActors" + WebstoryService_CreateActor_FullMethodName = "/webstory.v1.WebstoryService/CreateActor" + WebstoryService_UpdateActor_FullMethodName = "/webstory.v1.WebstoryService/UpdateActor" + WebstoryService_DeleteActor_FullMethodName = "/webstory.v1.WebstoryService/DeleteActor" ) // WebstoryServiceClient is the client API for WebstoryService service. @@ -43,6 +53,26 @@ type WebstoryServiceClient interface { UpdateStory(ctx context.Context, in *UpdateStoryRequest, opts ...grpc.CallOption) (*Story, error) // DeleteStory deletes a story. DeleteStory(ctx context.Context, in *DeleteStoryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // GetScene retrieves a scene by its resource name. + GetScene(ctx context.Context, in *GetSceneRequest, opts ...grpc.CallOption) (*Scene, error) + // ListScenes returns a list of scenes for a story. + ListScenes(ctx context.Context, in *ListScenesRequest, opts ...grpc.CallOption) (*ListScenesResponse, error) + // CreateScene creates a new scene in a story. + CreateScene(ctx context.Context, in *CreateSceneRequest, opts ...grpc.CallOption) (*Scene, error) + // UpdateScene updates an existing scene. + UpdateScene(ctx context.Context, in *UpdateSceneRequest, opts ...grpc.CallOption) (*Scene, error) + // DeleteScene deletes a scene. + DeleteScene(ctx context.Context, in *DeleteSceneRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // GetActor retrieves an actor by its resource name. + GetActor(ctx context.Context, in *GetActorRequest, opts ...grpc.CallOption) (*Actor, error) + // ListActors returns a list of actors for a story. + ListActors(ctx context.Context, in *ListActorsRequest, opts ...grpc.CallOption) (*ListActorsResponse, error) + // CreateActor creates a new actor in a story. + CreateActor(ctx context.Context, in *CreateActorRequest, opts ...grpc.CallOption) (*Actor, error) + // UpdateActor updates an existing actor. + UpdateActor(ctx context.Context, in *UpdateActorRequest, opts ...grpc.CallOption) (*Actor, error) + // DeleteActor deletes an actor. + DeleteActor(ctx context.Context, in *DeleteActorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type webstoryServiceClient struct { @@ -103,6 +133,106 @@ func (c *webstoryServiceClient) DeleteStory(ctx context.Context, in *DeleteStory return out, nil } +func (c *webstoryServiceClient) GetScene(ctx context.Context, in *GetSceneRequest, opts ...grpc.CallOption) (*Scene, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Scene) + err := c.cc.Invoke(ctx, WebstoryService_GetScene_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) ListScenes(ctx context.Context, in *ListScenesRequest, opts ...grpc.CallOption) (*ListScenesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListScenesResponse) + err := c.cc.Invoke(ctx, WebstoryService_ListScenes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) CreateScene(ctx context.Context, in *CreateSceneRequest, opts ...grpc.CallOption) (*Scene, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Scene) + err := c.cc.Invoke(ctx, WebstoryService_CreateScene_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) UpdateScene(ctx context.Context, in *UpdateSceneRequest, opts ...grpc.CallOption) (*Scene, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Scene) + err := c.cc.Invoke(ctx, WebstoryService_UpdateScene_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) DeleteScene(ctx context.Context, in *DeleteSceneRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, WebstoryService_DeleteScene_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) GetActor(ctx context.Context, in *GetActorRequest, opts ...grpc.CallOption) (*Actor, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Actor) + err := c.cc.Invoke(ctx, WebstoryService_GetActor_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) ListActors(ctx context.Context, in *ListActorsRequest, opts ...grpc.CallOption) (*ListActorsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListActorsResponse) + err := c.cc.Invoke(ctx, WebstoryService_ListActors_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) CreateActor(ctx context.Context, in *CreateActorRequest, opts ...grpc.CallOption) (*Actor, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Actor) + err := c.cc.Invoke(ctx, WebstoryService_CreateActor_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) UpdateActor(ctx context.Context, in *UpdateActorRequest, opts ...grpc.CallOption) (*Actor, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Actor) + err := c.cc.Invoke(ctx, WebstoryService_UpdateActor_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *webstoryServiceClient) DeleteActor(ctx context.Context, in *DeleteActorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, WebstoryService_DeleteActor_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // WebstoryServiceServer is the server API for WebstoryService service. // All implementations must embed UnimplementedWebstoryServiceServer // for forward compatibility. @@ -119,6 +249,26 @@ type WebstoryServiceServer interface { UpdateStory(context.Context, *UpdateStoryRequest) (*Story, error) // DeleteStory deletes a story. DeleteStory(context.Context, *DeleteStoryRequest) (*emptypb.Empty, error) + // GetScene retrieves a scene by its resource name. + GetScene(context.Context, *GetSceneRequest) (*Scene, error) + // ListScenes returns a list of scenes for a story. + ListScenes(context.Context, *ListScenesRequest) (*ListScenesResponse, error) + // CreateScene creates a new scene in a story. + CreateScene(context.Context, *CreateSceneRequest) (*Scene, error) + // UpdateScene updates an existing scene. + UpdateScene(context.Context, *UpdateSceneRequest) (*Scene, error) + // DeleteScene deletes a scene. + DeleteScene(context.Context, *DeleteSceneRequest) (*emptypb.Empty, error) + // GetActor retrieves an actor by its resource name. + GetActor(context.Context, *GetActorRequest) (*Actor, error) + // ListActors returns a list of actors for a story. + ListActors(context.Context, *ListActorsRequest) (*ListActorsResponse, error) + // CreateActor creates a new actor in a story. + CreateActor(context.Context, *CreateActorRequest) (*Actor, error) + // UpdateActor updates an existing actor. + UpdateActor(context.Context, *UpdateActorRequest) (*Actor, error) + // DeleteActor deletes an actor. + DeleteActor(context.Context, *DeleteActorRequest) (*emptypb.Empty, error) mustEmbedUnimplementedWebstoryServiceServer() } @@ -144,6 +294,36 @@ func (UnimplementedWebstoryServiceServer) UpdateStory(context.Context, *UpdateSt func (UnimplementedWebstoryServiceServer) DeleteStory(context.Context, *DeleteStoryRequest) (*emptypb.Empty, error) { return nil, status.Error(codes.Unimplemented, "method DeleteStory not implemented") } +func (UnimplementedWebstoryServiceServer) GetScene(context.Context, *GetSceneRequest) (*Scene, error) { + return nil, status.Error(codes.Unimplemented, "method GetScene not implemented") +} +func (UnimplementedWebstoryServiceServer) ListScenes(context.Context, *ListScenesRequest) (*ListScenesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListScenes not implemented") +} +func (UnimplementedWebstoryServiceServer) CreateScene(context.Context, *CreateSceneRequest) (*Scene, error) { + return nil, status.Error(codes.Unimplemented, "method CreateScene not implemented") +} +func (UnimplementedWebstoryServiceServer) UpdateScene(context.Context, *UpdateSceneRequest) (*Scene, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateScene not implemented") +} +func (UnimplementedWebstoryServiceServer) DeleteScene(context.Context, *DeleteSceneRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteScene not implemented") +} +func (UnimplementedWebstoryServiceServer) GetActor(context.Context, *GetActorRequest) (*Actor, error) { + return nil, status.Error(codes.Unimplemented, "method GetActor not implemented") +} +func (UnimplementedWebstoryServiceServer) ListActors(context.Context, *ListActorsRequest) (*ListActorsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListActors not implemented") +} +func (UnimplementedWebstoryServiceServer) CreateActor(context.Context, *CreateActorRequest) (*Actor, error) { + return nil, status.Error(codes.Unimplemented, "method CreateActor not implemented") +} +func (UnimplementedWebstoryServiceServer) UpdateActor(context.Context, *UpdateActorRequest) (*Actor, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateActor not implemented") +} +func (UnimplementedWebstoryServiceServer) DeleteActor(context.Context, *DeleteActorRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteActor not implemented") +} func (UnimplementedWebstoryServiceServer) mustEmbedUnimplementedWebstoryServiceServer() {} func (UnimplementedWebstoryServiceServer) testEmbeddedByValue() {} @@ -255,6 +435,186 @@ func _WebstoryService_DeleteStory_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _WebstoryService_GetScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSceneRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).GetScene(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_GetScene_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).GetScene(ctx, req.(*GetSceneRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_ListScenes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListScenesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).ListScenes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_ListScenes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).ListScenes(ctx, req.(*ListScenesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_CreateScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSceneRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).CreateScene(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_CreateScene_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).CreateScene(ctx, req.(*CreateSceneRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_UpdateScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSceneRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).UpdateScene(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_UpdateScene_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).UpdateScene(ctx, req.(*UpdateSceneRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_DeleteScene_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSceneRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).DeleteScene(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_DeleteScene_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).DeleteScene(ctx, req.(*DeleteSceneRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_GetActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetActorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).GetActor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_GetActor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).GetActor(ctx, req.(*GetActorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_ListActors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListActorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).ListActors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_ListActors_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).ListActors(ctx, req.(*ListActorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_CreateActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateActorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).CreateActor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_CreateActor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).CreateActor(ctx, req.(*CreateActorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_UpdateActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateActorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).UpdateActor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_UpdateActor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).UpdateActor(ctx, req.(*UpdateActorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WebstoryService_DeleteActor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteActorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WebstoryServiceServer).DeleteActor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WebstoryService_DeleteActor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WebstoryServiceServer).DeleteActor(ctx, req.(*DeleteActorRequest)) + } + return interceptor(ctx, in, info, handler) +} + // WebstoryService_ServiceDesc is the grpc.ServiceDesc for WebstoryService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -282,6 +642,46 @@ var WebstoryService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteStory", Handler: _WebstoryService_DeleteStory_Handler, }, + { + MethodName: "GetScene", + Handler: _WebstoryService_GetScene_Handler, + }, + { + MethodName: "ListScenes", + Handler: _WebstoryService_ListScenes_Handler, + }, + { + MethodName: "CreateScene", + Handler: _WebstoryService_CreateScene_Handler, + }, + { + MethodName: "UpdateScene", + Handler: _WebstoryService_UpdateScene_Handler, + }, + { + MethodName: "DeleteScene", + Handler: _WebstoryService_DeleteScene_Handler, + }, + { + MethodName: "GetActor", + Handler: _WebstoryService_GetActor_Handler, + }, + { + MethodName: "ListActors", + Handler: _WebstoryService_ListActors_Handler, + }, + { + MethodName: "CreateActor", + Handler: _WebstoryService_CreateActor_Handler, + }, + { + MethodName: "UpdateActor", + Handler: _WebstoryService_UpdateActor_Handler, + }, + { + MethodName: "DeleteActor", + Handler: _WebstoryService_DeleteActor_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "webstory/v1/api.proto", diff --git a/proto/webstory/v1/api.proto b/proto/webstory/v1/api.proto index 239c8fd..a6558e0 100644 --- a/proto/webstory/v1/api.proto +++ b/proto/webstory/v1/api.proto @@ -49,6 +49,78 @@ service WebstoryService { option (google.api.http) = {delete: "/v1/{name=stories/*}"}; option (google.api.method_signature) = "name"; } + + // GetScene retrieves a scene by its resource name. + rpc GetScene(GetSceneRequest) returns (Scene) { + option (google.api.http) = {get: "/v1/{name=stories/*/scenes/*}"}; + option (google.api.method_signature) = "name"; + } + + // ListScenes returns a list of scenes for a story. + rpc ListScenes(ListScenesRequest) returns (ListScenesResponse) { + option (google.api.http) = {get: "/v1/{parent=stories/*}/scenes"}; + option (google.api.method_signature) = "parent"; + } + + // CreateScene creates a new scene in a story. + rpc CreateScene(CreateSceneRequest) returns (Scene) { + option (google.api.http) = { + post: "/v1/{parent=stories/*}/scenes" + body: "scene" + }; + option (google.api.method_signature) = "parent,scene_id,scene"; + } + + // UpdateScene updates an existing scene. + rpc UpdateScene(UpdateSceneRequest) returns (Scene) { + option (google.api.http) = { + put: "/v1/{scene.name}" + body: "scene" + }; + option (google.api.method_signature) = "scene"; + } + + // DeleteScene deletes a scene. + rpc DeleteScene(DeleteSceneRequest) returns (google.protobuf.Empty) { + option (google.api.http) = {delete: "/v1/{name=stories/*/scenes/*}"}; + option (google.api.method_signature) = "name"; + } + + // GetActor retrieves an actor by its resource name. + rpc GetActor(GetActorRequest) returns (Actor) { + option (google.api.http) = {get: "/v1/{name=stories/*/actors/*}"}; + option (google.api.method_signature) = "name"; + } + + // ListActors returns a list of actors for a story. + rpc ListActors(ListActorsRequest) returns (ListActorsResponse) { + option (google.api.http) = {get: "/v1/{parent=stories/*}/actors"}; + option (google.api.method_signature) = "parent"; + } + + // CreateActor creates a new actor in a story. + rpc CreateActor(CreateActorRequest) returns (Actor) { + option (google.api.http) = { + post: "/v1/{parent=stories/*}/actors" + body: "actor" + }; + option (google.api.method_signature) = "parent,actor_id,actor"; + } + + // UpdateActor updates an existing actor. + rpc UpdateActor(UpdateActorRequest) returns (Actor) { + option (google.api.http) = { + put: "/v1/{actor.name}" + body: "actor" + }; + option (google.api.method_signature) = "actor"; + } + + // DeleteActor deletes an actor. + rpc DeleteActor(DeleteActorRequest) returns (google.protobuf.Empty) { + option (google.api.http) = {delete: "/v1/{name=stories/*/actors/*}"}; + option (google.api.method_signature) = "name"; + } } // Story represents a story resource in the webstory service. @@ -88,6 +160,12 @@ message Story { // Output only. The version of the story for concurrency control. string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The scenes contained in this story. + repeated Scene scenes = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The actors in this story. + repeated Actor actors = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // GetStoryRequest is the request message for GetStory RPC. @@ -169,3 +247,256 @@ message DeleteStoryRequest { (google.api.resource_reference) = {type: "webstory.googleapis.com/Story"} ]; } + +// Scene represents a scene resource in the webstory service. +message Scene { + option (google.api.resource) = { + type: "webstory.googleapis.com/Scene" + pattern: "stories/{story}/scenes/{scene}" + plural: "scenes" + }; + + // The resource name of the scene. + // Format: stories/{story}/scenes/{scene} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // The ID of the scene, used as the final component of the resource name. + string scene_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The scene number within the story. + int32 scene_number = 3 [(google.api.field_behavior) = REQUIRED]; + + // The title of the scene. + string title = 4 [(google.api.field_behavior) = REQUIRED]; + + // The content of the scene. + string content = 5; + + // The description of the scene. + string description = 6; + + // Output only. The time when the scene was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the scene was last updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of the scene for concurrency control. + string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// GetSceneRequest is the request message for GetScene RPC. +message GetSceneRequest { + // The resource name of the scene to retrieve. + // Format: stories/{story}/scenes/{scene} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "webstory.googleapis.com/Scene"} + ]; +} + +// ListScenesRequest is the request message for ListScenes RPC. +message ListScenesRequest { + // The parent story that owns this collection of scenes. + // Format: stories/{story} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of scenes to return. The service may return fewer than + // this value. If unspecified, at most 50 scenes will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous ListScenes call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to ListScenes must match + // the call that provided the page token. + string page_token = 3; + + // Optional. A filter expression that filters the scenes listed in the response. + // Supported fields: scene_number, title. + // Example: scene_number:>5 AND title:"climax" + string filter = 4; + + // Optional. The field to order the results by. + // Supported fields: scene_number, create_time, title. + // Default: scene_number (ascending order). + string order_by = 5; +} + +// ListScenesResponse is the response message for ListScenes RPC. +message ListScenesResponse { + // The list of scenes. + repeated Scene scenes = 1; + + // A token, which can be sent as page_token to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // The total number of scenes matching the filter. + // This value may be an estimate. + int32 total_size = 3; +} + +// CreateSceneRequest is the request message for CreateScene RPC. +message CreateSceneRequest { + // The parent story where this scene will be created. + // Format: stories/{story} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The ID to use for the scene, which will become the final component of + // the scene's resource name. + // This value should be 4-63 characters, and valid characters are + // /[a-z][0-9]-/. + string scene_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The scene to create. + Scene scene = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateSceneRequest is the request message for UpdateScene RPC. +message UpdateSceneRequest { + // The scene to update. + // The scene's name field is used to specify the resource to update. + Scene scene = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. + google.protobuf.FieldMask update_mask = 2; +} + +// DeleteSceneRequest is the request message for DeleteScene RPC. +message DeleteSceneRequest { + // The resource name of the scene to delete. + // Format: stories/{story}/scenes/{scene} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "webstory.googleapis.com/Scene"} + ]; +} + +// Actor represents an actor resource in the webstory service. +message Actor { + option (google.api.resource) = { + type: "webstory.googleapis.com/Actor" + pattern: "stories/{story}/actors/{actor}" + plural: "actors" + }; + + // The resource name of the actor. + // Format: stories/{story}/actors/{actor} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // The ID of the actor, used as the final component of the resource name. + string actor_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The name of the actor. + string name_value = 3 [(google.api.field_behavior) = REQUIRED]; + + // The role or character name this actor plays in the story. + string role = 4; + + // Optional notes about the actor. + string notes = 5; + + // Output only. The time when the actor was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the actor was last updated. + google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of the actor for concurrency control. + string etag = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// GetActorRequest is the request message for GetActor RPC. +message GetActorRequest { + // The resource name of the actor to retrieve. + // Format: stories/{story}/actors/{actor} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "webstory.googleapis.com/Actor"} + ]; +} + +// ListActorsRequest is the request message for ListActors RPC. +message ListActorsRequest { + // The parent story that owns this collection of actors. + // Format: stories/{story} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of actors to return. The service may return fewer than + // this value. If unspecified, at most 50 actors will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous ListActors call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to ListActors must match + // the call that provided the page token. + string page_token = 3; + + // Optional. A filter expression that filters the actors listed in the response. + // Supported fields: name_value, role. + // Example: role:"protagonist" + string filter = 4; + + // Optional. The field to order the results by. + // Supported fields: name_value, create_time. + // Default: name_value (ascending order). + string order_by = 5; +} + +// ListActorsResponse is the response message for ListActors RPC. +message ListActorsResponse { + // The list of actors. + repeated Actor actors = 1; + + // A token, which can be sent as page_token to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; + + // The total number of actors matching the filter. + // This value may be an estimate. + int32 total_size = 3; +} + +// CreateActorRequest is the request message for CreateActor RPC. +message CreateActorRequest { + // The parent story where this actor will be created. + // Format: stories/{story} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The ID to use for the actor, which will become the final component of + // the actor's resource name. + // This value should be 4-63 characters, and valid characters are + // /[a-z][0-9]-/. + string actor_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // The actor to create. + Actor actor = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// UpdateActorRequest is the request message for UpdateActor RPC. +message UpdateActorRequest { + // The actor to update. + // The actor's name field is used to specify the resource to update. + Actor actor = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. + google.protobuf.FieldMask update_mask = 2; +} + +// DeleteActorRequest is the request message for DeleteActor RPC. +message DeleteActorRequest { + // The resource name of the actor to delete. + // Format: stories/{story}/actors/{actor} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = {type: "webstory.googleapis.com/Actor"} + ]; +}