syntax = "proto3"; import "google/protobuf/empty.proto"; import "google/protobuf/wrappers.proto"; package pet; option go_package = "github.com/hub335/petclinic-protobuf/pet"; service PetService { rpc RegisterPet(PetCreateRequest) returns (google.protobuf.StringValue); rpc GetPetByPid(google.protobuf.StringValue) returns (Pet); rpc GetPetsByPids(PetStringsRequest) returns (Pets); rpc GetAllPets(PetPageableRequest) returns (PetPageableResponse); rpc UpdatePet(PetUpdateRequest) returns (google.protobuf.BoolValue); rpc ConnectPetToOwner(PetOwnerRequest) returns (google.protobuf.BoolValue); rpc GetPetsForOwner(google.protobuf.StringValue) returns (Pets); rpc GetPetByPidForOwner(PetOwnerRequest) returns (Pet); rpc RegisterVisit(VisitRequest) returns (google.protobuf.StringValue); rpc Search(PetSearchFilter) returns (Pets); rpc GetAvailablePetTypes(PetTypePageableRequest) returns (PetTypePageableResponse); rpc AddPetType(google.protobuf.StringValue) returns (PetType); rpc SearchPetTypes(google.protobuf.StringValue) returns (PetTypes); rpc GetPetsByVisitVetPid(google.protobuf.StringValue) returns (Pets); } message PetCreateRequest { string birthdate = 1; string name = 2; string ownerPid = 3; PetType petType = 4; } message Pet { string birthDate = 1; string name = 2; string ownerPid = 3; string pid = 4; repeated Visit visits = 5; PetType petType = 6; string lastUpdated = 7; string lastUpdatedBy = 8; } message Pets { repeated Pet pets = 1; } message PetUpdateRequest { google.protobuf.StringValue birthDate = 1; google.protobuf.StringValue name = 2; string pid = 4; } message PetOwnerRequest { string petPid = 1; string ownerPid = 2; } message VisitRequest { string date = 1; string description = 2; string vetPid = 3; string petPid = 4; } message Visit { string date = 1; string description = 2; string vetPid = 3; string visitPid = 4; } message PetType { string name = 1; string pid = 2; } message PetTypes { repeated PetType petTypes = 1; } message PetStringsRequest { repeated string requests = 1; } message PetPageableRequest { google.protobuf.Int64Value numberPerPage = 1; google.protobuf.StringValue lastItemId = 2; } message PetPageableResponse { repeated Pet data = 1; google.protobuf.Int64Value numberPerPage = 2; google.protobuf.StringValue lastItemId = 3; google.protobuf.Int64Value total = 4; google.protobuf.Int64Value noOfItemsInBatch = 5; } message PetTypePageableRequest { google.protobuf.Int64Value numberPerPage = 1; google.protobuf.StringValue lastItemId = 2; } message PetTypePageableResponse { repeated PetType data = 1; google.protobuf.Int64Value numberPerPage = 2; google.protobuf.StringValue lastItemId = 3; google.protobuf.Int64Value total = 4; google.protobuf.Int64Value noOfItemsInBatch = 5; } message PetSearchFilter { google.protobuf.StringValue birthDate = 1; google.protobuf.StringValue name = 2; google.protobuf.StringValue ownerPid = 3; }