From c802862cc611b936c1f42b163f1678c5f7595d31 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 23 Jun 2022 02:17:15 +0000 Subject: [PATCH 1/4] feat: Enable REST transport for most of Java and Go clients PiperOrigin-RevId: 456641589 Source-Link: https://github.com/googleapis/googleapis/commit/8a251f5225b789b2383207ffd978f6aa3d77fcf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9 --- ...hishingProtectionServiceV1Beta1Client.java | 22 +- ...shingProtectionServiceV1Beta1Settings.java | 30 +- .../v1beta1/gapic_metadata.json | 0 .../v1beta1/package-info.java | 0 ...otectionServiceV1Beta1CallableFactory.java | 0 ...cPhishingProtectionServiceV1Beta1Stub.java | 1 + ...otectionServiceV1Beta1CallableFactory.java | 105 +++++ ...nPhishingProtectionServiceV1Beta1Stub.java | 201 +++++++++ .../PhishingProtectionServiceV1Beta1Stub.java | 0 ...gProtectionServiceV1Beta1StubSettings.java | 60 ++- .../MockPhishingProtectionServiceV1Beta1.java | 0 ...kPhishingProtectionServiceV1Beta1Impl.java | 0 ...ctionServiceV1Beta1ClientHttpJsonTest.java | 161 +++++++ ...ingProtectionServiceV1Beta1ClientTest.java | 0 .../PhishingProtectionServiceV1Beta1Grpc.java | 228 ++++------ .../v1beta1/PhishingProtectionProto.java | 100 +++++ .../v1beta1/ProjectName.java | 0 .../v1beta1/ReportPhishingRequest.java | 421 ++++++++---------- .../ReportPhishingRequestOrBuilder.java | 44 +- .../v1beta1/ReportPhishingResponse.java | 245 +++++----- .../ReportPhishingResponseOrBuilder.java | 9 + .../v1beta1/phishingprotection.proto | 0 .../SyncCreateSetCredentialsProvider.java | 42 ++ .../SyncCreateSetCredentialsProvider1.java | 42 ++ .../create/SyncCreateSetEndpoint.java | 39 ++ .../reportphishing/AsyncReportPhishing.java | 49 ++ .../reportphishing/SyncReportPhishing.java | 46 ++ .../SyncReportPhishingProjectnameString.java | 42 ++ .../SyncReportPhishingStringString.java | 42 ++ .../reportphishing/SyncReportPhishing.java | 48 ++ .../reportphishing/SyncReportPhishing.java | 48 ++ .../v1beta1/PhishingProtectionProto.java | 114 ----- .../ReportPhishingResponseOrBuilder.java | 24 - 33 files changed, 1439 insertions(+), 724 deletions(-) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java (92%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java (86%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json (100%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java (100%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java (100%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java (99%) create mode 100644 owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java create mode 100644 owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java (100%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java (80%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java (100%) rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java (100%) create mode 100644 owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java rename {google-cloud-phishingprotection => owl-bot-staging/v1beta1/google-cloud-phishingprotection}/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java (100%) rename {grpc-google-cloud-phishingprotection-v1beta1 => owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java (58%) create mode 100644 owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java rename {proto-google-cloud-phishingprotection-v1beta1 => owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java (100%) rename {proto-google-cloud-phishingprotection-v1beta1 => owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java (68%) rename {proto-google-cloud-phishingprotection-v1beta1 => owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java (53%) rename {proto-google-cloud-phishingprotection-v1beta1 => owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java (67%) create mode 100644 owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java rename {proto-google-cloud-phishingprotection-v1beta1 => owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1}/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto (100%) create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java create mode 100644 owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java delete mode 100644 proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java delete mode 100644 proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java similarity index 92% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java index 2d8adf35..918db09c 100644 --- a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java +++ b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java @@ -55,13 +55,13 @@ * methods: * *
    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been + *
  2. A "flattened" method. With this type of method, the fields of the request type have been * converted into function parameters. It may be the case that not all fields are available as * parameters, and not every API method will have a flattened method entry point. - *
  3. A "request object" method. This type of method only takes one parameter, a request object, + *
  4. A "request object" method. This type of method only takes one parameter, a request object, * which must be constructed before the call. Not every API method will have a request object * method. - *
  5. A "callable" method. This type of method takes no parameters and returns an immutable API + *
  6. A "callable" method. This type of method takes no parameters and returns an immutable API * callable object, which can be used to initiate calls to the service. *
* @@ -98,6 +98,22 @@ * PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings); * } * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings =
+ *     PhishingProtectionServiceV1Beta1Settings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             PhishingProtectionServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder()
+ *                 .build())
+ *         .build();
+ * PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client =
+ *     PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java similarity index 86% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java index 0a93585a..c5c7d5a0 100644 --- a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java +++ b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java @@ -21,9 +21,11 @@ import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.phishingprotection.v1beta1.stub.PhishingProtectionServiceV1Beta1StubSettings; @@ -40,10 +42,10 @@ *

The default instance has everything set to sensible defaults: * *

* *

