Skip to content

Commit

Permalink
feat: [serviceusage] introduce resource class serviceusage.googleapis…
Browse files Browse the repository at this point in the history
….com/Service (#9841)

* feat: introduce resource class serviceusage.googleapis.com/Service
feat: added ConsumerQuotaLimit.supported_locations
feat: added ProducerQuotaPolicy message and QuotaBucket.producer_quota_policy field
chore: reformatted protos

PiperOrigin-RevId: 565811363

Source-Link: googleapis/googleapis@57d9a31

Source-Link: https://github.com/googleapis/googleapis-gen/commit/f6678e2bfaad1dedaf1c67943d1f678a879899c2
Copy-Tag: eyJwIjoiamF2YS1zZXJ2aWNlLXVzYWdlLy5Pd2xCb3QueWFtbCIsImgiOiJmNjY3OGUyYmZhYWQxZGVkYWYxYzY3OTQzZDFmNjc4YTg3OTg5OWMyIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 21, 2023
1 parent 82ca5cf commit 59426b1
Show file tree
Hide file tree
Showing 26 changed files with 3,616 additions and 460 deletions.
4 changes: 2 additions & 2 deletions java-service-usage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.19.0</version>
<version>26.23.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-service-usage.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-usage/2.21.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-service-usage/2.24.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,15 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.api.FieldBehavior",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.api.GoSettings",
"queryAllDeclaredConstructors": true,
Expand Down Expand Up @@ -1448,6 +1457,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.api.serviceusage.v1beta1.QuotaBucket",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ public void getConsumerQuotaLimitTest() throws Exception {
.setIsPrecise(true)
.setAllowsAdminOverrides(true)
.addAllQuotaBuckets(new ArrayList<QuotaBucket>())
.addAllSupportedLocations(new ArrayList<String>())
.build();
mockService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ public void getConsumerQuotaLimitTest() throws Exception {
.setIsPrecise(true)
.setAllowsAdminOverrides(true)
.addAllQuotaBuckets(new ArrayList<QuotaBucket>())
.addAllSupportedLocations(new ArrayList<String>())
.build();
mockServiceUsage.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "n.proto\032\031google/api/endpoint.proto\032#goog"
+ "le/api/monitored_resource.proto\032\033google/"
+ "api/monitoring.proto\032\026google/api/quota.p"
+ "roto\032\026google/api/usage.proto\032\031google/pro"
+ "tobuf/api.proto\"\224\001\n\007Service\022\014\n\004name\030\001 \001("
+ "\t\022\016\n\006parent\030\005 \001(\t\0229\n\006config\030\002 \001(\0132).goog"
+ "le.api.serviceusage.v1.ServiceConfig\0220\n\005"
+ "state\030\004 \001(\0162!.google.api.serviceusage.v1"
+ ".State\"\225\003\n\rServiceConfig\022\014\n\004name\030\001 \001(\t\022\r"
+ "\n\005title\030\002 \001(\t\022\"\n\004apis\030\003 \003(\0132\024.google.pro"
+ "tobuf.Api\0220\n\rdocumentation\030\006 \001(\0132\031.googl"
+ "e.api.Documentation\022 \n\005quota\030\n \001(\0132\021.goo"
+ "gle.api.Quota\0222\n\016authentication\030\013 \001(\0132\032."
+ "google.api.Authentication\022 \n\005usage\030\017 \001(\013"
+ "2\021.google.api.Usage\022\'\n\tendpoints\030\022 \003(\0132\024"
+ ".google.api.Endpoint\022D\n\023monitored_resour"
+ "ces\030\031 \003(\0132\'.google.api.MonitoredResource"
+ "Descriptor\022*\n\nmonitoring\030\034 \001(\0132\026.google."
+ "api.Monitoring\"+\n\021OperationMetadata\022\026\n\016r"
+ "esource_names\030\002 \003(\t*9\n\005State\022\025\n\021STATE_UN"
+ "SPECIFIED\020\000\022\014\n\010DISABLED\020\001\022\013\n\007ENABLED\020\002B\330"
+ "\001\n\036com.google.api.serviceusage.v1B\016Resou"
+ "rcesProtoP\001ZDcloud.google.com/go/service"
+ "usage/apiv1/serviceusagepb;serviceusagep"
+ "b\252\002\034Google.Cloud.ServiceUsage.V1\312\002\034Googl"
+ "e\\Cloud\\ServiceUsage\\V1\352\002\037Google::Cloud:"
+ ":ServiceUsage::V1b\006proto3"
+ "roto\032\031google/api/resource.proto\032\026google/"
+ "api/usage.proto\032\031google/protobuf/api.pro"
+ "to\"\275\002\n\007Service\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\005"
+ " \001(\t\0229\n\006config\030\002 \001(\0132).google.api.servic"
+ "eusage.v1.ServiceConfig\0220\n\005state\030\004 \001(\0162!"
+ ".google.api.serviceusage.v1.State:\246\001\352A\242\001"
+ "\n#serviceusage.googleapis.com/Service\022%p"
+ "rojects/{project}/services/{service}\022#fo"
+ "lders/{folder}/services/{service}\022/organ"
+ "izations/{organization}/services/{servic"
+ "e}\"\225\003\n\rServiceConfig\022\014\n\004name\030\001 \001(\t\022\r\n\005ti"
+ "tle\030\002 \001(\t\022\"\n\004apis\030\003 \003(\0132\024.google.protobu"
+ "f.Api\0220\n\rdocumentation\030\006 \001(\0132\031.google.ap"
+ "i.Documentation\022 \n\005quota\030\n \001(\0132\021.google."
+ "api.Quota\0222\n\016authentication\030\013 \001(\0132\032.goog"
+ "le.api.Authentication\022 \n\005usage\030\017 \001(\0132\021.g"
+ "oogle.api.Usage\022\'\n\tendpoints\030\022 \003(\0132\024.goo"
+ "gle.api.Endpoint\022D\n\023monitored_resources\030"
+ "\031 \003(\0132\'.google.api.MonitoredResourceDesc"
+ "riptor\022*\n\nmonitoring\030\034 \001(\0132\026.google.api."
+ "Monitoring\"+\n\021OperationMetadata\022\026\n\016resou"
+ "rce_names\030\002 \003(\t*9\n\005State\022\025\n\021STATE_UNSPEC"
+ "IFIED\020\000\022\014\n\010DISABLED\020\001\022\013\n\007ENABLED\020\002B\330\001\n\036c"
+ "om.google.api.serviceusage.v1B\016Resources"
+ "ProtoP\001ZDcloud.google.com/go/serviceusag"
+ "e/apiv1/serviceusagepb;serviceusagepb\252\002\034"
+ "Google.Cloud.ServiceUsage.V1\312\002\034Google\\Cl"
+ "oud\\ServiceUsage\\V1\352\002\037Google::Cloud::Ser"
+ "viceUsage::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand All @@ -89,6 +94,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
com.google.api.MonitoredResourceProto.getDescriptor(),
com.google.api.MonitoringProto.getDescriptor(),
com.google.api.QuotaProto.getDescriptor(),
com.google.api.ResourceProto.getDescriptor(),
com.google.api.UsageProto.getDescriptor(),
com.google.protobuf.ApiProto.getDescriptor(),
});
Expand Down Expand Up @@ -125,12 +131,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"ResourceNames",
});
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.ResourceProto.resource);
com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
descriptor, registry);
com.google.api.AuthProto.getDescriptor();
com.google.api.DocumentationProto.getDescriptor();
com.google.api.EndpointProto.getDescriptor();
com.google.api.MonitoredResourceProto.getDescriptor();
com.google.api.MonitoringProto.getDescriptor();
com.google.api.QuotaProto.getDescriptor();
com.google.api.ResourceProto.getDescriptor();
com.google.api.UsageProto.getDescriptor();
com.google.protobuf.ApiProto.getDescriptor();
}
Expand Down
Loading

0 comments on commit 59426b1

Please sign in to comment.