syntax = "proto3";

package pb;

import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";


import "person.proto";

option go_package = "github.com/itsscb/df/pb";

message UpdatePersonRequest {
    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
        json_schema: {
          title: "Update Person";
          description: "Update an Person";
          required: [
            "id"
            ];
        };
        example: "{\"id\": \"1\", \"firstname\": \"John\", \"lastname\": \"Doe\", \"phone\": \"\", \"street\": \"Death Star 3\", \"zip\": \"0816\", \"city\": \"Montana\", \"country\": \"Canada\", \"birthday\": \"1992-10-05T00:00:00Z\" }";
    };
    uint64 id = 1;
    optional string firstname = 2;
    optional string lastname = 3;
    optional string street = 4;
    optional string city = 5;
    optional string zip = 6;
    optional string country = 7;
    optional google.protobuf.Timestamp birthday = 8 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      example: "\"1990-10-05T00:00:00Z\""
  }];
}

message UpdatePersonResponse {
    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
        json_schema: {
          title: "Updated Person";
          description: "Returns the updated Person";
        };
    };
    Person person = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
      }];
}