syntax = "proto3";

package productgalleries;

import "public_messages.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";  
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "CMSMicroservice.Protobuf.Protos.ProductGalleries";

service ProductGalleriesContract
{
    rpc CreateNewProductGalleries(CreateNewProductGalleriesRequest) returns (CreateNewProductGalleriesResponse){
        option (google.api.http) = {
            post: "/CreateNewProductGalleries"
            body: "*"
        };
    };
    rpc UpdateProductGalleries(UpdateProductGalleriesRequest) returns (google.protobuf.Empty){
        option (google.api.http) = {
            put: "/UpdateProductGalleries"
            body: "*"
        };
    };
    rpc DeleteProductGalleries(DeleteProductGalleriesRequest) returns (google.protobuf.Empty){
        option (google.api.http) = {
            delete: "/DeleteProductGalleries"
            body: "*"
        };
    };
    rpc GetProductGalleries(GetProductGalleriesRequest) returns (GetProductGalleriesResponse){
        option (google.api.http) = {
            get: "/GetProductGalleries"
            
        };
    };
    rpc GetAllProductGalleriesByFilter(GetAllProductGalleriesByFilterRequest) returns (GetAllProductGalleriesByFilterResponse){
        option (google.api.http) = {
            get: "/GetAllProductGalleriesByFilter"
            
        };
    };
}
message CreateNewProductGalleriesRequest
{
    int64 product_image_id = 1;
    int64 product_id = 2;
}
message CreateNewProductGalleriesResponse
{
    int64 id = 1;
}
message UpdateProductGalleriesRequest
{
    int64 id = 1;
    int64 product_image_id = 2;
    int64 product_id = 3;
}
message DeleteProductGalleriesRequest
{
    int64 id = 1;
}
message GetProductGalleriesRequest
{
    int64 id = 1;
}
message GetProductGalleriesResponse
{
    int64 id = 1;
    int64 product_image_id = 2;
    int64 product_id = 3;
}
message GetAllProductGalleriesByFilterRequest
{
    messages.PaginationState pagination_state = 1;
    google.protobuf.StringValue sort_by = 2;
    GetAllProductGalleriesByFilterFilter filter = 3;
}
message GetAllProductGalleriesByFilterFilter
{
    google.protobuf.Int64Value id = 1;
    google.protobuf.Int64Value product_image_id = 2;
    google.protobuf.Int64Value product_id = 3;
}
message GetAllProductGalleriesByFilterResponse
{
    messages.MetaData meta_data = 1;
    repeated GetAllProductGalleriesByFilterResponseModel models = 2;
}
message GetAllProductGalleriesByFilterResponseModel
{
    int64 id = 1;
    int64 product_image_id = 2;
    int64 product_id = 3;
}
