summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/pseudomuto/protoc-gen-doc/examples/proto/Customer.proto
blob: d640ac29620107ee33f27c7877662f23c8428dbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/// This file has messages for describing a customer.
syntax = "proto2";

import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto";

package com.example;

option ruby_package = "com.example.ruby";

// Use // or /** */ to document messages, fields and enums.

/**
 * Represents a mail address.
 */
message Address {
  required string address_line_1 = 1 [(validate.rules).string.min_len = 2]; /** First address line. */
  optional string address_line_2 = 2; /** Second address line. */
  optional string address_line_3 = 3; /** Second address line. */

  required string town    = 4; /// Address town.
  optional string county  = 5; /// Address county, if applicable.
  required string country = 6; /// Address country.
}

/**
 * Represents a customer.
 */
message Customer {
  required int32 id          = 1; /// Unique customer ID.
  required string first_name = 2; /// Customer first name.
  required string last_name  = 3; /// Customer last name.
  optional string details    = 4; /// Customer details.

  optional string email_address   = 5; /// Customer e-mail address.
  repeated string phone_number    = 6; /// Customer phone numbers, primary first.
  repeated Address mail_addresses = 7; /// Customer mail addresses, primary first.
}