The builder of this class is recursive, so contained classes are themselves builders. When @@ -106,11 +108,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return PhishingProtectionServiceV1Beta1StubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return PhishingProtectionServiceV1Beta1StubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PhishingProtectionServiceV1Beta1StubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return PhishingProtectionServiceV1Beta1StubSettings.defaultTransportChannelProvider(); } @@ -120,11 +129,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return PhishingProtectionServiceV1Beta1StubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -163,6 +178,11 @@ private static Builder createDefault() { return new Builder(PhishingProtectionServiceV1Beta1StubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(PhishingProtectionServiceV1Beta1StubSettings.newHttpJsonBuilder()); + } + public PhishingProtectionServiceV1Beta1StubSettings.Builder getStubSettingsBuilder() { return ((PhishingProtectionServiceV1Beta1StubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json similarity index 100% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java similarity index 100% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java similarity index 100% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java similarity index 99% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java index aa573776..f990d8ad 100644 --- a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java +++ b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java @@ -30,6 +30,7 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; +import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java new file mode 100644 index 00000000..3a1546df --- /dev/null +++ b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the PhishingProtectionServiceV1Beta1 service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPhishingProtectionServiceV1Beta1CallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java new file mode 100644 index 00000000..1bf0c783 --- /dev/null +++ b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java @@ -0,0 +1,201 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the PhishingProtectionServiceV1Beta1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPhishingProtectionServiceV1Beta1Stub + extends PhishingProtectionServiceV1Beta1Stub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + reportPhishingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1/ReportPhishing") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{parent=projects/*}/phishing:report", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ReportPhishingResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable reportPhishingCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPhishingProtectionServiceV1Beta1Stub create( + PhishingProtectionServiceV1Beta1StubSettings settings) throws IOException { + return new HttpJsonPhishingProtectionServiceV1Beta1Stub( + settings, ClientContext.create(settings)); + } + + public static final HttpJsonPhishingProtectionServiceV1Beta1Stub create( + ClientContext clientContext) throws IOException { + return new HttpJsonPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPhishingProtectionServiceV1Beta1Stub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonPhishingProtectionServiceV1Beta1Stub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected HttpJsonPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPhishingProtectionServiceV1Beta1CallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPhishingProtectionServiceV1Beta1Stub, using the given + * settings. This is protected so that it is easy to make a subclass, but otherwise, the static + * factory methods should be preferred. + */ + protected HttpJsonPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + reportPhishingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(reportPhishingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.reportPhishingCallable = + callableFactory.createUnaryCallable( + reportPhishingTransportSettings, settings.reportPhishingSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(reportPhishingMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable reportPhishingCallable() { + return reportPhishingCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java similarity index 100% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java diff --git a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java similarity index 80% rename from google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java index f17767c5..639624b1 100644 --- a/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java +++ b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java @@ -24,6 +24,9 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; @@ -49,10 +52,10 @@ *

The default instance has everything set to sensible defaults: * *

* *

The builder of this class is recursive, so contained classes are themselves builders. When @@ -101,6 +104,11 @@ public PhishingProtectionServiceV1Beta1Stub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcPhishingProtectionServiceV1Beta1Stub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPhishingProtectionServiceV1Beta1Stub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -133,18 +141,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", @@ -153,11 +168,31 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(PhishingProtectionServiceV1Beta1StubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PhishingProtectionServiceV1Beta1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -244,6 +279,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .reportPhishingSettings() diff --git a/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java similarity index 100% rename from google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java diff --git a/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java similarity index 100% rename from google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java new file mode 100644 index 00000000..1452ba49 --- /dev/null +++ b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java @@ -0,0 +1,161 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.phishingprotection.v1beta1.stub.HttpJsonPhishingProtectionServiceV1Beta1Stub; +import com.google.phishingprotection.v1beta1.ProjectName; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PhishingProtectionServiceV1Beta1ClientHttpJsonTest { + private static MockHttpService mockService; + private static PhishingProtectionServiceV1Beta1Client client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPhishingProtectionServiceV1Beta1Stub.getMethodDescriptors(), + PhishingProtectionServiceV1Beta1Settings.getDefaultEndpoint()); + PhishingProtectionServiceV1Beta1Settings settings = + PhishingProtectionServiceV1Beta1Settings.newHttpJsonBuilder() + .setTransportChannelProvider( + PhishingProtectionServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PhishingProtectionServiceV1Beta1Client.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void reportPhishingTest() throws Exception { + ReportPhishingResponse expectedResponse = ReportPhishingResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String uri = "uri116076"; + + ReportPhishingResponse actualResponse = client.reportPhishing(parent, uri); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void reportPhishingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String uri = "uri116076"; + client.reportPhishing(parent, uri); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void reportPhishingTest2() throws Exception { + ReportPhishingResponse expectedResponse = ReportPhishingResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + String uri = "uri116076"; + + ReportPhishingResponse actualResponse = client.reportPhishing(parent, uri); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void reportPhishingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + String uri = "uri116076"; + client.reportPhishing(parent, uri); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java b/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java similarity index 100% rename from google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java rename to owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java diff --git a/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java b/owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java similarity index 58% rename from grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java rename to owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java index 7b57612e..a16f4d16 100644 --- a/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java +++ b/owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java @@ -1,25 +1,8 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ package com.google.phishingprotection.v1beta1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** - * - * *

  * Service to report phishing URIs.
  * 
@@ -32,70 +15,51 @@ public final class PhishingProtectionServiceV1Beta1Grpc { private PhishingProtectionServiceV1Beta1Grpc() {} - public static final String SERVICE_NAME = - "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1"; + public static final String SERVICE_NAME = "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.phishingprotection.v1beta1.ReportPhishingRequest, - com.google.phishingprotection.v1beta1.ReportPhishingResponse> - getReportPhishingMethod; + private static volatile io.grpc.MethodDescriptor getReportPhishingMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ReportPhishing", requestType = com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, responseType = com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.phishingprotection.v1beta1.ReportPhishingRequest, - com.google.phishingprotection.v1beta1.ReportPhishingResponse> - getReportPhishingMethod() { - io.grpc.MethodDescriptor< - com.google.phishingprotection.v1beta1.ReportPhishingRequest, - com.google.phishingprotection.v1beta1.ReportPhishingResponse> - getReportPhishingMethod; - if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) - == null) { + public static io.grpc.MethodDescriptor getReportPhishingMethod() { + io.grpc.MethodDescriptor getReportPhishingMethod; + if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) == null) { synchronized (PhishingProtectionServiceV1Beta1Grpc.class) { - if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) - == null) { - PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod = - getReportPhishingMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportPhishing")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.phishingprotection.v1beta1.ReportPhishingRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.phishingprotection.v1beta1.ReportPhishingResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PhishingProtectionServiceV1Beta1MethodDescriptorSupplier( - "ReportPhishing")) - .build(); + if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) == null) { + PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod = getReportPhishingMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportPhishing")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance())) + .setSchemaDescriptor(new PhishingProtectionServiceV1Beta1MethodDescriptorSupplier("ReportPhishing")) + .build(); } } } return getReportPhishingMethod; } - /** Creates a new async stub that supports all call types for the service */ + /** + * Creates a new async stub that supports all call types for the service + */ public static PhishingProtectionServiceV1Beta1Stub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PhishingProtectionServiceV1Beta1Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PhishingProtectionServiceV1Beta1Stub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PhishingProtectionServiceV1Beta1Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1Stub(channel, callOptions); + } + }; return PhishingProtectionServiceV1Beta1Stub.newStub(factory, channel); } @@ -105,42 +69,38 @@ public PhishingProtectionServiceV1Beta1Stub newStub( public static PhishingProtectionServiceV1Beta1BlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PhishingProtectionServiceV1Beta1BlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PhishingProtectionServiceV1Beta1BlockingStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PhishingProtectionServiceV1Beta1BlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1BlockingStub(channel, callOptions); + } + }; return PhishingProtectionServiceV1Beta1BlockingStub.newStub(factory, channel); } - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static PhishingProtectionServiceV1Beta1FutureStub newFutureStub(io.grpc.Channel channel) { + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static PhishingProtectionServiceV1Beta1FutureStub newFutureStub( + io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PhishingProtectionServiceV1Beta1FutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PhishingProtectionServiceV1Beta1FutureStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PhishingProtectionServiceV1Beta1FutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1FutureStub(channel, callOptions); + } + }; return PhishingProtectionServiceV1Beta1FutureStub.newStub(factory, channel); } /** - * - * *
    * Service to report phishing URIs.
    * 
*/ - public abstract static class PhishingProtectionServiceV1Beta1ImplBase - implements io.grpc.BindableService { + public static abstract class PhishingProtectionServiceV1Beta1ImplBase implements io.grpc.BindableService { /** - * - * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -151,37 +111,30 @@ public abstract static class PhishingProtectionServiceV1Beta1ImplBase
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public void reportPhishing( - com.google.phishingprotection.v1beta1.ReportPhishingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getReportPhishingMethod(), responseObserver); + public void reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReportPhishingMethod(), responseObserver); } - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getReportPhishingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.phishingprotection.v1beta1.ReportPhishingRequest, - com.google.phishingprotection.v1beta1.ReportPhishingResponse>( - this, METHODID_REPORT_PHISHING))) + getReportPhishingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse>( + this, METHODID_REPORT_PHISHING))) .build(); } } /** - * - * *
    * Service to report phishing URIs.
    * 
*/ - public static final class PhishingProtectionServiceV1Beta1Stub - extends io.grpc.stub.AbstractAsyncStub { + public static final class PhishingProtectionServiceV1Beta1Stub extends io.grpc.stub.AbstractAsyncStub { private PhishingProtectionServiceV1Beta1Stub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -194,8 +147,6 @@ protected PhishingProtectionServiceV1Beta1Stub build( } /** - * - * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -206,26 +157,19 @@ protected PhishingProtectionServiceV1Beta1Stub build(
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public void reportPhishing( - com.google.phishingprotection.v1beta1.ReportPhishingRequest request, - io.grpc.stub.StreamObserver - responseObserver) { + public void reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getReportPhishingMethod(), getCallOptions()), - request, - responseObserver); + getChannel().newCall(getReportPhishingMethod(), getCallOptions()), request, responseObserver); } } /** - * - * *
    * Service to report phishing URIs.
    * 
*/ - public static final class PhishingProtectionServiceV1Beta1BlockingStub - extends io.grpc.stub.AbstractBlockingStub { + public static final class PhishingProtectionServiceV1Beta1BlockingStub extends io.grpc.stub.AbstractBlockingStub { private PhishingProtectionServiceV1Beta1BlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -238,8 +182,6 @@ protected PhishingProtectionServiceV1Beta1BlockingStub build( } /** - * - * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -250,22 +192,18 @@ protected PhishingProtectionServiceV1Beta1BlockingStub build(
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public com.google.phishingprotection.v1beta1.ReportPhishingResponse reportPhishing( - com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { + public com.google.phishingprotection.v1beta1.ReportPhishingResponse reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReportPhishingMethod(), getCallOptions(), request); } } /** - * - * *
    * Service to report phishing URIs.
    * 
*/ - public static final class PhishingProtectionServiceV1Beta1FutureStub - extends io.grpc.stub.AbstractFutureStub { + public static final class PhishingProtectionServiceV1Beta1FutureStub extends io.grpc.stub.AbstractFutureStub { private PhishingProtectionServiceV1Beta1FutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -278,8 +216,6 @@ protected PhishingProtectionServiceV1Beta1FutureStub build( } /** - * - * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -290,9 +226,8 @@ protected PhishingProtectionServiceV1Beta1FutureStub build(
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture< - com.google.phishingprotection.v1beta1.ReportPhishingResponse> - reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { + public com.google.common.util.concurrent.ListenableFuture reportPhishing( + com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReportPhishingMethod(), getCallOptions()), request); } @@ -300,11 +235,11 @@ protected PhishingProtectionServiceV1Beta1FutureStub build( private static final int METHODID_REPORT_PHISHING = 0; - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { private final PhishingProtectionServiceV1Beta1ImplBase serviceImpl; private final int methodId; @@ -318,11 +253,8 @@ private static final class MethodHandlers public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_REPORT_PHISHING: - serviceImpl.reportPhishing( - (com.google.phishingprotection.v1beta1.ReportPhishingRequest) request, - (io.grpc.stub.StreamObserver< - com.google.phishingprotection.v1beta1.ReportPhishingResponse>) - responseObserver); + serviceImpl.reportPhishing((com.google.phishingprotection.v1beta1.ReportPhishingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -340,9 +272,8 @@ public io.grpc.stub.StreamObserver invoke( } } - private abstract static class PhishingProtectionServiceV1Beta1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private static abstract class PhishingProtectionServiceV1Beta1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { PhishingProtectionServiceV1Beta1BaseDescriptorSupplier() {} @java.lang.Override @@ -384,13 +315,10 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (PhishingProtectionServiceV1Beta1Grpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor( - new PhishingProtectionServiceV1Beta1FileDescriptorSupplier()) - .addMethod(getReportPhishingMethod()) - .build(); + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PhishingProtectionServiceV1Beta1FileDescriptorSupplier()) + .addMethod(getReportPhishingMethod()) + .build(); } } } diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java new file mode 100644 index 00000000..6f0cd2cb --- /dev/null +++ b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java @@ -0,0 +1,100 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto + +package com.google.phishingprotection.v1beta1; + +public final class PhishingProtectionProto { + private PhishingProtectionProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n@google/cloud/phishingprotection/v1beta" + + "1/phishingprotection.proto\022\'google.cloud" + + ".phishingprotection.v1beta1\032\034google/api/" + + "annotations.proto\032\027google/api/client.pro" + + "to\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\"n\n\025ReportPhishing" + + "Request\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudre" + + "sourcemanager.googleapis.com/Project\022\020\n\003" + + "uri\030\002 \001(\tB\003\340A\002\"\030\n\026ReportPhishingResponse" + + "2\323\002\n PhishingProtectionServiceV1Beta1\022\327\001" + + "\n\016ReportPhishing\022>.google.cloud.phishing" + + "protection.v1beta1.ReportPhishingRequest" + + "\032?.google.cloud.phishingprotection.v1bet" + + "a1.ReportPhishingResponse\"D\202\323\344\223\0021\",/v1be" + + "ta1/{parent=projects/*}/phishing:report:" + + "\001*\332A\nparent,uri\032U\312A!phishingprotection.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\245\002\n%com.google.ph" + + "ishingprotection.v1beta1B\027PhishingProtec" + + "tionProtoP\001ZYgoogle.golang.org/genproto/" + + "googleapis/cloud/phishingprotection/v1be" + + "ta1;phishingprotection\242\002\004GCPP\252\002\'Google.C" + + "loud.PhishingProtection.V1Beta1\312\002\'Google" + + "\\Cloud\\PhishingProtection\\V1beta1\352\002*Goog" + + "le::Cloud::PhishingProtection::V1beta1b\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor, + new java.lang.String[] { "Parent", "Uri", }); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor, + new java.lang.String[] { }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java similarity index 100% rename from proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java rename to owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java similarity index 68% rename from proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java rename to owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java index 55937c73..e5a4bb31 100644 --- a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java +++ b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java @@ -1,42 +1,24 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto package com.google.phishingprotection.v1beta1; /** - * - * *
  * The ReportPhishing request message.
  * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingRequest} */ -public final class ReportPhishingRequest extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ReportPhishingRequest extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) ReportPhishingRequestOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ReportPhishingRequest.newBuilder() to construct. private ReportPhishingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ReportPhishingRequest() { parent_ = ""; uri_ = ""; @@ -44,15 +26,16 @@ private ReportPhishingRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ReportPhishingRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - private ReportPhishingRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -71,27 +54,25 @@ private ReportPhishingRequest( case 0: done = true; break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); + case 10: { + java.lang.String s = input.readStringRequireUtf8(); - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); - uri_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; + uri_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -99,42 +80,35 @@ private ReportPhishingRequest( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, - com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** - * - * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ @java.lang.Override @@ -143,32 +117,30 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** - * - * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -179,14 +151,11 @@ public com.google.protobuf.ByteString getParentBytes() { public static final int URI_FIELD_NUMBER = 2; private volatile java.lang.Object uri_; /** - * - * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @return The uri. */ @java.lang.Override @@ -195,29 +164,29 @@ public java.lang.String getUri() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); uri_ = s; return s; } } /** - * - * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for uri. */ @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { + public com.google.protobuf.ByteString + getUriBytes() { java.lang.Object ref = uri_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); uri_ = b; return b; } else { @@ -226,7 +195,6 @@ public com.google.protobuf.ByteString getUriBytes() { } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -238,7 +206,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -268,16 +237,17 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.phishingprotection.v1beta1.ReportPhishingRequest)) { return super.equals(obj); } - com.google.phishingprotection.v1beta1.ReportPhishingRequest other = - (com.google.phishingprotection.v1beta1.ReportPhishingRequest) obj; + com.google.phishingprotection.v1beta1.ReportPhishingRequest other = (com.google.phishingprotection.v1beta1.ReportPhishingRequest) obj; - if (!getParent().equals(other.getParent())) return false; - if (!getUri().equals(other.getUri())) return false; + if (!getParent() + .equals(other.getParent())) return false; + if (!getUri() + .equals(other.getUri())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -299,127 +269,117 @@ public int hashCode() { } public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.phishingprotection.v1beta1.ReportPhishingRequest prototype) { + public static Builder newBuilder(com.google.phishingprotection.v1beta1.ReportPhishingRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * The ReportPhishing request message.
    * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingRequest} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) com.google.phishingprotection.v1beta1.ReportPhishingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, - com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); } // Construct using com.google.phishingprotection.v1beta1.ReportPhishingRequest.newBuilder() @@ -427,15 +387,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } - @java.lang.Override public Builder clear() { super.clear(); @@ -447,9 +408,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; } @java.lang.Override @@ -468,8 +429,7 @@ public com.google.phishingprotection.v1beta1.ReportPhishingRequest build() { @java.lang.Override public com.google.phishingprotection.v1beta1.ReportPhishingRequest buildPartial() { - com.google.phishingprotection.v1beta1.ReportPhishingRequest result = - new com.google.phishingprotection.v1beta1.ReportPhishingRequest(this); + com.google.phishingprotection.v1beta1.ReportPhishingRequest result = new com.google.phishingprotection.v1beta1.ReportPhishingRequest(this); result.parent_ = parent_; result.uri_ = uri_; onBuilt(); @@ -480,39 +440,38 @@ public com.google.phishingprotection.v1beta1.ReportPhishingRequest buildPartial( public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.phishingprotection.v1beta1.ReportPhishingRequest) { - return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingRequest) other); + return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingRequest)other); } else { super.mergeFrom(other); return this; @@ -520,8 +479,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.phishingprotection.v1beta1.ReportPhishingRequest other) { - if (other == com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance()) - return this; + if (other == com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance()) return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -549,8 +507,7 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.phishingprotection.v1beta1.ReportPhishingRequest) e.getUnfinishedMessage(); + parsedMessage = (com.google.phishingprotection.v1beta1.ReportPhishingRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -562,23 +519,19 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** - * - * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -587,24 +540,21 @@ public java.lang.String getParent() { } } /** - * - * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - public com.google.protobuf.ByteString getParentBytes() { + public com.google.protobuf.ByteString + getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); parent_ = b; return b; } else { @@ -612,70 +562,57 @@ public com.google.protobuf.ByteString getParentBytes() { } } /** - * - * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent(java.lang.String value) { + public Builder setParent( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** - * - * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** - * - * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { + public Builder setParentBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; @@ -683,20 +620,18 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { private java.lang.Object uri_ = ""; /** - * - * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @return The uri. */ public java.lang.String getUri() { java.lang.Object ref = uri_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); uri_ = s; return s; @@ -705,21 +640,20 @@ public java.lang.String getUri() { } } /** - * - * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for uri. */ - public com.google.protobuf.ByteString getUriBytes() { + public com.google.protobuf.ByteString + getUriBytes() { java.lang.Object ref = uri_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); uri_ = b; return b; } else { @@ -727,68 +661,61 @@ public com.google.protobuf.ByteString getUriBytes() { } } /** - * - * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The uri to set. * @return This builder for chaining. */ - public Builder setUri(java.lang.String value) { + public Builder setUri( + java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + uri_ = value; onChanged(); return this; } /** - * - * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @return This builder for chaining. */ public Builder clearUri() { - + uri_ = getDefaultInstance().getUri(); onChanged(); return this; } /** - * - * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @param value The bytes for uri to set. * @return This builder for chaining. */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { + public Builder setUriBytes( + com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; onChanged(); return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -798,12 +725,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) } // @@protoc_insertion_point(class_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) private static final com.google.phishingprotection.v1beta1.ReportPhishingRequest DEFAULT_INSTANCE; - static { DEFAULT_INSTANCE = new com.google.phishingprotection.v1beta1.ReportPhishingRequest(); } @@ -812,16 +739,16 @@ public static com.google.phishingprotection.v1beta1.ReportPhishingRequest getDef return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReportPhishingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReportPhishingRequest(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportPhishingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReportPhishingRequest(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -836,4 +763,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.phishingprotection.v1beta1.ReportPhishingRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java similarity index 53% rename from proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java rename to owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java index 826ad9f3..a19b18bf 100644 --- a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java +++ b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java @@ -1,81 +1,51 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto package com.google.phishingprotection.v1beta1; -public interface ReportPhishingRequestOrBuilder - extends +public interface ReportPhishingRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) com.google.protobuf.MessageOrBuilder { /** - * - * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The parent. */ java.lang.String getParent(); /** - * - * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * @return The bytes for parent. */ - com.google.protobuf.ByteString getParentBytes(); + com.google.protobuf.ByteString + getParentBytes(); /** - * - * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @return The uri. */ java.lang.String getUri(); /** - * - * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * * @return The bytes for uri. */ - com.google.protobuf.ByteString getUriBytes(); + com.google.protobuf.ByteString + getUriBytes(); } diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java similarity index 67% rename from proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java rename to owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java index 8b9aea2d..1dde3bbf 100644 --- a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java +++ b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java @@ -1,55 +1,39 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto package com.google.phishingprotection.v1beta1; /** - * - * *
  * The ReportPhishing (empty) response message.
  * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingResponse} */ -public final class ReportPhishingResponse extends com.google.protobuf.GeneratedMessageV3 - implements +public final class ReportPhishingResponse extends + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) ReportPhishingResponseOrBuilder { - private static final long serialVersionUID = 0L; +private static final long serialVersionUID = 0L; // Use ReportPhishingResponse.newBuilder() to construct. private ReportPhishingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - - private ReportPhishingResponse() {} + private ReportPhishingResponse() { + } @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { return new ReportPhishingResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { return this.unknownFields; } - private ReportPhishingResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -68,13 +52,13 @@ private ReportPhishingResponse( case 0: done = true; break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -82,30 +66,27 @@ private ReportPhishingResponse( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, - com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); } private byte memoizedIsInitialized = -1; - @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -117,7 +98,8 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { unknownFields.writeTo(output); } @@ -135,13 +117,12 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.phishingprotection.v1beta1.ReportPhishingResponse)) { return super.equals(obj); } - com.google.phishingprotection.v1beta1.ReportPhishingResponse other = - (com.google.phishingprotection.v1beta1.ReportPhishingResponse) obj; + com.google.phishingprotection.v1beta1.ReportPhishingResponse other = (com.google.phishingprotection.v1beta1.ReportPhishingResponse) obj; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -160,127 +141,117 @@ public int hashCode() { } public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } - - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - - public static Builder newBuilder( - com.google.phishingprotection.v1beta1.ReportPhishingResponse prototype) { + public static Builder newBuilder(com.google.phishingprotection.v1beta1.ReportPhishingResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * - * *
    * The ReportPhishing (empty) response message.
    * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingResponse} */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) com.google.phishingprotection.v1beta1.ReportPhishingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, - com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); } // Construct using com.google.phishingprotection.v1beta1.ReportPhishingResponse.newBuilder() @@ -288,15 +259,16 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } } - @java.lang.Override public Builder clear() { super.clear(); @@ -304,14 +276,13 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto - .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; } @java.lang.Override - public com.google.phishingprotection.v1beta1.ReportPhishingResponse - getDefaultInstanceForType() { + public com.google.phishingprotection.v1beta1.ReportPhishingResponse getDefaultInstanceForType() { return com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance(); } @@ -326,8 +297,7 @@ public com.google.phishingprotection.v1beta1.ReportPhishingResponse build() { @java.lang.Override public com.google.phishingprotection.v1beta1.ReportPhishingResponse buildPartial() { - com.google.phishingprotection.v1beta1.ReportPhishingResponse result = - new com.google.phishingprotection.v1beta1.ReportPhishingResponse(this); + com.google.phishingprotection.v1beta1.ReportPhishingResponse result = new com.google.phishingprotection.v1beta1.ReportPhishingResponse(this); onBuilt(); return result; } @@ -336,39 +306,38 @@ public com.google.phishingprotection.v1beta1.ReportPhishingResponse buildPartial public Builder clone() { return super.clone(); } - @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } - @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } - @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { return super.addRepeatedField(field, value); } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.phishingprotection.v1beta1.ReportPhishingResponse) { - return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingResponse) other); + return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingResponse)other); } else { super.mergeFrom(other); return this; @@ -376,9 +345,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.phishingprotection.v1beta1.ReportPhishingResponse other) { - if (other - == com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance()) - return this; + if (other == com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -398,8 +365,7 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.phishingprotection.v1beta1.ReportPhishingResponse) e.getUnfinishedMessage(); + parsedMessage = (com.google.phishingprotection.v1beta1.ReportPhishingResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -408,9 +374,9 @@ public Builder mergeFrom( } return this; } - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -420,13 +386,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } + // @@protoc_insertion_point(builder_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) } // @@protoc_insertion_point(class_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) - private static final com.google.phishingprotection.v1beta1.ReportPhishingResponse - DEFAULT_INSTANCE; - + private static final com.google.phishingprotection.v1beta1.ReportPhishingResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.phishingprotection.v1beta1.ReportPhishingResponse(); } @@ -435,16 +400,16 @@ public static com.google.phishingprotection.v1beta1.ReportPhishingResponse getDe return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReportPhishingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReportPhishingResponse(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportPhishingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReportPhishingResponse(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -459,4 +424,6 @@ public com.google.protobuf.Parser getParserForType() { public com.google.phishingprotection.v1beta1.ReportPhishingResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } + } + diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java new file mode 100644 index 00000000..8dede110 --- /dev/null +++ b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto + +package com.google.phishingprotection.v1beta1; + +public interface ReportPhishingResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto similarity index 100% rename from proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto rename to owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..9ee89f06 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; +import com.google.cloud.phishingprotection.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings = + PhishingProtectionServiceV1Beta1Settings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = + PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings); + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..201f4414 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider1_sync] +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings = + PhishingProtectionServiceV1Beta1Settings.newBuilder() + .setTransportChannelProvider( + PhishingProtectionServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() + .build()) + .build(); + PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = + PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings); + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..2f966e64 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setendpoint_sync] +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; +import com.google.cloud.phishingprotection.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings = + PhishingProtectionServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build(); + PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = + PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings); + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setendpoint_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java new file mode 100644 index 00000000..170424e0 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; +import com.google.phishingprotection.v1beta1.ProjectName; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; + +public class AsyncReportPhishing { + + public static void main(String[] args) throws Exception { + asyncReportPhishing(); + } + + public static void asyncReportPhishing() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = + PhishingProtectionServiceV1Beta1Client.create()) { + ReportPhishingRequest request = + ReportPhishingRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setUri("uri116076") + .build(); + ApiFuture future = + phishingProtectionServiceV1Beta1Client.reportPhishingCallable().futureCall(request); + // Do something. + ReportPhishingResponse response = future.get(); + } + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_async] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java new file mode 100644 index 00000000..8627837d --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_sync] +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; +import com.google.phishingprotection.v1beta1.ProjectName; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; + +public class SyncReportPhishing { + + public static void main(String[] args) throws Exception { + syncReportPhishing(); + } + + public static void syncReportPhishing() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = + PhishingProtectionServiceV1Beta1Client.create()) { + ReportPhishingRequest request = + ReportPhishingRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setUri("uri116076") + .build(); + ReportPhishingResponse response = + phishingProtectionServiceV1Beta1Client.reportPhishing(request); + } + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java new file mode 100644 index 00000000..a6568c60 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_projectnamestring_sync] +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; +import com.google.phishingprotection.v1beta1.ProjectName; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; + +public class SyncReportPhishingProjectnameString { + + public static void main(String[] args) throws Exception { + syncReportPhishingProjectnameString(); + } + + public static void syncReportPhishingProjectnameString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = + PhishingProtectionServiceV1Beta1Client.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + String uri = "uri116076"; + ReportPhishingResponse response = + phishingProtectionServiceV1Beta1Client.reportPhishing(parent, uri); + } + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_projectnamestring_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java new file mode 100644 index 00000000..f0e61073 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_stringstring_sync] +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; +import com.google.phishingprotection.v1beta1.ProjectName; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; + +public class SyncReportPhishingStringString { + + public static void main(String[] args) throws Exception { + syncReportPhishingStringString(); + } + + public static void syncReportPhishingStringString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = + PhishingProtectionServiceV1Beta1Client.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + String uri = "uri116076"; + ReportPhishingResponse response = + phishingProtectionServiceV1Beta1Client.reportPhishing(parent, uri); + } + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_stringstring_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java new file mode 100644 index 00000000..a7682b31 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1settings_reportphishing_sync] +import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; +import java.time.Duration; + +public class SyncReportPhishing { + + public static void main(String[] args) throws Exception { + syncReportPhishing(); + } + + public static void syncReportPhishing() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + PhishingProtectionServiceV1Beta1Settings.Builder + phishingProtectionServiceV1Beta1SettingsBuilder = + PhishingProtectionServiceV1Beta1Settings.newBuilder(); + phishingProtectionServiceV1Beta1SettingsBuilder + .reportPhishingSettings() + .setRetrySettings( + phishingProtectionServiceV1Beta1SettingsBuilder + .reportPhishingSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings = + phishingProtectionServiceV1Beta1SettingsBuilder.build(); + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1settings_reportphishing_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java new file mode 100644 index 00000000..b210b346 --- /dev/null +++ b/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.phishingprotection.v1beta1.stub.samples; + +// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1stubsettings_reportphishing_sync] +import com.google.cloud.phishingprotection.v1beta1.stub.PhishingProtectionServiceV1Beta1StubSettings; +import java.time.Duration; + +public class SyncReportPhishing { + + public static void main(String[] args) throws Exception { + syncReportPhishing(); + } + + public static void syncReportPhishing() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + PhishingProtectionServiceV1Beta1StubSettings.Builder + phishingProtectionServiceV1Beta1SettingsBuilder = + PhishingProtectionServiceV1Beta1StubSettings.newBuilder(); + phishingProtectionServiceV1Beta1SettingsBuilder + .reportPhishingSettings() + .setRetrySettings( + phishingProtectionServiceV1Beta1SettingsBuilder + .reportPhishingSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PhishingProtectionServiceV1Beta1StubSettings phishingProtectionServiceV1Beta1Settings = + phishingProtectionServiceV1Beta1SettingsBuilder.build(); + } +} +// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1stubsettings_reportphishing_sync] diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java deleted file mode 100644 index 293b2dc0..00000000 --- a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto - -package com.google.phishingprotection.v1beta1; - -public final class PhishingProtectionProto { - private PhishingProtectionProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n@google/cloud/phishingprotection/v1beta" - + "1/phishingprotection.proto\022\'google.cloud" - + ".phishingprotection.v1beta1\032\034google/api/" - + "annotations.proto\032\027google/api/client.pro" - + "to\032\037google/api/field_behavior.proto\032\031goo" - + "gle/api/resource.proto\"n\n\025ReportPhishing" - + "Request\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudre" - + "sourcemanager.googleapis.com/Project\022\020\n\003" - + "uri\030\002 \001(\tB\003\340A\002\"\030\n\026ReportPhishingResponse" - + "2\323\002\n PhishingProtectionServiceV1Beta1\022\327\001" - + "\n\016ReportPhishing\022>.google.cloud.phishing" - + "protection.v1beta1.ReportPhishingRequest" - + "\032?.google.cloud.phishingprotection.v1bet" - + "a1.ReportPhishingResponse\"D\202\323\344\223\0021\",/v1be" - + "ta1/{parent=projects/*}/phishing:report:" - + "\001*\332A\nparent,uri\032U\312A!phishingprotection.g" - + "oogleapis.com\322A.https://www.googleapis.c" - + "om/auth/cloud-platformB\245\002\n%com.google.ph" - + "ishingprotection.v1beta1B\027PhishingProtec" - + "tionProtoP\001ZYgoogle.golang.org/genproto/" - + "googleapis/cloud/phishingprotection/v1be" - + "ta1;phishingprotection\242\002\004GCPP\252\002\'Google.C" - + "loud.PhishingProtection.V1Beta1\312\002\'Google" - + "\\Cloud\\PhishingProtection\\V1beta1\352\002*Goog" - + "le::Cloud::PhishingProtection::V1beta1b\006" - + "proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - }); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor, - new java.lang.String[] { - "Parent", "Uri", - }); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor, - new java.lang.String[] {}); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java deleted file mode 100644 index 4831def3..00000000 --- a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto - -package com.google.phishingprotection.v1beta1; - -public interface ReportPhishingResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) - com.google.protobuf.MessageOrBuilder {} From 3c1a37255cf65030f5642510f200acc91c8b914a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 23 Jun 2022 02:19:14 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- ...hishingProtectionServiceV1Beta1Client.java | 6 +- ...shingProtectionServiceV1Beta1Settings.java | 7 +- .../v1beta1/gapic_metadata.json | 0 .../v1beta1/package-info.java | 0 ...otectionServiceV1Beta1CallableFactory.java | 0 ...cPhishingProtectionServiceV1Beta1Stub.java | 1 - ...otectionServiceV1Beta1CallableFactory.java | 0 ...nPhishingProtectionServiceV1Beta1Stub.java | 0 .../PhishingProtectionServiceV1Beta1Stub.java | 0 ...gProtectionServiceV1Beta1StubSettings.java | 6 +- .../MockPhishingProtectionServiceV1Beta1.java | 0 ...kPhishingProtectionServiceV1Beta1Impl.java | 0 ...ctionServiceV1Beta1ClientHttpJsonTest.java | 0 ...ingProtectionServiceV1Beta1ClientTest.java | 0 .../PhishingProtectionServiceV1Beta1Grpc.java | 228 ++++++---- .../v1beta1/PhishingProtectionProto.java | 100 ----- .../ReportPhishingResponseOrBuilder.java | 9 - .../v1beta1/PhishingProtectionProto.java | 114 +++++ .../v1beta1/ProjectName.java | 0 .../v1beta1/ReportPhishingRequest.java | 421 ++++++++++-------- .../ReportPhishingRequestOrBuilder.java | 44 +- .../v1beta1/ReportPhishingResponse.java | 245 +++++----- .../ReportPhishingResponseOrBuilder.java | 24 + .../v1beta1/phishingprotection.proto | 0 .../SyncCreateSetCredentialsProvider.java | 6 +- .../SyncCreateSetCredentialsProvider1.java | 6 +- .../create/SyncCreateSetEndpoint.java | 6 +- .../reportphishing/AsyncReportPhishing.java | 6 +- .../reportphishing/SyncReportPhishing.java | 6 +- .../SyncReportPhishingProjectnameString.java | 6 +- .../SyncReportPhishingStringString.java | 6 +- .../reportphishing/SyncReportPhishing.java | 6 +- .../reportphishing/SyncReportPhishing.java | 6 +- 33 files changed, 755 insertions(+), 504 deletions(-) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java (98%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java (96%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java (99%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java (97%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java (100%) rename {owl-bot-staging/v1beta1/google-cloud-phishingprotection => google-cloud-phishingprotection}/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java (100%) rename {owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1 => grpc-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java (58%) delete mode 100644 owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java delete mode 100644 owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java create mode 100644 proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java rename {owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1 => proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java (100%) rename {owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1 => proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java (68%) rename {owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1 => proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java (53%) rename {owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1 => proto-google-cloud-phishingprotection-v1beta1}/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java (67%) create mode 100644 proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java rename {owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1 => proto-google-cloud-phishingprotection-v1beta1}/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto (100%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java (87%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java (87%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java (87%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java (89%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java (89%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java (86%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java (86%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java (89%) rename {owl-bot-staging/v1beta1/samples => samples}/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java (88%) diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java similarity index 98% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java index 918db09c..e8559f92 100644 --- a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java +++ b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java @@ -55,13 +55,13 @@ * methods: * *
    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been + *
  2. A "flattened" method. With this type of method, the fields of the request type have been * converted into function parameters. It may be the case that not all fields are available as * parameters, and not every API method will have a flattened method entry point. - *
  3. A "request object" method. This type of method only takes one parameter, a request object, + *
  4. A "request object" method. This type of method only takes one parameter, a request object, * which must be constructed before the call. Not every API method will have a request object * method. - *
  5. A "callable" method. This type of method takes no parameters and returns an immutable API + *
  6. A "callable" method. This type of method takes no parameters and returns an immutable API * callable object, which can be used to initiate calls to the service. *
* diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java similarity index 96% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java index c5c7d5a0..e505fe3b 100644 --- a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java +++ b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java @@ -25,7 +25,6 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.phishingprotection.v1beta1.stub.PhishingProtectionServiceV1Beta1StubSettings; @@ -42,10 +41,10 @@ *

The default instance has everything set to sensible defaults: * *

    - *
  • The default service address (phishingprotection.googleapis.com) and default port (443) are + *
  • The default service address (phishingprotection.googleapis.com) and default port (443) are * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. *
* *

The builder of this class is recursive, so contained classes are themselves builders. When diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/gapic_metadata.json diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java similarity index 99% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java index f990d8ad..aa573776 100644 --- a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java +++ b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java @@ -30,7 +30,6 @@ import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; -import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.Generated; diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1CallableFactory.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/HttpJsonPhishingProtectionServiceV1Beta1Stub.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java similarity index 97% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java rename to google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java index 639624b1..36dcdece 100644 --- a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java +++ b/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java @@ -52,10 +52,10 @@ *

The default instance has everything set to sensible defaults: * *

    - *
  • The default service address (phishingprotection.googleapis.com) and default port (443) are + *
  • The default service address (phishingprotection.googleapis.com) and default port (443) are * used. - *
  • Credentials are acquired automatically through Application Default Credentials. - *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. *
