Skip to content

Commit 86e0cbd

Browse files
authored
Merge pull request #4 from UweTrottmann/update-protos
Update protos
2 parents c348083 + 823b594 commit 86e0cbd

7 files changed

Lines changed: 14 additions & 349 deletions

File tree

endpoints-control-api-client/src/main/java/com/google/api/services/servicecontrol/v1/ServiceControl.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@
4444
public class ServiceControl extends com.google.api.client.googleapis.services.AbstractGoogleClient {
4545
private static final ObjectParser parser = new ProtoObjectParser();
4646

47-
// Note: Leave this static initializer at the top of the file.
48-
static {
49-
com.google.api.client.util.Preconditions.checkState(
50-
com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
51-
com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15,
52-
"You are currently running with version %s of google-api-client. " +
53-
"You need at least version 1.15 of google-api-client to run version " +
54-
"1.22.0-SNAPSHOT of the Google Service Control API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
55-
}
56-
5747
/**
5848
* The default encoded root URL of the service. This is determined when the library is generated
5949
* and normally should not be changed.

endpoints-control/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
buildscript {
18-
repositories {
19-
mavenCentral()
20-
}
21-
dependencies { classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10' }
22-
}
23-
2417
plugins {
2518
id("ut-publish")
2619
}

endpoints-control/src/main/java/com/google/api/control/model/QuotaErrorInfo.java

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ public enum QuotaErrorInfo {
4040
Code.RESOURCE_EXHAUSTED,
4141
429,
4242
"Quota allocation failed."),
43-
PROJECT_SUSPENDED(
44-
Code.PROJECT_SUSPENDED,
45-
HttpServletResponse.SC_FORBIDDEN,
46-
"Project suspended."),
47-
SERVICE_NOT_ENABLED(
48-
Code.SERVICE_NOT_ENABLED,
49-
HttpServletResponse.SC_FORBIDDEN,
50-
"API {service_name} is not available for the project."),
5143
BILLING_NOT_ACTIVE(
5244
Code.BILLING_NOT_ACTIVE,
5345
HttpServletResponse.SC_FORBIDDEN,
@@ -56,22 +48,6 @@ public enum QuotaErrorInfo {
5648
Code.PROJECT_DELETED,
5749
HttpServletResponse.SC_BAD_REQUEST,
5850
"Client project not valid. Please pass a valid project."),
59-
PROJECT_INVALID(
60-
Code.PROJECT_INVALID,
61-
HttpServletResponse.SC_BAD_REQUEST,
62-
"Client project not valid. Please pass a valid project."),
63-
IP_ADDRESS_BLOCKED(
64-
Code.IP_ADDRESS_BLOCKED,
65-
HttpServletResponse.SC_FORBIDDEN,
66-
"IP address blocked."),
67-
REFERER_BLOCKED(
68-
Code.REFERER_BLOCKED,
69-
HttpServletResponse.SC_FORBIDDEN,
70-
"Referer blocked."),
71-
CLIENT_APP_BLOCKED(
72-
Code.CLIENT_APP_BLOCKED,
73-
HttpServletResponse.SC_FORBIDDEN,
74-
"Client app blocked."),
7551
API_KEY_INVALID(
7652
Code.API_KEY_INVALID,
7753
HttpServletResponse.SC_BAD_REQUEST,
@@ -80,22 +56,6 @@ public enum QuotaErrorInfo {
8056
Code.API_KEY_EXPIRED,
8157
HttpServletResponse.SC_BAD_REQUEST,
8258
"API key expired. Please renew the API key."),
83-
PROJECT_STATUS_UNAVAILABLE(
84-
Code.PROJECT_STATUS_UNAVAILABLE,
85-
HttpServletResponse.SC_OK,
86-
""),
87-
SERVICE_STATUS_UNAVAILABLE(
88-
Code.SERVICE_STATUS_UNAVAILABLE,
89-
HttpServletResponse.SC_OK,
90-
""),
91-
BILLING_STATUS_UNAVAILABLE(
92-
Code.BILLING_STATUS_UNAVAILABLE,
93-
HttpServletResponse.SC_OK,
94-
""),
95-
QUOTA_SYSTEM_UNAVAILABLE(
96-
Code.QUOTA_SYSTEM_UNAVAILABLE,
97-
HttpServletResponse.SC_OK,
98-
""),
9959
UNKNOWN(
10060
Code.UNRECOGNIZED,
10161
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
@@ -169,7 +129,7 @@ public boolean isReallyError() {
169129
*/
170130
public static QuotaErrorInfo convert(@Nullable AllocateQuotaResponse response) {
171131
if (response == null) {
172-
return SERVICE_STATUS_UNAVAILABLE;
132+
return UNKNOWN;
173133
}
174134
if (response.getAllocateErrorsCount() == 0) {
175135
return OK;

endpoints-management-protos/build.gradle

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
buildscript {
2-
repositories {
3-
mavenCentral()
4-
}
5-
dependencies { classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10' }
6-
}
7-
81
plugins {
92
id("ut-publish")
3+
id("com.google.protobuf") version "0.9.4"
104
}
115

12-
apply plugin: 'com.google.protobuf'
13-
146
version = "1.0.15-SNAPSHOT"
157

168
// Set project-specific publishing properties
@@ -68,10 +60,12 @@ sourceSets {
6860
srcDir 'build/generated/source/proto/main/java'
6961
}
7062
proto {
71-
srcDir 'src/auxi/proto'
63+
setIncludes([
64+
"google/api/servicecontrol/v1/*.proto",
65+
"google/api/distribution.proto",
66+
"google/api/client.proto",
67+
"google/api/launch_stage.proto"
68+
])
7269
}
7370
}
7471
}
75-
sourceSets.main.proto.setIncludes([
76-
'google/api/servicecontrol/v1/*.proto',
77-
'google/api/experimental/*.proto'])

0 commit comments

Comments
 (0)