syntax = "proto3";

package io.apicurio.registry.utils.protobuf.schema.syntax3.options;

option php_class_prefix = "Example";
option php_metadata_namespace = "ExampleOptionsSyntax2";
option php_namespace = "io.apicurio.registry.utils.protobuf.schema.syntax3.options.example";
option optimize_for = CODE_SIZE;

message Address {
  option no_standard_descriptor_accessor = true;
  string street = 1 [ctype = CORD];
  repeated int64 zipCode = 2 [jstype = JS_NUMBER];
  string state = 3 [json_name = "STATE OR PROVINCE"];
  string country = 4 [deprecated = true];

  message ShippingAddress {
    option no_standard_descriptor_accessor = false; //default is false
  }

  oneof test_oneof {
    string city = 5 [deprecated = false]; // default is false
    string county = 7 [ctype = STRING_PIECE];
  }
}

message Customer {
  option no_standard_descriptor_accessor = false; //default is false
  string name = 1 [ctype = STRING]; // default is STRING
  repeated int32 age = 2 [packed = true];
  repeated int64 phoneNumber = 3 [jstype = JS_NORMAL]; // default is JS_NORMAL
}

service OriginalService {
  rpc Foo(Customer) returns(Address) {
    option idempotency_level = IDEMPOTENT;
  };

  rpc Boo(Address) returns(Customer) {
    option idempotency_level = IDEMPOTENCY_UNKNOWN; // default is IDEMPOTENCY_UNKNOWN
  };
}