* *

The builder of this class is recursive, so contained classes are themselves builders. When diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java b/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java rename to google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java b/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java rename to google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java b/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java rename to google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientHttpJsonTest.java diff --git a/owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java b/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java similarity index 100% rename from owl-bot-staging/v1beta1/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java rename to google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java diff --git a/owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java b/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java similarity index 58% rename from owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java rename to grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java index a16f4d16..7b57612e 100644 --- a/owl-bot-staging/v1beta1/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java +++ b/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java @@ -1,8 +1,25 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.google.phishingprotection.v1beta1; import static io.grpc.MethodDescriptor.generateFullMethodName; /** + * + * *

  * Service to report phishing URIs.
  * 
@@ -15,51 +32,70 @@ public final class PhishingProtectionServiceV1Beta1Grpc { private PhishingProtectionServiceV1Beta1Grpc() {} - public static final String SERVICE_NAME = "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1"; + public static final String SERVICE_NAME = + "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getReportPhishingMethod; + private static volatile io.grpc.MethodDescriptor< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + getReportPhishingMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ReportPhishing", requestType = com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, responseType = com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getReportPhishingMethod() { - io.grpc.MethodDescriptor getReportPhishingMethod; - if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) == null) { + public static io.grpc.MethodDescriptor< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + getReportPhishingMethod() { + io.grpc.MethodDescriptor< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + getReportPhishingMethod; + if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) + == null) { synchronized (PhishingProtectionServiceV1Beta1Grpc.class) { - if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) == null) { - PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod = getReportPhishingMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportPhishing")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance())) - .setSchemaDescriptor(new PhishingProtectionServiceV1Beta1MethodDescriptorSupplier("ReportPhishing")) - .build(); + if ((getReportPhishingMethod = PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod) + == null) { + PhishingProtectionServiceV1Beta1Grpc.getReportPhishingMethod = + getReportPhishingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ReportPhishing")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.phishingprotection.v1beta1.ReportPhishingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.phishingprotection.v1beta1.ReportPhishingResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PhishingProtectionServiceV1Beta1MethodDescriptorSupplier( + "ReportPhishing")) + .build(); } } } return getReportPhishingMethod; } - /** - * Creates a new async stub that supports all call types for the service - */ + /** Creates a new async stub that supports all call types for the service */ public static PhishingProtectionServiceV1Beta1Stub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PhishingProtectionServiceV1Beta1Stub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PhishingProtectionServiceV1Beta1Stub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PhishingProtectionServiceV1Beta1Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1Stub(channel, callOptions); + } + }; return PhishingProtectionServiceV1Beta1Stub.newStub(factory, channel); } @@ -69,38 +105,42 @@ public PhishingProtectionServiceV1Beta1Stub newStub(io.grpc.Channel channel, io. public static PhishingProtectionServiceV1Beta1BlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PhishingProtectionServiceV1Beta1BlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PhishingProtectionServiceV1Beta1BlockingStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PhishingProtectionServiceV1Beta1BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1BlockingStub(channel, callOptions); + } + }; return PhishingProtectionServiceV1Beta1BlockingStub.newStub(factory, channel); } - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static PhishingProtectionServiceV1Beta1FutureStub newFutureStub( - io.grpc.Channel channel) { + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PhishingProtectionServiceV1Beta1FutureStub newFutureStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public PhishingProtectionServiceV1Beta1FutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new PhishingProtectionServiceV1Beta1FutureStub(channel, callOptions); - } - }; + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PhishingProtectionServiceV1Beta1FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1FutureStub(channel, callOptions); + } + }; return PhishingProtectionServiceV1Beta1FutureStub.newStub(factory, channel); } /** + * + * *
    * Service to report phishing URIs.
    * 
*/ - public static abstract class PhishingProtectionServiceV1Beta1ImplBase implements io.grpc.BindableService { + public abstract static class PhishingProtectionServiceV1Beta1ImplBase + implements io.grpc.BindableService { /** + * + * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -111,30 +151,37 @@ public static abstract class PhishingProtectionServiceV1Beta1ImplBase implements
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public void reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getReportPhishingMethod(), responseObserver); + public void reportPhishing( + com.google.phishingprotection.v1beta1.ReportPhishingRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getReportPhishingMethod(), responseObserver); } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( - getReportPhishingMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.phishingprotection.v1beta1.ReportPhishingRequest, - com.google.phishingprotection.v1beta1.ReportPhishingResponse>( - this, METHODID_REPORT_PHISHING))) + getReportPhishingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse>( + this, METHODID_REPORT_PHISHING))) .build(); } } /** + * + * *
    * Service to report phishing URIs.
    * 
*/ - public static final class PhishingProtectionServiceV1Beta1Stub extends io.grpc.stub.AbstractAsyncStub { + public static final class PhishingProtectionServiceV1Beta1Stub + extends io.grpc.stub.AbstractAsyncStub { private PhishingProtectionServiceV1Beta1Stub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -147,6 +194,8 @@ protected PhishingProtectionServiceV1Beta1Stub build( } /** + * + * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -157,19 +206,26 @@ protected PhishingProtectionServiceV1Beta1Stub build(
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public void reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void reportPhishing( + com.google.phishingprotection.v1beta1.ReportPhishingRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getReportPhishingMethod(), getCallOptions()), request, responseObserver); + getChannel().newCall(getReportPhishingMethod(), getCallOptions()), + request, + responseObserver); } } /** + * + * *
    * Service to report phishing URIs.
    * 
*/ - public static final class PhishingProtectionServiceV1Beta1BlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class PhishingProtectionServiceV1Beta1BlockingStub + extends io.grpc.stub.AbstractBlockingStub { private PhishingProtectionServiceV1Beta1BlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -182,6 +238,8 @@ protected PhishingProtectionServiceV1Beta1BlockingStub build( } /** + * + * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -192,18 +250,22 @@ protected PhishingProtectionServiceV1Beta1BlockingStub build(
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public com.google.phishingprotection.v1beta1.ReportPhishingResponse reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { + public com.google.phishingprotection.v1beta1.ReportPhishingResponse reportPhishing( + com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getReportPhishingMethod(), getCallOptions(), request); } } /** + * + * *
    * Service to report phishing URIs.
    * 
*/ - public static final class PhishingProtectionServiceV1Beta1FutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class PhishingProtectionServiceV1Beta1FutureStub + extends io.grpc.stub.AbstractFutureStub { private PhishingProtectionServiceV1Beta1FutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -216,6 +278,8 @@ protected PhishingProtectionServiceV1Beta1FutureStub build( } /** + * + * *
      * Reports a URI suspected of containing phishing content to be reviewed. Once
      * the report review is complete, its result can be found in the Cloud
@@ -226,8 +290,9 @@ protected PhishingProtectionServiceV1Beta1FutureStub build(
      * protect users that could get exposed to this threat in the future.
      * 
*/ - public com.google.common.util.concurrent.ListenableFuture reportPhishing( - com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { + public com.google.common.util.concurrent.ListenableFuture< + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + reportPhishing(com.google.phishingprotection.v1beta1.ReportPhishingRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getReportPhishingMethod(), getCallOptions()), request); } @@ -235,11 +300,11 @@ public com.google.common.util.concurrent.ListenableFuture implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { private final PhishingProtectionServiceV1Beta1ImplBase serviceImpl; private final int methodId; @@ -253,8 +318,11 @@ private static final class MethodHandlers implements public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_REPORT_PHISHING: - serviceImpl.reportPhishing((com.google.phishingprotection.v1beta1.ReportPhishingRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.reportPhishing( + (com.google.phishingprotection.v1beta1.ReportPhishingRequest) request, + (io.grpc.stub.StreamObserver< + com.google.phishingprotection.v1beta1.ReportPhishingResponse>) + responseObserver); break; default: throw new AssertionError(); @@ -272,8 +340,9 @@ public io.grpc.stub.StreamObserver invoke( } } - private static abstract class PhishingProtectionServiceV1Beta1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + private abstract static class PhishingProtectionServiceV1Beta1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { PhishingProtectionServiceV1Beta1BaseDescriptorSupplier() {} @java.lang.Override @@ -315,10 +384,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { synchronized (PhishingProtectionServiceV1Beta1Grpc.class) { result = serviceDescriptor; if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new PhishingProtectionServiceV1Beta1FileDescriptorSupplier()) - .addMethod(getReportPhishingMethod()) - .build(); + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new PhishingProtectionServiceV1Beta1FileDescriptorSupplier()) + .addMethod(getReportPhishingMethod()) + .build(); } } } diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java deleted file mode 100644 index 6f0cd2cb..00000000 --- a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java +++ /dev/null @@ -1,100 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto - -package com.google.phishingprotection.v1beta1; - -public final class PhishingProtectionProto { - private PhishingProtectionProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n@google/cloud/phishingprotection/v1beta" + - "1/phishingprotection.proto\022\'google.cloud" + - ".phishingprotection.v1beta1\032\034google/api/" + - "annotations.proto\032\027google/api/client.pro" + - "to\032\037google/api/field_behavior.proto\032\031goo" + - "gle/api/resource.proto\"n\n\025ReportPhishing" + - "Request\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudre" + - "sourcemanager.googleapis.com/Project\022\020\n\003" + - "uri\030\002 \001(\tB\003\340A\002\"\030\n\026ReportPhishingResponse" + - "2\323\002\n PhishingProtectionServiceV1Beta1\022\327\001" + - "\n\016ReportPhishing\022>.google.cloud.phishing" + - "protection.v1beta1.ReportPhishingRequest" + - "\032?.google.cloud.phishingprotection.v1bet" + - "a1.ReportPhishingResponse\"D\202\323\344\223\0021\",/v1be" + - "ta1/{parent=projects/*}/phishing:report:" + - "\001*\332A\nparent,uri\032U\312A!phishingprotection.g" + - "oogleapis.com\322A.https://www.googleapis.c" + - "om/auth/cloud-platformB\245\002\n%com.google.ph" + - "ishingprotection.v1beta1B\027PhishingProtec" + - "tionProtoP\001ZYgoogle.golang.org/genproto/" + - "googleapis/cloud/phishingprotection/v1be" + - "ta1;phishingprotection\242\002\004GCPP\252\002\'Google.C" + - "loud.PhishingProtection.V1Beta1\312\002\'Google" + - "\\Cloud\\PhishingProtection\\V1beta1\352\002*Goog" + - "le::Cloud::PhishingProtection::V1beta1b\006" + - "proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - }); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor, - new java.lang.String[] { "Parent", "Uri", }); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor, - new java.lang.String[] { }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor - .internalUpdateFileDescriptor(descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java b/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java deleted file mode 100644 index 8dede110..00000000 --- a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java +++ /dev/null @@ -1,9 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto - -package com.google.phishingprotection.v1beta1; - -public interface ReportPhishingResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) - com.google.protobuf.MessageOrBuilder { -} diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java new file mode 100644 index 00000000..293b2dc0 --- /dev/null +++ b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java @@ -0,0 +1,114 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto + +package com.google.phishingprotection.v1beta1; + +public final class PhishingProtectionProto { + private PhishingProtectionProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n@google/cloud/phishingprotection/v1beta" + + "1/phishingprotection.proto\022\'google.cloud" + + ".phishingprotection.v1beta1\032\034google/api/" + + "annotations.proto\032\027google/api/client.pro" + + "to\032\037google/api/field_behavior.proto\032\031goo" + + "gle/api/resource.proto\"n\n\025ReportPhishing" + + "Request\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloudre" + + "sourcemanager.googleapis.com/Project\022\020\n\003" + + "uri\030\002 \001(\tB\003\340A\002\"\030\n\026ReportPhishingResponse" + + "2\323\002\n PhishingProtectionServiceV1Beta1\022\327\001" + + "\n\016ReportPhishing\022>.google.cloud.phishing" + + "protection.v1beta1.ReportPhishingRequest" + + "\032?.google.cloud.phishingprotection.v1bet" + + "a1.ReportPhishingResponse\"D\202\323\344\223\0021\",/v1be" + + "ta1/{parent=projects/*}/phishing:report:" + + "\001*\332A\nparent,uri\032U\312A!phishingprotection.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\245\002\n%com.google.ph" + + "ishingprotection.v1beta1B\027PhishingProtec" + + "tionProtoP\001ZYgoogle.golang.org/genproto/" + + "googleapis/cloud/phishingprotection/v1be" + + "ta1;phishingprotection\242\002\004GCPP\252\002\'Google.C" + + "loud.PhishingProtection.V1Beta1\312\002\'Google" + + "\\Cloud\\PhishingProtection\\V1beta1\352\002*Goog" + + "le::Cloud::PhishingProtection::V1beta1b\006" + + "proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor, + new java.lang.String[] { + "Parent", "Uri", + }); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java similarity index 100% rename from owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java rename to proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java similarity index 68% rename from owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java rename to proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java index e5a4bb31..55937c73 100644 --- a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java +++ b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java @@ -1,24 +1,42 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto package com.google.phishingprotection.v1beta1; /** + * + * *
  * The ReportPhishing request message.
  * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingRequest} */ -public final class ReportPhishingRequest extends - com.google.protobuf.GeneratedMessageV3 implements +public final class ReportPhishingRequest extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) ReportPhishingRequestOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use ReportPhishingRequest.newBuilder() to construct. private ReportPhishingRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } + private ReportPhishingRequest() { parent_ = ""; uri_ = ""; @@ -26,16 +44,15 @@ private ReportPhishingRequest() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ReportPhishingRequest(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private ReportPhishingRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -54,25 +71,27 @@ private ReportPhishingRequest( case 0: done = true; break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); - parent_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); - uri_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + uri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -80,35 +99,42 @@ private ReportPhishingRequest( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, + com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); } public static final int PARENT_FIELD_NUMBER = 1; private volatile java.lang.Object parent_; /** + * + * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @return The parent. */ @java.lang.Override @@ -117,30 +143,32 @@ public java.lang.String getParent() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** + * + * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @return The bytes for parent. */ @java.lang.Override - public com.google.protobuf.ByteString - getParentBytes() { + public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); parent_ = b; return b; } else { @@ -151,11 +179,14 @@ public java.lang.String getParent() { public static final int URI_FIELD_NUMBER = 2; private volatile java.lang.Object uri_; /** + * + * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @return The uri. */ @java.lang.Override @@ -164,29 +195,29 @@ public java.lang.String getUri() { if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); uri_ = s; return s; } } /** + * + * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @return The bytes for uri. */ @java.lang.Override - public com.google.protobuf.ByteString - getUriBytes() { + public com.google.protobuf.ByteString getUriBytes() { java.lang.Object ref = uri_; if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); uri_ = b; return b; } else { @@ -195,6 +226,7 @@ public java.lang.String getUri() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -206,8 +238,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } @@ -237,17 +268,16 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.phishingprotection.v1beta1.ReportPhishingRequest)) { return super.equals(obj); } - com.google.phishingprotection.v1beta1.ReportPhishingRequest other = (com.google.phishingprotection.v1beta1.ReportPhishingRequest) obj; + com.google.phishingprotection.v1beta1.ReportPhishingRequest other = + (com.google.phishingprotection.v1beta1.ReportPhishingRequest) obj; - if (!getParent() - .equals(other.getParent())) return false; - if (!getUri() - .equals(other.getUri())) return false; + if (!getParent().equals(other.getParent())) return false; + if (!getUri().equals(other.getUri())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -269,117 +299,127 @@ public int hashCode() { } public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.phishingprotection.v1beta1.ReportPhishingRequest prototype) { + + public static Builder newBuilder( + com.google.phishingprotection.v1beta1.ReportPhishingRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * The ReportPhishing request message.
    * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingRequest} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) com.google.phishingprotection.v1beta1.ReportPhishingRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingRequest.class, + com.google.phishingprotection.v1beta1.ReportPhishingRequest.Builder.class); } // Construct using com.google.phishingprotection.v1beta1.ReportPhishingRequest.newBuilder() @@ -387,16 +427,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -408,9 +447,9 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; } @java.lang.Override @@ -429,7 +468,8 @@ public com.google.phishingprotection.v1beta1.ReportPhishingRequest build() { @java.lang.Override public com.google.phishingprotection.v1beta1.ReportPhishingRequest buildPartial() { - com.google.phishingprotection.v1beta1.ReportPhishingRequest result = new com.google.phishingprotection.v1beta1.ReportPhishingRequest(this); + com.google.phishingprotection.v1beta1.ReportPhishingRequest result = + new com.google.phishingprotection.v1beta1.ReportPhishingRequest(this); result.parent_ = parent_; result.uri_ = uri_; onBuilt(); @@ -440,38 +480,39 @@ public com.google.phishingprotection.v1beta1.ReportPhishingRequest buildPartial( public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.phishingprotection.v1beta1.ReportPhishingRequest) { - return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingRequest)other); + return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingRequest) other); } else { super.mergeFrom(other); return this; @@ -479,7 +520,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.phishingprotection.v1beta1.ReportPhishingRequest other) { - if (other == com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance()) return this; + if (other == com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance()) + return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); @@ -507,7 +549,8 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.phishingprotection.v1beta1.ReportPhishingRequest) e.getUnfinishedMessage(); + parsedMessage = + (com.google.phishingprotection.v1beta1.ReportPhishingRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -519,19 +562,23 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** + * + * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; @@ -540,21 +587,24 @@ public java.lang.String getParent() { } } /** + * + * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @return The bytes for parent. */ - public com.google.protobuf.ByteString - getParentBytes() { + public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); parent_ = b; return b; } else { @@ -562,57 +612,70 @@ public java.lang.String getParent() { } } /** + * + * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @param value The parent to set. * @return This builder for chaining. */ - public Builder setParent( - java.lang.String value) { + public Builder setParent(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + parent_ = value; onChanged(); return this; } /** + * + * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @return This builder for chaining. */ public Builder clearParent() { - + parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** + * + * *
      * Required. The name of the project for which the report will be created,
      * in the format "projects/{project_number}".
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @param value The bytes for parent to set. * @return This builder for chaining. */ - public Builder setParentBytes( - com.google.protobuf.ByteString value) { + public Builder setParentBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; onChanged(); return this; @@ -620,18 +683,20 @@ public Builder setParentBytes( private java.lang.Object uri_ = ""; /** + * + * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @return The uri. */ public java.lang.String getUri() { java.lang.Object ref = uri_; if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); uri_ = s; return s; @@ -640,20 +705,21 @@ public java.lang.String getUri() { } } /** + * + * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @return The bytes for uri. */ - public com.google.protobuf.ByteString - getUriBytes() { + public com.google.protobuf.ByteString getUriBytes() { java.lang.Object ref = uri_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); uri_ = b; return b; } else { @@ -661,61 +727,68 @@ public java.lang.String getUri() { } } /** + * + * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @param value The uri to set. * @return This builder for chaining. */ - public Builder setUri( - java.lang.String value) { + public Builder setUri(java.lang.String value) { if (value == null) { - throw new NullPointerException(); - } - + throw new NullPointerException(); + } + uri_ = value; onChanged(); return this; } /** + * + * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @return This builder for chaining. */ public Builder clearUri() { - + uri_ = getDefaultInstance().getUri(); onChanged(); return this; } /** + * + * *
      * Required. The URI that is being reported for phishing content to be analyzed.
      * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @param value The bytes for uri to set. * @return This builder for chaining. */ - public Builder setUriBytes( - com.google.protobuf.ByteString value) { + public Builder setUriBytes(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; onChanged(); return this; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -725,12 +798,12 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) } // @@protoc_insertion_point(class_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) private static final com.google.phishingprotection.v1beta1.ReportPhishingRequest DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.phishingprotection.v1beta1.ReportPhishingRequest(); } @@ -739,16 +812,16 @@ public static com.google.phishingprotection.v1beta1.ReportPhishingRequest getDef return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReportPhishingRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReportPhishingRequest(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportPhishingRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReportPhishingRequest(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -763,6 +836,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.phishingprotection.v1beta1.ReportPhishingRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java similarity index 53% rename from owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java rename to proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java index a19b18bf..826ad9f3 100644 --- a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java +++ b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java @@ -1,51 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto package com.google.phishingprotection.v1beta1; -public interface ReportPhishingRequestOrBuilder extends +public interface ReportPhishingRequestOrBuilder + extends // @@protoc_insertion_point(interface_extends:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) com.google.protobuf.MessageOrBuilder { /** + * + * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @return The parent. */ java.lang.String getParent(); /** + * + * *
    * Required. The name of the project for which the report will be created,
    * in the format "projects/{project_number}".
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * * @return The bytes for parent. */ - com.google.protobuf.ByteString - getParentBytes(); + com.google.protobuf.ByteString getParentBytes(); /** + * + * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @return The uri. */ java.lang.String getUri(); /** + * + * *
    * Required. The URI that is being reported for phishing content to be analyzed.
    * 
* * string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * * @return The bytes for uri. */ - com.google.protobuf.ByteString - getUriBytes(); + com.google.protobuf.ByteString getUriBytes(); } diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java similarity index 67% rename from owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java rename to proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java index 1dde3bbf..8b9aea2d 100644 --- a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java +++ b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java @@ -1,39 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto package com.google.phishingprotection.v1beta1; /** + * + * *
  * The ReportPhishing (empty) response message.
  * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingResponse} */ -public final class ReportPhishingResponse extends - com.google.protobuf.GeneratedMessageV3 implements +public final class ReportPhishingResponse extends com.google.protobuf.GeneratedMessageV3 + implements // @@protoc_insertion_point(message_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) ReportPhishingResponseOrBuilder { -private static final long serialVersionUID = 0L; + private static final long serialVersionUID = 0L; // Use ReportPhishingResponse.newBuilder() to construct. private ReportPhishingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ReportPhishingResponse() { - } + + private ReportPhishingResponse() {} @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ReportPhishingResponse(); } @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } + private ReportPhishingResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -52,13 +68,13 @@ private ReportPhishingResponse( case 0: done = true; break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; } - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -66,27 +82,30 @@ private ReportPhishingResponse( } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, + com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -98,8 +117,7 @@ public final boolean isInitialized() { } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { unknownFields.writeTo(output); } @@ -117,12 +135,13 @@ public int getSerializedSize() { @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } if (!(obj instanceof com.google.phishingprotection.v1beta1.ReportPhishingResponse)) { return super.equals(obj); } - com.google.phishingprotection.v1beta1.ReportPhishingResponse other = (com.google.phishingprotection.v1beta1.ReportPhishingResponse) obj; + com.google.phishingprotection.v1beta1.ReportPhishingResponse other = + (com.google.phishingprotection.v1beta1.ReportPhishingResponse) obj; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -141,117 +160,127 @@ public int hashCode() { } public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); + + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } + public Builder newBuilderForType() { + return newBuilder(); + } + public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(com.google.phishingprotection.v1beta1.ReportPhishingResponse prototype) { + + public static Builder newBuilder( + com.google.phishingprotection.v1beta1.ReportPhishingResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** + * + * *
    * The ReportPhishing (empty) response message.
    * 
