Skip to content

Commit a64ad81

Browse files
remove google-proto-files (#2458)
1 parent 59de125 commit a64ad81

281 files changed

Lines changed: 38288 additions & 176 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/bigtable/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
],
3232
"main": "./src/index.js",
3333
"files": [
34+
"protos",
3435
"src",
3536
"AUTHORS",
3637
"CONTRIBUTORS",
@@ -57,7 +58,6 @@
5758
"create-error-class": "^3.0.2",
5859
"dot-prop": "^3.0.0",
5960
"extend": "^3.0.0",
60-
"google-proto-files": "^0.12.0",
6161
"is": "^3.0.1",
6262
"lodash.flatten": "^4.2.0",
6363
"node-int64": "^0.4.0",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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/protobuf/descriptor.proto";
21+
22+
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "AnnotationsProto";
25+
option java_package = "com.google.api";
26+
option objc_class_prefix = "GAPI";
27+
28+
extend google.protobuf.MethodOptions {
29+
// See `HttpRule`.
30+
HttpRule http = 72295728;
31+
}
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
// Copyright 2017 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/annotations.proto";
20+
21+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
22+
option java_multiple_files = true;
23+
option java_outer_classname = "AuthProto";
24+
option java_package = "com.google.api";
25+
option objc_class_prefix = "GAPI";
26+
27+
28+
// `Authentication` defines the authentication configuration for an API.
29+
//
30+
// Example for an API targeted for external use:
31+
//
32+
// name: calendar.googleapis.com
33+
// authentication:
34+
// providers:
35+
// - id: google_calendar_auth
36+
// jwks_uri: https://www.googleapis.com/oauth2/v1/certs
37+
// issuer: https://securetoken.google.com
38+
// rules:
39+
// - selector: "*"
40+
// requirements:
41+
// provider_id: google_calendar_auth
42+
message Authentication {
43+
// A list of authentication rules that apply to individual API methods.
44+
//
45+
// **NOTE:** All service configuration rules follow "last one wins" order.
46+
repeated AuthenticationRule rules = 3;
47+
48+
// Defines a set of authentication providers that a service supports.
49+
repeated AuthProvider providers = 4;
50+
}
51+
52+
// Authentication rules for the service.
53+
//
54+
// By default, if a method has any authentication requirements, every request
55+
// must include a valid credential matching one of the requirements.
56+
// It's an error to include more than one kind of credential in a single
57+
// request.
58+
//
59+
// If a method doesn't have any auth requirements, request credentials will be
60+
// ignored.
61+
message AuthenticationRule {
62+
// Selects the methods to which this rule applies.
63+
//
64+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
65+
string selector = 1;
66+
67+
// The requirements for OAuth credentials.
68+
OAuthRequirements oauth = 2;
69+
70+
// Whether to allow requests without a credential. The credential can be
71+
// an OAuth token, Google cookies (first-party auth) or EndUserCreds.
72+
//
73+
// For requests without credentials, if the service control environment is
74+
// specified, each incoming request **must** be associated with a service
75+
// consumer. This can be done by passing an API key that belongs to a consumer
76+
// project.
77+
bool allow_without_credential = 5;
78+
79+
// Requirements for additional authentication providers.
80+
repeated AuthRequirement requirements = 7;
81+
}
82+
83+
// Configuration for an anthentication provider, including support for
84+
// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
85+
message AuthProvider {
86+
// The unique identifier of the auth provider. It will be referred to by
87+
// `AuthRequirement.provider_id`.
88+
//
89+
// Example: "bookstore_auth".
90+
string id = 1;
91+
92+
// Identifies the principal that issued the JWT. See
93+
// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1
94+
// Usually a URL or an email address.
95+
//
96+
// Example: https://securetoken.google.com
97+
// Example: [email protected]
98+
string issuer = 2;
99+
100+
// URL of the provider's public key set to validate signature of the JWT. See
101+
// [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
102+
// Optional if the key set document:
103+
// - can be retrieved from
104+
// [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
105+
// of the issuer.
106+
// - can be inferred from the email domain of the issuer (e.g. a Google service account).
107+
//
108+
// Example: https://www.googleapis.com/oauth2/v1/certs
109+
string jwks_uri = 3;
110+
111+
// The list of JWT
112+
// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
113+
// that are allowed to access. A JWT containing any of these audiences will
114+
// be accepted. When this setting is absent, only JWTs with audience
115+
// "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
116+
// will be accepted. For example, if no audiences are in the setting,
117+
// LibraryService API will only accept JWTs with the following audience
118+
// "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
119+
//
120+
// Example:
121+
//
122+
// audiences: bookstore_android.apps.googleusercontent.com,
123+
// bookstore_web.apps.googleusercontent.com
124+
string audiences = 4;
125+
}
126+
127+
// OAuth scopes are a way to define data and permissions on data. For example,
128+
// there are scopes defined for "Read-only access to Google Calendar" and
129+
// "Access to Cloud Platform". Users can consent to a scope for an application,
130+
// giving it permission to access that data on their behalf.
131+
//
132+
// OAuth scope specifications should be fairly coarse grained; a user will need
133+
// to see and understand the text description of what your scope means.
134+
//
135+
// In most cases: use one or at most two OAuth scopes for an entire family of
136+
// products. If your product has multiple APIs, you should probably be sharing
137+
// the OAuth scope across all of those APIs.
138+
//
139+
// When you need finer grained OAuth consent screens: talk with your product
140+
// management about how developers will use them in practice.
141+
//
142+
// Please note that even though each of the canonical scopes is enough for a
143+
// request to be accepted and passed to the backend, a request can still fail
144+
// due to the backend requiring additional scopes or permissions.
145+
message OAuthRequirements {
146+
// The list of publicly documented OAuth scopes that are allowed access. An
147+
// OAuth token containing any of these scopes will be accepted.
148+
//
149+
// Example:
150+
//
151+
// canonical_scopes: https://www.googleapis.com/auth/calendar,
152+
// https://www.googleapis.com/auth/calendar.read
153+
string canonical_scopes = 1;
154+
}
155+
156+
// User-defined authentication requirements, including support for
157+
// [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
158+
message AuthRequirement {
159+
// [id][google.api.AuthProvider.id] from authentication provider.
160+
//
161+
// Example:
162+
//
163+
// provider_id: bookstore_auth
164+
string provider_id = 1;
165+
166+
// NOTE: This will be deprecated soon, once AuthProvider.audiences is
167+
// implemented and accepted in all the runtime components.
168+
//
169+
// The list of JWT
170+
// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
171+
// that are allowed to access. A JWT containing any of these audiences will
172+
// be accepted. When this setting is absent, only JWTs with audience
173+
// "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
174+
// will be accepted. For example, if no audiences are in the setting,
175+
// LibraryService API will only accept JWTs with the following audience
176+
// "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
177+
//
178+
// Example:
179+
//
180+
// audiences: bookstore_android.apps.googleusercontent.com,
181+
// bookstore_web.apps.googleusercontent.com
182+
string audiences = 2;
183+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright 2017 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 go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
20+
option java_multiple_files = true;
21+
option java_outer_classname = "BackendProto";
22+
option java_package = "com.google.api";
23+
option objc_class_prefix = "GAPI";
24+
25+
26+
// `Backend` defines the backend configuration for a service.
27+
message Backend {
28+
// A list of API backend rules that apply to individual API methods.
29+
//
30+
// **NOTE:** All service configuration rules follow "last one wins" order.
31+
repeated BackendRule rules = 1;
32+
}
33+
34+
// A backend rule provides configuration for an individual API element.
35+
message BackendRule {
36+
// Selects the methods to which this rule applies.
37+
//
38+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
39+
string selector = 1;
40+
41+
// The address of the API backend.
42+
string address = 2;
43+
44+
// The number of seconds to wait for a response from a request. The
45+
// default depends on the deployment context.
46+
double deadline = 3;
47+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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+
import "google/api/annotations.proto";
20+
import "google/api/metric.proto";
21+
22+
option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "BillingProto";
25+
option java_package = "com.google.api";
26+
27+
28+
// Billing related configuration of the service.
29+
//
30+
// The following example shows how to configure metrics for billing:
31+
//
32+
// metrics:
33+
// - name: library.googleapis.com/read_calls
34+
// metric_kind: DELTA
35+
// value_type: INT64
36+
// - name: library.googleapis.com/write_calls
37+
// metric_kind: DELTA
38+
// value_type: INT64
39+
// billing:
40+
// metrics:
41+
// - library.googleapis.com/read_calls
42+
// - library.googleapis.com/write_calls
43+
//
44+
// The next example shows how to enable billing status check and customize the
45+
// check behavior. It makes sure billing status check is included in the `Check`
46+
// method of [Service Control API](https://cloud.google.com/service-control/).
47+
// In the example, "google.storage.Get" method can be served when the billing
48+
// status is either `current` or `delinquent`, while "google.storage.Write"
49+
// method can only be served when the billing status is `current`:
50+
//
51+
// billing:
52+
// rules:
53+
// - selector: google.storage.Get
54+
// allowed_statuses:
55+
// - current
56+
// - delinquent
57+
// - selector: google.storage.Write
58+
// allowed_statuses: current
59+
//
60+
// Mostly services should only allow `current` status when serving requests.
61+
// In addition, services can choose to allow both `current` and `delinquent`
62+
// statuses when serving read-only requests to resources. If there's no
63+
// matching selector for operation, no billing status check will be performed.
64+
//
65+
message Billing {
66+
// Names of the metrics to report to billing. Each name must
67+
// be defined in [Service.metrics][google.api.Service.metrics] section.
68+
repeated string metrics = 1;
69+
70+
// A list of billing status rules for configuring billing status check.
71+
repeated BillingStatusRule rules = 5;
72+
}
73+
74+
// Defines the billing status requirements for operations.
75+
//
76+
// When used with
77+
// [Service Control API](https://cloud.google.com/service-control/), the
78+
// following statuses are supported:
79+
//
80+
// - **current**: the associated billing account is up to date and capable of
81+
// paying for resource usages.
82+
// - **delinquent**: the associated billing account has a correctable problem,
83+
// such as late payment.
84+
//
85+
// Mostly services should only allow `current` status when serving requests.
86+
// In addition, services can choose to allow both `current` and `delinquent`
87+
// statuses when serving read-only requests to resources. If the list of
88+
// allowed_statuses is empty, it means no billing requirement.
89+
//
90+
message BillingStatusRule {
91+
// Selects the operation names to which this rule applies.
92+
// Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
93+
string selector = 1;
94+
95+
// Allowed billing statuses. The billing status check passes if the actual
96+
// billing status matches any of the provided values here.
97+
repeated string allowed_statuses = 2;
98+
}

0 commit comments

Comments
 (0)