├── .gradle ├── 4.4 │ ├── fileChanges │ │ └── last-build.bin │ ├── fileHashes │ │ ├── fileHashes.bin │ │ └── fileHashes.lock │ └── taskHistory │ │ ├── taskHistory.bin │ │ └── taskHistory.lock └── buildOutputCleanup │ ├── buildOutputCleanup.lock │ ├── cache.properties │ └── outputFiles.bin ├── .idea ├── codeStyles │ └── codeStyleConfig.xml ├── dictionaries │ └── brent_wejrowski.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── misc.xml ├── vcs.xml └── workspace.xml ├── build.gradle ├── build ├── extracted-include-protos │ └── main │ │ └── google │ │ └── protobuf │ │ ├── any.proto │ │ ├── api.proto │ │ ├── compiler │ │ └── plugin.proto │ │ ├── descriptor.proto │ │ ├── duration.proto │ │ ├── empty.proto │ │ ├── field_mask.proto │ │ ├── source_context.proto │ │ ├── struct.proto │ │ ├── timestamp.proto │ │ ├── type.proto │ │ └── wrappers.proto └── generated │ └── source │ └── proto │ └── main │ ├── grpc │ ├── com │ │ └── proto │ │ │ └── dummy │ │ │ └── DummyServiceGrpc.java │ └── contactsapi │ │ ├── company │ │ └── CompanyServiceGrpc.java │ │ └── customfield │ │ └── CustomFieldServiceGrpc.java │ └── java │ ├── Contacts.java │ ├── com │ ├── google │ │ ├── api │ │ │ ├── AnnotationsProto.java │ │ │ ├── CustomHttpPattern.java │ │ │ ├── CustomHttpPatternOrBuilder.java │ │ │ ├── Http.java │ │ │ ├── HttpOrBuilder.java │ │ │ ├── HttpProto.java │ │ │ ├── HttpRule.java │ │ │ └── HttpRuleOrBuilder.java │ │ └── protobuf │ │ │ ├── FieldMask.java │ │ │ ├── FieldMaskOrBuilder.java │ │ │ └── FieldMaskProto.java │ └── proto │ │ └── dummy │ │ ├── Dummy.java │ │ ├── DummyMessage.java │ │ └── DummyMessageOrBuilder.java │ ├── contactsapi │ ├── company │ │ ├── Companies.java │ │ ├── CompanyResponse.java │ │ ├── CompanyResponseOrBuilder.java │ │ ├── CreateCompanyRequest.java │ │ ├── CreateCompanyRequestOrBuilder.java │ │ ├── DeleteCompanyRequest.java │ │ ├── DeleteCompanyRequestOrBuilder.java │ │ ├── GetCompaniesRequest.java │ │ ├── GetCompaniesRequestOrBuilder.java │ │ ├── GetCompanyRequest.java │ │ ├── GetCompanyRequestOrBuilder.java │ │ ├── ListCompaniesRequest.java │ │ ├── ListCompaniesRequestOrBuilder.java │ │ ├── ListCompaniesResponse.java │ │ ├── ListCompaniesResponseOrBuilder.java │ │ ├── UpdateCompanyRequest.java │ │ └── UpdateCompanyRequestOrBuilder.java │ └── customfield │ │ ├── CreateCustomFieldRequest.java │ │ ├── CreateCustomFieldRequestOrBuilder.java │ │ ├── CustomField.java │ │ ├── CustomFieldOrBuilder.java │ │ ├── Customfieldschema.java │ │ ├── DeleteCustomFieldRequest.java │ │ ├── DeleteCustomFieldRequestOrBuilder.java │ │ ├── GetCustomFieldRequest.java │ │ ├── GetCustomFieldRequestOrBuilder.java │ │ ├── ListCustomFieldsRequest.java │ │ ├── ListCustomFieldsRequestOrBuilder.java │ │ ├── ListCustomFieldsResponse.java │ │ ├── ListCustomFieldsResponseOrBuilder.java │ │ ├── UpdateCustomFieldRequest.java │ │ └── UpdateCustomFieldRequestOrBuilder.java │ └── google │ └── protobuf │ ├── FieldMaskOuterClass.java │ └── XfieldMask.java ├── entry.go ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── readme.md ├── settings.gradle └── src └── main ├── java └── contactsapi │ ├── company │ └── server │ │ └── CompanyServiceImpl.java │ ├── customfield │ └── server │ │ └── CustomFieldServiceImpl.java │ └── grpcserver │ └── ContactsApiServer.java └── proto ├── contactsapi ├── company │ ├── companies.pb.go │ ├── companies.pb.gw.go │ └── companies.proto ├── contact │ └── contacts.proto └── customfield │ ├── customfieldschema.pb.go │ ├── customfieldschema.pb.gw.go │ └── customfieldschema.proto ├── dummy.proto ├── google ├── api │ ├── annotations.proto │ └── http.proto └── protobuf │ └── field_mask.proto └── greet ├── greet.pb.go ├── greet.pb.gw.go └── greet.swagger.json /.gradle/4.4/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gradle/4.4/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wejrowski/grpc-gateway-java-gradle/e9958c4dcfd5b8ad2c08ee0e61d7ed61fe58f74d/.gradle/4.4/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /.gradle/4.4/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wejrowski/grpc-gateway-java-gradle/e9958c4dcfd5b8ad2c08ee0e61d7ed61fe58f74d/.gradle/4.4/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /.gradle/4.4/taskHistory/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wejrowski/grpc-gateway-java-gradle/e9958c4dcfd5b8ad2c08ee0e61d7ed61fe58f74d/.gradle/4.4/taskHistory/taskHistory.bin -------------------------------------------------------------------------------- /.gradle/4.4/taskHistory/taskHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wejrowski/grpc-gateway-java-gradle/e9958c4dcfd5b8ad2c08ee0e61d7ed61fe58f74d/.gradle/4.4/taskHistory/taskHistory.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wejrowski/grpc-gateway-java-gradle/e9958c4dcfd5b8ad2c08ee0e61d7ed61fe58f74d/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Mon Jun 04 11:43:51 MST 2018 2 | gradle.version=4.4 3 | -------------------------------------------------------------------------------- /.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wejrowski/grpc-gateway-java-gradle/e9958c4dcfd5b8ad2c08ee0e61d7ed61fe58f74d/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/dictionaries/brent_wejrowski.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.github.wejrowski.githubcourse' 2 | version '1.0-SNAPSHOT' 3 | 4 | apply plugin: 'java' 5 | apply plugin: 'idea' 6 | apply plugin: 'com.google.protobuf' 7 | 8 | sourceCompatibility = 1.8 9 | 10 | buildscript { 11 | repositories { 12 | mavenCentral() 13 | } 14 | dependencies { 15 | // ASSUMES GRADLE 2.12 OR HIGHER. Use plugin version 0.7.5 with earlier 16 | // gradle versions 17 | classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.5' 18 | } 19 | } 20 | 21 | 22 | repositories { 23 | mavenCentral() 24 | } 25 | 26 | dependencies { 27 | testCompile group: 'junit', name: 'junit', version: '4.12' 28 | 29 | // gRPC 30 | compile 'io.grpc:grpc-netty:1.12.0' 31 | compile 'io.grpc:grpc-protobuf:1.12.0' 32 | compile 'io.grpc:grpc-stub:1.12.0' 33 | } 34 | 35 | protobuf { 36 | protoc { 37 | artifact = "com.google.protobuf:protoc:3.5.1-1" 38 | } 39 | plugins { 40 | grpc { 41 | artifact = 'io.grpc:protoc-gen-grpc-java:1.12.0' 42 | } 43 | } 44 | generateProtoTasks { 45 | all()*.plugins { 46 | grpc {} 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/any.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option go_package = "github.com/golang/protobuf/ptypes/any"; 37 | option java_package = "com.google.protobuf"; 38 | option java_outer_classname = "AnyProto"; 39 | option java_multiple_files = true; 40 | option objc_class_prefix = "GPB"; 41 | 42 | // `Any` contains an arbitrary serialized protocol buffer message along with a 43 | // URL that describes the type of the serialized message. 44 | // 45 | // Protobuf library provides support to pack/unpack Any values in the form 46 | // of utility functions or additional generated methods of the Any type. 47 | // 48 | // Example 1: Pack and unpack a message in C++. 49 | // 50 | // Foo foo = ...; 51 | // Any any; 52 | // any.PackFrom(foo); 53 | // ... 54 | // if (any.UnpackTo(&foo)) { 55 | // ... 56 | // } 57 | // 58 | // Example 2: Pack and unpack a message in Java. 59 | // 60 | // Foo foo = ...; 61 | // Any any = Any.pack(foo); 62 | // ... 63 | // if (any.is(Foo.class)) { 64 | // foo = any.unpack(Foo.class); 65 | // } 66 | // 67 | // Example 3: Pack and unpack a message in Python. 68 | // 69 | // foo = Foo(...) 70 | // any = Any() 71 | // any.Pack(foo) 72 | // ... 73 | // if any.Is(Foo.DESCRIPTOR): 74 | // any.Unpack(foo) 75 | // ... 76 | // 77 | // Example 4: Pack and unpack a message in Go 78 | // 79 | // foo := &pb.Foo{...} 80 | // any, err := ptypes.MarshalAny(foo) 81 | // ... 82 | // foo := &pb.Foo{} 83 | // if err := ptypes.UnmarshalAny(any, foo); err != nil { 84 | // ... 85 | // } 86 | // 87 | // The pack methods provided by protobuf library will by default use 88 | // 'type.googleapis.com/full.type.name' as the type URL and the unpack 89 | // methods only use the fully qualified type name after the last '/' 90 | // in the type URL, for example "foo.bar.com/x/y.z" will yield type 91 | // name "y.z". 92 | // 93 | // 94 | // JSON 95 | // ==== 96 | // The JSON representation of an `Any` value uses the regular 97 | // representation of the deserialized, embedded message, with an 98 | // additional field `@type` which contains the type URL. Example: 99 | // 100 | // package google.profile; 101 | // message Person { 102 | // string first_name = 1; 103 | // string last_name = 2; 104 | // } 105 | // 106 | // { 107 | // "@type": "type.googleapis.com/google.profile.Person", 108 | // "firstName": , 109 | // "lastName": 110 | // } 111 | // 112 | // If the embedded message type is well-known and has a custom JSON 113 | // representation, that representation will be embedded adding a field 114 | // `value` which holds the custom JSON in addition to the `@type` 115 | // field. Example (for message [google.protobuf.Duration][]): 116 | // 117 | // { 118 | // "@type": "type.googleapis.com/google.protobuf.Duration", 119 | // "value": "1.212s" 120 | // } 121 | // 122 | message Any { 123 | // A URL/resource name whose content describes the type of the 124 | // serialized protocol buffer message. 125 | // 126 | // For URLs which use the scheme `http`, `https`, or no scheme, the 127 | // following restrictions and interpretations apply: 128 | // 129 | // * If no scheme is provided, `https` is assumed. 130 | // * The last segment of the URL's path must represent the fully 131 | // qualified name of the type (as in `path/google.protobuf.Duration`). 132 | // The name should be in a canonical form (e.g., leading "." is 133 | // not accepted). 134 | // * An HTTP GET on the URL must yield a [google.protobuf.Type][] 135 | // value in binary format, or produce an error. 136 | // * Applications are allowed to cache lookup results based on the 137 | // URL, or have them precompiled into a binary to avoid any 138 | // lookup. Therefore, binary compatibility needs to be preserved 139 | // on changes to types. (Use versioned type names to manage 140 | // breaking changes.) 141 | // 142 | // Schemes other than `http`, `https` (or the empty scheme) might be 143 | // used with implementation specific semantics. 144 | // 145 | string type_url = 1; 146 | 147 | // Must be a valid serialized protocol buffer of the above specified type. 148 | bytes value = 2; 149 | } 150 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/api.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | import "google/protobuf/source_context.proto"; 36 | import "google/protobuf/type.proto"; 37 | 38 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 39 | option java_package = "com.google.protobuf"; 40 | option java_outer_classname = "ApiProto"; 41 | option java_multiple_files = true; 42 | option objc_class_prefix = "GPB"; 43 | option go_package = "google.golang.org/genproto/protobuf/api;api"; 44 | 45 | // Api is a light-weight descriptor for an API Interface. 46 | // 47 | // Interfaces are also described as "protocol buffer services" in some contexts, 48 | // such as by the "service" keyword in a .proto file, but they are different 49 | // from API Services, which represent a concrete implementation of an interface 50 | // as opposed to simply a description of methods and bindings. They are also 51 | // sometimes simply referred to as "APIs" in other contexts, such as the name of 52 | // this message itself. See https://cloud.google.com/apis/design/glossary for 53 | // detailed terminology. 54 | message Api { 55 | 56 | // The fully qualified name of this interface, including package name 57 | // followed by the interface's simple name. 58 | string name = 1; 59 | 60 | // The methods of this interface, in unspecified order. 61 | repeated Method methods = 2; 62 | 63 | // Any metadata attached to the interface. 64 | repeated Option options = 3; 65 | 66 | // A version string for this interface. If specified, must have the form 67 | // `major-version.minor-version`, as in `1.10`. If the minor version is 68 | // omitted, it defaults to zero. If the entire version field is empty, the 69 | // major version is derived from the package name, as outlined below. If the 70 | // field is not empty, the version in the package name will be verified to be 71 | // consistent with what is provided here. 72 | // 73 | // The versioning schema uses [semantic 74 | // versioning](http://semver.org) where the major version number 75 | // indicates a breaking change and the minor version an additive, 76 | // non-breaking change. Both version numbers are signals to users 77 | // what to expect from different versions, and should be carefully 78 | // chosen based on the product plan. 79 | // 80 | // The major version is also reflected in the package name of the 81 | // interface, which must end in `v`, as in 82 | // `google.feature.v1`. For major versions 0 and 1, the suffix can 83 | // be omitted. Zero major versions must only be used for 84 | // experimental, non-GA interfaces. 85 | // 86 | // 87 | string version = 4; 88 | 89 | // Source context for the protocol buffer service represented by this 90 | // message. 91 | SourceContext source_context = 5; 92 | 93 | // Included interfaces. See [Mixin][]. 94 | repeated Mixin mixins = 6; 95 | 96 | // The source syntax of the service. 97 | Syntax syntax = 7; 98 | } 99 | 100 | // Method represents a method of an API interface. 101 | message Method { 102 | 103 | // The simple name of this method. 104 | string name = 1; 105 | 106 | // A URL of the input message type. 107 | string request_type_url = 2; 108 | 109 | // If true, the request is streamed. 110 | bool request_streaming = 3; 111 | 112 | // The URL of the output message type. 113 | string response_type_url = 4; 114 | 115 | // If true, the response is streamed. 116 | bool response_streaming = 5; 117 | 118 | // Any metadata attached to the method. 119 | repeated Option options = 6; 120 | 121 | // The source syntax of this method. 122 | Syntax syntax = 7; 123 | } 124 | 125 | // Declares an API Interface to be included in this interface. The including 126 | // interface must redeclare all the methods from the included interface, but 127 | // documentation and options are inherited as follows: 128 | // 129 | // - If after comment and whitespace stripping, the documentation 130 | // string of the redeclared method is empty, it will be inherited 131 | // from the original method. 132 | // 133 | // - Each annotation belonging to the service config (http, 134 | // visibility) which is not set in the redeclared method will be 135 | // inherited. 136 | // 137 | // - If an http annotation is inherited, the path pattern will be 138 | // modified as follows. Any version prefix will be replaced by the 139 | // version of the including interface plus the [root][] path if 140 | // specified. 141 | // 142 | // Example of a simple mixin: 143 | // 144 | // package google.acl.v1; 145 | // service AccessControl { 146 | // // Get the underlying ACL object. 147 | // rpc GetAcl(GetAclRequest) returns (Acl) { 148 | // option (google.api.http).get = "/v1/{resource=**}:getAcl"; 149 | // } 150 | // } 151 | // 152 | // package google.storage.v2; 153 | // service Storage { 154 | // rpc GetAcl(GetAclRequest) returns (Acl); 155 | // 156 | // // Get a data record. 157 | // rpc GetData(GetDataRequest) returns (Data) { 158 | // option (google.api.http).get = "/v2/{resource=**}"; 159 | // } 160 | // } 161 | // 162 | // Example of a mixin configuration: 163 | // 164 | // apis: 165 | // - name: google.storage.v2.Storage 166 | // mixins: 167 | // - name: google.acl.v1.AccessControl 168 | // 169 | // The mixin construct implies that all methods in `AccessControl` are 170 | // also declared with same name and request/response types in 171 | // `Storage`. A documentation generator or annotation processor will 172 | // see the effective `Storage.GetAcl` method after inherting 173 | // documentation and annotations as follows: 174 | // 175 | // service Storage { 176 | // // Get the underlying ACL object. 177 | // rpc GetAcl(GetAclRequest) returns (Acl) { 178 | // option (google.api.http).get = "/v2/{resource=**}:getAcl"; 179 | // } 180 | // ... 181 | // } 182 | // 183 | // Note how the version in the path pattern changed from `v1` to `v2`. 184 | // 185 | // If the `root` field in the mixin is specified, it should be a 186 | // relative path under which inherited HTTP paths are placed. Example: 187 | // 188 | // apis: 189 | // - name: google.storage.v2.Storage 190 | // mixins: 191 | // - name: google.acl.v1.AccessControl 192 | // root: acls 193 | // 194 | // This implies the following inherited HTTP annotation: 195 | // 196 | // service Storage { 197 | // // Get the underlying ACL object. 198 | // rpc GetAcl(GetAclRequest) returns (Acl) { 199 | // option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; 200 | // } 201 | // ... 202 | // } 203 | message Mixin { 204 | // The fully qualified name of the interface which is included. 205 | string name = 1; 206 | 207 | // If non-empty specifies a path under which inherited HTTP paths 208 | // are rooted. 209 | string root = 2; 210 | } 211 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/compiler/plugin.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // 33 | // WARNING: The plugin interface is currently EXPERIMENTAL and is subject to 34 | // change. 35 | // 36 | // protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is 37 | // just a program that reads a CodeGeneratorRequest from stdin and writes a 38 | // CodeGeneratorResponse to stdout. 39 | // 40 | // Plugins written using C++ can use google/protobuf/compiler/plugin.h instead 41 | // of dealing with the raw protocol defined here. 42 | // 43 | // A plugin executable needs only to be placed somewhere in the path. The 44 | // plugin should be named "protoc-gen-$NAME", and will then be used when the 45 | // flag "--${NAME}_out" is passed to protoc. 46 | 47 | syntax = "proto2"; 48 | package google.protobuf.compiler; 49 | option java_package = "com.google.protobuf.compiler"; 50 | option java_outer_classname = "PluginProtos"; 51 | 52 | option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go"; 53 | 54 | import "google/protobuf/descriptor.proto"; 55 | 56 | // The version number of protocol compiler. 57 | message Version { 58 | optional int32 major = 1; 59 | optional int32 minor = 2; 60 | optional int32 patch = 3; 61 | // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should 62 | // be empty for mainline stable releases. 63 | optional string suffix = 4; 64 | } 65 | 66 | // An encoded CodeGeneratorRequest is written to the plugin's stdin. 67 | message CodeGeneratorRequest { 68 | // The .proto files that were explicitly listed on the command-line. The 69 | // code generator should generate code only for these files. Each file's 70 | // descriptor will be included in proto_file, below. 71 | repeated string file_to_generate = 1; 72 | 73 | // The generator parameter passed on the command-line. 74 | optional string parameter = 2; 75 | 76 | // FileDescriptorProtos for all files in files_to_generate and everything 77 | // they import. The files will appear in topological order, so each file 78 | // appears before any file that imports it. 79 | // 80 | // protoc guarantees that all proto_files will be written after 81 | // the fields above, even though this is not technically guaranteed by the 82 | // protobuf wire format. This theoretically could allow a plugin to stream 83 | // in the FileDescriptorProtos and handle them one by one rather than read 84 | // the entire set into memory at once. However, as of this writing, this 85 | // is not similarly optimized on protoc's end -- it will store all fields in 86 | // memory at once before sending them to the plugin. 87 | // 88 | // Type names of fields and extensions in the FileDescriptorProto are always 89 | // fully qualified. 90 | repeated FileDescriptorProto proto_file = 15; 91 | 92 | // The version number of protocol compiler. 93 | optional Version compiler_version = 3; 94 | 95 | } 96 | 97 | // The plugin writes an encoded CodeGeneratorResponse to stdout. 98 | message CodeGeneratorResponse { 99 | // Error message. If non-empty, code generation failed. The plugin process 100 | // should exit with status code zero even if it reports an error in this way. 101 | // 102 | // This should be used to indicate errors in .proto files which prevent the 103 | // code generator from generating correct code. Errors which indicate a 104 | // problem in protoc itself -- such as the input CodeGeneratorRequest being 105 | // unparseable -- should be reported by writing a message to stderr and 106 | // exiting with a non-zero status code. 107 | optional string error = 1; 108 | 109 | // Represents a single generated file. 110 | message File { 111 | // The file name, relative to the output directory. The name must not 112 | // contain "." or ".." components and must be relative, not be absolute (so, 113 | // the file cannot lie outside the output directory). "/" must be used as 114 | // the path separator, not "\". 115 | // 116 | // If the name is omitted, the content will be appended to the previous 117 | // file. This allows the generator to break large files into small chunks, 118 | // and allows the generated text to be streamed back to protoc so that large 119 | // files need not reside completely in memory at one time. Note that as of 120 | // this writing protoc does not optimize for this -- it will read the entire 121 | // CodeGeneratorResponse before writing files to disk. 122 | optional string name = 1; 123 | 124 | // If non-empty, indicates that the named file should already exist, and the 125 | // content here is to be inserted into that file at a defined insertion 126 | // point. This feature allows a code generator to extend the output 127 | // produced by another code generator. The original generator may provide 128 | // insertion points by placing special annotations in the file that look 129 | // like: 130 | // @@protoc_insertion_point(NAME) 131 | // The annotation can have arbitrary text before and after it on the line, 132 | // which allows it to be placed in a comment. NAME should be replaced with 133 | // an identifier naming the point -- this is what other generators will use 134 | // as the insertion_point. Code inserted at this point will be placed 135 | // immediately above the line containing the insertion point (thus multiple 136 | // insertions to the same point will come out in the order they were added). 137 | // The double-@ is intended to make it unlikely that the generated code 138 | // could contain things that look like insertion points by accident. 139 | // 140 | // For example, the C++ code generator places the following line in the 141 | // .pb.h files that it generates: 142 | // // @@protoc_insertion_point(namespace_scope) 143 | // This line appears within the scope of the file's package namespace, but 144 | // outside of any particular class. Another plugin can then specify the 145 | // insertion_point "namespace_scope" to generate additional classes or 146 | // other declarations that should be placed in this scope. 147 | // 148 | // Note that if the line containing the insertion point begins with 149 | // whitespace, the same whitespace will be added to every line of the 150 | // inserted text. This is useful for languages like Python, where 151 | // indentation matters. In these languages, the insertion point comment 152 | // should be indented the same amount as any inserted code will need to be 153 | // in order to work correctly in that context. 154 | // 155 | // The code generator that generates the initial file and the one which 156 | // inserts into it must both run as part of a single invocation of protoc. 157 | // Code generators are executed in the order in which they appear on the 158 | // command line. 159 | // 160 | // If |insertion_point| is present, |name| must also be present. 161 | optional string insertion_point = 2; 162 | 163 | // The file contents. 164 | optional string content = 15; 165 | } 166 | repeated File file = 15; 167 | } 168 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/duration.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/duration"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "DurationProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // A Duration represents a signed, fixed-length span of time represented 44 | // as a count of seconds and fractions of seconds at nanosecond 45 | // resolution. It is independent of any calendar and concepts like "day" 46 | // or "month". It is related to Timestamp in that the difference between 47 | // two Timestamp values is a Duration and it can be added or subtracted 48 | // from a Timestamp. Range is approximately +-10,000 years. 49 | // 50 | // # Examples 51 | // 52 | // Example 1: Compute Duration from two Timestamps in pseudo code. 53 | // 54 | // Timestamp start = ...; 55 | // Timestamp end = ...; 56 | // Duration duration = ...; 57 | // 58 | // duration.seconds = end.seconds - start.seconds; 59 | // duration.nanos = end.nanos - start.nanos; 60 | // 61 | // if (duration.seconds < 0 && duration.nanos > 0) { 62 | // duration.seconds += 1; 63 | // duration.nanos -= 1000000000; 64 | // } else if (durations.seconds > 0 && duration.nanos < 0) { 65 | // duration.seconds -= 1; 66 | // duration.nanos += 1000000000; 67 | // } 68 | // 69 | // Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 70 | // 71 | // Timestamp start = ...; 72 | // Duration duration = ...; 73 | // Timestamp end = ...; 74 | // 75 | // end.seconds = start.seconds + duration.seconds; 76 | // end.nanos = start.nanos + duration.nanos; 77 | // 78 | // if (end.nanos < 0) { 79 | // end.seconds -= 1; 80 | // end.nanos += 1000000000; 81 | // } else if (end.nanos >= 1000000000) { 82 | // end.seconds += 1; 83 | // end.nanos -= 1000000000; 84 | // } 85 | // 86 | // Example 3: Compute Duration from datetime.timedelta in Python. 87 | // 88 | // td = datetime.timedelta(days=3, minutes=10) 89 | // duration = Duration() 90 | // duration.FromTimedelta(td) 91 | // 92 | // # JSON Mapping 93 | // 94 | // In JSON format, the Duration type is encoded as a string rather than an 95 | // object, where the string ends in the suffix "s" (indicating seconds) and 96 | // is preceded by the number of seconds, with nanoseconds expressed as 97 | // fractional seconds. For example, 3 seconds with 0 nanoseconds should be 98 | // encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should 99 | // be expressed in JSON format as "3.000000001s", and 3 seconds and 1 100 | // microsecond should be expressed in JSON format as "3.000001s". 101 | // 102 | // 103 | message Duration { 104 | 105 | // Signed seconds of the span of time. Must be from -315,576,000,000 106 | // to +315,576,000,000 inclusive. Note: these bounds are computed from: 107 | // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 108 | int64 seconds = 1; 109 | 110 | // Signed fractions of a second at nanosecond resolution of the span 111 | // of time. Durations less than one second are represented with a 0 112 | // `seconds` field and a positive or negative `nanos` field. For durations 113 | // of one second or more, a non-zero value for the `nanos` field must be 114 | // of the same sign as the `seconds` field. Must be from -999,999,999 115 | // to +999,999,999 inclusive. 116 | int32 nanos = 2; 117 | } 118 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/empty.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option go_package = "github.com/golang/protobuf/ptypes/empty"; 37 | option java_package = "com.google.protobuf"; 38 | option java_outer_classname = "EmptyProto"; 39 | option java_multiple_files = true; 40 | option objc_class_prefix = "GPB"; 41 | option cc_enable_arenas = true; 42 | 43 | // A generic empty message that you can re-use to avoid defining duplicated 44 | // empty messages in your APIs. A typical example is to use it as the request 45 | // or the response type of an API method. For instance: 46 | // 47 | // service Foo { 48 | // rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 49 | // } 50 | // 51 | // The JSON representation for `Empty` is empty JSON object `{}`. 52 | message Empty {} 53 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/field_mask.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option java_package = "com.google.protobuf"; 37 | option java_outer_classname = "FieldMaskProto"; 38 | option java_multiple_files = true; 39 | option objc_class_prefix = "GPB"; 40 | option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask"; 41 | 42 | // `FieldMask` represents a set of symbolic field paths, for example: 43 | // 44 | // paths: "f.a" 45 | // paths: "f.b.d" 46 | // 47 | // Here `f` represents a field in some root message, `a` and `b` 48 | // fields in the message found in `f`, and `d` a field found in the 49 | // message in `f.b`. 50 | // 51 | // Field masks are used to specify a subset of fields that should be 52 | // returned by a get operation or modified by an update operation. 53 | // Field masks also have a custom JSON encoding (see below). 54 | // 55 | // # Field Masks in Projections 56 | // 57 | // When used in the context of a projection, a response message or 58 | // sub-message is filtered by the API to only contain those fields as 59 | // specified in the mask. For example, if the mask in the previous 60 | // example is applied to a response message as follows: 61 | // 62 | // f { 63 | // a : 22 64 | // b { 65 | // d : 1 66 | // x : 2 67 | // } 68 | // y : 13 69 | // } 70 | // z: 8 71 | // 72 | // The result will not contain specific values for fields x,y and z 73 | // (their value will be set to the default, and omitted in proto text 74 | // output): 75 | // 76 | // 77 | // f { 78 | // a : 22 79 | // b { 80 | // d : 1 81 | // } 82 | // } 83 | // 84 | // A repeated field is not allowed except at the last position of a 85 | // paths string. 86 | // 87 | // If a FieldMask object is not present in a get operation, the 88 | // operation applies to all fields (as if a FieldMask of all fields 89 | // had been specified). 90 | // 91 | // Note that a field mask does not necessarily apply to the 92 | // top-level response message. In case of a REST get operation, the 93 | // field mask applies directly to the response, but in case of a REST 94 | // list operation, the mask instead applies to each individual message 95 | // in the returned resource list. In case of a REST custom method, 96 | // other definitions may be used. Where the mask applies will be 97 | // clearly documented together with its declaration in the API. In 98 | // any case, the effect on the returned resource/resources is required 99 | // behavior for APIs. 100 | // 101 | // # Field Masks in Update Operations 102 | // 103 | // A field mask in update operations specifies which fields of the 104 | // targeted resource are going to be updated. The API is required 105 | // to only change the values of the fields as specified in the mask 106 | // and leave the others untouched. If a resource is passed in to 107 | // describe the updated values, the API ignores the values of all 108 | // fields not covered by the mask. 109 | // 110 | // If a repeated field is specified for an update operation, the existing 111 | // repeated values in the target resource will be overwritten by the new values. 112 | // Note that a repeated field is only allowed in the last position of a `paths` 113 | // string. 114 | // 115 | // If a sub-message is specified in the last position of the field mask for an 116 | // update operation, then the existing sub-message in the target resource is 117 | // overwritten. Given the target message: 118 | // 119 | // f { 120 | // b { 121 | // d : 1 122 | // x : 2 123 | // } 124 | // c : 1 125 | // } 126 | // 127 | // And an update message: 128 | // 129 | // f { 130 | // b { 131 | // d : 10 132 | // } 133 | // } 134 | // 135 | // then if the field mask is: 136 | // 137 | // paths: "f.b" 138 | // 139 | // then the result will be: 140 | // 141 | // f { 142 | // b { 143 | // d : 10 144 | // } 145 | // c : 1 146 | // } 147 | // 148 | // However, if the update mask was: 149 | // 150 | // paths: "f.b.d" 151 | // 152 | // then the result would be: 153 | // 154 | // f { 155 | // b { 156 | // d : 10 157 | // x : 2 158 | // } 159 | // c : 1 160 | // } 161 | // 162 | // In order to reset a field's value to the default, the field must 163 | // be in the mask and set to the default value in the provided resource. 164 | // Hence, in order to reset all fields of a resource, provide a default 165 | // instance of the resource and set all fields in the mask, or do 166 | // not provide a mask as described below. 167 | // 168 | // If a field mask is not present on update, the operation applies to 169 | // all fields (as if a field mask of all fields has been specified). 170 | // Note that in the presence of schema evolution, this may mean that 171 | // fields the client does not know and has therefore not filled into 172 | // the request will be reset to their default. If this is unwanted 173 | // behavior, a specific service may require a client to always specify 174 | // a field mask, producing an error if not. 175 | // 176 | // As with get operations, the location of the resource which 177 | // describes the updated values in the request message depends on the 178 | // operation kind. In any case, the effect of the field mask is 179 | // required to be honored by the API. 180 | // 181 | // ## Considerations for HTTP REST 182 | // 183 | // The HTTP kind of an update operation which uses a field mask must 184 | // be set to PATCH instead of PUT in order to satisfy HTTP semantics 185 | // (PUT must only be used for full updates). 186 | // 187 | // # JSON Encoding of Field Masks 188 | // 189 | // In JSON, a field mask is encoded as a single string where paths are 190 | // separated by a comma. Fields name in each path are converted 191 | // to/from lower-camel naming conventions. 192 | // 193 | // As an example, consider the following message declarations: 194 | // 195 | // message Profile { 196 | // User user = 1; 197 | // Photo photo = 2; 198 | // } 199 | // message User { 200 | // string display_name = 1; 201 | // string address = 2; 202 | // } 203 | // 204 | // In proto a field mask for `Profile` may look as such: 205 | // 206 | // mask { 207 | // paths: "user.display_name" 208 | // paths: "photo" 209 | // } 210 | // 211 | // In JSON, the same mask is represented as below: 212 | // 213 | // { 214 | // mask: "user.displayName,photo" 215 | // } 216 | // 217 | // # Field Masks and Oneof Fields 218 | // 219 | // Field masks treat fields in oneofs just as regular fields. Consider the 220 | // following message: 221 | // 222 | // message SampleMessage { 223 | // oneof test_oneof { 224 | // string name = 4; 225 | // SubMessage sub_message = 9; 226 | // } 227 | // } 228 | // 229 | // The field mask can be: 230 | // 231 | // mask { 232 | // paths: "name" 233 | // } 234 | // 235 | // Or: 236 | // 237 | // mask { 238 | // paths: "sub_message" 239 | // } 240 | // 241 | // Note that oneof type names ("test_oneof" in this case) cannot be used in 242 | // paths. 243 | // 244 | // ## Field Mask Verification 245 | // 246 | // The implementation of the all the API methods, which have any FieldMask type 247 | // field in the request, should verify the included field paths, and return 248 | // `INVALID_ARGUMENT` error if any path is duplicated or unmappable. 249 | message FieldMask { 250 | // The set of field mask paths. 251 | repeated string paths = 1; 252 | } 253 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/source_context.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option java_package = "com.google.protobuf"; 37 | option java_outer_classname = "SourceContextProto"; 38 | option java_multiple_files = true; 39 | option objc_class_prefix = "GPB"; 40 | option go_package = "google.golang.org/genproto/protobuf/source_context;source_context"; 41 | 42 | // `SourceContext` represents information about the source of a 43 | // protobuf element, like the file in which it is defined. 44 | message SourceContext { 45 | // The path-qualified name of the .proto file that contained the associated 46 | // protobuf element. For example: `"google/protobuf/source_context.proto"`. 47 | string file_name = 1; 48 | } 49 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/struct.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "StructProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | 44 | // `Struct` represents a structured data value, consisting of fields 45 | // which map to dynamically typed values. In some languages, `Struct` 46 | // might be supported by a native representation. For example, in 47 | // scripting languages like JS a struct is represented as an 48 | // object. The details of that representation are described together 49 | // with the proto support for the language. 50 | // 51 | // The JSON representation for `Struct` is JSON object. 52 | message Struct { 53 | // Unordered map of dynamically typed values. 54 | map fields = 1; 55 | } 56 | 57 | // `Value` represents a dynamically typed value which can be either 58 | // null, a number, a string, a boolean, a recursive struct value, or a 59 | // list of values. A producer of value is expected to set one of that 60 | // variants, absence of any variant indicates an error. 61 | // 62 | // The JSON representation for `Value` is JSON value. 63 | message Value { 64 | // The kind of value. 65 | oneof kind { 66 | // Represents a null value. 67 | NullValue null_value = 1; 68 | // Represents a double value. 69 | double number_value = 2; 70 | // Represents a string value. 71 | string string_value = 3; 72 | // Represents a boolean value. 73 | bool bool_value = 4; 74 | // Represents a structured value. 75 | Struct struct_value = 5; 76 | // Represents a repeated `Value`. 77 | ListValue list_value = 6; 78 | } 79 | } 80 | 81 | // `NullValue` is a singleton enumeration to represent the null value for the 82 | // `Value` type union. 83 | // 84 | // The JSON representation for `NullValue` is JSON `null`. 85 | enum NullValue { 86 | // Null value. 87 | NULL_VALUE = 0; 88 | } 89 | 90 | // `ListValue` is a wrapper around a repeated field of values. 91 | // 92 | // The JSON representation for `ListValue` is JSON array. 93 | message ListValue { 94 | // Repeated field of dynamically typed values. 95 | repeated Value values = 1; 96 | } 97 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/timestamp.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | option cc_enable_arenas = true; 37 | option go_package = "github.com/golang/protobuf/ptypes/timestamp"; 38 | option java_package = "com.google.protobuf"; 39 | option java_outer_classname = "TimestampProto"; 40 | option java_multiple_files = true; 41 | option objc_class_prefix = "GPB"; 42 | 43 | // A Timestamp represents a point in time independent of any time zone 44 | // or calendar, represented as seconds and fractions of seconds at 45 | // nanosecond resolution in UTC Epoch time. It is encoded using the 46 | // Proleptic Gregorian Calendar which extends the Gregorian calendar 47 | // backwards to year one. It is encoded assuming all minutes are 60 48 | // seconds long, i.e. leap seconds are "smeared" so that no leap second 49 | // table is needed for interpretation. Range is from 50 | // 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. 51 | // By restricting to that range, we ensure that we can convert to 52 | // and from RFC 3339 date strings. 53 | // See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). 54 | // 55 | // # Examples 56 | // 57 | // Example 1: Compute Timestamp from POSIX `time()`. 58 | // 59 | // Timestamp timestamp; 60 | // timestamp.set_seconds(time(NULL)); 61 | // timestamp.set_nanos(0); 62 | // 63 | // Example 2: Compute Timestamp from POSIX `gettimeofday()`. 64 | // 65 | // struct timeval tv; 66 | // gettimeofday(&tv, NULL); 67 | // 68 | // Timestamp timestamp; 69 | // timestamp.set_seconds(tv.tv_sec); 70 | // timestamp.set_nanos(tv.tv_usec * 1000); 71 | // 72 | // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 73 | // 74 | // FILETIME ft; 75 | // GetSystemTimeAsFileTime(&ft); 76 | // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 77 | // 78 | // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z 79 | // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. 80 | // Timestamp timestamp; 81 | // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); 82 | // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 83 | // 84 | // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 85 | // 86 | // long millis = System.currentTimeMillis(); 87 | // 88 | // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) 89 | // .setNanos((int) ((millis % 1000) * 1000000)).build(); 90 | // 91 | // 92 | // Example 5: Compute Timestamp from current time in Python. 93 | // 94 | // timestamp = Timestamp() 95 | // timestamp.GetCurrentTime() 96 | // 97 | // # JSON Mapping 98 | // 99 | // In JSON format, the Timestamp type is encoded as a string in the 100 | // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the 101 | // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" 102 | // where {year} is always expressed using four digits while {month}, {day}, 103 | // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional 104 | // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), 105 | // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone 106 | // is required, though only UTC (as indicated by "Z") is presently supported. 107 | // 108 | // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 109 | // 01:30 UTC on January 15, 2017. 110 | // 111 | // In JavaScript, one can convert a Date object to this format using the 112 | // standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] 113 | // method. In Python, a standard `datetime.datetime` object can be converted 114 | // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) 115 | // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one 116 | // can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( 117 | // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--) 118 | // to obtain a formatter capable of generating timestamps in this format. 119 | // 120 | // 121 | message Timestamp { 122 | 123 | // Represents seconds of UTC time since Unix epoch 124 | // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 125 | // 9999-12-31T23:59:59Z inclusive. 126 | int64 seconds = 1; 127 | 128 | // Non-negative fractions of a second at nanosecond resolution. Negative 129 | // second values with fractions must still have non-negative nanos values 130 | // that count forward in time. Must be from 0 to 999,999,999 131 | // inclusive. 132 | int32 nanos = 2; 133 | } 134 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/type.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | import "google/protobuf/any.proto"; 36 | import "google/protobuf/source_context.proto"; 37 | 38 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 39 | option cc_enable_arenas = true; 40 | option java_package = "com.google.protobuf"; 41 | option java_outer_classname = "TypeProto"; 42 | option java_multiple_files = true; 43 | option objc_class_prefix = "GPB"; 44 | option go_package = "google.golang.org/genproto/protobuf/ptype;ptype"; 45 | 46 | // A protocol buffer message type. 47 | message Type { 48 | // The fully qualified message name. 49 | string name = 1; 50 | // The list of fields. 51 | repeated Field fields = 2; 52 | // The list of types appearing in `oneof` definitions in this type. 53 | repeated string oneofs = 3; 54 | // The protocol buffer options. 55 | repeated Option options = 4; 56 | // The source context. 57 | SourceContext source_context = 5; 58 | // The source syntax. 59 | Syntax syntax = 6; 60 | } 61 | 62 | // A single field of a message type. 63 | message Field { 64 | // Basic field types. 65 | enum Kind { 66 | // Field type unknown. 67 | TYPE_UNKNOWN = 0; 68 | // Field type double. 69 | TYPE_DOUBLE = 1; 70 | // Field type float. 71 | TYPE_FLOAT = 2; 72 | // Field type int64. 73 | TYPE_INT64 = 3; 74 | // Field type uint64. 75 | TYPE_UINT64 = 4; 76 | // Field type int32. 77 | TYPE_INT32 = 5; 78 | // Field type fixed64. 79 | TYPE_FIXED64 = 6; 80 | // Field type fixed32. 81 | TYPE_FIXED32 = 7; 82 | // Field type bool. 83 | TYPE_BOOL = 8; 84 | // Field type string. 85 | TYPE_STRING = 9; 86 | // Field type group. Proto2 syntax only, and deprecated. 87 | TYPE_GROUP = 10; 88 | // Field type message. 89 | TYPE_MESSAGE = 11; 90 | // Field type bytes. 91 | TYPE_BYTES = 12; 92 | // Field type uint32. 93 | TYPE_UINT32 = 13; 94 | // Field type enum. 95 | TYPE_ENUM = 14; 96 | // Field type sfixed32. 97 | TYPE_SFIXED32 = 15; 98 | // Field type sfixed64. 99 | TYPE_SFIXED64 = 16; 100 | // Field type sint32. 101 | TYPE_SINT32 = 17; 102 | // Field type sint64. 103 | TYPE_SINT64 = 18; 104 | }; 105 | 106 | // Whether a field is optional, required, or repeated. 107 | enum Cardinality { 108 | // For fields with unknown cardinality. 109 | CARDINALITY_UNKNOWN = 0; 110 | // For optional fields. 111 | CARDINALITY_OPTIONAL = 1; 112 | // For required fields. Proto2 syntax only. 113 | CARDINALITY_REQUIRED = 2; 114 | // For repeated fields. 115 | CARDINALITY_REPEATED = 3; 116 | }; 117 | 118 | // The field type. 119 | Kind kind = 1; 120 | // The field cardinality. 121 | Cardinality cardinality = 2; 122 | // The field number. 123 | int32 number = 3; 124 | // The field name. 125 | string name = 4; 126 | // The field type URL, without the scheme, for message or enumeration 127 | // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. 128 | string type_url = 6; 129 | // The index of the field type in `Type.oneofs`, for message or enumeration 130 | // types. The first type has index 1; zero means the type is not in the list. 131 | int32 oneof_index = 7; 132 | // Whether to use alternative packed wire representation. 133 | bool packed = 8; 134 | // The protocol buffer options. 135 | repeated Option options = 9; 136 | // The field JSON name. 137 | string json_name = 10; 138 | // The string value of the default value of this field. Proto2 syntax only. 139 | string default_value = 11; 140 | } 141 | 142 | // Enum type definition. 143 | message Enum { 144 | // Enum type name. 145 | string name = 1; 146 | // Enum value definitions. 147 | repeated EnumValue enumvalue = 2; 148 | // Protocol buffer options. 149 | repeated Option options = 3; 150 | // The source context. 151 | SourceContext source_context = 4; 152 | // The source syntax. 153 | Syntax syntax = 5; 154 | } 155 | 156 | // Enum value definition. 157 | message EnumValue { 158 | // Enum value name. 159 | string name = 1; 160 | // Enum value number. 161 | int32 number = 2; 162 | // Protocol buffer options. 163 | repeated Option options = 3; 164 | } 165 | 166 | // A protocol buffer option, which can be attached to a message, field, 167 | // enumeration, etc. 168 | message Option { 169 | // The option's name. For protobuf built-in options (options defined in 170 | // descriptor.proto), this is the short name. For example, `"map_entry"`. 171 | // For custom options, it should be the fully-qualified name. For example, 172 | // `"google.api.http"`. 173 | string name = 1; 174 | // The option's value packed in an Any message. If the value is a primitive, 175 | // the corresponding wrapper type defined in google/protobuf/wrappers.proto 176 | // should be used. If the value is an enum, it should be stored as an int32 177 | // value using the google.protobuf.Int32Value type. 178 | Any value = 2; 179 | } 180 | 181 | // The syntax in which a protocol buffer element is defined. 182 | enum Syntax { 183 | // Syntax `proto2`. 184 | SYNTAX_PROTO2 = 0; 185 | // Syntax `proto3`. 186 | SYNTAX_PROTO3 = 1; 187 | } 188 | -------------------------------------------------------------------------------- /build/extracted-include-protos/main/google/protobuf/wrappers.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Wrappers for primitive (non-message) types. These types are useful 32 | // for embedding primitives in the `google.protobuf.Any` type and for places 33 | // where we need to distinguish between the absence of a primitive 34 | // typed field and its default value. 35 | 36 | syntax = "proto3"; 37 | 38 | package google.protobuf; 39 | 40 | option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 41 | option cc_enable_arenas = true; 42 | option go_package = "github.com/golang/protobuf/ptypes/wrappers"; 43 | option java_package = "com.google.protobuf"; 44 | option java_outer_classname = "WrappersProto"; 45 | option java_multiple_files = true; 46 | option objc_class_prefix = "GPB"; 47 | 48 | // Wrapper message for `double`. 49 | // 50 | // The JSON representation for `DoubleValue` is JSON number. 51 | message DoubleValue { 52 | // The double value. 53 | double value = 1; 54 | } 55 | 56 | // Wrapper message for `float`. 57 | // 58 | // The JSON representation for `FloatValue` is JSON number. 59 | message FloatValue { 60 | // The float value. 61 | float value = 1; 62 | } 63 | 64 | // Wrapper message for `int64`. 65 | // 66 | // The JSON representation for `Int64Value` is JSON string. 67 | message Int64Value { 68 | // The int64 value. 69 | int64 value = 1; 70 | } 71 | 72 | // Wrapper message for `uint64`. 73 | // 74 | // The JSON representation for `UInt64Value` is JSON string. 75 | message UInt64Value { 76 | // The uint64 value. 77 | uint64 value = 1; 78 | } 79 | 80 | // Wrapper message for `int32`. 81 | // 82 | // The JSON representation for `Int32Value` is JSON number. 83 | message Int32Value { 84 | // The int32 value. 85 | int32 value = 1; 86 | } 87 | 88 | // Wrapper message for `uint32`. 89 | // 90 | // The JSON representation for `UInt32Value` is JSON number. 91 | message UInt32Value { 92 | // The uint32 value. 93 | uint32 value = 1; 94 | } 95 | 96 | // Wrapper message for `bool`. 97 | // 98 | // The JSON representation for `BoolValue` is JSON `true` and `false`. 99 | message BoolValue { 100 | // The bool value. 101 | bool value = 1; 102 | } 103 | 104 | // Wrapper message for `string`. 105 | // 106 | // The JSON representation for `StringValue` is JSON string. 107 | message StringValue { 108 | // The string value. 109 | string value = 1; 110 | } 111 | 112 | // Wrapper message for `bytes`. 113 | // 114 | // The JSON representation for `BytesValue` is JSON string. 115 | message BytesValue { 116 | // The bytes value. 117 | bytes value = 1; 118 | } 119 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/grpc/com/proto/dummy/DummyServiceGrpc.java: -------------------------------------------------------------------------------- 1 | package com.proto.dummy; 2 | 3 | import static io.grpc.MethodDescriptor.generateFullMethodName; 4 | import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; 5 | import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; 6 | import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; 7 | import static io.grpc.stub.ClientCalls.asyncUnaryCall; 8 | import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; 9 | import static io.grpc.stub.ClientCalls.blockingUnaryCall; 10 | import static io.grpc.stub.ClientCalls.futureUnaryCall; 11 | import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; 12 | import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; 13 | import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; 14 | import static io.grpc.stub.ServerCalls.asyncUnaryCall; 15 | import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; 16 | import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; 17 | 18 | /** 19 | */ 20 | @javax.annotation.Generated( 21 | value = "by gRPC proto compiler (version 1.12.0)", 22 | comments = "Source: dummy.proto") 23 | public final class DummyServiceGrpc { 24 | 25 | private DummyServiceGrpc() {} 26 | 27 | public static final String SERVICE_NAME = "dummy.DummyService"; 28 | 29 | // Static method descriptors that strictly reflect the proto. 30 | 31 | /** 32 | * Creates a new async stub that supports all call types for the service 33 | */ 34 | public static DummyServiceStub newStub(io.grpc.Channel channel) { 35 | return new DummyServiceStub(channel); 36 | } 37 | 38 | /** 39 | * Creates a new blocking-style stub that supports unary and streaming output calls on the service 40 | */ 41 | public static DummyServiceBlockingStub newBlockingStub( 42 | io.grpc.Channel channel) { 43 | return new DummyServiceBlockingStub(channel); 44 | } 45 | 46 | /** 47 | * Creates a new ListenableFuture-style stub that supports unary calls on the service 48 | */ 49 | public static DummyServiceFutureStub newFutureStub( 50 | io.grpc.Channel channel) { 51 | return new DummyServiceFutureStub(channel); 52 | } 53 | 54 | /** 55 | */ 56 | public static abstract class DummyServiceImplBase implements io.grpc.BindableService { 57 | 58 | @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { 59 | return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 60 | .build(); 61 | } 62 | } 63 | 64 | /** 65 | */ 66 | public static final class DummyServiceStub extends io.grpc.stub.AbstractStub { 67 | private DummyServiceStub(io.grpc.Channel channel) { 68 | super(channel); 69 | } 70 | 71 | private DummyServiceStub(io.grpc.Channel channel, 72 | io.grpc.CallOptions callOptions) { 73 | super(channel, callOptions); 74 | } 75 | 76 | @java.lang.Override 77 | protected DummyServiceStub build(io.grpc.Channel channel, 78 | io.grpc.CallOptions callOptions) { 79 | return new DummyServiceStub(channel, callOptions); 80 | } 81 | } 82 | 83 | /** 84 | */ 85 | public static final class DummyServiceBlockingStub extends io.grpc.stub.AbstractStub { 86 | private DummyServiceBlockingStub(io.grpc.Channel channel) { 87 | super(channel); 88 | } 89 | 90 | private DummyServiceBlockingStub(io.grpc.Channel channel, 91 | io.grpc.CallOptions callOptions) { 92 | super(channel, callOptions); 93 | } 94 | 95 | @java.lang.Override 96 | protected DummyServiceBlockingStub build(io.grpc.Channel channel, 97 | io.grpc.CallOptions callOptions) { 98 | return new DummyServiceBlockingStub(channel, callOptions); 99 | } 100 | } 101 | 102 | /** 103 | */ 104 | public static final class DummyServiceFutureStub extends io.grpc.stub.AbstractStub { 105 | private DummyServiceFutureStub(io.grpc.Channel channel) { 106 | super(channel); 107 | } 108 | 109 | private DummyServiceFutureStub(io.grpc.Channel channel, 110 | io.grpc.CallOptions callOptions) { 111 | super(channel, callOptions); 112 | } 113 | 114 | @java.lang.Override 115 | protected DummyServiceFutureStub build(io.grpc.Channel channel, 116 | io.grpc.CallOptions callOptions) { 117 | return new DummyServiceFutureStub(channel, callOptions); 118 | } 119 | } 120 | 121 | 122 | private static final class MethodHandlers implements 123 | io.grpc.stub.ServerCalls.UnaryMethod, 124 | io.grpc.stub.ServerCalls.ServerStreamingMethod, 125 | io.grpc.stub.ServerCalls.ClientStreamingMethod, 126 | io.grpc.stub.ServerCalls.BidiStreamingMethod { 127 | private final DummyServiceImplBase serviceImpl; 128 | private final int methodId; 129 | 130 | MethodHandlers(DummyServiceImplBase serviceImpl, int methodId) { 131 | this.serviceImpl = serviceImpl; 132 | this.methodId = methodId; 133 | } 134 | 135 | @java.lang.Override 136 | @java.lang.SuppressWarnings("unchecked") 137 | public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { 138 | switch (methodId) { 139 | default: 140 | throw new AssertionError(); 141 | } 142 | } 143 | 144 | @java.lang.Override 145 | @java.lang.SuppressWarnings("unchecked") 146 | public io.grpc.stub.StreamObserver invoke( 147 | io.grpc.stub.StreamObserver responseObserver) { 148 | switch (methodId) { 149 | default: 150 | throw new AssertionError(); 151 | } 152 | } 153 | } 154 | 155 | private static abstract class DummyServiceBaseDescriptorSupplier 156 | implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { 157 | DummyServiceBaseDescriptorSupplier() {} 158 | 159 | @java.lang.Override 160 | public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 161 | return com.proto.dummy.Dummy.getDescriptor(); 162 | } 163 | 164 | @java.lang.Override 165 | public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 166 | return getFileDescriptor().findServiceByName("DummyService"); 167 | } 168 | } 169 | 170 | private static final class DummyServiceFileDescriptorSupplier 171 | extends DummyServiceBaseDescriptorSupplier { 172 | DummyServiceFileDescriptorSupplier() {} 173 | } 174 | 175 | private static final class DummyServiceMethodDescriptorSupplier 176 | extends DummyServiceBaseDescriptorSupplier 177 | implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 178 | private final String methodName; 179 | 180 | DummyServiceMethodDescriptorSupplier(String methodName) { 181 | this.methodName = methodName; 182 | } 183 | 184 | @java.lang.Override 185 | public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 186 | return getServiceDescriptor().findMethodByName(methodName); 187 | } 188 | } 189 | 190 | private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 191 | 192 | public static io.grpc.ServiceDescriptor getServiceDescriptor() { 193 | io.grpc.ServiceDescriptor result = serviceDescriptor; 194 | if (result == null) { 195 | synchronized (DummyServiceGrpc.class) { 196 | result = serviceDescriptor; 197 | if (result == null) { 198 | serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 199 | .setSchemaDescriptor(new DummyServiceFileDescriptorSupplier()) 200 | .build(); 201 | } 202 | } 203 | } 204 | return result; 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/google/api/AnnotationsProto.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: google/api/annotations.proto 3 | 4 | package com.google.api; 5 | 6 | public final class AnnotationsProto { 7 | private AnnotationsProto() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistryLite registry) { 10 | registry.add(com.google.api.AnnotationsProto.http); 11 | } 12 | 13 | public static void registerAllExtensions( 14 | com.google.protobuf.ExtensionRegistry registry) { 15 | registerAllExtensions( 16 | (com.google.protobuf.ExtensionRegistryLite) registry); 17 | } 18 | public static final int HTTP_FIELD_NUMBER = 72295728; 19 | /** 20 | *
21 |    * See `HttpRule`.
22 |    * 
23 | * 24 | * extend .google.protobuf.MethodOptions { ... } 25 | */ 26 | public static final 27 | com.google.protobuf.GeneratedMessage.GeneratedExtension< 28 | com.google.protobuf.DescriptorProtos.MethodOptions, 29 | com.google.api.HttpRule> http = com.google.protobuf.GeneratedMessage 30 | .newFileScopedGeneratedExtension( 31 | com.google.api.HttpRule.class, 32 | com.google.api.HttpRule.getDefaultInstance()); 33 | 34 | public static com.google.protobuf.Descriptors.FileDescriptor 35 | getDescriptor() { 36 | return descriptor; 37 | } 38 | private static com.google.protobuf.Descriptors.FileDescriptor 39 | descriptor; 40 | static { 41 | java.lang.String[] descriptorData = { 42 | "\n\034google/api/annotations.proto\022\ngoogle.a" + 43 | "pi\032\025google/api/http.proto\032 google/protob" + 44 | "uf/descriptor.proto:E\n\004http\022\036.google.pro" + 45 | "tobuf.MethodOptions\030\260\312\274\" \001(\0132\024.google.ap" + 46 | "i.HttpRuleBn\n\016com.google.apiB\020Annotation" + 47 | "sProtoP\001ZAgoogle.golang.org/genproto/goo" + 48 | "gleapis/api/annotations;annotations\242\002\004GA" + 49 | "PIb\006proto3" 50 | }; 51 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 52 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 53 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 54 | com.google.protobuf.Descriptors.FileDescriptor root) { 55 | descriptor = root; 56 | return null; 57 | } 58 | }; 59 | com.google.protobuf.Descriptors.FileDescriptor 60 | .internalBuildGeneratedFileFrom(descriptorData, 61 | new com.google.protobuf.Descriptors.FileDescriptor[] { 62 | com.google.api.HttpProto.getDescriptor(), 63 | com.google.protobuf.DescriptorProtos.getDescriptor(), 64 | }, assigner); 65 | http.internalInit(descriptor.getExtensions().get(0)); 66 | com.google.api.HttpProto.getDescriptor(); 67 | com.google.protobuf.DescriptorProtos.getDescriptor(); 68 | } 69 | 70 | // @@protoc_insertion_point(outer_class_scope) 71 | } 72 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/google/api/CustomHttpPatternOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: google/api/http.proto 3 | 4 | package com.google.api; 5 | 6 | public interface CustomHttpPatternOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:google.api.CustomHttpPattern) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | *
12 |    * The name of this custom HTTP verb.
13 |    * 
14 | * 15 | * string kind = 1; 16 | */ 17 | java.lang.String getKind(); 18 | /** 19 | *
20 |    * The name of this custom HTTP verb.
21 |    * 
22 | * 23 | * string kind = 1; 24 | */ 25 | com.google.protobuf.ByteString 26 | getKindBytes(); 27 | 28 | /** 29 | *
30 |    * The path matched by this custom verb.
31 |    * 
32 | * 33 | * string path = 2; 34 | */ 35 | java.lang.String getPath(); 36 | /** 37 | *
38 |    * The path matched by this custom verb.
39 |    * 
40 | * 41 | * string path = 2; 42 | */ 43 | com.google.protobuf.ByteString 44 | getPathBytes(); 45 | } 46 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/google/api/HttpOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: google/api/http.proto 3 | 4 | package com.google.api; 5 | 6 | public interface HttpOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:google.api.Http) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | *
12 |    * A list of HTTP configuration rules that apply to individual API methods.
13 |    * **NOTE:** All service configuration rules follow "last one wins" order.
14 |    * 
15 | * 16 | * repeated .google.api.HttpRule rules = 1; 17 | */ 18 | java.util.List 19 | getRulesList(); 20 | /** 21 | *
22 |    * A list of HTTP configuration rules that apply to individual API methods.
23 |    * **NOTE:** All service configuration rules follow "last one wins" order.
24 |    * 
25 | * 26 | * repeated .google.api.HttpRule rules = 1; 27 | */ 28 | com.google.api.HttpRule getRules(int index); 29 | /** 30 | *
31 |    * A list of HTTP configuration rules that apply to individual API methods.
32 |    * **NOTE:** All service configuration rules follow "last one wins" order.
33 |    * 
34 | * 35 | * repeated .google.api.HttpRule rules = 1; 36 | */ 37 | int getRulesCount(); 38 | /** 39 | *
40 |    * A list of HTTP configuration rules that apply to individual API methods.
41 |    * **NOTE:** All service configuration rules follow "last one wins" order.
42 |    * 
43 | * 44 | * repeated .google.api.HttpRule rules = 1; 45 | */ 46 | java.util.List 47 | getRulesOrBuilderList(); 48 | /** 49 | *
50 |    * A list of HTTP configuration rules that apply to individual API methods.
51 |    * **NOTE:** All service configuration rules follow "last one wins" order.
52 |    * 
53 | * 54 | * repeated .google.api.HttpRule rules = 1; 55 | */ 56 | com.google.api.HttpRuleOrBuilder getRulesOrBuilder( 57 | int index); 58 | } 59 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/google/api/HttpProto.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: google/api/http.proto 3 | 4 | package com.google.api; 5 | 6 | public final class HttpProto { 7 | private HttpProto() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistryLite registry) { 10 | } 11 | 12 | public static void registerAllExtensions( 13 | com.google.protobuf.ExtensionRegistry registry) { 14 | registerAllExtensions( 15 | (com.google.protobuf.ExtensionRegistryLite) registry); 16 | } 17 | static final com.google.protobuf.Descriptors.Descriptor 18 | internal_static_google_api_Http_descriptor; 19 | static final 20 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 21 | internal_static_google_api_Http_fieldAccessorTable; 22 | static final com.google.protobuf.Descriptors.Descriptor 23 | internal_static_google_api_HttpRule_descriptor; 24 | static final 25 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 26 | internal_static_google_api_HttpRule_fieldAccessorTable; 27 | static final com.google.protobuf.Descriptors.Descriptor 28 | internal_static_google_api_CustomHttpPattern_descriptor; 29 | static final 30 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 31 | internal_static_google_api_CustomHttpPattern_fieldAccessorTable; 32 | 33 | public static com.google.protobuf.Descriptors.FileDescriptor 34 | getDescriptor() { 35 | return descriptor; 36 | } 37 | private static com.google.protobuf.Descriptors.FileDescriptor 38 | descriptor; 39 | static { 40 | java.lang.String[] descriptorData = { 41 | "\n\025google/api/http.proto\022\ngoogle.api\"+\n\004H" + 42 | "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule" + 43 | "\"\352\001\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030\002" + 44 | " \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020\n" + 45 | "\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cust" + 46 | "om\030\010 \001(\0132\035.google.api.CustomHttpPatternH" + 47 | "\000\022\014\n\004body\030\007 \001(\t\0221\n\023additional_bindings\030\013" + 48 | " \003(\0132\024.google.api.HttpRuleB\t\n\007pattern\"/\n" + 49 | "\021CustomHttpPattern\022\014\n\004kind\030\001 \001(\t\022\014\n\004path" + 50 | "\030\002 \001(\tBj\n\016com.google.apiB\tHttpProtoP\001ZAg" + 51 | "oogle.golang.org/genproto/googleapis/api" + 52 | "/annotations;annotations\370\001\001\242\002\004GAPIb\006prot" + 53 | "o3" 54 | }; 55 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 56 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 57 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 58 | com.google.protobuf.Descriptors.FileDescriptor root) { 59 | descriptor = root; 60 | return null; 61 | } 62 | }; 63 | com.google.protobuf.Descriptors.FileDescriptor 64 | .internalBuildGeneratedFileFrom(descriptorData, 65 | new com.google.protobuf.Descriptors.FileDescriptor[] { 66 | }, assigner); 67 | internal_static_google_api_Http_descriptor = 68 | getDescriptor().getMessageTypes().get(0); 69 | internal_static_google_api_Http_fieldAccessorTable = new 70 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 71 | internal_static_google_api_Http_descriptor, 72 | new java.lang.String[] { "Rules", }); 73 | internal_static_google_api_HttpRule_descriptor = 74 | getDescriptor().getMessageTypes().get(1); 75 | internal_static_google_api_HttpRule_fieldAccessorTable = new 76 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 77 | internal_static_google_api_HttpRule_descriptor, 78 | new java.lang.String[] { "Selector", "Get", "Put", "Post", "Delete", "Patch", "Custom", "Body", "AdditionalBindings", "Pattern", }); 79 | internal_static_google_api_CustomHttpPattern_descriptor = 80 | getDescriptor().getMessageTypes().get(2); 81 | internal_static_google_api_CustomHttpPattern_fieldAccessorTable = new 82 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 83 | internal_static_google_api_CustomHttpPattern_descriptor, 84 | new java.lang.String[] { "Kind", "Path", }); 85 | } 86 | 87 | // @@protoc_insertion_point(outer_class_scope) 88 | } 89 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/google/api/HttpRuleOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: google/api/http.proto 3 | 4 | package com.google.api; 5 | 6 | public interface HttpRuleOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:google.api.HttpRule) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | *
 12 |    * Selects methods to which this rule applies.
 13 |    * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
 14 |    * 