* * Protobuf type {@code google.cloud.phishingprotection.v1beta1.ReportPhishingResponse} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements // @@protoc_insertion_point(builder_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) com.google.phishingprotection.v1beta1.ReportPhishingResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); + com.google.phishingprotection.v1beta1.ReportPhishingResponse.class, + com.google.phishingprotection.v1beta1.ReportPhishingResponse.Builder.class); } // Construct using com.google.phishingprotection.v1beta1.ReportPhishingResponse.newBuilder() @@ -259,16 +288,15 @@ private Builder() { maybeForceBuilderInitialization(); } - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } + private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } + @java.lang.Override public Builder clear() { super.clear(); @@ -276,13 +304,14 @@ public Builder clear() { } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.phishingprotection.v1beta1.PhishingProtectionProto.internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingResponse_descriptor; } @java.lang.Override - public com.google.phishingprotection.v1beta1.ReportPhishingResponse getDefaultInstanceForType() { + public com.google.phishingprotection.v1beta1.ReportPhishingResponse + getDefaultInstanceForType() { return com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance(); } @@ -297,7 +326,8 @@ public com.google.phishingprotection.v1beta1.ReportPhishingResponse build() { @java.lang.Override public com.google.phishingprotection.v1beta1.ReportPhishingResponse buildPartial() { - com.google.phishingprotection.v1beta1.ReportPhishingResponse result = new com.google.phishingprotection.v1beta1.ReportPhishingResponse(this); + com.google.phishingprotection.v1beta1.ReportPhishingResponse result = + new com.google.phishingprotection.v1beta1.ReportPhishingResponse(this); onBuilt(); return result; } @@ -306,38 +336,39 @@ public com.google.phishingprotection.v1beta1.ReportPhishingResponse buildPartial public Builder clone() { return super.clone(); } + @java.lang.Override public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } + @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } + @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.phishingprotection.v1beta1.ReportPhishingResponse) { - return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingResponse)other); + return mergeFrom((com.google.phishingprotection.v1beta1.ReportPhishingResponse) other); } else { super.mergeFrom(other); return this; @@ -345,7 +376,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom(com.google.phishingprotection.v1beta1.ReportPhishingResponse other) { - if (other == com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance()) return this; + if (other + == com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance()) + return this; this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -365,7 +398,8 @@ public Builder mergeFrom( try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.phishingprotection.v1beta1.ReportPhishingResponse) e.getUnfinishedMessage(); + parsedMessage = + (com.google.phishingprotection.v1beta1.ReportPhishingResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { @@ -374,9 +408,9 @@ public Builder mergeFrom( } return this; } + @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @@ -386,12 +420,13 @@ public final Builder mergeUnknownFields( return super.mergeUnknownFields(unknownFields); } - // @@protoc_insertion_point(builder_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) } // @@protoc_insertion_point(class_scope:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) - private static final com.google.phishingprotection.v1beta1.ReportPhishingResponse DEFAULT_INSTANCE; + private static final com.google.phishingprotection.v1beta1.ReportPhishingResponse + DEFAULT_INSTANCE; + static { DEFAULT_INSTANCE = new com.google.phishingprotection.v1beta1.ReportPhishingResponse(); } @@ -400,16 +435,16 @@ public static com.google.phishingprotection.v1beta1.ReportPhishingResponse getDe return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ReportPhishingResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReportPhishingResponse(input, extensionRegistry); - } - }; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReportPhishingResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ReportPhishingResponse(input, extensionRegistry); + } + }; public static com.google.protobuf.Parser parser() { return PARSER; @@ -424,6 +459,4 @@ public com.google.protobuf.Parser getParserForType() { public com.google.phishingprotection.v1beta1.ReportPhishingResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - diff --git a/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java new file mode 100644 index 00000000..4831def3 --- /dev/null +++ b/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto + +package com.google.phishingprotection.v1beta1; + +public interface ReportPhishingResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto b/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto similarity index 100% rename from owl-bot-staging/v1beta1/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto rename to proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java similarity index 87% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java index 9ee89f06..fbc05917 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider_sync] import com.google.api.gax.core.FixedCredentialsProvider; import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; @@ -39,4 +40,5 @@ public static void syncCreateSetCredentialsProvider() throws Exception { PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings); } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java similarity index 87% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java index 201f4414..ef9b86c5 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider1_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider1_sync] import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; @@ -39,4 +40,5 @@ public static void syncCreateSetCredentialsProvider1() throws Exception { PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings); } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider1_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setcredentialsprovider1_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java similarity index 87% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java index 2f966e64..3c8fd580 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/create/SyncCreateSetEndpoint.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setendpoint_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setendpoint_sync] import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; import com.google.cloud.phishingprotection.v1beta1.myEndpoint; @@ -36,4 +37,5 @@ public static void syncCreateSetEndpoint() throws Exception { PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings); } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setendpoint_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_create_setendpoint_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java similarity index 89% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java index 170424e0..9fe76545 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/AsyncReportPhishing.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_async] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_async] import com.google.api.core.ApiFuture; import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; import com.google.phishingprotection.v1beta1.ProjectName; @@ -46,4 +47,5 @@ public static void asyncReportPhishing() throws Exception { } } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_async] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_async] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java similarity index 89% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java index 8627837d..70d70369 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishing.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_sync] import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; import com.google.phishingprotection.v1beta1.ProjectName; import com.google.phishingprotection.v1beta1.ReportPhishingRequest; @@ -43,4 +44,5 @@ public static void syncReportPhishing() throws Exception { } } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java similarity index 86% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java index a6568c60..ef363ca1 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingProjectnameString.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_projectnamestring_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_projectnamestring_sync] import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; import com.google.phishingprotection.v1beta1.ProjectName; import com.google.phishingprotection.v1beta1.ReportPhishingResponse; @@ -39,4 +40,5 @@ public static void syncReportPhishingProjectnameString() throws Exception { } } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_projectnamestring_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_projectnamestring_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java similarity index 86% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java index f0e61073..f958ce81 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1client/reportphishing/SyncReportPhishingStringString.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_stringstring_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_stringstring_sync] import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Client; import com.google.phishingprotection.v1beta1.ProjectName; import com.google.phishingprotection.v1beta1.ReportPhishingResponse; @@ -39,4 +40,5 @@ public static void syncReportPhishingStringString() throws Exception { } } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_stringstring_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1client_reportphishing_stringstring_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java similarity index 89% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java index a7682b31..eedd3f96 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/phishingprotectionservicev1beta1settings/reportphishing/SyncReportPhishing.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1settings_reportphishing_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1settings_reportphishing_sync] import com.google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Settings; import java.time.Duration; @@ -45,4 +46,5 @@ public static void syncReportPhishing() throws Exception { phishingProtectionServiceV1Beta1SettingsBuilder.build(); } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1settings_reportphishing_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1settings_reportphishing_sync] diff --git a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java similarity index 88% rename from owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java rename to samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java index b210b346..b27d291c 100644 --- a/owl-bot-staging/v1beta1/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java +++ b/samples/snippets/generated/com/google/cloud/phishingprotection/v1beta1/stub/phishingprotectionservicev1beta1stubsettings/reportphishing/SyncReportPhishing.java @@ -16,7 +16,8 @@ package com.google.cloud.phishingprotection.v1beta1.stub.samples; -// [START phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1stubsettings_reportphishing_sync] +// [START +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1stubsettings_reportphishing_sync] import com.google.cloud.phishingprotection.v1beta1.stub.PhishingProtectionServiceV1Beta1StubSettings; import java.time.Duration; @@ -45,4 +46,5 @@ public static void syncReportPhishing() throws Exception { phishingProtectionServiceV1Beta1SettingsBuilder.build(); } } -// [END phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1stubsettings_reportphishing_sync] +// [END +// phishingprotection_v1beta1_generated_phishingprotectionservicev1beta1stubsettings_reportphishing_sync] From 396facbe32d82e3acb6b13b555a43983bc749617 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 23 Jun 2022 21:13:35 +0000 Subject: [PATCH 3/4] deps: adding gax-httpjson --- google-cloud-phishingprotection/pom.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/google-cloud-phishingprotection/pom.xml b/google-cloud-phishingprotection/pom.xml index 3432fe8a..104b8350 100644 --- a/google-cloud-phishingprotection/pom.xml +++ b/google-cloud-phishingprotection/pom.xml @@ -58,6 +58,10 @@ com.google.api gax-grpc + + com.google.api + gax-httpjson + org.threeten threetenbp @@ -76,12 +80,24 @@ test + + com.google.api + gax + testlib + test + com.google.api gax-grpc testlib test + + com.google.api + gax-httpjson + testlib + test + From cbd8711c5a53ea632eafff546df76b98357b82de Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 23 Jun 2022 21:16:02 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f54893af..41976d31 100644 --- a/README.md +++ b/README.md @@ -59,13 +59,13 @@ implementation 'com.google.cloud:google-cloud-phishingprotection' If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-phishingprotection:0.33.0' +implementation 'com.google.cloud:google-cloud-phishingprotection:0.33.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-phishingprotection" % "0.33.0" +libraryDependencies += "com.google.cloud" % "google-cloud-phishingprotection" % "0.33.1" ``` ## Authentication