Use google.api instead of custom googleapi package
Use the standard google.api package to not create conflicts with other
proto definition that uses the same package.
Change-Id: I264db977a2316ced0fdfb6ab8e499a1258726cb7
diff --git a/protos/README.md b/protos/README.md
new file mode 100644
index 0000000..5a4a8f9
--- /dev/null
+++ b/protos/README.md
@@ -0,0 +1,5 @@
+NOTE: The `google/api` directory has files copied from the [Google
+APIs](https://github.com/googleapis/api-common-protos), and is only included for
+compilation of the protobuf files - these API's should be
+installed independently via the python
+[googleapis-common-protos](https://pypi.org/project/googleapis-common-protos/).
\ No newline at end of file
diff --git a/protos/annotations.proto b/protos/google/api/annotations.proto
similarity index 85%
rename from protos/annotations.proto
rename to protos/google/api/annotations.proto
index 2ed81a6..18dcf20 100644
--- a/protos/annotations.proto
+++ b/protos/google/api/annotations.proto
@@ -1,5 +1,4 @@
// Copyright (c) 2015, Google Inc.
-// Modififications (C) 2018, Open Networking Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -13,13 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// See NOTE in http.proto for the modifications made to these files
-
syntax = "proto3";
-package googleapi;
+package google.api;
-import "http.proto";
+import "google/api/http.proto";
import "google/protobuf/descriptor.proto";
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
@@ -31,4 +28,4 @@
extend google.protobuf.MethodOptions {
// See `HttpRule`.
HttpRule http = 72295728;
-}
+}
\ No newline at end of file
diff --git a/protos/http.proto b/protos/google/api/http.proto
similarity index 83%
rename from protos/http.proto
rename to protos/google/api/http.proto
index 99d0ce3..61168c3 100644
--- a/protos/http.proto
+++ b/protos/google/api/http.proto
@@ -1,5 +1,4 @@
// Copyright 2018 Google LLC
-// Modififications (C) 2018, Open Networking Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -13,48 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// NOTE: On the provenance of and modifications to http.proto and
-// annotations.proto
-//
-// TL;DR: The files http.proto and annotations.proto are originally from here:
-// https://github.com/googleapis/googleapis
-// They have been modified slightly to avoid a namespace conflict.
-//
-// Long winded explanation:
-// These files are designed to interact with Google's first party API's, and
-// the recommended way to use them is to compiled them to code with protoc and
-// included in your codebase before being used. Due to the fact that we're not
-// using them that way, and because of how Chameleon and XOS work (dynamically
-// defining our own API's), we have to ship these *.proto files as a part of
-// our artifacts.
-//
-// The problems start when you try to include these specific .proto files in
-// python. The protoc compiler includes the `google.protobuf` classes, which
-// python can look up in the standard python library path. Unfortunately these
-// files are namespaced with `google.api` in the path and aren't shipped with
-// protoc. This leads to a path conflict - you can't have two library paths
-// start with the same path component (`google` in this case) without getting
-// an "ImportError: No module named ..." on one of the paths when you import
-// them.
-//
-// Historically, various confusing hacks were implemented to override and
-// special-case the python `include` directive to include a file at a different
-// path than was specified. These hacks also failed when updating the base OS,
-// and would likely continue to fail in other, stranger ways as we update the
-// codebase. Specifically, Python 3 reimplemented these features in the
-// importlib section of the standard library, so there's little confidence our
-// hacks would continue to work. As an aside, there are various protobuf
-// `options` statements to deal with this sort of issue in other languages (see
-// the `go_package` and `java_package` below ) but these don't currently exist
-// for python: https://github.com/google/protobuf/issues/973
-//
-// To avoid this entire psychotic namespace hellscape, it's much easier to
-// modify these files to remove the google.api path component, and have them
-// included directly at a path of our own choice.
-
syntax = "proto3";
-package googleapi;
+package google.api;
option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
@@ -337,6 +297,11 @@
// present at the top-level of request message type.
string body = 7;
+ // Optional. The name of the response field whose value is mapped to the HTTP
+ // body of response. Other response fields are ignored. When
+ // not set, the response message will be used as HTTP body of response.
+ string response_body = 12;
+
// Additional HTTP bindings for the selector. Nested bindings must
// not contain an `additional_bindings` field themselves (that is,
// the nesting may only be one level deep).
@@ -350,4 +315,4 @@
// The path matched by this custom verb.
string path = 2;
-}
+}
\ No newline at end of file