15 | * 16 | * string selector = 1; 17 | */ 18 | java.lang.String getSelector(); 19 | /** 20 | *
 21 |    * Selects methods to which this rule applies.
 22 |    * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
 23 |    * 
24 | * 25 | * string selector = 1; 26 | */ 27 | com.google.protobuf.ByteString 28 | getSelectorBytes(); 29 | 30 | /** 31 | *
 32 |    * Used for listing and getting information about resources.
 33 |    * 
34 | * 35 | * string get = 2; 36 | */ 37 | java.lang.String getGet(); 38 | /** 39 | *
 40 |    * Used for listing and getting information about resources.
 41 |    * 
42 | * 43 | * string get = 2; 44 | */ 45 | com.google.protobuf.ByteString 46 | getGetBytes(); 47 | 48 | /** 49 | *
 50 |    * Used for updating a resource.
 51 |    * 
52 | * 53 | * string put = 3; 54 | */ 55 | java.lang.String getPut(); 56 | /** 57 | *
 58 |    * Used for updating a resource.
 59 |    * 
60 | * 61 | * string put = 3; 62 | */ 63 | com.google.protobuf.ByteString 64 | getPutBytes(); 65 | 66 | /** 67 | *
 68 |    * Used for creating a resource.
 69 |    * 
70 | * 71 | * string post = 4; 72 | */ 73 | java.lang.String getPost(); 74 | /** 75 | *
 76 |    * Used for creating a resource.
 77 |    * 
78 | * 79 | * string post = 4; 80 | */ 81 | com.google.protobuf.ByteString 82 | getPostBytes(); 83 | 84 | /** 85 | *
 86 |    * Used for deleting a resource.
 87 |    * 
88 | * 89 | * string delete = 5; 90 | */ 91 | java.lang.String getDelete(); 92 | /** 93 | *
 94 |    * Used for deleting a resource.
 95 |    * 
96 | * 97 | * string delete = 5; 98 | */ 99 | com.google.protobuf.ByteString 100 | getDeleteBytes(); 101 | 102 | /** 103 | *
104 |    * Used for updating a resource.
105 |    * 
106 | * 107 | * string patch = 6; 108 | */ 109 | java.lang.String getPatch(); 110 | /** 111 | *
112 |    * Used for updating a resource.
113 |    * 
114 | * 115 | * string patch = 6; 116 | */ 117 | com.google.protobuf.ByteString 118 | getPatchBytes(); 119 | 120 | /** 121 | *
122 |    * Custom pattern is used for defining custom verbs.
123 |    * 
124 | * 125 | * .google.api.CustomHttpPattern custom = 8; 126 | */ 127 | boolean hasCustom(); 128 | /** 129 | *
130 |    * Custom pattern is used for defining custom verbs.
131 |    * 
132 | * 133 | * .google.api.CustomHttpPattern custom = 8; 134 | */ 135 | com.google.api.CustomHttpPattern getCustom(); 136 | /** 137 | *
138 |    * Custom pattern is used for defining custom verbs.
139 |    * 
140 | * 141 | * .google.api.CustomHttpPattern custom = 8; 142 | */ 143 | com.google.api.CustomHttpPatternOrBuilder getCustomOrBuilder(); 144 | 145 | /** 146 | *
147 |    * The name of the request field whose value is mapped to the HTTP body, or
148 |    * `*` for mapping all fields not captured by the path pattern to the HTTP
149 |    * body. NOTE: the referred field must not be a repeated field and must be
150 |    * present at the top-level of request message type.
151 |    * 
152 | * 153 | * string body = 7; 154 | */ 155 | java.lang.String getBody(); 156 | /** 157 | *
158 |    * The name of the request field whose value is mapped to the HTTP body, or
159 |    * `*` for mapping all fields not captured by the path pattern to the HTTP
160 |    * body. NOTE: the referred field must not be a repeated field and must be
161 |    * present at the top-level of request message type.
162 |    * 
163 | * 164 | * string body = 7; 165 | */ 166 | com.google.protobuf.ByteString 167 | getBodyBytes(); 168 | 169 | /** 170 | *
171 |    * Additional HTTP bindings for the selector. Nested bindings must
172 |    * not contain an `additional_bindings` field themselves (that is,
173 |    * the nesting may only be one level deep).
174 |    * 
175 | * 176 | * repeated .google.api.HttpRule additional_bindings = 11; 177 | */ 178 | java.util.List 179 | getAdditionalBindingsList(); 180 | /** 181 | *
182 |    * Additional HTTP bindings for the selector. Nested bindings must
183 |    * not contain an `additional_bindings` field themselves (that is,
184 |    * the nesting may only be one level deep).
185 |    * 
186 | * 187 | * repeated .google.api.HttpRule additional_bindings = 11; 188 | */ 189 | com.google.api.HttpRule getAdditionalBindings(int index); 190 | /** 191 | *
192 |    * Additional HTTP bindings for the selector. Nested bindings must
193 |    * not contain an `additional_bindings` field themselves (that is,
194 |    * the nesting may only be one level deep).
195 |    * 
196 | * 197 | * repeated .google.api.HttpRule additional_bindings = 11; 198 | */ 199 | int getAdditionalBindingsCount(); 200 | /** 201 | *
202 |    * Additional HTTP bindings for the selector. Nested bindings must
203 |    * not contain an `additional_bindings` field themselves (that is,
204 |    * the nesting may only be one level deep).
205 |    * 
206 | * 207 | * repeated .google.api.HttpRule additional_bindings = 11; 208 | */ 209 | java.util.List 210 | getAdditionalBindingsOrBuilderList(); 211 | /** 212 | *
213 |    * Additional HTTP bindings for the selector. Nested bindings must
214 |    * not contain an `additional_bindings` field themselves (that is,
215 |    * the nesting may only be one level deep).
216 |    * 
217 | * 218 | * repeated .google.api.HttpRule additional_bindings = 11; 219 | */ 220 | com.google.api.HttpRuleOrBuilder getAdditionalBindingsOrBuilder( 221 | int index); 222 | 223 | public com.google.api.HttpRule.PatternCase getPatternCase(); 224 | } 225 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/google/protobuf/FieldMaskOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: google/protobuf/xfield_mask.proto 3 | 4 | package com.google.protobuf; 5 | 6 | public interface FieldMaskOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:google.protobuf.FieldMask) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | *
12 |    * The set of field mask paths.
13 |    * 
14 | * 15 | * repeated string paths = 1; 16 | */ 17 | java.util.List 18 | getPathsList(); 19 | /** 20 | *
21 |    * The set of field mask paths.
22 |    * 
23 | * 24 | * repeated string paths = 1; 25 | */ 26 | int getPathsCount(); 27 | /** 28 | *
29 |    * The set of field mask paths.
30 |    * 
31 | * 32 | * repeated string paths = 1; 33 | */ 34 | java.lang.String getPaths(int index); 35 | /** 36 | *
37 |    * The set of field mask paths.
38 |    * 
39 | * 40 | * repeated string paths = 1; 41 | */ 42 | com.google.protobuf.ByteString 43 | getPathsBytes(int index); 44 | } 45 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/google/protobuf/FieldMaskProto.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: google/protobuf/xfield_mask.proto 3 | 4 | package com.google.protobuf; 5 | 6 | public final class FieldMaskProto { 7 | private FieldMaskProto() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistryLite registry) { 10 | } 11 | 12 | public static void registerAllExtensions( 13 | com.google.protobuf.ExtensionRegistry registry) { 14 | registerAllExtensions( 15 | (com.google.protobuf.ExtensionRegistryLite) registry); 16 | } 17 | static final com.google.protobuf.Descriptors.Descriptor 18 | internal_static_google_protobuf_FieldMask_descriptor; 19 | static final 20 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 21 | internal_static_google_protobuf_FieldMask_fieldAccessorTable; 22 | 23 | public static com.google.protobuf.Descriptors.FileDescriptor 24 | getDescriptor() { 25 | return descriptor; 26 | } 27 | private static com.google.protobuf.Descriptors.FileDescriptor 28 | descriptor; 29 | static { 30 | java.lang.String[] descriptorData = { 31 | "\n!google/protobuf/xfield_mask.proto\022\017goo" + 32 | "gle.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\t" + 33 | "B\211\001\n\023com.google.protobufB\016FieldMaskProto" + 34 | "P\001Z9google.golang.org/genproto/protobuf/" + 35 | "field_mask;field_mask\242\002\003GPB\252\002\036Google.Pro" + 36 | "tobuf.WellKnownTypesb\006proto3" 37 | }; 38 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 39 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 40 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 41 | com.google.protobuf.Descriptors.FileDescriptor root) { 42 | descriptor = root; 43 | return null; 44 | } 45 | }; 46 | com.google.protobuf.Descriptors.FileDescriptor 47 | .internalBuildGeneratedFileFrom(descriptorData, 48 | new com.google.protobuf.Descriptors.FileDescriptor[] { 49 | }, assigner); 50 | internal_static_google_protobuf_FieldMask_descriptor = 51 | getDescriptor().getMessageTypes().get(0); 52 | internal_static_google_protobuf_FieldMask_fieldAccessorTable = new 53 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 54 | internal_static_google_protobuf_FieldMask_descriptor, 55 | new java.lang.String[] { "Paths", }); 56 | } 57 | 58 | // @@protoc_insertion_point(outer_class_scope) 59 | } 60 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/proto/dummy/Dummy.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: dummy.proto 3 | 4 | package com.proto.dummy; 5 | 6 | public final class Dummy { 7 | private Dummy() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistryLite registry) { 10 | } 11 | 12 | public static void registerAllExtensions( 13 | com.google.protobuf.ExtensionRegistry registry) { 14 | registerAllExtensions( 15 | (com.google.protobuf.ExtensionRegistryLite) registry); 16 | } 17 | static final com.google.protobuf.Descriptors.Descriptor 18 | internal_static_dummy_DummyMessage_descriptor; 19 | static final 20 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 21 | internal_static_dummy_DummyMessage_fieldAccessorTable; 22 | 23 | public static com.google.protobuf.Descriptors.FileDescriptor 24 | getDescriptor() { 25 | return descriptor; 26 | } 27 | private static com.google.protobuf.Descriptors.FileDescriptor 28 | descriptor; 29 | static { 30 | java.lang.String[] descriptorData = { 31 | "\n\013dummy.proto\022\005dummy\"\016\n\014DummyMessage2\016\n\014" + 32 | "DummyServiceB\023\n\017com.proto.dummyP\001b\006proto" + 33 | "3" 34 | }; 35 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 36 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 37 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 38 | com.google.protobuf.Descriptors.FileDescriptor root) { 39 | descriptor = root; 40 | return null; 41 | } 42 | }; 43 | com.google.protobuf.Descriptors.FileDescriptor 44 | .internalBuildGeneratedFileFrom(descriptorData, 45 | new com.google.protobuf.Descriptors.FileDescriptor[] { 46 | }, assigner); 47 | internal_static_dummy_DummyMessage_descriptor = 48 | getDescriptor().getMessageTypes().get(0); 49 | internal_static_dummy_DummyMessage_fieldAccessorTable = new 50 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 51 | internal_static_dummy_DummyMessage_descriptor, 52 | new java.lang.String[] { }); 53 | } 54 | 55 | // @@protoc_insertion_point(outer_class_scope) 56 | } 57 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/com/proto/dummy/DummyMessageOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: dummy.proto 3 | 4 | package com.proto.dummy; 5 | 6 | public interface DummyMessageOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:dummy.DummyMessage) 8 | com.google.protobuf.MessageOrBuilder { 9 | } 10 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/Companies.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public final class Companies { 7 | private Companies() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistryLite registry) { 10 | } 11 | 12 | public static void registerAllExtensions( 13 | com.google.protobuf.ExtensionRegistry registry) { 14 | registerAllExtensions( 15 | (com.google.protobuf.ExtensionRegistryLite) registry); 16 | } 17 | static final com.google.protobuf.Descriptors.Descriptor 18 | internal_static_contactsapi_company_CreateCompanyRequest_descriptor; 19 | static final 20 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 21 | internal_static_contactsapi_company_CreateCompanyRequest_fieldAccessorTable; 22 | static final com.google.protobuf.Descriptors.Descriptor 23 | internal_static_contactsapi_company_GetCompanyRequest_descriptor; 24 | static final 25 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 26 | internal_static_contactsapi_company_GetCompanyRequest_fieldAccessorTable; 27 | static final com.google.protobuf.Descriptors.Descriptor 28 | internal_static_contactsapi_company_ListCompaniesRequest_descriptor; 29 | static final 30 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 31 | internal_static_contactsapi_company_ListCompaniesRequest_fieldAccessorTable; 32 | static final com.google.protobuf.Descriptors.Descriptor 33 | internal_static_contactsapi_company_GetCompaniesRequest_descriptor; 34 | static final 35 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 36 | internal_static_contactsapi_company_GetCompaniesRequest_fieldAccessorTable; 37 | static final com.google.protobuf.Descriptors.Descriptor 38 | internal_static_contactsapi_company_UpdateCompanyRequest_descriptor; 39 | static final 40 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 41 | internal_static_contactsapi_company_UpdateCompanyRequest_fieldAccessorTable; 42 | static final com.google.protobuf.Descriptors.Descriptor 43 | internal_static_contactsapi_company_DeleteCompanyRequest_descriptor; 44 | static final 45 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 46 | internal_static_contactsapi_company_DeleteCompanyRequest_fieldAccessorTable; 47 | static final com.google.protobuf.Descriptors.Descriptor 48 | internal_static_contactsapi_company_CompanyResponse_descriptor; 49 | static final 50 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 51 | internal_static_contactsapi_company_CompanyResponse_fieldAccessorTable; 52 | static final com.google.protobuf.Descriptors.Descriptor 53 | internal_static_contactsapi_company_ListCompaniesResponse_descriptor; 54 | static final 55 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 56 | internal_static_contactsapi_company_ListCompaniesResponse_fieldAccessorTable; 57 | 58 | public static com.google.protobuf.Descriptors.FileDescriptor 59 | getDescriptor() { 60 | return descriptor; 61 | } 62 | private static com.google.protobuf.Descriptors.FileDescriptor 63 | descriptor; 64 | static { 65 | java.lang.String[] descriptorData = { 66 | "\n#contactsapi/company/companies.proto\022\023c" + 67 | "ontactsapi.company\032\034google/api/annotatio" + 68 | "ns.proto\032\033google/protobuf/empty.proto\032 g" + 69 | "oogle/protobuf/field_mask.proto\"T\n\024Creat" + 70 | "eCompanyRequest\022\014\n\004name\030\001 \001(\t\022.\n\nfield_m" + 71 | "ask\030\002 \001(\0132\032.google.protobuf.FieldMask\"O\n" + 72 | "\021GetCompanyRequest\022\n\n\002id\030\001 \001(\t\022.\n\nfield_" + 73 | "mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"F" + 74 | "\n\024ListCompaniesRequest\022.\n\nfield_mask\030\002 \001" + 75 | "(\0132\032.google.protobuf.FieldMask\"l\n\023GetCom" + 76 | "paniesRequest\022\022\n\npage_token\030\001 \001(\t\022\021\n\tpag" + 77 | "e_size\030\002 \001(\005\022.\n\nfield_mask\030\003 \001(\0132\032.googl" + 78 | "e.protobuf.FieldMask\"a\n\024UpdateCompanyReq" + 79 | "uest\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022/\n\013update" + 80 | "_mask\030\003 \001(\0132\032.google.protobuf.FieldMask\"" + 81 | "\"\n\024DeleteCompanyRequest\022\n\n\002id\030\001 \001(\t\"<\n\017C" + 82 | "ompanyResponse\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t" + 83 | "\022\017\n\007version\030\003 \001(\005\"x\n\025ListCompaniesRespon" + 84 | "se\0227\n\tcompanies\030\001 \003(\0132$.contactsapi.comp" + 85 | "any.CompanyResponse\022\027\n\017next_page_token\030\002" + 86 | " \001(\t\022\r\n\005count\030\003 \001(\0052\361\004\n\016CompanyService\022z" + 87 | "\n\rCreateCompany\022).contactsapi.company.Cr" + 88 | "eateCompanyRequest\032$.contactsapi.company" + 89 | ".CompanyResponse\"\030\202\323\344\223\002\022\"\r/v1/companies:" + 90 | "\001*\022v\n\nGetCompany\022&.contactsapi.company.G" + 91 | "etCompanyRequest\032$.contactsapi.company.C" + 92 | "ompanyResponse\"\032\202\323\344\223\002\024\022\022/v1/companies/{i" + 93 | "d}\022}\n\rListCompanies\022).contactsapi.compan" + 94 | "y.ListCompaniesRequest\032*.contactsapi.com" + 95 | "pany.ListCompaniesResponse\"\025\202\323\344\223\002\017\022\r/v1/" + 96 | "companies\022|\n\rUpdateCompany\022).contactsapi" + 97 | ".company.UpdateCompanyRequest\032$.contacts" + 98 | "api.company.CompanyResponse\"\032\202\323\344\223\002\024\022\022/v1" + 99 | "/companies/{id}\022n\n\rDeleteCompany\022).conta" + 100 | "ctsapi.company.DeleteCompanyRequest\032\026.go" + 101 | "ogle.protobuf.Empty\"\032\202\323\344\223\002\024*\022/v1/compani" + 102 | "es/{id}B\002P\001b\006proto3" 103 | }; 104 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 105 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 106 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 107 | com.google.protobuf.Descriptors.FileDescriptor root) { 108 | descriptor = root; 109 | return null; 110 | } 111 | }; 112 | com.google.protobuf.Descriptors.FileDescriptor 113 | .internalBuildGeneratedFileFrom(descriptorData, 114 | new com.google.protobuf.Descriptors.FileDescriptor[] { 115 | com.google.api.AnnotationsProto.getDescriptor(), 116 | com.google.protobuf.EmptyProto.getDescriptor(), 117 | google.protobuf.FieldMaskOuterClass.getDescriptor(), 118 | }, assigner); 119 | internal_static_contactsapi_company_CreateCompanyRequest_descriptor = 120 | getDescriptor().getMessageTypes().get(0); 121 | internal_static_contactsapi_company_CreateCompanyRequest_fieldAccessorTable = new 122 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 123 | internal_static_contactsapi_company_CreateCompanyRequest_descriptor, 124 | new java.lang.String[] { "Name", "FieldMask", }); 125 | internal_static_contactsapi_company_GetCompanyRequest_descriptor = 126 | getDescriptor().getMessageTypes().get(1); 127 | internal_static_contactsapi_company_GetCompanyRequest_fieldAccessorTable = new 128 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 129 | internal_static_contactsapi_company_GetCompanyRequest_descriptor, 130 | new java.lang.String[] { "Id", "FieldMask", }); 131 | internal_static_contactsapi_company_ListCompaniesRequest_descriptor = 132 | getDescriptor().getMessageTypes().get(2); 133 | internal_static_contactsapi_company_ListCompaniesRequest_fieldAccessorTable = new 134 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 135 | internal_static_contactsapi_company_ListCompaniesRequest_descriptor, 136 | new java.lang.String[] { "FieldMask", }); 137 | internal_static_contactsapi_company_GetCompaniesRequest_descriptor = 138 | getDescriptor().getMessageTypes().get(3); 139 | internal_static_contactsapi_company_GetCompaniesRequest_fieldAccessorTable = new 140 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 141 | internal_static_contactsapi_company_GetCompaniesRequest_descriptor, 142 | new java.lang.String[] { "PageToken", "PageSize", "FieldMask", }); 143 | internal_static_contactsapi_company_UpdateCompanyRequest_descriptor = 144 | getDescriptor().getMessageTypes().get(4); 145 | internal_static_contactsapi_company_UpdateCompanyRequest_fieldAccessorTable = new 146 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 147 | internal_static_contactsapi_company_UpdateCompanyRequest_descriptor, 148 | new java.lang.String[] { "Id", "Name", "UpdateMask", }); 149 | internal_static_contactsapi_company_DeleteCompanyRequest_descriptor = 150 | getDescriptor().getMessageTypes().get(5); 151 | internal_static_contactsapi_company_DeleteCompanyRequest_fieldAccessorTable = new 152 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 153 | internal_static_contactsapi_company_DeleteCompanyRequest_descriptor, 154 | new java.lang.String[] { "Id", }); 155 | internal_static_contactsapi_company_CompanyResponse_descriptor = 156 | getDescriptor().getMessageTypes().get(6); 157 | internal_static_contactsapi_company_CompanyResponse_fieldAccessorTable = new 158 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 159 | internal_static_contactsapi_company_CompanyResponse_descriptor, 160 | new java.lang.String[] { "Id", "Name", "Version", }); 161 | internal_static_contactsapi_company_ListCompaniesResponse_descriptor = 162 | getDescriptor().getMessageTypes().get(7); 163 | internal_static_contactsapi_company_ListCompaniesResponse_fieldAccessorTable = new 164 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 165 | internal_static_contactsapi_company_ListCompaniesResponse_descriptor, 166 | new java.lang.String[] { "Companies", "NextPageToken", "Count", }); 167 | com.google.protobuf.ExtensionRegistry registry = 168 | com.google.protobuf.ExtensionRegistry.newInstance(); 169 | registry.add(com.google.api.AnnotationsProto.http); 170 | com.google.protobuf.Descriptors.FileDescriptor 171 | .internalUpdateFileDescriptor(descriptor, registry); 172 | com.google.api.AnnotationsProto.getDescriptor(); 173 | com.google.protobuf.EmptyProto.getDescriptor(); 174 | google.protobuf.FieldMaskOuterClass.getDescriptor(); 175 | } 176 | 177 | // @@protoc_insertion_point(outer_class_scope) 178 | } 179 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/CompanyResponseOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface CompanyResponseOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.CompanyResponse) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string id = 1; 12 | */ 13 | java.lang.String getId(); 14 | /** 15 | * string id = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getIdBytes(); 19 | 20 | /** 21 | * string name = 2; 22 | */ 23 | java.lang.String getName(); 24 | /** 25 | * string name = 2; 26 | */ 27 | com.google.protobuf.ByteString 28 | getNameBytes(); 29 | 30 | /** 31 | *
32 |    * TODO: Should this be a string or a int32?
33 |    * 
34 | * 35 | * int32 version = 3; 36 | */ 37 | int getVersion(); 38 | } 39 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/CreateCompanyRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface CreateCompanyRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.CreateCompanyRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string name = 1; 12 | */ 13 | java.lang.String getName(); 14 | /** 15 | * string name = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getNameBytes(); 19 | 20 | /** 21 | *
22 |    * TODO: does create have a mask?..
23 |    * 
24 | * 25 | * .google.protobuf.FieldMask field_mask = 2; 26 | */ 27 | boolean hasFieldMask(); 28 | /** 29 | *
30 |    * TODO: does create have a mask?..
31 |    * 
32 | * 33 | * .google.protobuf.FieldMask field_mask = 2; 34 | */ 35 | google.protobuf.FieldMaskOuterClass.FieldMask getFieldMask(); 36 | /** 37 | *
38 |    * TODO: does create have a mask?..
39 |    * 
40 | * 41 | * .google.protobuf.FieldMask field_mask = 2; 42 | */ 43 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getFieldMaskOrBuilder(); 44 | } 45 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/DeleteCompanyRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface DeleteCompanyRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.DeleteCompanyRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string id = 1; 12 | */ 13 | java.lang.String getId(); 14 | /** 15 | * string id = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getIdBytes(); 19 | } 20 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/GetCompaniesRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface GetCompaniesRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.GetCompaniesRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string page_token = 1; 12 | */ 13 | java.lang.String getPageToken(); 14 | /** 15 | * string page_token = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getPageTokenBytes(); 19 | 20 | /** 21 | * int32 page_size = 2; 22 | */ 23 | int getPageSize(); 24 | 25 | /** 26 | * .google.protobuf.FieldMask field_mask = 3; 27 | */ 28 | boolean hasFieldMask(); 29 | /** 30 | * .google.protobuf.FieldMask field_mask = 3; 31 | */ 32 | google.protobuf.FieldMaskOuterClass.FieldMask getFieldMask(); 33 | /** 34 | * .google.protobuf.FieldMask field_mask = 3; 35 | */ 36 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getFieldMaskOrBuilder(); 37 | } 38 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/GetCompanyRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface GetCompanyRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.GetCompanyRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string id = 1; 12 | */ 13 | java.lang.String getId(); 14 | /** 15 | * string id = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getIdBytes(); 19 | 20 | /** 21 | * .google.protobuf.FieldMask field_mask = 2; 22 | */ 23 | boolean hasFieldMask(); 24 | /** 25 | * .google.protobuf.FieldMask field_mask = 2; 26 | */ 27 | google.protobuf.FieldMaskOuterClass.FieldMask getFieldMask(); 28 | /** 29 | * .google.protobuf.FieldMask field_mask = 2; 30 | */ 31 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getFieldMaskOrBuilder(); 32 | } 33 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/ListCompaniesRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface ListCompaniesRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.ListCompaniesRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * .google.protobuf.FieldMask field_mask = 2; 12 | */ 13 | boolean hasFieldMask(); 14 | /** 15 | * .google.protobuf.FieldMask field_mask = 2; 16 | */ 17 | google.protobuf.FieldMaskOuterClass.FieldMask getFieldMask(); 18 | /** 19 | * .google.protobuf.FieldMask field_mask = 2; 20 | */ 21 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getFieldMaskOrBuilder(); 22 | } 23 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/ListCompaniesResponseOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface ListCompaniesResponseOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.ListCompaniesResponse) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * repeated .contactsapi.company.CompanyResponse companies = 1; 12 | */ 13 | java.util.List 14 | getCompaniesList(); 15 | /** 16 | * repeated .contactsapi.company.CompanyResponse companies = 1; 17 | */ 18 | contactsapi.company.CompanyResponse getCompanies(int index); 19 | /** 20 | * repeated .contactsapi.company.CompanyResponse companies = 1; 21 | */ 22 | int getCompaniesCount(); 23 | /** 24 | * repeated .contactsapi.company.CompanyResponse companies = 1; 25 | */ 26 | java.util.List 27 | getCompaniesOrBuilderList(); 28 | /** 29 | * repeated .contactsapi.company.CompanyResponse companies = 1; 30 | */ 31 | contactsapi.company.CompanyResponseOrBuilder getCompaniesOrBuilder( 32 | int index); 33 | 34 | /** 35 | * string next_page_token = 2; 36 | */ 37 | java.lang.String getNextPageToken(); 38 | /** 39 | * string next_page_token = 2; 40 | */ 41 | com.google.protobuf.ByteString 42 | getNextPageTokenBytes(); 43 | 44 | /** 45 | * int32 count = 3; 46 | */ 47 | int getCount(); 48 | } 49 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/company/UpdateCompanyRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/company/companies.proto 3 | 4 | package contactsapi.company; 5 | 6 | public interface UpdateCompanyRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.company.UpdateCompanyRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string id = 1; 12 | */ 13 | java.lang.String getId(); 14 | /** 15 | * string id = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getIdBytes(); 19 | 20 | /** 21 | * string name = 2; 22 | */ 23 | java.lang.String getName(); 24 | /** 25 | * string name = 2; 26 | */ 27 | com.google.protobuf.ByteString 28 | getNameBytes(); 29 | 30 | /** 31 | * .google.protobuf.FieldMask update_mask = 3; 32 | */ 33 | boolean hasUpdateMask(); 34 | /** 35 | * .google.protobuf.FieldMask update_mask = 3; 36 | */ 37 | google.protobuf.FieldMaskOuterClass.FieldMask getUpdateMask(); 38 | /** 39 | * .google.protobuf.FieldMask update_mask = 3; 40 | */ 41 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getUpdateMaskOrBuilder(); 42 | } 43 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/CreateCustomFieldRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public interface CreateCustomFieldRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.customfield.CreateCustomFieldRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string name = 1; 12 | */ 13 | java.lang.String getName(); 14 | /** 15 | * string name = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getNameBytes(); 19 | 20 | /** 21 | * .contactsapi.customfield.CreateCustomFieldRequest.Type type = 2; 22 | */ 23 | int getTypeValue(); 24 | /** 25 | * .contactsapi.customfield.CreateCustomFieldRequest.Type type = 2; 26 | */ 27 | contactsapi.customfield.CreateCustomFieldRequest.Type getType(); 28 | 29 | /** 30 | *
31 |    *    ??
32 |    *    repeated string field_mask = 4;
33 |    * 
34 | * 35 | * string label = 3; 36 | */ 37 | java.lang.String getLabel(); 38 | /** 39 | *
40 |    *    ??
41 |    *    repeated string field_mask = 4;
42 |    * 
43 | * 44 | * string label = 3; 45 | */ 46 | com.google.protobuf.ByteString 47 | getLabelBytes(); 48 | } 49 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/CustomFieldOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public interface CustomFieldOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.customfield.CustomField) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string name = 1; 12 | */ 13 | java.lang.String getName(); 14 | /** 15 | * string name = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getNameBytes(); 19 | 20 | /** 21 | * .contactsapi.customfield.CustomField.Type type = 2; 22 | */ 23 | int getTypeValue(); 24 | /** 25 | * .contactsapi.customfield.CustomField.Type type = 2; 26 | */ 27 | contactsapi.customfield.CustomField.Type getType(); 28 | 29 | /** 30 | * string label = 3; 31 | */ 32 | java.lang.String getLabel(); 33 | /** 34 | * string label = 3; 35 | */ 36 | com.google.protobuf.ByteString 37 | getLabelBytes(); 38 | 39 | /** 40 | * string id = 4; 41 | */ 42 | java.lang.String getId(); 43 | /** 44 | * string id = 4; 45 | */ 46 | com.google.protobuf.ByteString 47 | getIdBytes(); 48 | 49 | /** 50 | *
51 |    * TODO: or Timestamp.proto?
52 |    * 
53 | * 54 | * string created = 5; 55 | */ 56 | java.lang.String getCreated(); 57 | /** 58 | *
59 |    * TODO: or Timestamp.proto?
60 |    * 
61 | * 62 | * string created = 5; 63 | */ 64 | com.google.protobuf.ByteString 65 | getCreatedBytes(); 66 | 67 | /** 68 | *
69 |    * TODO: or Timestamp.proto?
70 |    * 
71 | * 72 | * string updated = 6; 73 | */ 74 | java.lang.String getUpdated(); 75 | /** 76 | *
77 |    * TODO: or Timestamp.proto?
78 |    * 
79 | * 80 | * string updated = 6; 81 | */ 82 | com.google.protobuf.ByteString 83 | getUpdatedBytes(); 84 | } 85 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/Customfieldschema.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public final class Customfieldschema { 7 | private Customfieldschema() {} 8 | public static void registerAllExtensions( 9 | com.google.protobuf.ExtensionRegistryLite registry) { 10 | } 11 | 12 | public static void registerAllExtensions( 13 | com.google.protobuf.ExtensionRegistry registry) { 14 | registerAllExtensions( 15 | (com.google.protobuf.ExtensionRegistryLite) registry); 16 | } 17 | static final com.google.protobuf.Descriptors.Descriptor 18 | internal_static_contactsapi_customfield_CreateCustomFieldRequest_descriptor; 19 | static final 20 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 21 | internal_static_contactsapi_customfield_CreateCustomFieldRequest_fieldAccessorTable; 22 | static final com.google.protobuf.Descriptors.Descriptor 23 | internal_static_contactsapi_customfield_ListCustomFieldsRequest_descriptor; 24 | static final 25 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 26 | internal_static_contactsapi_customfield_ListCustomFieldsRequest_fieldAccessorTable; 27 | static final com.google.protobuf.Descriptors.Descriptor 28 | internal_static_contactsapi_customfield_ListCustomFieldsResponse_descriptor; 29 | static final 30 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 31 | internal_static_contactsapi_customfield_ListCustomFieldsResponse_fieldAccessorTable; 32 | static final com.google.protobuf.Descriptors.Descriptor 33 | internal_static_contactsapi_customfield_GetCustomFieldRequest_descriptor; 34 | static final 35 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 36 | internal_static_contactsapi_customfield_GetCustomFieldRequest_fieldAccessorTable; 37 | static final com.google.protobuf.Descriptors.Descriptor 38 | internal_static_contactsapi_customfield_UpdateCustomFieldRequest_descriptor; 39 | static final 40 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 41 | internal_static_contactsapi_customfield_UpdateCustomFieldRequest_fieldAccessorTable; 42 | static final com.google.protobuf.Descriptors.Descriptor 43 | internal_static_contactsapi_customfield_DeleteCustomFieldRequest_descriptor; 44 | static final 45 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 46 | internal_static_contactsapi_customfield_DeleteCustomFieldRequest_fieldAccessorTable; 47 | static final com.google.protobuf.Descriptors.Descriptor 48 | internal_static_contactsapi_customfield_CustomField_descriptor; 49 | static final 50 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 51 | internal_static_contactsapi_customfield_CustomField_fieldAccessorTable; 52 | 53 | public static com.google.protobuf.Descriptors.FileDescriptor 54 | getDescriptor() { 55 | return descriptor; 56 | } 57 | private static com.google.protobuf.Descriptors.FileDescriptor 58 | descriptor; 59 | static { 60 | java.lang.String[] descriptorData = { 61 | "\n/contactsapi/customfield/customfieldsch" + 62 | "ema.proto\022\027contactsapi.customfield\032\033goog" + 63 | "le/protobuf/empty.proto\032\034google/api/anno" + 64 | "tations.proto\032 google/protobuf/field_mas" + 65 | "k.proto\"\335\001\n\030CreateCustomFieldRequest\022\014\n\004" + 66 | "name\030\001 \001(\t\022D\n\004type\030\002 \001(\01626.contactsapi.c" + 67 | "ustomfield.CreateCustomFieldRequest.Type" + 68 | "\022\r\n\005label\030\003 \001(\t\"^\n\004Type\022\010\n\004TEXT\020\000\022\n\n\006NUM" + 69 | "BER\020\001\022\013\n\007BOOLEAN\020\002\022\r\n\tDATE_TIME\020\003\022\t\n\005EMA" + 70 | "IL\020\004\022\020\n\014PHONE_NUMBER\020\005\022\007\n\003URL\020\006\"p\n\027ListC" + 71 | "ustomFieldsRequest\022\022\n\npage_token\030\001 \001(\t\022\021" + 72 | "\n\tpage_size\030\002 \001(\005\022.\n\nfield_mask\030\003 \001(\0132\032." + 73 | "google.protobuf.FieldMask\"\177\n\030ListCustomF" + 74 | "ieldsResponse\022;\n\rcustom_fields\030\001 \003(\0132$.c" + 75 | "ontactsapi.customfield.CustomField\022\r\n\005co" + 76 | "unt\030\002 \001(\005\022\027\n\017next_page_token\030\003 \001(\t\"S\n\025Ge" + 77 | "tCustomFieldRequest\022\n\n\002id\030\001 \001(\t\022.\n\nfield" + 78 | "_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"" + 79 | "e\n\030UpdateCustomFieldRequest\022\n\n\002id\030\001 \001(\t\022" + 80 | "\014\n\004name\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.goo" + 81 | "gle.protobuf.FieldMask\"&\n\030DeleteCustomFi" + 82 | "eldRequest\022\n\n\002id\030\001 \001(\t\"\361\001\n\013CustomField\022\014" + 83 | "\n\004name\030\001 \001(\t\0227\n\004type\030\002 \001(\0162).contactsapi" + 84 | ".customfield.CustomField.Type\022\r\n\005label\030\003" + 85 | " \001(\t\022\n\n\002id\030\004 \001(\t\022\017\n\007created\030\005 \001(\t\022\017\n\007upd" + 86 | "ated\030\006 \001(\t\"^\n\004Type\022\010\n\004TEXT\020\000\022\n\n\006NUMBER\020\001" + 87 | "\022\013\n\007BOOLEAN\020\002\022\r\n\tDATE_TIME\020\003\022\t\n\005EMAIL\020\004\022" + 88 | "\020\n\014PHONE_NUMBER\020\005\022\007\n\003URL\020\0062\311\005\n\022CustomFie" + 89 | "ldService\022\211\001\n\021CreateCustomField\0221.contac" + 90 | "tsapi.customfield.CreateCustomFieldReque" + 91 | "st\032$.contactsapi.customfield.CustomField" + 92 | "\"\033\202\323\344\223\002\025\"\020/v1/customfields:\001*\022\221\001\n\020ListCu" + 93 | "stomFields\0220.contactsapi.customfield.Lis" + 94 | "tCustomFieldsRequest\0321.contactsapi.custo" + 95 | "mfield.ListCustomFieldsResponse\"\030\202\323\344\223\002\022\022" + 96 | "\020/v1/customfields\022\205\001\n\016GetCustomField\022..c" + 97 | "ontactsapi.customfield.GetCustomFieldReq" + 98 | "uest\032$.contactsapi.customfield.CustomFie" + 99 | "ld\"\035\202\323\344\223\002\027\022\025/v1/customfields/{id}\022\213\001\n\021Up" + 100 | "dateCustomField\0221.contactsapi.customfiel" + 101 | "d.UpdateCustomFieldRequest\032$.contactsapi" + 102 | ".customfield.CustomField\"\035\202\323\344\223\002\0272\025/v1/cu" + 103 | "stomfields/{id}\022}\n\021DeleteCustomField\0221.c" + 104 | "ontactsapi.customfield.DeleteCustomField" + 105 | "Request\032\026.google.protobuf.Empty\"\035\202\323\344\223\002\027*" + 106 | "\025/v1/customfields/{id}B\002P\001b\006proto3" 107 | }; 108 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 109 | new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 110 | public com.google.protobuf.ExtensionRegistry assignDescriptors( 111 | com.google.protobuf.Descriptors.FileDescriptor root) { 112 | descriptor = root; 113 | return null; 114 | } 115 | }; 116 | com.google.protobuf.Descriptors.FileDescriptor 117 | .internalBuildGeneratedFileFrom(descriptorData, 118 | new com.google.protobuf.Descriptors.FileDescriptor[] { 119 | com.google.protobuf.EmptyProto.getDescriptor(), 120 | com.google.api.AnnotationsProto.getDescriptor(), 121 | google.protobuf.FieldMaskOuterClass.getDescriptor(), 122 | }, assigner); 123 | internal_static_contactsapi_customfield_CreateCustomFieldRequest_descriptor = 124 | getDescriptor().getMessageTypes().get(0); 125 | internal_static_contactsapi_customfield_CreateCustomFieldRequest_fieldAccessorTable = new 126 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 127 | internal_static_contactsapi_customfield_CreateCustomFieldRequest_descriptor, 128 | new java.lang.String[] { "Name", "Type", "Label", }); 129 | internal_static_contactsapi_customfield_ListCustomFieldsRequest_descriptor = 130 | getDescriptor().getMessageTypes().get(1); 131 | internal_static_contactsapi_customfield_ListCustomFieldsRequest_fieldAccessorTable = new 132 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 133 | internal_static_contactsapi_customfield_ListCustomFieldsRequest_descriptor, 134 | new java.lang.String[] { "PageToken", "PageSize", "FieldMask", }); 135 | internal_static_contactsapi_customfield_ListCustomFieldsResponse_descriptor = 136 | getDescriptor().getMessageTypes().get(2); 137 | internal_static_contactsapi_customfield_ListCustomFieldsResponse_fieldAccessorTable = new 138 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 139 | internal_static_contactsapi_customfield_ListCustomFieldsResponse_descriptor, 140 | new java.lang.String[] { "CustomFields", "Count", "NextPageToken", }); 141 | internal_static_contactsapi_customfield_GetCustomFieldRequest_descriptor = 142 | getDescriptor().getMessageTypes().get(3); 143 | internal_static_contactsapi_customfield_GetCustomFieldRequest_fieldAccessorTable = new 144 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 145 | internal_static_contactsapi_customfield_GetCustomFieldRequest_descriptor, 146 | new java.lang.String[] { "Id", "FieldMask", }); 147 | internal_static_contactsapi_customfield_UpdateCustomFieldRequest_descriptor = 148 | getDescriptor().getMessageTypes().get(4); 149 | internal_static_contactsapi_customfield_UpdateCustomFieldRequest_fieldAccessorTable = new 150 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 151 | internal_static_contactsapi_customfield_UpdateCustomFieldRequest_descriptor, 152 | new java.lang.String[] { "Id", "Name", "UpdateMask", }); 153 | internal_static_contactsapi_customfield_DeleteCustomFieldRequest_descriptor = 154 | getDescriptor().getMessageTypes().get(5); 155 | internal_static_contactsapi_customfield_DeleteCustomFieldRequest_fieldAccessorTable = new 156 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 157 | internal_static_contactsapi_customfield_DeleteCustomFieldRequest_descriptor, 158 | new java.lang.String[] { "Id", }); 159 | internal_static_contactsapi_customfield_CustomField_descriptor = 160 | getDescriptor().getMessageTypes().get(6); 161 | internal_static_contactsapi_customfield_CustomField_fieldAccessorTable = new 162 | com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 163 | internal_static_contactsapi_customfield_CustomField_descriptor, 164 | new java.lang.String[] { "Name", "Type", "Label", "Id", "Created", "Updated", }); 165 | com.google.protobuf.ExtensionRegistry registry = 166 | com.google.protobuf.ExtensionRegistry.newInstance(); 167 | registry.add(com.google.api.AnnotationsProto.http); 168 | com.google.protobuf.Descriptors.FileDescriptor 169 | .internalUpdateFileDescriptor(descriptor, registry); 170 | com.google.protobuf.EmptyProto.getDescriptor(); 171 | com.google.api.AnnotationsProto.getDescriptor(); 172 | google.protobuf.FieldMaskOuterClass.getDescriptor(); 173 | } 174 | 175 | // @@protoc_insertion_point(outer_class_scope) 176 | } 177 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/DeleteCustomFieldRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public interface DeleteCustomFieldRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.customfield.DeleteCustomFieldRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string id = 1; 12 | */ 13 | java.lang.String getId(); 14 | /** 15 | * string id = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getIdBytes(); 19 | } 20 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/GetCustomFieldRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public interface GetCustomFieldRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.customfield.GetCustomFieldRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string id = 1; 12 | */ 13 | java.lang.String getId(); 14 | /** 15 | * string id = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getIdBytes(); 19 | 20 | /** 21 | * .google.protobuf.FieldMask field_mask = 2; 22 | */ 23 | boolean hasFieldMask(); 24 | /** 25 | * .google.protobuf.FieldMask field_mask = 2; 26 | */ 27 | google.protobuf.FieldMaskOuterClass.FieldMask getFieldMask(); 28 | /** 29 | * .google.protobuf.FieldMask field_mask = 2; 30 | */ 31 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getFieldMaskOrBuilder(); 32 | } 33 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/ListCustomFieldsRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public interface ListCustomFieldsRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.customfield.ListCustomFieldsRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string page_token = 1; 12 | */ 13 | java.lang.String getPageToken(); 14 | /** 15 | * string page_token = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getPageTokenBytes(); 19 | 20 | /** 21 | * int32 page_size = 2; 22 | */ 23 | int getPageSize(); 24 | 25 | /** 26 | *
27 |    * TODO: string or array of strings?
28 |    * 
29 | * 30 | * .google.protobuf.FieldMask field_mask = 3; 31 | */ 32 | boolean hasFieldMask(); 33 | /** 34 | *
35 |    * TODO: string or array of strings?
36 |    * 
37 | * 38 | * .google.protobuf.FieldMask field_mask = 3; 39 | */ 40 | google.protobuf.FieldMaskOuterClass.FieldMask getFieldMask(); 41 | /** 42 | *
43 |    * TODO: string or array of strings?
44 |    * 
45 | * 46 | * .google.protobuf.FieldMask field_mask = 3; 47 | */ 48 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getFieldMaskOrBuilder(); 49 | } 50 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/ListCustomFieldsResponseOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public interface ListCustomFieldsResponseOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.customfield.ListCustomFieldsResponse) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * repeated .contactsapi.customfield.CustomField custom_fields = 1; 12 | */ 13 | java.util.List 14 | getCustomFieldsList(); 15 | /** 16 | * repeated .contactsapi.customfield.CustomField custom_fields = 1; 17 | */ 18 | contactsapi.customfield.CustomField getCustomFields(int index); 19 | /** 20 | * repeated .contactsapi.customfield.CustomField custom_fields = 1; 21 | */ 22 | int getCustomFieldsCount(); 23 | /** 24 | * repeated .contactsapi.customfield.CustomField custom_fields = 1; 25 | */ 26 | java.util.List 27 | getCustomFieldsOrBuilderList(); 28 | /** 29 | * repeated .contactsapi.customfield.CustomField custom_fields = 1; 30 | */ 31 | contactsapi.customfield.CustomFieldOrBuilder getCustomFieldsOrBuilder( 32 | int index); 33 | 34 | /** 35 | * int32 count = 2; 36 | */ 37 | int getCount(); 38 | 39 | /** 40 | * string next_page_token = 3; 41 | */ 42 | java.lang.String getNextPageToken(); 43 | /** 44 | * string next_page_token = 3; 45 | */ 46 | com.google.protobuf.ByteString 47 | getNextPageTokenBytes(); 48 | } 49 | -------------------------------------------------------------------------------- /build/generated/source/proto/main/java/contactsapi/customfield/UpdateCustomFieldRequestOrBuilder.java: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: contactsapi/customfield/customfieldschema.proto 3 | 4 | package contactsapi.customfield; 5 | 6 | public interface UpdateCustomFieldRequestOrBuilder extends 7 | // @@protoc_insertion_point(interface_extends:contactsapi.customfield.UpdateCustomFieldRequest) 8 | com.google.protobuf.MessageOrBuilder { 9 | 10 | /** 11 | * string id = 1; 12 | */ 13 | java.lang.String getId(); 14 | /** 15 | * string id = 1; 16 | */ 17 | com.google.protobuf.ByteString 18 | getIdBytes(); 19 | 20 | /** 21 | * string name = 2; 22 | */ 23 | java.lang.String getName(); 24 | /** 25 | * string name = 2; 26 | */ 27 | com.google.protobuf.ByteString 28 | getNameBytes(); 29 | 30 | /** 31 | * .google.protobuf.FieldMask update_mask = 3; 32 | */ 33 | boolean hasUpdateMask(); 34 | /** 35 | * .google.protobuf.FieldMask update_mask = 3; 36 | */ 37 | google.protobuf.FieldMaskOuterClass.FieldMask getUpdateMask(); 38 | /** 39 | * .google.protobuf.FieldMask update_mask = 3; 40 | */ 41 | google.protobuf.FieldMaskOuterClass.FieldMaskOrBuilder getUpdateMaskOrBuilder(); 42 | } 43 | -------------------------------------------------------------------------------- /entry.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "net/http" 6 | 7 | "github.com/golang/glog" 8 | "golang.org/x/net/context" 9 | "github.com/grpc-ecosystem/grpc-gateway/runtime" 10 | "google.golang.org/grpc" 11 | 12 | customFieldGateway "./src/main/proto/contactsapi/customfield" 13 | companyGateway "./src/main/proto/contactsapi/company" 14 | ) 15 | 16 | var ( 17 | gRpcServer = flag.String("echo_endpoint", "localhost:50051", "endpoint of YourService") 18 | ) 19 | 20 | func run() error { 21 | ctx := context.Background() 22 | ctx, cancel := context.WithCancel(ctx) 23 | defer cancel() 24 | 25 | mux := runtime.NewServeMux() 26 | opts := []grpc.DialOption{grpc.WithInsecure()} 27 | 28 | companyErr := companyGateway.RegisterCompanyServiceHandlerFromEndpoint(ctx, mux, *gRpcServer, opts) 29 | customFieldErr := customFieldGateway.RegisterCustomFieldServiceHandlerFromEndpoint(ctx, mux, *gRpcServer, opts) 30 | 31 | if companyErr != nil { 32 | return companyErr 33 | } 34 | 35 | if customFieldErr != nil { 36 | return customFieldErr 37 | } 38 | 39 | return http.ListenAndServe(":8080", mux) 40 | } 41 | 42 | func main() { 43 | flag.Parse() 44 | defer glog.Flush() 45 | 46 | if err := run(); err != nil { 47 | glog.Fatal(err) 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wejrowski/grpc-gateway-java-gradle/e9958c4dcfd5b8ad2c08ee0e61d7ed61fe58f74d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## Get the gateway running 2 | 3 | 1. Start java server 4 | ```CustomFieldServer.java``` 5 | 2. Run the go proxy 6 | ```go run entry.go``` 7 | 3. curl the rest proxy endpoints (below) 8 | 9 | 10 | ## Sample Endpoint requests 11 | *Documentation: https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api*) 12 | 13 | ### Create Custom Field 14 | 15 | *// TODO: Why when asking for type TEXT, it doesn't return the label? 16 | // Is that by default for default or first values?* 17 | 18 | ``` 19 | curl -X POST -d '{"label": "a label", "name": "a name", "type": "DATE_TIME"}' -k http://localhost:8080/v1/customfields 20 | ``` 21 | 22 | Response: 23 | ```json 24 | { 25 | "name":"a name", 26 | "type":"DATE_TIME", 27 | "label":"a label" 28 | } 29 | ``` 30 | 31 | ### Get Custom Field 32 | 33 | *// TODO: Test params* 34 | 35 | ``` 36 | curl -X GET -k http://localhost:8080/v1/customfields/12 37 | ``` 38 | 39 | Response: 40 | ```json 41 | { 42 | "name": "FieldName", 43 | "label":"Field Label" 44 | } 45 | ``` 46 | 47 | ### List Custom Fields 48 | 49 | *// TODO: Test params* 50 | 51 | ``` 52 | curl -X GET -k http://localhost:8080/v1/customfields 53 | ``` 54 | 55 | Response: 56 | ```json 57 | { 58 | "count": 25, 59 | "custom_fields": [ 60 | { 61 | "label": "Favorite Color", 62 | "name": "fav_color" 63 | }, 64 | { 65 | "label": "Favorite day", 66 | "name": "fav_day", 67 | "type": "DATE_TIME" 68 | } 69 | ] 70 | } 71 | ``` 72 | 73 | ### List fields with mask 74 | ``` 75 | curl -X GET -k http://localhost:8080/v1/customfields\?field_mask.paths\=id\&field_mask.paths\=name 76 | ``` 77 | 78 | Response: 79 | ``` 80 | { 81 | "count":25 82 | "custom_fields": [ 83 | { 84 | "name": "fav_color", 85 | "id":"3214" 86 | }, 87 | { 88 | "name": "fav_day", 89 | "id":"8849" 90 | } 91 | ] 92 | } 93 | ``` 94 | 95 | 96 | ### Update Custom Field 97 | 98 | *// NOTE: type also is left out if it's set to TEXT* 99 | 100 | ``` 101 | curl -X PATCH -k -d '{"name": "my name"}' http://localhost:8080/v1/customfields/1 102 | ``` 103 | 104 | Response: 105 | ```json 106 | { 107 | "name":"1", 108 | "label":"Field Label" 109 | } 110 | ``` 111 | 112 | # Original steps to create 113 | 114 | Create gradle project in intellij 115 | 116 | Add java grpc gradle settings via https://github.com/grpc/grpc-java 117 | *Ensure protobuf-gradle-plugin is at latest release, check https://github.com/google/protobuf-gradle-plugin/releases* 118 | 119 | 120 | Create dummy proto file 121 | 122 | Run gradle Task other/generateProto 123 | - This creates build/generated/source/proto/main... 124 | - The files in generated/source/proto/main/java/com/proto/dumby appear 125 | to be exactly the same as running ```protoc --proto_path=src/main/proto --java_out=build src/main/proto/dummy.proto``` 126 | It created 127 | - Dummy.java, DummyMessage.java and DummyMessageOrBuilder.java 128 | - **Additionally creates a grpc dir with a ```DummyServiceGrpc.java/GreetServiceGrpc.java``` file.** 129 | - This has a grpc service class with stubs 130 | (This is one of the missing pieces the command doesn't run. It *might* be connected to.... [what was the project?]) 131 | 132 | ```bash 133 | protoc --plugin=protoc-gen-grpc-java=build/exe/java_plugin/protoc-gen-grpc-java \ 134 | --grpc-java_out=build --proto_path=src/main/proto src/main/proto/dummy.proto 135 | ``` 136 | 137 | 138 | 139 | 140 | Create Java server (GreetServiceImpl.java) that implements a io.grpc.Server (GreetingServer.java) 141 | - Create Client (make sure you run gw generateProto before) 142 | - Run Server, run Client, watch hello message result 143 | 144 | 145 | ## Creating the gateway 146 | 147 | Install go: ```brew install go```, ```export PATH="$PATH:$GOPATH/bin"``` 148 | 149 | 150 | Install go dependencies 151 | ``` 152 | go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway 153 | go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger 154 | go get -u github.com/golang/protobuf/protoc-gen-go 155 | ``` 156 | 157 | Note: Right now I copied the annotations.proto and http.proto into the project from the grpc-gateway 158 | go installation. 159 | 160 | Generate go server (pb.go) 161 | 162 | ``` 163 | protoc -I/usr/local/include -I. \ 164 | -I$GOPATH/src \ 165 | -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ 166 | --plugin=protoc-gen-go=$GOPATH/bin/protoc-gen-go \ 167 | --go_out=plugins=grpc:. \ 168 | ./src/main/proto/contactsapi/customfield/customfieldschema.proto 169 | ``` 170 | 171 | Create the proxy pb.gw.go file: 172 | 173 | ``` 174 | protoc -I/usr/local/include -I. \ 175 | -I$GOPATH/src \ 176 | -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ 177 | --plugin=protoc-gen-grpc-gateway=$GOPATH/bin/protoc-gen-grpc-gateway \ 178 | --grpc-gateway_out=logtostderr=true:. \ 179 | ./src/main/proto/contactsapi/customfield/customfieldschema.proto 180 | ``` 181 | 182 | // Generate swagger (not needed for proxy) 183 | ``` 184 | protoc -I/usr/local/include -I. \ 185 | -I$GOPATH/src \ 186 | -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ 187 | --plugin=protoc-gen-swagger=$GOPATH/bin/protoc-gen-go \ 188 | --swagger_out=logtostderr=true:. \ 189 | ./src/main/proto/greet/greet.proto 190 | ``` 191 | 192 | NOTE: GreetingServer.java sets the port for the gRPC server ServerBuilder.forPort(50051) 193 | 9090 194 | entry.go sets ```echoEndpoint = flag.String("echo_endpoint", "localhost:9090", "endpoint of YourService")``` 195 | That was changed to gRPC server port ```50051``` (from the grpc-gateway repo) 196 | 197 | 198 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'grpc-java-course' 2 | 3 | -------------------------------------------------------------------------------- /src/main/java/contactsapi/company/server/CompanyServiceImpl.java: -------------------------------------------------------------------------------- 1 | package contactsapi.company.server; 2 | 3 | import com.google.protobuf.Empty; 4 | import contactsapi.company.CompanyResponse; 5 | import contactsapi.company.CompanyServiceGrpc; 6 | import contactsapi.company.CreateCompanyRequest; 7 | import contactsapi.company.DeleteCompanyRequest; 8 | import contactsapi.company.GetCompanyRequest; 9 | import contactsapi.company.ListCompaniesRequest; 10 | import contactsapi.company.ListCompaniesResponse; 11 | import contactsapi.company.UpdateCompanyRequest; 12 | import io.grpc.stub.StreamObserver; 13 | 14 | public class CompanyServiceImpl extends CompanyServiceGrpc.CompanyServiceImplBase { 15 | @Override 16 | public void createCompany(CreateCompanyRequest request, StreamObserver responseObserver) { 17 | CompanyResponse response = CompanyResponse.newBuilder() 18 | .setId("1234") 19 | .setName(request.getName()) 20 | .setVersion(1) 21 | .build(); 22 | 23 | // Send the response 24 | responseObserver.onNext(response); 25 | // Complete the RPC call 26 | responseObserver.onCompleted(); 27 | } 28 | 29 | @Override 30 | public void getCompany(GetCompanyRequest request, StreamObserver responseObserver) { 31 | CompanyResponse response = CompanyResponse.newBuilder() 32 | .setId(request.getId()) 33 | .setName("The Biz LLC") 34 | .setVersion(4) 35 | .build(); 36 | 37 | responseObserver.onNext(response); 38 | responseObserver.onCompleted(); 39 | } 40 | 41 | @Override 42 | public void listCompanies(ListCompaniesRequest request, StreamObserver responseObserver) { 43 | ListCompaniesResponse response = ListCompaniesResponse.newBuilder() 44 | .setCount(15) 45 | .addCompanies(CompanyResponse.newBuilder() 46 | .setId("1234") 47 | .setName("Bob's Builders") 48 | .setVersion(1) 49 | .build()) 50 | .addCompanies(CompanyResponse.newBuilder() 51 | .setId("4472") 52 | .setName("Sara's Sandwhich Shop") 53 | .setVersion(1) 54 | .build()) 55 | .build(); 56 | 57 | responseObserver.onNext(response); 58 | responseObserver.onCompleted(); 59 | } 60 | 61 | @Override 62 | public void updateCompany(UpdateCompanyRequest request, StreamObserver responseObserver) { 63 | CompanyResponse response = CompanyResponse.newBuilder() 64 | .setId("123") 65 | .setName(request.getName()) 66 | .setVersion(2) 67 | .build(); 68 | 69 | responseObserver.onNext(response); 70 | responseObserver.onCompleted(); 71 | } 72 | 73 | @Override 74 | public void deleteCompany(DeleteCompanyRequest request, StreamObserver responseObserver) { 75 | responseObserver.onNext(Empty.getDefaultInstance()); 76 | responseObserver.onCompleted(); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/contactsapi/customfield/server/CustomFieldServiceImpl.java: -------------------------------------------------------------------------------- 1 | package contactsapi.customfield.server; 2 | 3 | import com.google.protobuf.Empty; 4 | import contactsapi.customfield.CreateCustomFieldRequest; 5 | import contactsapi.customfield.CustomField; 6 | import contactsapi.customfield.CustomFieldServiceGrpc; 7 | import contactsapi.customfield.DeleteCustomFieldRequest; 8 | import contactsapi.customfield.GetCustomFieldRequest; 9 | import contactsapi.customfield.ListCustomFieldsRequest; 10 | import contactsapi.customfield.ListCustomFieldsResponse; 11 | import contactsapi.customfield.UpdateCustomFieldRequest; 12 | import io.grpc.stub.StreamObserver; 13 | 14 | public class CustomFieldServiceImpl extends CustomFieldServiceGrpc.CustomFieldServiceImplBase { 15 | @Override 16 | public void createCustomField(CreateCustomFieldRequest request, StreamObserver responseObserver) { 17 | // Create response 18 | CustomField response = CustomField.newBuilder() 19 | .setId("1000") 20 | .setLabel(request.getLabel()) 21 | .setName(request.getName()) 22 | // TODO: WHy isn't this responding? 23 | .setType(CustomField.Type.valueOf(request.getType().toString())) 24 | .build(); 25 | 26 | // Send the response 27 | responseObserver.onNext(response); 28 | 29 | // Complete the RPC call 30 | responseObserver.onCompleted(); 31 | } 32 | 33 | @Override 34 | public void listCustomFields(ListCustomFieldsRequest request, StreamObserver responseObserver) { 35 | 36 | CustomField.Builder customField1Builder = CustomField.newBuilder(); 37 | CustomField.Builder customField2Builder = CustomField.newBuilder(); 38 | 39 | 40 | if (request.getFieldMask().getPathsList().size() == 0 || request.getFieldMask().getPathsList().contains("id")) { 41 | customField1Builder.setId("3214"); 42 | customField2Builder.setId("8849"); 43 | } 44 | 45 | if (request.getFieldMask().getPathsList().size() == 0 || request.getFieldMask().getPathsList().contains("label")) { 46 | customField1Builder.setLabel("Favorite Color"); 47 | customField2Builder.setLabel("Favorite day"); 48 | } 49 | 50 | if (request.getFieldMask().getPathsList().size() == 0 || request.getFieldMask().getPathsList().contains("name")) { 51 | customField1Builder.setName("fav_color"); 52 | customField2Builder.setName("fav_day"); 53 | } 54 | 55 | if (request.getFieldMask().getPathsList().size() == 0 || request.getFieldMask().getPathsList().contains("type")) { 56 | customField1Builder.setType(CustomField.Type.TEXT); 57 | customField2Builder.setType(CustomField.Type.DATE_TIME); 58 | } 59 | 60 | customField1Builder.setId("maskCount:" + request.getFieldMask().getPathsCount()); 61 | 62 | CustomField customField1 = customField1Builder.build(); 63 | CustomField customField2 = customField2Builder.build(); 64 | 65 | 66 | ListCustomFieldsResponse response = ListCustomFieldsResponse.newBuilder() 67 | .setCount(25) 68 | .addCustomFields(customField1) 69 | .addCustomFields(customField2) 70 | .build(); 71 | // Send the response 72 | responseObserver.onNext(response); 73 | 74 | // Complete the RPC call 75 | responseObserver.onCompleted(); 76 | } 77 | 78 | @Override 79 | public void getCustomField(GetCustomFieldRequest request, StreamObserver responseObserver) { 80 | // Create response 81 | CustomField response = CustomField.newBuilder() 82 | .setId(request.getId()) 83 | .setLabel("Field Label") 84 | .setName("FieldName") 85 | .setType(CustomField.Type.PHONE_NUMBER) 86 | .build(); 87 | 88 | // Send the response 89 | responseObserver.onNext(response); 90 | 91 | // Complete the RPC call 92 | responseObserver.onCompleted(); 93 | } 94 | 95 | @Override 96 | public void updateCustomField(UpdateCustomFieldRequest request, StreamObserver responseObserver) { 97 | // Create response 98 | CustomField response = CustomField.newBuilder() 99 | .setId(request.getId()) 100 | .setLabel("Field Label") 101 | .setName(request.getName()) 102 | .setType(CustomField.Type.EMAIL) 103 | .build(); 104 | 105 | // Send the response 106 | responseObserver.onNext(response); 107 | 108 | // Complete the RPC call 109 | responseObserver.onCompleted(); 110 | } 111 | 112 | @Override 113 | public void deleteCustomField(DeleteCustomFieldRequest request, StreamObserver responseObserver) { 114 | responseObserver.onNext(Empty.getDefaultInstance()); 115 | responseObserver.onCompleted(); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /src/main/java/contactsapi/grpcserver/ContactsApiServer.java: -------------------------------------------------------------------------------- 1 | package contactsapi.grpcserver; 2 | 3 | import contactsapi.company.server.CompanyServiceImpl; 4 | import contactsapi.customfield.server.CustomFieldServiceImpl; 5 | import io.grpc.Server; 6 | import io.grpc.ServerBuilder; 7 | 8 | import java.io.IOException; 9 | 10 | public class ContactsApiServer { 11 | public static void main(String[] args) throws IOException, InterruptedException { 12 | System.out.println("Hello gRPC"); 13 | 14 | Server server = ServerBuilder.forPort(50051) 15 | .addService(new CustomFieldServiceImpl()) 16 | .addService(new CompanyServiceImpl()) 17 | .build(); 18 | 19 | server.start(); 20 | 21 | Runtime.getRuntime().addShutdownHook(new Thread(() -> { 22 | System.out.println("Received Shutdown Request"); 23 | server.shutdown(); 24 | System.out.println("Successfully stopped server"); 25 | })); 26 | 27 | // Block main thread until terminated 28 | server.awaitTermination(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/proto/contactsapi/company/companies.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package contactsapi.company; 4 | option java_multiple_files = true; 5 | 6 | import "google/api/annotations.proto"; 7 | import "google/protobuf/empty.proto"; 8 | import "google/protobuf/field_mask.proto"; 9 | 10 | message CreateCompanyRequest { 11 | string name = 1; 12 | // TODO: does create have a mask?.. 13 | google.protobuf.FieldMask field_mask = 2; 14 | } 15 | 16 | message GetCompanyRequest { 17 | string id = 1; 18 | google.protobuf.FieldMask field_mask = 2; 19 | } 20 | 21 | message ListCompaniesRequest { 22 | google.protobuf.FieldMask field_mask = 2; 23 | } 24 | 25 | message GetCompaniesRequest { 26 | string page_token = 1; 27 | int32 page_size = 2; 28 | google.protobuf.FieldMask field_mask = 3; 29 | } 30 | 31 | message UpdateCompanyRequest { 32 | string id = 1; 33 | string name = 2; 34 | google.protobuf.FieldMask update_mask = 3; 35 | } 36 | 37 | message DeleteCompanyRequest { 38 | string id = 1; 39 | } 40 | 41 | message CompanyResponse { 42 | string id = 1; 43 | string name = 2; 44 | int32 version = 3;// TODO: Should this be a string or a int32? 45 | } 46 | 47 | message ListCompaniesResponse { 48 | repeated CompanyResponse companies = 1; 49 | string next_page_token = 2; 50 | int32 count = 3; 51 | } 52 | 53 | service CompanyService { 54 | rpc CreateCompany(CreateCompanyRequest) returns (CompanyResponse) { 55 | option (google.api.http) = { 56 | post: "/v1/companies" 57 | body: "*" 58 | }; 59 | }; 60 | 61 | rpc GetCompany(GetCompanyRequest) returns (CompanyResponse) { 62 | option (google.api.http) = { 63 | get: "/v1/companies/{id}" 64 | }; 65 | }; 66 | 67 | rpc ListCompanies(ListCompaniesRequest) returns (ListCompaniesResponse) { 68 | option (google.api.http) = { 69 | get: "/v1/companies" 70 | }; 71 | }; 72 | 73 | rpc UpdateCompany(UpdateCompanyRequest) returns (CompanyResponse) { 74 | option (google.api.http) = { 75 | get: "/v1/companies/{id}" 76 | }; 77 | }; 78 | 79 | rpc DeleteCompany(DeleteCompanyRequest) returns (google.protobuf.Empty) { 80 | option (google.api.http) = { 81 | delete: "/v1/companies/{id}" 82 | }; 83 | }; 84 | } 85 | -------------------------------------------------------------------------------- /src/main/proto/contactsapi/contact/contacts.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package contactsapi.contact; 4 | option java_multiple_files = true; 5 | 6 | //import "google/protobuf/timestamp.proto"; 7 | //import "google.protobuf.Timestamp"; 8 | // /usr/local/include/google/protobuf/timestamp.proto 9 | import "google/api/annotations.proto"; 10 | //import "google/protobuf/field_mask.proto"; 11 | import "google/protobuf/field_mask.proto"; 12 | import "google/protobuf/empty.proto"; 13 | 14 | // import "../../lib/google/api/annotations.proto"; // THIS APPARENTLY IS IN GOOGLE/PROTOBUF/API.PROTO! 15 | // although.. that might dissappear in build? let's try it. 16 | //import "google/protobuf/api.proto"; 17 | 18 | 19 | message CreateContactRequest { 20 | string name = 1; 21 | enum Type { 22 | TEXT = 0; 23 | NUMBER = 1; 24 | BOOLEAN = 2; 25 | DATE_TIME = 3; 26 | EMAIL = 4; 27 | PHONE_NUMBER = 5; 28 | URL = 6; 29 | } 30 | 31 | Type type = 2; 32 | string label = 3; 33 | } 34 | 35 | 36 | message ListContactsRequest { 37 | string pageToken = 1; 38 | int32 limit = 2; 39 | repeated string fieldMask = 3; 40 | string givenName = 4;// filter contacts by givenName string 41 | string familyName = 5;// filter contacts by familyName string 42 | string email = 6;// filter contacts by email string 43 | repeated string tags = 7;// filter contacts by tag nams string[] 44 | // TODO: get Timestamp.proto import working 45 | // Timestamp created = 8;// filter contacts by create date date range - 1/12/18~2/12/18 46 | repeated string contactIds = 9; 47 | string companyId = 10;// filter contacts by company Id string 48 | } 49 | 50 | message ListContactsResponse { 51 | repeated ContactResponse contacts = 1; 52 | string next_page_token = 2; 53 | int32 count = 3; 54 | } 55 | 56 | message GetContactRequest { 57 | string id = 1; 58 | google.protobuf.FieldMask field_mask = 2; 59 | } 60 | 61 | 62 | // TODO: Will we allow updating type/label? 63 | message UpdateContactRequest { 64 | string id = 1; 65 | string name = 2; 66 | google.protobuf.FieldMask update_mask = 3; 67 | } 68 | 69 | message ContactResponse { 70 | string name = 1; 71 | 72 | } 73 | 74 | service ContactService { 75 | rpc CreateContact(CreateContactRequest) returns (ContactResponse) { 76 | option (google.api.http) = { 77 | post: "/v1/contacts" 78 | body: "*" 79 | }; 80 | }; 81 | 82 | rpc ListContacts(ListContactsRequest) returns (ListContactsResponse) { 83 | option (google.api.http) = { 84 | get: "/v1/contacts" 85 | }; 86 | }; 87 | 88 | rpc GetContact(GetContactRequest) returns (ContactResponse) { 89 | option (google.api.http) = { 90 | get: "/v1/contacts/{id}" 91 | }; 92 | }; 93 | 94 | rpc UpdateContact(UpdateContactRequest) returns (ContactResponse) { 95 | option (google.api.http) = { 96 | patch: "/v1/contacts/{id}" 97 | }; 98 | }; 99 | 100 | rpc DeleteContact(UpdateContactRequest) returns (google.protobuf.Empty) { 101 | option (google.api.http) = { 102 | patch: "/v1/contacts/{id}" 103 | }; 104 | }; 105 | } 106 | -------------------------------------------------------------------------------- /src/main/proto/contactsapi/customfield/customfieldschema.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package contactsapi.customfield; 4 | option java_multiple_files = true; 5 | 6 | //import "google/protobuf/timestamp.proto"; 7 | //import "google.protobuf.Timestamp"; 8 | // /usr/local/include/google/protobuf/timestamp.proto 9 | 10 | import "google/protobuf/empty.proto"; 11 | import "google/api/annotations.proto"; 12 | // NOTE this is where these come from I beleive: https://github.com/googleapis/googleapis/tree/master/google/api 13 | // Gateway has it copied in their project on gateway and also swagger under third_party 14 | // https://github.com/grpc-ecosystem/grpc-gateway/blob/master/third_party/googleapis/google/api/annotations.proto 15 | 16 | 17 | //google.protobuf/ 18 | import "google/protobuf/field_mask.proto"; 19 | //import "contactsapi/customfield/field_mask.proto"; 20 | 21 | // import "../../lib/google/api/annotations.proto"; // THIS APPARENTLY IS IN GOOGLE/PROTOBUF/API.PROTO! 22 | // although.. that might dissappear in build? let's try it. 23 | //import "google/protobuf/api.proto"; 24 | 25 | // TODO: add version (string or int32?) 26 | 27 | message CreateCustomFieldRequest { 28 | string name = 1; 29 | enum Type { 30 | TEXT = 0; 31 | NUMBER = 1; 32 | BOOLEAN = 2; 33 | DATE_TIME = 3; 34 | EMAIL = 4; 35 | PHONE_NUMBER = 5; 36 | URL = 6; 37 | } 38 | 39 | Type type = 2; 40 | string label = 3; 41 | // ?? 42 | // repeated string field_mask = 4; 43 | } 44 | 45 | message ListCustomFieldsRequest { 46 | string page_token = 1; 47 | int32 page_size = 2; 48 | // TODO: string or array of strings? 49 | google.protobuf.FieldMask field_mask = 3; 50 | } 51 | message ListCustomFieldsResponse { 52 | repeated CustomField custom_fields = 1; 53 | int32 count = 2; 54 | string next_page_token = 3; 55 | } 56 | 57 | message GetCustomFieldRequest { 58 | string id = 1; 59 | google.protobuf.FieldMask field_mask = 2; 60 | } 61 | 62 | 63 | // TODO: Will we allow updating type/label? 64 | message UpdateCustomFieldRequest { 65 | string id = 1; 66 | string name = 2; 67 | google.protobuf.FieldMask update_mask = 3; 68 | } 69 | 70 | 71 | message DeleteCustomFieldRequest { 72 | string id = 1; 73 | } 74 | 75 | message CustomField { 76 | string name = 1; 77 | enum Type { 78 | TEXT = 0; 79 | NUMBER = 1; 80 | BOOLEAN = 2; 81 | DATE_TIME = 3; 82 | EMAIL = 4; 83 | PHONE_NUMBER = 5; 84 | URL = 6; 85 | } 86 | 87 | Type type = 2; 88 | string label = 3; 89 | string id = 4; 90 | string created = 5; // TODO: or Timestamp.proto? 91 | string updated = 6; // TODO: or Timestamp.proto? 92 | 93 | } 94 | 95 | service CustomFieldService { 96 | rpc CreateCustomField(CreateCustomFieldRequest) returns (CustomField) { 97 | option (google.api.http) = { 98 | post: "/v1/customfields" 99 | body: "*" 100 | }; 101 | }; 102 | 103 | rpc ListCustomFields(ListCustomFieldsRequest) returns (ListCustomFieldsResponse) { 104 | option (google.api.http) = { 105 | get: "/v1/customfields" 106 | }; 107 | }; 108 | 109 | rpc GetCustomField(GetCustomFieldRequest) returns (CustomField) { 110 | option (google.api.http) = { 111 | get: "/v1/customfields/{id}" 112 | }; 113 | }; 114 | 115 | rpc UpdateCustomField(UpdateCustomFieldRequest) returns (CustomField) { 116 | option (google.api.http) = { 117 | patch: "/v1/customfields/{id}" 118 | }; 119 | }; 120 | 121 | rpc DeleteCustomField(DeleteCustomFieldRequest) returns (google.protobuf.Empty) { 122 | option (google.api.http) = { 123 | delete: "/v1/customfields/{id}" 124 | }; 125 | }; 126 | } 127 | 128 | -------------------------------------------------------------------------------- /src/main/proto/dummy.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package dummy; 4 | 5 | option java_package = "com.proto.dummy"; 6 | option java_multiple_files = true; 7 | 8 | message DummyMessage {} 9 | 10 | service DummyService {} 11 | -------------------------------------------------------------------------------- /src/main/proto/google/api/annotations.proto: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Google Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.api; 18 | 19 | import "google/api/http.proto"; 20 | //import "google/api/http.proto"; 21 | import "google/protobuf/descriptor.proto"; 22 | 23 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; 24 | option java_multiple_files = true; 25 | option java_outer_classname = "AnnotationsProto"; 26 | option java_package = "com.google.api"; 27 | option objc_class_prefix = "GAPI"; 28 | 29 | extend google.protobuf.MethodOptions { 30 | // See `HttpRule`. 31 | HttpRule http = 72295728; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/proto/google/api/http.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.api; 18 | 19 | option cc_enable_arenas = true; 20 | option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; 21 | option java_multiple_files = true; 22 | option java_outer_classname = "HttpProto"; 23 | option java_package = "com.google.api"; 24 | option objc_class_prefix = "GAPI"; 25 | 26 | 27 | // Defines the HTTP configuration for a service. It contains a list of 28 | // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method 29 | // to one or more HTTP REST API methods. 30 | message Http { 31 | // A list of HTTP configuration rules that apply to individual API methods. 32 | // 33 | // **NOTE:** All service configuration rules follow "last one wins" order. 34 | repeated HttpRule rules = 1; 35 | } 36 | 37 | // `HttpRule` defines the mapping of an RPC method to one or more HTTP 38 | // REST APIs. The mapping determines what portions of the request 39 | // message are populated from the path, query parameters, or body of 40 | // the HTTP request. The mapping is typically specified as an 41 | // `google.api.http` annotation, see "google/api/annotations.proto" 42 | // for details. 43 | // 44 | // The mapping consists of a field specifying the path template and 45 | // method kind. The path template can refer to fields in the request 46 | // message, as in the example below which describes a REST GET 47 | // operation on a resource collection of messages: 48 | // 49 | // 50 | // service Messaging { 51 | // rpc GetMessage(GetMessageRequest) returns (Message) { 52 | // option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; 53 | // } 54 | // } 55 | // message GetMessageRequest { 56 | // message SubMessage { 57 | // string subfield = 1; 58 | // } 59 | // string message_id = 1; // mapped to the URL 60 | // SubMessage sub = 2; // `sub.subfield` is url-mapped 61 | // } 62 | // message Message { 63 | // string text = 1; // content of the resource 64 | // } 65 | // 66 | // The same http annotation can alternatively be expressed inside the 67 | // `GRPC API Configuration` YAML file. 68 | // 69 | // http: 70 | // rules: 71 | // - selector: .Messaging.GetMessage 72 | // get: /v1/messages/{message_id}/{sub.subfield} 73 | // 74 | // This definition enables an automatic, bidrectional mapping of HTTP 75 | // JSON to RPC. Example: 76 | // 77 | // HTTP | RPC 78 | // -----|----- 79 | // `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` 80 | // 81 | // In general, not only fields but also field paths can be referenced 82 | // from a path pattern. Fields mapped to the path pattern cannot be 83 | // repeated and must have a primitive (non-message) type. 84 | // 85 | // Any fields in the request message which are not bound by the path 86 | // pattern automatically become (optional) HTTP query 87 | // parameters. Assume the following definition of the request message: 88 | // 89 | // 90 | // message GetMessageRequest { 91 | // message SubMessage { 92 | // string subfield = 1; 93 | // } 94 | // string message_id = 1; // mapped to the URL 95 | // int64 revision = 2; // becomes a parameter 96 | // SubMessage sub = 3; // `sub.subfield` becomes a parameter 97 | // } 98 | // 99 | // 100 | // This enables a HTTP JSON to RPC mapping as below: 101 | // 102 | // HTTP | RPC 103 | // -----|----- 104 | // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` 105 | // 106 | // Note that fields which are mapped to HTTP parameters must have a 107 | // primitive type or a repeated primitive type. Message types are not 108 | // allowed. In the case of a repeated type, the parameter can be 109 | // repeated in the URL, as in `...?param=A¶m=B`. 110 | // 111 | // For HTTP method kinds which allow a request body, the `body` field 112 | // specifies the mapping. Consider a REST update method on the 113 | // message resource collection: 114 | // 115 | // 116 | // service Messaging { 117 | // rpc UpdateMessage(UpdateMessageRequest) returns (Message) { 118 | // option (google.api.http) = { 119 | // put: "/v1/messages/{message_id}" 120 | // body: "message" 121 | // }; 122 | // } 123 | // } 124 | // message UpdateMessageRequest { 125 | // string message_id = 1; // mapped to the URL 126 | // Message message = 2; // mapped to the body 127 | // } 128 | // 129 | // 130 | // The following HTTP JSON to RPC mapping is enabled, where the 131 | // representation of the JSON in the request body is determined by 132 | // protos JSON encoding: 133 | // 134 | // HTTP | RPC 135 | // -----|----- 136 | // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` 137 | // 138 | // The special name `*` can be used in the body mapping to define that 139 | // every field not bound by the path template should be mapped to the 140 | // request body. This enables the following alternative definition of 141 | // the update method: 142 | // 143 | // service Messaging { 144 | // rpc UpdateMessage(Message) returns (Message) { 145 | // option (google.api.http) = { 146 | // put: "/v1/messages/{message_id}" 147 | // body: "*" 148 | // }; 149 | // } 150 | // } 151 | // message Message { 152 | // string message_id = 1; 153 | // string text = 2; 154 | // } 155 | // 156 | // 157 | // The following HTTP JSON to RPC mapping is enabled: 158 | // 159 | // HTTP | RPC 160 | // -----|----- 161 | // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` 162 | // 163 | // Note that when using `*` in the body mapping, it is not possible to 164 | // have HTTP parameters, as all fields not bound by the path end in 165 | // the body. This makes this option more rarely used in practice of 166 | // defining REST APIs. The common usage of `*` is in custom methods 167 | // which don't use the URL at all for transferring data. 168 | // 169 | // It is possible to define multiple HTTP methods for one RPC by using 170 | // the `additional_bindings` option. Example: 171 | // 172 | // service Messaging { 173 | // rpc GetMessage(GetMessageRequest) returns (Message) { 174 | // option (google.api.http) = { 175 | // get: "/v1/messages/{message_id}" 176 | // additional_bindings { 177 | // get: "/v1/users/{user_id}/messages/{message_id}" 178 | // } 179 | // }; 180 | // } 181 | // } 182 | // message GetMessageRequest { 183 | // string message_id = 1; 184 | // string user_id = 2; 185 | // } 186 | // 187 | // 188 | // This enables the following two alternative HTTP JSON to RPC 189 | // mappings: 190 | // 191 | // HTTP | RPC 192 | // -----|----- 193 | // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` 194 | // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` 195 | // 196 | // # Rules for HTTP mapping 197 | // 198 | // The rules for mapping HTTP path, query parameters, and body fields 199 | // to the request message are as follows: 200 | // 201 | // 1. The `body` field specifies either `*` or a field path, or is 202 | // omitted. If omitted, it assumes there is no HTTP body. 203 | // 2. Leaf fields (recursive expansion of nested messages in the 204 | // request) can be classified into three types: 205 | // (a) Matched in the URL template. 206 | // (b) Covered by body (if body is `*`, everything except (a) fields; 207 | // else everything under the body field) 208 | // (c) All other fields. 209 | // 3. URL query parameters found in the HTTP request are mapped to (c) fields. 210 | // 4. Any body sent with an HTTP request can contain only (b) fields. 211 | // 212 | // The syntax of the path template is as follows: 213 | // 214 | // Template = "/" Segments [ Verb ] ; 215 | // Segments = Segment { "/" Segment } ; 216 | // Segment = "*" | "**" | LITERAL | Variable ; 217 | // Variable = "{" FieldPath [ "=" Segments ] "}" ; 218 | // FieldPath = IDENT { "." IDENT } ; 219 | // Verb = ":" LITERAL ; 220 | // 221 | // The syntax `*` matches a single path segment. It follows the semantics of 222 | // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String 223 | // Expansion. 224 | // 225 | // The syntax `**` matches zero or more path segments. It follows the semantics 226 | // of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved 227 | // Expansion. NOTE: it must be the last segment in the path except the Verb. 228 | // 229 | // The syntax `LITERAL` matches literal text in the URL path. 230 | // 231 | // The syntax `Variable` matches the entire path as specified by its template; 232 | // this nested template must not contain further variables. If a variable 233 | // matches a single path segment, its template may be omitted, e.g. `{var}` 234 | // is equivalent to `{var=*}`. 235 | // 236 | // NOTE: the field paths in variables and in the `body` must not refer to 237 | // repeated fields or map fields. 238 | // 239 | // Use CustomHttpPattern to specify any HTTP method that is not included in the 240 | // `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for 241 | // a given URL path rule. The wild-card rule is useful for services that provide 242 | // content to Web (HTML) clients. 243 | message HttpRule { 244 | // Selects methods to which this rule applies. 245 | // 246 | // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. 247 | string selector = 1; 248 | 249 | // Determines the URL pattern is matched by this rules. This pattern can be 250 | // used with any of the {get|put|post|delete|patch} methods. A custom method 251 | // can be defined using the 'custom' field. 252 | oneof pattern { 253 | // Used for listing and getting information about resources. 254 | string get = 2; 255 | 256 | // Used for updating a resource. 257 | string put = 3; 258 | 259 | // Used for creating a resource. 260 | string post = 4; 261 | 262 | // Used for deleting a resource. 263 | string delete = 5; 264 | 265 | // Used for updating a resource. 266 | string patch = 6; 267 | 268 | // Custom pattern is used for defining custom verbs. 269 | CustomHttpPattern custom = 8; 270 | } 271 | 272 | // The name of the request field whose value is mapped to the HTTP body, or 273 | // `*` for mapping all fields not captured by the path pattern to the HTTP 274 | // body. NOTE: the referred field must not be a repeated field and must be 275 | // present at the top-level of request message type. 276 | string body = 7; 277 | 278 | // Additional HTTP bindings for the selector. Nested bindings must 279 | // not contain an `additional_bindings` field themselves (that is, 280 | // the nesting may only be one level deep). 281 | repeated HttpRule additional_bindings = 11; 282 | } 283 | 284 | // A custom pattern is used for defining custom HTTP verb. 285 | message CustomHttpPattern { 286 | // The name of this custom HTTP verb. 287 | string kind = 1; 288 | 289 | // The path matched by this custom verb. 290 | string path = 2; 291 | } 292 | -------------------------------------------------------------------------------- /src/main/proto/google/protobuf/field_mask.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package google.protobuf; 34 | 35 | //option csharp_namespace = "Google.Protobuf.WellKnownTypes"; 36 | //option java_package = "com.google.protobuf"; 37 | //option java_outer_classname = "FieldMaskProto"; 38 | //option java_multiple_files = true; 39 | //option objc_class_prefix = "GPB"; 40 | //option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask"; 41 | 42 | // `FieldMask` represents a set of symbolic field paths, for example: 43 | // 44 | // paths: "f.a" 45 | // paths: "f.b.d" 46 | // 47 | // Here `f` represents a field in some root message, `a` and `b` 48 | // fields in the message found in `f`, and `d` a field found in the 49 | // message in `f.b`. 50 | // 51 | // Field masks are used to specify a subset of fields that should be 52 | // returned by a get operation or modified by an update operation. 53 | // Field masks also have a custom JSON encoding (see below). 54 | // 55 | // # Field Masks in Projections 56 | // 57 | // When used in the context of a projection, a response message or 58 | // sub-message is filtered by the API to only contain those fields as 59 | // specified in the mask. For example, if the mask in the previous 60 | // example is applied to a response message as follows: 61 | // 62 | // f { 63 | // a : 22 64 | // b { 65 | // d : 1 66 | // x : 2 67 | // } 68 | // y : 13 69 | // } 70 | // z: 8 71 | // 72 | // The result will not contain specific values for fields x,y and z 73 | // (their value will be set to the default, and omitted in proto text 74 | // output): 75 | // 76 | // 77 | // f { 78 | // a : 22 79 | // b { 80 | // d : 1 81 | // } 82 | // } 83 | // 84 | // A repeated field is not allowed except at the last position of a 85 | // paths string. 86 | // 87 | // If a FieldMask object is not present in a get operation, the 88 | // operation applies to all fields (as if a FieldMask of all fields 89 | // had been specified). 90 | // 91 | // Note that a field mask does not necessarily apply to the 92 | // top-level response message. In case of a REST get operation, the 93 | // field mask applies directly to the response, but in case of a REST 94 | // list operation, the mask instead applies to each individual message 95 | // in the returned resource list. In case of a REST custom method, 96 | // other definitions may be used. Where the mask applies will be 97 | // clearly documented together with its declaration in the API. In 98 | // any case, the effect on the returned resource/resources is required 99 | // behavior for APIs. 100 | // 101 | // # Field Masks in Update Operations 102 | // 103 | // A field mask in update operations specifies which fields of the 104 | // targeted resource are going to be updated. The API is required 105 | // to only change the values of the fields as specified in the mask 106 | // and leave the others untouched. If a resource is passed in to 107 | // describe the updated values, the API ignores the values of all 108 | // fields not covered by the mask. 109 | // 110 | // If a repeated field is specified for an update operation, the existing 111 | // repeated values in the target resource will be overwritten by the new values. 112 | // Note that a repeated field is only allowed in the last position of a `paths` 113 | // string. 114 | // 115 | // If a sub-message is specified in the last position of the field mask for an 116 | // update operation, then the existing sub-message in the target resource is 117 | // overwritten. Given the target message: 118 | // 119 | // f { 120 | // b { 121 | // d : 1 122 | // x : 2 123 | // } 124 | // c : 1 125 | // } 126 | // 127 | // And an update message: 128 | // 129 | // f { 130 | // b { 131 | // d : 10 132 | // } 133 | // } 134 | // 135 | // then if the field mask is: 136 | // 137 | // paths: "f.b" 138 | // 139 | // then the result will be: 140 | // 141 | // f { 142 | // b { 143 | // d : 10 144 | // } 145 | // c : 1 146 | // } 147 | // 148 | // However, if the update mask was: 149 | // 150 | // paths: "f.b.d" 151 | // 152 | // then the result would be: 153 | // 154 | // f { 155 | // b { 156 | // d : 10 157 | // x : 2 158 | // } 159 | // c : 1 160 | // } 161 | // 162 | // In order to reset a field's value to the default, the field must 163 | // be in the mask and set to the default value in the provided resource. 164 | // Hence, in order to reset all fields of a resource, provide a default 165 | // instance of the resource and set all fields in the mask, or do 166 | // not provide a mask as described below. 167 | // 168 | // If a field mask is not present on update, the operation applies to 169 | // all fields (as if a field mask of all fields has been specified). 170 | // Note that in the presence of schema evolution, this may mean that 171 | // fields the client does not know and has therefore not filled into 172 | // the request will be reset to their default. If this is unwanted 173 | // behavior, a specific service may require a client to always specify 174 | // a field mask, producing an error if not. 175 | // 176 | // As with get operations, the location of the resource which 177 | // describes the updated values in the request message depends on the 178 | // operation kind. In any case, the effect of the field mask is 179 | // required to be honored by the API. 180 | // 181 | // ## Considerations for HTTP REST 182 | // 183 | // The HTTP kind of an update operation which uses a field mask must 184 | // be set to PATCH instead of PUT in order to satisfy HTTP semantics 185 | // (PUT must only be used for full updates). 186 | // 187 | // # JSON Encoding of Field Masks 188 | // 189 | // In JSON, a field mask is encoded as a single string where paths are 190 | // separated by a comma. Fields name in each path are converted 191 | // to/from lower-camel naming conventions. 192 | // 193 | // As an example, consider the following message declarations: 194 | // 195 | // message Profile { 196 | // User user = 1; 197 | // Photo photo = 2; 198 | // } 199 | // message User { 200 | // string display_name = 1; 201 | // string address = 2; 202 | // } 203 | // 204 | // In proto a field mask for `Profile` may look as such: 205 | // 206 | // mask { 207 | // paths: "user.display_name" 208 | // paths: "photo" 209 | // } 210 | // 211 | // In JSON, the same mask is represented as below: 212 | // 213 | // { 214 | // mask: "user.displayName,photo" 215 | // } 216 | // 217 | // # Field Masks and Oneof Fields 218 | // 219 | // Field masks treat fields in oneofs just as regular fields. Consider the 220 | // following message: 221 | // 222 | // message SampleMessage { 223 | // oneof test_oneof { 224 | // string name = 4; 225 | // SubMessage sub_message = 9; 226 | // } 227 | // } 228 | // 229 | // The field mask can be: 230 | // 231 | // mask { 232 | // paths: "name" 233 | // } 234 | // 235 | // Or: 236 | // 237 | // mask { 238 | // paths: "sub_message" 239 | // } 240 | // 241 | // Note that oneof type names ("test_oneof" in this case) cannot be used in 242 | // paths. 243 | // 244 | // ## Field Mask Verification 245 | // 246 | // The implementation of the all the API methods, which have any FieldMask type 247 | // field in the request, should verify the included field paths, and return 248 | // `INVALID_ARGUMENT` error if any path is duplicated or unmappable. 249 | message FieldMask { 250 | // The set of field mask paths. 251 | repeated string paths = 1; 252 | } 253 | -------------------------------------------------------------------------------- /src/main/proto/greet/greet.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. DO NOT EDIT. 2 | // source: src/main/proto/greet/greet.proto 3 | 4 | package greet 5 | 6 | import proto "github.com/golang/protobuf/proto" 7 | import fmt "fmt" 8 | import math "math" 9 | import _ "google.golang.org/genproto/googleapis/api/annotations" 10 | 11 | import ( 12 | context "golang.org/x/net/context" 13 | grpc "google.golang.org/grpc" 14 | ) 15 | 16 | // Reference imports to suppress errors if they are not otherwise used. 17 | var _ = proto.Marshal 18 | var _ = fmt.Errorf 19 | var _ = math.Inf 20 | 21 | // This is a compile-time assertion to ensure that this generated file 22 | // is compatible with the proto package it is being compiled against. 23 | // A compilation error at this line likely means your copy of the 24 | // proto package needs to be updated. 25 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 26 | 27 | type Greeting struct { 28 | FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName" json:"first_name,omitempty"` 29 | LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName" json:"last_name,omitempty"` 30 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 31 | XXX_unrecognized []byte `json:"-"` 32 | XXX_sizecache int32 `json:"-"` 33 | } 34 | 35 | func (m *Greeting) Reset() { *m = Greeting{} } 36 | func (m *Greeting) String() string { return proto.CompactTextString(m) } 37 | func (*Greeting) ProtoMessage() {} 38 | func (*Greeting) Descriptor() ([]byte, []int) { 39 | return fileDescriptor_greet_b6cc28bd62e1bfe7, []int{0} 40 | } 41 | func (m *Greeting) XXX_Unmarshal(b []byte) error { 42 | return xxx_messageInfo_Greeting.Unmarshal(m, b) 43 | } 44 | func (m *Greeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 | return xxx_messageInfo_Greeting.Marshal(b, m, deterministic) 46 | } 47 | func (dst *Greeting) XXX_Merge(src proto.Message) { 48 | xxx_messageInfo_Greeting.Merge(dst, src) 49 | } 50 | func (m *Greeting) XXX_Size() int { 51 | return xxx_messageInfo_Greeting.Size(m) 52 | } 53 | func (m *Greeting) XXX_DiscardUnknown() { 54 | xxx_messageInfo_Greeting.DiscardUnknown(m) 55 | } 56 | 57 | var xxx_messageInfo_Greeting proto.InternalMessageInfo 58 | 59 | func (m *Greeting) GetFirstName() string { 60 | if m != nil { 61 | return m.FirstName 62 | } 63 | return "" 64 | } 65 | 66 | func (m *Greeting) GetLastName() string { 67 | if m != nil { 68 | return m.LastName 69 | } 70 | return "" 71 | } 72 | 73 | type GreetRequest struct { 74 | Greeting *Greeting `protobuf:"bytes,1,opt,name=greeting" json:"greeting,omitempty"` 75 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 76 | XXX_unrecognized []byte `json:"-"` 77 | XXX_sizecache int32 `json:"-"` 78 | } 79 | 80 | func (m *GreetRequest) Reset() { *m = GreetRequest{} } 81 | func (m *GreetRequest) String() string { return proto.CompactTextString(m) } 82 | func (*GreetRequest) ProtoMessage() {} 83 | func (*GreetRequest) Descriptor() ([]byte, []int) { 84 | return fileDescriptor_greet_b6cc28bd62e1bfe7, []int{1} 85 | } 86 | func (m *GreetRequest) XXX_Unmarshal(b []byte) error { 87 | return xxx_messageInfo_GreetRequest.Unmarshal(m, b) 88 | } 89 | func (m *GreetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 90 | return xxx_messageInfo_GreetRequest.Marshal(b, m, deterministic) 91 | } 92 | func (dst *GreetRequest) XXX_Merge(src proto.Message) { 93 | xxx_messageInfo_GreetRequest.Merge(dst, src) 94 | } 95 | func (m *GreetRequest) XXX_Size() int { 96 | return xxx_messageInfo_GreetRequest.Size(m) 97 | } 98 | func (m *GreetRequest) XXX_DiscardUnknown() { 99 | xxx_messageInfo_GreetRequest.DiscardUnknown(m) 100 | } 101 | 102 | var xxx_messageInfo_GreetRequest proto.InternalMessageInfo 103 | 104 | func (m *GreetRequest) GetGreeting() *Greeting { 105 | if m != nil { 106 | return m.Greeting 107 | } 108 | return nil 109 | } 110 | 111 | type GreetResponse struct { 112 | Result string `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` 113 | XXX_NoUnkeyedLiteral struct{} `json:"-"` 114 | XXX_unrecognized []byte `json:"-"` 115 | XXX_sizecache int32 `json:"-"` 116 | } 117 | 118 | func (m *GreetResponse) Reset() { *m = GreetResponse{} } 119 | func (m *GreetResponse) String() string { return proto.CompactTextString(m) } 120 | func (*GreetResponse) ProtoMessage() {} 121 | func (*GreetResponse) Descriptor() ([]byte, []int) { 122 | return fileDescriptor_greet_b6cc28bd62e1bfe7, []int{2} 123 | } 124 | func (m *GreetResponse) XXX_Unmarshal(b []byte) error { 125 | return xxx_messageInfo_GreetResponse.Unmarshal(m, b) 126 | } 127 | func (m *GreetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 128 | return xxx_messageInfo_GreetResponse.Marshal(b, m, deterministic) 129 | } 130 | func (dst *GreetResponse) XXX_Merge(src proto.Message) { 131 | xxx_messageInfo_GreetResponse.Merge(dst, src) 132 | } 133 | func (m *GreetResponse) XXX_Size() int { 134 | return xxx_messageInfo_GreetResponse.Size(m) 135 | } 136 | func (m *GreetResponse) XXX_DiscardUnknown() { 137 | xxx_messageInfo_GreetResponse.DiscardUnknown(m) 138 | } 139 | 140 | var xxx_messageInfo_GreetResponse proto.InternalMessageInfo 141 | 142 | func (m *GreetResponse) GetResult() string { 143 | if m != nil { 144 | return m.Result 145 | } 146 | return "" 147 | } 148 | 149 | func init() { 150 | proto.RegisterType((*Greeting)(nil), "greet.Greeting") 151 | proto.RegisterType((*GreetRequest)(nil), "greet.GreetRequest") 152 | proto.RegisterType((*GreetResponse)(nil), "greet.GreetResponse") 153 | } 154 | 155 | // Reference imports to suppress errors if they are not otherwise used. 156 | var _ context.Context 157 | var _ grpc.ClientConn 158 | 159 | // This is a compile-time assertion to ensure that this generated file 160 | // is compatible with the grpc package it is being compiled against. 161 | const _ = grpc.SupportPackageIsVersion4 162 | 163 | // GreetServiceClient is the client API for GreetService service. 164 | // 165 | // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 166 | type GreetServiceClient interface { 167 | // Unary API 168 | Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error) 169 | } 170 | 171 | type greetServiceClient struct { 172 | cc *grpc.ClientConn 173 | } 174 | 175 | func NewGreetServiceClient(cc *grpc.ClientConn) GreetServiceClient { 176 | return &greetServiceClient{cc} 177 | } 178 | 179 | func (c *greetServiceClient) Greet(ctx context.Context, in *GreetRequest, opts ...grpc.CallOption) (*GreetResponse, error) { 180 | out := new(GreetResponse) 181 | err := c.cc.Invoke(ctx, "/greet.GreetService/Greet", in, out, opts...) 182 | if err != nil { 183 | return nil, err 184 | } 185 | return out, nil 186 | } 187 | 188 | // GreetServiceServer is the server API for GreetService service. 189 | type GreetServiceServer interface { 190 | // Unary API 191 | Greet(context.Context, *GreetRequest) (*GreetResponse, error) 192 | } 193 | 194 | func RegisterGreetServiceServer(s *grpc.Server, srv GreetServiceServer) { 195 | s.RegisterService(&_GreetService_serviceDesc, srv) 196 | } 197 | 198 | func _GreetService_Greet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 199 | in := new(GreetRequest) 200 | if err := dec(in); err != nil { 201 | return nil, err 202 | } 203 | if interceptor == nil { 204 | return srv.(GreetServiceServer).Greet(ctx, in) 205 | } 206 | info := &grpc.UnaryServerInfo{ 207 | Server: srv, 208 | FullMethod: "/greet.GreetService/Greet", 209 | } 210 | handler := func(ctx context.Context, req interface{}) (interface{}, error) { 211 | return srv.(GreetServiceServer).Greet(ctx, req.(*GreetRequest)) 212 | } 213 | return interceptor(ctx, in, info, handler) 214 | } 215 | 216 | var _GreetService_serviceDesc = grpc.ServiceDesc{ 217 | ServiceName: "greet.GreetService", 218 | HandlerType: (*GreetServiceServer)(nil), 219 | Methods: []grpc.MethodDesc{ 220 | { 221 | MethodName: "Greet", 222 | Handler: _GreetService_Greet_Handler, 223 | }, 224 | }, 225 | Streams: []grpc.StreamDesc{}, 226 | Metadata: "src/main/proto/greet/greet.proto", 227 | } 228 | 229 | func init() { 230 | proto.RegisterFile("src/main/proto/greet/greet.proto", fileDescriptor_greet_b6cc28bd62e1bfe7) 231 | } 232 | 233 | var fileDescriptor_greet_b6cc28bd62e1bfe7 = []byte{ 234 | // 265 bytes of a gzipped FileDescriptorProto 235 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xc1, 0x4a, 0x03, 0x31, 236 | 0x10, 0x86, 0xd9, 0x42, 0x4b, 0x77, 0x54, 0x2a, 0xa9, 0x8a, 0xb4, 0x0a, 0x25, 0x17, 0x45, 0xa1, 237 | 0xc1, 0x7a, 0xd3, 0x9b, 0x07, 0xbd, 0xa9, 0xac, 0x0f, 0x50, 0xe2, 0x32, 0xc6, 0xc0, 0x26, 0xb3, 238 | 0x26, 0x69, 0xf1, 0xec, 0x2b, 0xf8, 0x68, 0xbe, 0x82, 0x0f, 0x22, 0x9b, 0xa4, 0xa2, 0x97, 0xc0, 239 | 0xff, 0xcf, 0x3f, 0xdf, 0xfc, 0x04, 0x66, 0xde, 0xd5, 0xc2, 0x48, 0x6d, 0x45, 0xeb, 0x28, 0x90, 240 | 0x50, 0x0e, 0x31, 0xa4, 0x77, 0x1e, 0x1d, 0xd6, 0x8f, 0x62, 0x72, 0xa4, 0x88, 0x54, 0x83, 0x42, 241 | 0xb6, 0x5a, 0x48, 0x6b, 0x29, 0xc8, 0xa0, 0xc9, 0xfa, 0x14, 0xe2, 0xb7, 0x30, 0xbc, 0xeb, 0x62, 242 | 0xda, 0x2a, 0x76, 0x0c, 0xf0, 0xa2, 0x9d, 0x0f, 0x4b, 0x2b, 0x0d, 0x1e, 0x16, 0xb3, 0xe2, 0xb4, 243 | 0xac, 0xca, 0xe8, 0xdc, 0x4b, 0x83, 0x6c, 0x0a, 0x65, 0x23, 0x37, 0xd3, 0x5e, 0x9c, 0x0e, 0x3b, 244 | 0xa3, 0x1b, 0xf2, 0x6b, 0xd8, 0x8e, 0x9c, 0x0a, 0xdf, 0x56, 0xe8, 0x03, 0x3b, 0x87, 0xa1, 0xca, 245 | 0xdc, 0x48, 0xda, 0x5a, 0x8c, 0xe6, 0xa9, 0xdc, 0xe6, 0x5c, 0xf5, 0x1b, 0xe0, 0x27, 0xb0, 0x93, 246 | 0x97, 0x7d, 0x4b, 0xd6, 0x23, 0x3b, 0x80, 0x81, 0x43, 0xbf, 0x6a, 0x42, 0x6e, 0x91, 0xd5, 0x62, 247 | 0x99, 0xaf, 0x3c, 0xa1, 0x5b, 0xeb, 0x1a, 0xd9, 0x03, 0xf4, 0xa3, 0x66, 0xe3, 0xbf, 0xf0, 0xdc, 248 | 0x61, 0xb2, 0xf7, 0xdf, 0x4c, 0x6c, 0x3e, 0xfd, 0xf8, 0xfa, 0xfe, 0xec, 0xed, 0xf3, 0x5d, 0xb1, 249 | 0xbe, 0x10, 0xf8, 0x2e, 0x4d, 0xdb, 0xa0, 0xc0, 0xfa, 0x95, 0xae, 0x8a, 0xb3, 0x9b, 0x31, 0x8c, 250 | 0x6a, 0x32, 0xe9, 0x6f, 0xd2, 0xf6, 0x63, 0xf1, 0x3c, 0x88, 0xf2, 0xf2, 0x27, 0x00, 0x00, 0xff, 251 | 0xff, 0x6e, 0xfc, 0xbd, 0x5b, 0x73, 0x01, 0x00, 0x00, 252 | } 253 | -------------------------------------------------------------------------------- /src/main/proto/greet/greet.pb.gw.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. 2 | // source: src/main/proto/greet/greet.proto 3 | 4 | /* 5 | Package greet is a reverse proxy. 6 | 7 | It translates gRPC into RESTful JSON APIs. 8 | */ 9 | package greet 10 | 11 | import ( 12 | "io" 13 | "net/http" 14 | 15 | "github.com/golang/protobuf/proto" 16 | "github.com/grpc-ecosystem/grpc-gateway/runtime" 17 | "github.com/grpc-ecosystem/grpc-gateway/utilities" 18 | "golang.org/x/net/context" 19 | "google.golang.org/grpc" 20 | "google.golang.org/grpc/codes" 21 | "google.golang.org/grpc/grpclog" 22 | "google.golang.org/grpc/status" 23 | ) 24 | 25 | var _ codes.Code 26 | var _ io.Reader 27 | var _ status.Status 28 | var _ = runtime.String 29 | var _ = utilities.NewDoubleArray 30 | 31 | func request_GreetService_Greet_0(ctx context.Context, marshaler runtime.Marshaler, client GreetServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { 32 | var protoReq GreetRequest 33 | var metadata runtime.ServerMetadata 34 | 35 | if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { 36 | return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) 37 | } 38 | 39 | msg, err := client.Greet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) 40 | return msg, metadata, err 41 | 42 | } 43 | 44 | // RegisterGreetServiceHandlerFromEndpoint is same as RegisterGreetServiceHandler but 45 | // automatically dials to "endpoint" and closes the connection when "ctx" gets done. 46 | func RegisterGreetServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { 47 | conn, err := grpc.Dial(endpoint, opts...) 48 | if err != nil { 49 | return err 50 | } 51 | defer func() { 52 | if err != nil { 53 | if cerr := conn.Close(); cerr != nil { 54 | grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) 55 | } 56 | return 57 | } 58 | go func() { 59 | <-ctx.Done() 60 | if cerr := conn.Close(); cerr != nil { 61 | grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) 62 | } 63 | }() 64 | }() 65 | 66 | return RegisterGreetServiceHandler(ctx, mux, conn) 67 | } 68 | 69 | // RegisterGreetServiceHandler registers the http handlers for service GreetService to "mux". 70 | // The handlers forward requests to the grpc endpoint over "conn". 71 | func RegisterGreetServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { 72 | return RegisterGreetServiceHandlerClient(ctx, mux, NewGreetServiceClient(conn)) 73 | } 74 | 75 | // RegisterGreetServiceHandler registers the http handlers for service GreetService to "mux". 76 | // The handlers forward requests to the grpc endpoint over the given implementation of "GreetServiceClient". 77 | // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GreetServiceClient" 78 | // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in 79 | // "GreetServiceClient" to call the correct interceptors. 80 | func RegisterGreetServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreetServiceClient) error { 81 | 82 | mux.Handle("POST", pattern_GreetService_Greet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { 83 | ctx, cancel := context.WithCancel(req.Context()) 84 | defer cancel() 85 | if cn, ok := w.(http.CloseNotifier); ok { 86 | go func(done <-chan struct{}, closed <-chan bool) { 87 | select { 88 | case <-done: 89 | case <-closed: 90 | cancel() 91 | } 92 | }(ctx.Done(), cn.CloseNotify()) 93 | } 94 | inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) 95 | rctx, err := runtime.AnnotateContext(ctx, mux, req) 96 | if err != nil { 97 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 98 | return 99 | } 100 | resp, md, err := request_GreetService_Greet_0(rctx, inboundMarshaler, client, req, pathParams) 101 | ctx = runtime.NewServerMetadataContext(ctx, md) 102 | if err != nil { 103 | runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) 104 | return 105 | } 106 | 107 | forward_GreetService_Greet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) 108 | 109 | }) 110 | 111 | return nil 112 | } 113 | 114 | var ( 115 | pattern_GreetService_Greet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "example", "echo"}, "")) 116 | ) 117 | 118 | var ( 119 | forward_GreetService_Greet_0 = runtime.ForwardResponseMessage 120 | ) 121 | -------------------------------------------------------------------------------- /src/main/proto/greet/greet.swagger.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger": "2.0", 3 | "info": { 4 | "title": "src/main/proto/greet/greet.proto", 5 | "version": "version not set" 6 | }, 7 | "schemes": [ 8 | "http", 9 | "https" 10 | ], 11 | "consumes": [ 12 | "application/json" 13 | ], 14 | "produces": [ 15 | "application/json" 16 | ], 17 | "paths": { 18 | "/v1/example/echo": { 19 | "post": { 20 | "summary": "Unary API", 21 | "operationId": "Greet", 22 | "responses": { 23 | "200": { 24 | "description": "", 25 | "schema": { 26 | "$ref": "#/definitions/greetGreetResponse" 27 | } 28 | } 29 | }, 30 | "parameters": [ 31 | { 32 | "name": "body", 33 | "in": "body", 34 | "required": true, 35 | "schema": { 36 | "$ref": "#/definitions/greetGreetRequest" 37 | } 38 | } 39 | ], 40 | "tags": [ 41 | "GreetService" 42 | ] 43 | } 44 | } 45 | }, 46 | "definitions": { 47 | "greetGreetRequest": { 48 | "type": "object", 49 | "properties": { 50 | "greeting": { 51 | "$ref": "#/definitions/greetGreeting" 52 | } 53 | } 54 | }, 55 | "greetGreetResponse": { 56 | "type": "object", 57 | "properties": { 58 | "result": { 59 | "type": "string" 60 | } 61 | } 62 | }, 63 | "greetGreeting": { 64 | "type": "object", 65 | "properties": { 66 | "first_name": { 67 | "type": "string" 68 | }, 69 | "last_name": { 70 | "type": "string" 71 | } 72 | } 73 | } 74 | } 75 | } 76 | --------------------------------------------------------------------------------