syntax = "proto3";

package pb;

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

import "account.proto";

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

message UpdateAccountRequest {
    option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
        json_schema: {
          title: "Update Account";
          description: "Update an Account";
          required: [
            "email",
            "password"
            ];
        };
        example: "{\"account_id\": \"1\", \"email\": \"john.doe@example.com\"}";
    };
    uint64 account_id = 1;
    optional string email = 2;
    optional string password = 3;
}

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