diff --git a/google-api-grpc/grpc-google-cloud-phishingprotection-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-phishingprotection-v1beta1/pom.xml new file mode 100644 index 000000000000..4304c54a5033 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-phishingprotection-v1beta1/pom.xml @@ -0,0 +1,53 @@ + + 4.0.0 + grpc-google-cloud-phishingprotection-v1beta1 + 0.0.1-SNAPSHOT + grpc-google-cloud-phishingprotection-v1beta1 + GRPC library for grpc-google-cloud-phishingprotection-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.54.1-SNAPSHOT + + + + io.grpc + grpc-stub + compile + + + io.grpc + grpc-protobuf + compile + + + com.google.api.grpc + proto-google-cloud-phishingprotection-v1beta1 + compile + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.0 + + protected + true + none + true + + + ${project.javadoc.protobufBaseURL} + ../../../../proto-google-cloud-phishingprotection-v1beta1/target/site/apidocs/ + + + + + + + diff --git a/google-api-grpc/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java b/google-api-grpc/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java new file mode 100644 index 000000000000..31601c3919a4 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Grpc.java @@ -0,0 +1,384 @@ +package com.google.phishingprotection.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Service to report phishing URIs.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto") +public final class PhishingProtectionServiceV1Beta1Grpc { + + private PhishingProtectionServiceV1Beta1Grpc() {} + + public static final String SERVICE_NAME = + "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getReportPhishingMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + METHOD_REPORT_PHISHING = getReportPhishingMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + getReportPhishingMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + getReportPhishingMethod() { + return getReportPhishingMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.phishingprotection.v1beta1.ReportPhishingRequest, + com.google.phishingprotection.v1beta1.ReportPhishingResponse> + getReportPhishingMethodHelper() { + 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( + "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1", + "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 */ + public static PhishingProtectionServiceV1Beta1Stub newStub(io.grpc.Channel channel) { + return new PhishingProtectionServiceV1Beta1Stub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PhishingProtectionServiceV1Beta1BlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new PhishingProtectionServiceV1Beta1BlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PhishingProtectionServiceV1Beta1FutureStub newFutureStub(io.grpc.Channel channel) { + return new PhishingProtectionServiceV1Beta1FutureStub(channel); + } + + /** + * + * + *
+   * Service to report phishing URIs.
+   * 
+ */ + 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 completed, if its result verifies the existince of
+     * malicious phishing content, the site will be added the to [Google's Social
+     * Engineering lists](https://support.google.com/webmasters/answer/6350487/)
+     * in order to 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) { + asyncUnimplementedUnaryCall(getReportPhishingMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getReportPhishingMethodHelper(), + 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.AbstractStub { + private PhishingProtectionServiceV1Beta1Stub(io.grpc.Channel channel) { + super(channel); + } + + private PhishingProtectionServiceV1Beta1Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PhishingProtectionServiceV1Beta1Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1Stub(channel, callOptions); + } + + /** + * + * + *
+     * Reports a URI suspected of containing phishing content to be reviewed. Once
+     * the report review is completed, if its result verifies the existince of
+     * malicious phishing content, the site will be added the to [Google's Social
+     * Engineering lists](https://support.google.com/webmasters/answer/6350487/)
+     * in order to 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) { + asyncUnaryCall( + getChannel().newCall(getReportPhishingMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Service to report phishing URIs.
+   * 
+ */ + public static final class PhishingProtectionServiceV1Beta1BlockingStub + extends io.grpc.stub.AbstractStub { + private PhishingProtectionServiceV1Beta1BlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private PhishingProtectionServiceV1Beta1BlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PhishingProtectionServiceV1Beta1BlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1BlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Reports a URI suspected of containing phishing content to be reviewed. Once
+     * the report review is completed, if its result verifies the existince of
+     * malicious phishing content, the site will be added the to [Google's Social
+     * Engineering lists](https://support.google.com/webmasters/answer/6350487/)
+     * in order to 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) { + return blockingUnaryCall( + getChannel(), getReportPhishingMethodHelper(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service to report phishing URIs.
+   * 
+ */ + public static final class PhishingProtectionServiceV1Beta1FutureStub + extends io.grpc.stub.AbstractStub { + private PhishingProtectionServiceV1Beta1FutureStub(io.grpc.Channel channel) { + super(channel); + } + + private PhishingProtectionServiceV1Beta1FutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PhishingProtectionServiceV1Beta1FutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PhishingProtectionServiceV1Beta1FutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Reports a URI suspected of containing phishing content to be reviewed. Once
+     * the report review is completed, if its result verifies the existince of
+     * malicious phishing content, the site will be added the to [Google's Social
+     * Engineering lists](https://support.google.com/webmasters/answer/6350487/)
+     * in order to 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) { + return futureUnaryCall( + getChannel().newCall(getReportPhishingMethodHelper(), getCallOptions()), request); + } + } + + 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 final PhishingProtectionServiceV1Beta1ImplBase serviceImpl; + private final int methodId; + + MethodHandlers(PhishingProtectionServiceV1Beta1ImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + 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); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class PhishingProtectionServiceV1Beta1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PhishingProtectionServiceV1Beta1BaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("PhishingProtectionServiceV1Beta1"); + } + } + + private static final class PhishingProtectionServiceV1Beta1FileDescriptorSupplier + extends PhishingProtectionServiceV1Beta1BaseDescriptorSupplier { + PhishingProtectionServiceV1Beta1FileDescriptorSupplier() {} + } + + private static final class PhishingProtectionServiceV1Beta1MethodDescriptorSupplier + extends PhishingProtectionServiceV1Beta1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + PhishingProtectionServiceV1Beta1MethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PhishingProtectionServiceV1Beta1Grpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor( + new PhishingProtectionServiceV1Beta1FileDescriptorSupplier()) + .addMethod(getReportPhishingMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index b2404b3bacaa..1e0177a7e57c 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -777,6 +777,16 @@ com.google.api.grpc + proto-google-cloud-phishingprotection-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-phishingprotection-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1beta1 0.0.1-SNAPSHOT @@ -817,6 +827,7 @@ grpc-google-cloud-logging-v2 grpc-google-cloud-monitoring-v3 grpc-google-cloud-os-login-v1 + grpc-google-cloud-phishingprotection-v1beta1 grpc-google-cloud-pubsub-v1 grpc-google-cloud-recaptchaenterprise-v1beta1 grpc-google-cloud-redis-v1beta1 @@ -883,6 +894,7 @@ proto-google-cloud-logging-v2 proto-google-cloud-monitoring-v3 proto-google-cloud-os-login-v1 + proto-google-cloud-phishingprotection-v1beta1 proto-google-cloud-pubsub-v1 proto-google-cloud-recaptchaenterprise-v1beta1 proto-google-cloud-redis-v1beta1 diff --git a/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/pom.xml new file mode 100644 index 000000000000..7423e0635805 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + proto-google-cloud-phishingprotection-v1beta1 + 0.0.1-SNAPSHOT + proto-google-cloud-phishingprotection-v1beta1 + PROTO library for proto-google-cloud-phishingprotection-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.54.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + compile + + + com.google.api + api-common + compile + + + com.google.api.grpc + proto-google-common-protos + compile + + + com.google.api.grpc + proto-google-iam-v1 + compile + + + diff --git a/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java new file mode 100644 index 000000000000..8c7778db3429 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/PhishingProtectionProto.java @@ -0,0 +1,88 @@ +// 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\"4\n\025ReportPhishingReque" + + "st\022\016\n\006parent\030\001 \001(\t\022\013\n\003uri\030\002 \001(\t\"\030\n\026Repor" + + "tPhishingResponse2\357\001\n PhishingProtection" + + "ServiceV1Beta1\022\312\001\n\016ReportPhishing\022>.goog" + + "le.cloud.phishingprotection.v1beta1.Repo" + + "rtPhishingRequest\032?.google.cloud.phishin" + + "gprotection.v1beta1.ReportPhishingRespon" + + "se\"7\202\323\344\223\0021\",/v1beta1/{parent=projects/*}" + + "/phishing:report:\001*B\370\001\n%com.google.phish" + + "ingprotection.v1beta1B\027PhishingProtectio" + + "nProtoP\001ZYgoogle.golang.org/genproto/goo" + + "gleapis/cloud/phishingprotection/v1beta1" + + ";phishingprotection\242\002\004GCPP\252\002\'Google.Clou" + + "d.PhishingProtection.V1Beta1\312\002\'Google\\Cl" + + "oud\\PhishingProtection\\V1beta1b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + 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.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java new file mode 100644 index 000000000000..5e921842852b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ProjectName.java @@ -0,0 +1,160 @@ +/* + * Copyright 2018 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 + * + * http://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 com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class ProjectName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + + private volatile Map fieldValuesMap; + + private final String project; + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project); + } + + /** Builder for ProjectName. */ + public static class Builder { + + private String project; + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder() {} + + private Builder(ProjectName projectName) { + project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ProjectName) { + ProjectName that = (ProjectName) o; + return (this.project.equals(that.project)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java new file mode 100644 index 000000000000..a5fbb4b64426 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequest.java @@ -0,0 +1,767 @@ +// 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 + // @@protoc_insertion_point(message_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingRequest) + ReportPhishingRequestOrBuilder { + 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_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReportPhishingRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + 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; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + 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); + } + + 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; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + 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; + */ + 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); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + private volatile java.lang.Object uri_; + /** + * + * + *
+   * The URI that is being reported for phishing content to be analyzed.
+   * 
+ * + * string uri = 2; + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * + * + *
+   * The URI that is being reported for phishing content to be analyzed.
+   * 
+ * + * string uri = 2; + */ + 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); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + 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; + + if (!getParent().equals(other.getParent())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest parseFrom( + 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) + 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) + 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, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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); + } + + 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); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + 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); + } + + @java.lang.Override + 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 + // @@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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + 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); + } + + // Construct using com.google.phishingprotection.v1beta1.ReportPhishingRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.phishingprotection.v1beta1.PhishingProtectionProto + .internal_static_google_cloud_phishingprotection_v1beta1_ReportPhishingRequest_descriptor; + } + + @java.lang.Override + public com.google.phishingprotection.v1beta1.ReportPhishingRequest getDefaultInstanceForType() { + return com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.phishingprotection.v1beta1.ReportPhishingRequest build() { + com.google.phishingprotection.v1beta1.ReportPhishingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.phishingprotection.v1beta1.ReportPhishingRequest buildPartial() { + com.google.phishingprotection.v1beta1.ReportPhishingRequest result = + new com.google.phishingprotection.v1beta1.ReportPhishingRequest(this); + result.parent_ = parent_; + result.uri_ = uri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + 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) { + return super.clearField(field); + } + + @java.lang.Override + 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) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + 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); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.phishingprotection.v1beta1.ReportPhishingRequest other) { + if (other == com.google.phishingprotection.v1beta1.ReportPhishingRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.phishingprotection.v1beta1.ReportPhishingRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.phishingprotection.v1beta1.ReportPhishingRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + 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; + */ + 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; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the project for which the report will be created,
+     * in the format "projects/{project_number}".
+     * 
+ * + * string parent = 1; + */ + 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); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the project for which the report will be created,
+     * in the format "projects/{project_number}".
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + 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; + */ + 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; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+     * The URI that is being reported for phishing content to be analyzed.
+     * 
+ * + * string uri = 2; + */ + 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; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI that is being reported for phishing content to be analyzed.
+     * 
+ * + * string uri = 2; + */ + 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); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI that is being reported for phishing content to be analyzed.
+     * 
+ * + * string uri = 2; + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI that is being reported for phishing content to be analyzed.
+     * 
+ * + * string uri = 2; + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * The URI that is being reported for phishing content to be analyzed.
+     * 
+ * + * string uri = 2; + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + 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(); + } + + public static com.google.phishingprotection.v1beta1.ReportPhishingRequest getDefaultInstance() { + 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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.phishingprotection.v1beta1.ReportPhishingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java new file mode 100644 index 000000000000..c08df7062bde --- /dev/null +++ b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingRequestOrBuilder.java @@ -0,0 +1,54 @@ +// 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 + // @@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; + */ + 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; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The URI that is being reported for phishing content to be analyzed.
+   * 
+ * + * string uri = 2; + */ + java.lang.String getUri(); + /** + * + * + *
+   * The URI that is being reported for phishing content to be analyzed.
+   * 
+ * + * string uri = 2; + */ + com.google.protobuf.ByteString getUriBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java new file mode 100644 index 000000000000..bcdacad2d789 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponse.java @@ -0,0 +1,439 @@ +// 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 + // @@protoc_insertion_point(message_implements:google.cloud.phishingprotection.v1beta1.ReportPhishingResponse) + ReportPhishingResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ReportPhishingResponse.newBuilder() to construct. + private ReportPhishingResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ReportPhishingResponse() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ReportPhishingResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + 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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + 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); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + 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; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse parseFrom( + 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) + 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) + 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, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + 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); + } + + 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); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + 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); + } + + @java.lang.Override + 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 + // @@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; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + 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); + } + + // Construct using com.google.phishingprotection.v1beta1.ReportPhishingResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + 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() { + return com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.phishingprotection.v1beta1.ReportPhishingResponse build() { + com.google.phishingprotection.v1beta1.ReportPhishingResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.phishingprotection.v1beta1.ReportPhishingResponse buildPartial() { + com.google.phishingprotection.v1beta1.ReportPhishingResponse result = + new com.google.phishingprotection.v1beta1.ReportPhishingResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + 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) { + return super.clearField(field); + } + + @java.lang.Override + 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) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + 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); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.phishingprotection.v1beta1.ReportPhishingResponse other) { + if (other + == com.google.phishingprotection.v1beta1.ReportPhishingResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.phishingprotection.v1beta1.ReportPhishingResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.phishingprotection.v1beta1.ReportPhishingResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + 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; + + static { + DEFAULT_INSTANCE = new com.google.phishingprotection.v1beta1.ReportPhishingResponse(); + } + + public static com.google.phishingprotection.v1beta1.ReportPhishingResponse getDefaultInstance() { + 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); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.phishingprotection.v1beta1.ReportPhishingResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/java/com/google/phishingprotection/v1beta1/ReportPhishingResponseOrBuilder.java new file mode 100644 index 000000000000..4c2fde75144b --- /dev/null +++ b/google-api-grpc/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/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto new file mode 100644 index 000000000000..62a9fd03e3df --- /dev/null +++ b/google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/src/main/proto/google/cloud/phishingprotection/v1beta1/phishingprotection.proto @@ -0,0 +1,57 @@ +// Copyright 2019 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 +// +// http://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. +// + +syntax = "proto3"; + +package google.cloud.phishingprotection.v1beta1; + +import "google/api/annotations.proto"; + +option csharp_namespace = "Google.Cloud.PhishingProtection.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/phishingprotection/v1beta1;phishingprotection"; +option java_multiple_files = true; +option java_outer_classname = "PhishingProtectionProto"; +option java_package = "com.google.phishingprotection.v1beta1"; +option objc_class_prefix = "GCPP"; +option php_namespace = "Google\\Cloud\\PhishingProtection\\V1beta1"; + +// Service to report phishing URIs. +service PhishingProtectionServiceV1Beta1 { + // Reports a URI suspected of containing phishing content to be reviewed. Once + // the report review is completed, if its result verifies the existince of + // malicious phishing content, the site will be added the to [Google's Social + // Engineering lists](https://support.google.com/webmasters/answer/6350487/) + // in order to protect users that could get exposed to this threat in + // the future. + rpc ReportPhishing(ReportPhishingRequest) returns (ReportPhishingResponse) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/phishing:report" + body: "*" + }; + } +} + +// The ReportPhishing request message. +message ReportPhishingRequest { + // Required. The name of the project for which the report will be created, + // in the format "projects/{project_number}". + string parent = 1; + + // The URI that is being reported for phishing content to be analyzed. + string uri = 2; +} + +// The ReportPhishing (empty) response message. +message ReportPhishingResponse {} diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml index bd2e095768e9..248f563a4b1e 100644 --- a/google-cloud-bom/pom.xml +++ b/google-cloud-bom/pom.xml @@ -675,12 +675,12 @@ grpc-google-cloud-scheduler-v1 0.54.1-SNAPSHOT - - com.google.api.grpc - proto-google-cloud-scheduler-v1 - 0.54.1-SNAPSHOT - - + + com.google.api.grpc + proto-google-cloud-scheduler-v1 + 0.54.1-SNAPSHOT + + com.google.api.grpc proto-google-cloud-securitycenter-v1beta1 0.54.1-SNAPSHOT @@ -1060,6 +1060,21 @@ google-cloud-webrisk 0.4.1-alpha-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-phishingprotection-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-phishingprotection-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.cloud + google-cloud-phishingprotection + 0.0.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-recaptchaenterprise-v1beta1 diff --git a/google-cloud-clients/google-cloud-phishingprotection/README.md b/google-cloud-clients/google-cloud-phishingprotection/README.md new file mode 100644 index 000000000000..b7dfa29ac8e9 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/README.md @@ -0,0 +1,100 @@ +Google Cloud Java Client for Phishing Protection +=================================================== + +Java idiomatic client for [Phishing Protection][product-overview]. + +[![Kokoro CI](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg)](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html) +[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-phishingprotection.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-phishingprotection.svg) +[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) + +- [Product Documentation][product-docs] +- [Client Library Documentation][lib-docs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +Quickstart +---------- + +[//]: # ({x-version-update-start:google-cloud-phishingprotection:released}) +If you are using Maven, add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-phishingprotection + 0.0.1 + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-phishingprotection:0.0.1' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-phishingprotection" % "0.0.1" +``` +[//]: # ({x-version-update-end}) + +Authentication +-------------- + +See the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) section in the base directory's README. + +About Phishing Protection +---------------------------- + +[Phishing Protection][product-overview] Protect your users from phishing sites + +See the [Phishing Protection client library docs][lib-docs] to learn how to use this Phishing Protection Client Library. + +Getting Started +--------------- +#### Prerequisites +You will need a [Google Developers Console](https://console.developers.google.com/) project with the Phishing Protection API enabled. [Follow these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +#### Installation and setup +You'll need to obtain the `google-cloud-phishingprotection` library. See the [Quickstart](#quickstart) section to add `google-cloud-phishingprotection` as a dependency in your code. + +Troubleshooting +--------------- + +To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting). + +Transport +--------- +Phishing Protection uses gRPC for the transport layer. + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Versioning +---------- + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/googleapis/google-cloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/googleapis/google-cloud-java/blob/master/CONTRIBUTING.md +[code-of-conduct]:https://github.com/googleapis/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/master/LICENSE +[cloud-platform]: https://cloud.google.com/ +[product-overview]: https://cloud.google.com/phishing-protection/ +[product-docs]: https://cloud.google.com/phishing-protection/docs/ +[lib-docs]: https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/phishingprotection/v1beta1/package-summary.html diff --git a/google-cloud-clients/google-cloud-phishingprotection/pom.xml b/google-cloud-clients/google-cloud-phishingprotection/pom.xml new file mode 100644 index 000000000000..38ed9888045b --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/pom.xml @@ -0,0 +1,113 @@ + + + 4.0.0 + google-cloud-phishingprotection + 0.0.1-SNAPSHOT + jar + Google Cloud Phishing Protection + https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-phishingprotection + + Java idiomatic client for Google Cloud Phishing Protection. + + + com.google.cloud + google-cloud-clients + 0.89.1-alpha-SNAPSHOT + + + google-cloud-phishingprotection + + + + ${project.groupId} + google-cloud-core + + + ${project.groupId} + google-cloud-core-grpc + + + com.google.api.grpc + proto-google-cloud-phishingprotection-v1beta1 + + + com.google.api.grpc + grpc-google-cloud-phishingprotection-v1beta1 + + + io.grpc + grpc-netty-shaded + + + io.grpc + grpc-stub + + + io.grpc + grpc-auth + + + ${project.groupId} + google-cloud-core + test-jar + test + + + junit + junit + test + + + org.easymock + easymock + test + + + org.objenesis + objenesis + test + + + com.google.truth + truth + test + + + com.google.api.grpc + grpc-google-iam-v1 + test + + + com.google.api + gax-grpc + testlib + test + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.0 + + protected + true + none + true + + + ${project.javadoc.protobufBaseURL} + ../../../../../google-api-grpc/proto-google-cloud-phishingprotection-v1beta1/target/site/apidocs/ + + + ${project.javadoc.protobufBaseURL} + ../../../../../google-api-grpc/grpc-google-cloud-phishingprotection-v1beta1/target/site/apidocs/ + + + + + + + diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java new file mode 100644 index 000000000000..6d7658d0d722 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Client.java @@ -0,0 +1,307 @@ +/* + * Copyright 2019 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.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.phishingprotection.v1beta1.stub.PhishingProtectionServiceV1Beta1Stub; +import com.google.cloud.phishingprotection.v1beta1.stub.PhishingProtectionServiceV1Beta1StubSettings; +import com.google.phishingprotection.v1beta1.ProjectName; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Service to report phishing URIs. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = PhishingProtectionServiceV1Beta1Client.create()) {
+ *   ProjectName parent = ProjectName.of("[PROJECT]");
+ *   String uri = "";
+ *   ReportPhishingResponse response = phishingProtectionServiceV1Beta1Client.reportPhishing(parent, uri);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the phishingProtectionServiceV1Beta1Client object to clean + * up resources such as threads. In the example above, try-with-resources is used, which + * automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. 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. + *
  2. 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. + *
  3. 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. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * PhishingProtectionServiceV1Beta1Settings to create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings =
+ *     PhishingProtectionServiceV1Beta1Settings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client =
+ *     PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings =
+ *     PhishingProtectionServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client =
+ *     PhishingProtectionServiceV1Beta1Client.create(phishingProtectionServiceV1Beta1Settings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class PhishingProtectionServiceV1Beta1Client implements BackgroundResource { + private final PhishingProtectionServiceV1Beta1Settings settings; + private final PhishingProtectionServiceV1Beta1Stub stub; + + /** Constructs an instance of PhishingProtectionServiceV1Beta1Client with default settings. */ + public static final PhishingProtectionServiceV1Beta1Client create() throws IOException { + return create(PhishingProtectionServiceV1Beta1Settings.newBuilder().build()); + } + + /** + * Constructs an instance of PhishingProtectionServiceV1Beta1Client, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final PhishingProtectionServiceV1Beta1Client create( + PhishingProtectionServiceV1Beta1Settings settings) throws IOException { + return new PhishingProtectionServiceV1Beta1Client(settings); + } + + /** + * Constructs an instance of PhishingProtectionServiceV1Beta1Client, using the given stub for + * making calls. This is for advanced usage - prefer to use + * PhishingProtectionServiceV1Beta1Settings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final PhishingProtectionServiceV1Beta1Client create( + PhishingProtectionServiceV1Beta1Stub stub) { + return new PhishingProtectionServiceV1Beta1Client(stub); + } + + /** + * Constructs an instance of PhishingProtectionServiceV1Beta1Client, 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 PhishingProtectionServiceV1Beta1Client( + PhishingProtectionServiceV1Beta1Settings settings) throws IOException { + this.settings = settings; + this.stub = + ((PhishingProtectionServiceV1Beta1StubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected PhishingProtectionServiceV1Beta1Client(PhishingProtectionServiceV1Beta1Stub stub) { + this.settings = null; + this.stub = stub; + } + + public final PhishingProtectionServiceV1Beta1Settings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PhishingProtectionServiceV1Beta1Stub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Reports a URI suspected of containing phishing content to be reviewed. Once the report review + * is completed, if its result verifies the existince of malicious phishing content, the site will + * be added the to [Google's Social Engineering + * lists](https://support.google.com/webmasters/answer/6350487/) in order to protect users that + * could get exposed to this threat in the future. + * + *

Sample code: + * + *


+   * try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = PhishingProtectionServiceV1Beta1Client.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String uri = "";
+   *   ReportPhishingResponse response = phishingProtectionServiceV1Beta1Client.reportPhishing(parent, uri);
+   * }
+   * 
+ * + * @param parent Required. The name of the project for which the report will be created, in the + * format "projects/{project_number}". + * @param uri The URI that is being reported for phishing content to be analyzed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReportPhishingResponse reportPhishing(ProjectName parent, String uri) { + + ReportPhishingRequest request = + ReportPhishingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setUri(uri) + .build(); + return reportPhishing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Reports a URI suspected of containing phishing content to be reviewed. Once the report review + * is completed, if its result verifies the existince of malicious phishing content, the site will + * be added the to [Google's Social Engineering + * lists](https://support.google.com/webmasters/answer/6350487/) in order to protect users that + * could get exposed to this threat in the future. + * + *

Sample code: + * + *


+   * try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = PhishingProtectionServiceV1Beta1Client.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String uri = "";
+   *   ReportPhishingResponse response = phishingProtectionServiceV1Beta1Client.reportPhishing(parent.toString(), uri);
+   * }
+   * 
+ * + * @param parent Required. The name of the project for which the report will be created, in the + * format "projects/{project_number}". + * @param uri The URI that is being reported for phishing content to be analyzed. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReportPhishingResponse reportPhishing(String parent, String uri) { + + ReportPhishingRequest request = + ReportPhishingRequest.newBuilder().setParent(parent).setUri(uri).build(); + return reportPhishing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Reports a URI suspected of containing phishing content to be reviewed. Once the report review + * is completed, if its result verifies the existince of malicious phishing content, the site will + * be added the to [Google's Social Engineering + * lists](https://support.google.com/webmasters/answer/6350487/) in order to protect users that + * could get exposed to this threat in the future. + * + *

Sample code: + * + *


+   * try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = PhishingProtectionServiceV1Beta1Client.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String uri = "";
+   *   ReportPhishingRequest request = ReportPhishingRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setUri(uri)
+   *     .build();
+   *   ReportPhishingResponse response = phishingProtectionServiceV1Beta1Client.reportPhishing(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ReportPhishingResponse reportPhishing(ReportPhishingRequest request) { + return reportPhishingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Reports a URI suspected of containing phishing content to be reviewed. Once the report review + * is completed, if its result verifies the existince of malicious phishing content, the site will + * be added the to [Google's Social Engineering + * lists](https://support.google.com/webmasters/answer/6350487/) in order to protect users that + * could get exposed to this threat in the future. + * + *

Sample code: + * + *


+   * try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = PhishingProtectionServiceV1Beta1Client.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String uri = "";
+   *   ReportPhishingRequest request = ReportPhishingRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setUri(uri)
+   *     .build();
+   *   ApiFuture<ReportPhishingResponse> future = phishingProtectionServiceV1Beta1Client.reportPhishingCallable().futureCall(request);
+   *   // Do something
+   *   ReportPhishingResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + reportPhishingCallable() { + return stub.reportPhishingCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java new file mode 100644 index 000000000000..bb3ea02fd942 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1Settings.java @@ -0,0 +1,181 @@ +/* + * Copyright 2019 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.core.ApiFunction; +import com.google.api.core.BetaApi; +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.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.phishingprotection.v1beta1.stub.PhishingProtectionServiceV1Beta1StubSettings; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link PhishingProtectionServiceV1Beta1Client}. + * + *

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

    + *
  • 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. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of reportPhishing to 30 seconds: + * + *

+ * 
+ * PhishingProtectionServiceV1Beta1Settings.Builder phishingProtectionServiceV1Beta1SettingsBuilder =
+ *     PhishingProtectionServiceV1Beta1Settings.newBuilder();
+ * phishingProtectionServiceV1Beta1SettingsBuilder.reportPhishingSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * PhishingProtectionServiceV1Beta1Settings phishingProtectionServiceV1Beta1Settings = phishingProtectionServiceV1Beta1SettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class PhishingProtectionServiceV1Beta1Settings + extends ClientSettings { + /** Returns the object with the settings used for calls to reportPhishing. */ + public UnaryCallSettings reportPhishingSettings() { + return ((PhishingProtectionServiceV1Beta1StubSettings) getStubSettings()) + .reportPhishingSettings(); + } + + public static final PhishingProtectionServiceV1Beta1Settings create( + PhishingProtectionServiceV1Beta1StubSettings stub) throws IOException { + return new PhishingProtectionServiceV1Beta1Settings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PhishingProtectionServiceV1Beta1StubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PhishingProtectionServiceV1Beta1StubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PhishingProtectionServiceV1Beta1StubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PhishingProtectionServiceV1Beta1StubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PhishingProtectionServiceV1Beta1StubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PhishingProtectionServiceV1Beta1StubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PhishingProtectionServiceV1Beta1StubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PhishingProtectionServiceV1Beta1Settings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PhishingProtectionServiceV1Beta1Settings. */ + public static class Builder + extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(PhishingProtectionServiceV1Beta1StubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(PhishingProtectionServiceV1Beta1StubSettings.newBuilder()); + } + + protected Builder(PhishingProtectionServiceV1Beta1Settings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PhishingProtectionServiceV1Beta1StubSettings.Builder stubSettings) { + super(stubSettings); + } + + public PhishingProtectionServiceV1Beta1StubSettings.Builder getStubSettingsBuilder() { + return ((PhishingProtectionServiceV1Beta1StubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to reportPhishing. */ + public UnaryCallSettings.Builder + reportPhishingSettings() { + return getStubSettingsBuilder().reportPhishingSettings(); + } + + @Override + public PhishingProtectionServiceV1Beta1Settings build() throws IOException { + return new PhishingProtectionServiceV1Beta1Settings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java new file mode 100644 index 000000000000..12e27f370470 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/package-info.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019 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. + */ + +/** + * A client to Phishing Protection API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

====================================== PhishingProtectionServiceV1Beta1Client + * ====================================== + * + *

Service Description: Service to report phishing URIs. + * + *

Sample for PhishingProtectionServiceV1Beta1Client: + * + *

+ * 
+ * try (PhishingProtectionServiceV1Beta1Client phishingProtectionServiceV1Beta1Client = PhishingProtectionServiceV1Beta1Client.create()) {
+ *   ProjectName parent = ProjectName.of("[PROJECT]");
+ *   String uri = "";
+ *   ReportPhishingResponse response = phishingProtectionServiceV1Beta1Client.reportPhishing(parent, uri);
+ * }
+ * 
+ * 
+ */ +package com.google.cloud.phishingprotection.v1beta1; diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java new file mode 100644 index 000000000000..92b5e6f01a98 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1CallableFactory.java @@ -0,0 +1,116 @@ +/* + * Copyright 2019 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.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +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.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Phishing Protection API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcPhishingProtectionServiceV1Beta1CallableFactory + implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java new file mode 100644 index 000000000000..220b9f25ba23 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/GrpcPhishingProtectionServiceV1Beta1Stub.java @@ -0,0 +1,161 @@ +/* + * Copyright 2019 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.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +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; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Phishing Protection API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcPhishingProtectionServiceV1Beta1Stub extends PhishingProtectionServiceV1Beta1Stub { + + private static final MethodDescriptor + reportPhishingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1/ReportPhishing") + .setRequestMarshaller( + ProtoUtils.marshaller(ReportPhishingRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ReportPhishingResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable reportPhishingCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPhishingProtectionServiceV1Beta1Stub create( + PhishingProtectionServiceV1Beta1StubSettings settings) throws IOException { + return new GrpcPhishingProtectionServiceV1Beta1Stub(settings, ClientContext.create(settings)); + } + + public static final GrpcPhishingProtectionServiceV1Beta1Stub create(ClientContext clientContext) + throws IOException { + return new GrpcPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPhishingProtectionServiceV1Beta1Stub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcPhishingProtectionServiceV1Beta1Stub, 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 GrpcPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPhishingProtectionServiceV1Beta1CallableFactory()); + } + + /** + * Constructs an instance of GrpcPhishingProtectionServiceV1Beta1Stub, 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 GrpcPhishingProtectionServiceV1Beta1Stub( + PhishingProtectionServiceV1Beta1StubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings + reportPhishingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(reportPhishingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ReportPhishingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.reportPhishingCallable = + callableFactory.createUnaryCallable( + reportPhishingTransportSettings, settings.reportPhishingSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable reportPhishingCallable() { + return reportPhishingCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java new file mode 100644 index 000000000000..096ce35c8a38 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1Stub.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019 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.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Phishing Protection API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class PhishingProtectionServiceV1Beta1Stub implements BackgroundResource { + + public UnaryCallable reportPhishingCallable() { + throw new UnsupportedOperationException("Not implemented: reportPhishingCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java new file mode 100644 index 000000000000..7079622ce0db --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/main/java/com/google/cloud/phishingprotection/v1beta1/stub/PhishingProtectionServiceV1Beta1StubSettings.java @@ -0,0 +1,272 @@ +/* + * Copyright 2019 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.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link PhishingProtectionServiceV1Beta1Stub}. + * + *

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

    + *
  • 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. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of reportPhishing to 30 seconds: + * + *

+ * 
+ * PhishingProtectionServiceV1Beta1StubSettings.Builder phishingProtectionServiceV1Beta1SettingsBuilder =
+ *     PhishingProtectionServiceV1Beta1StubSettings.newBuilder();
+ * phishingProtectionServiceV1Beta1SettingsBuilder.reportPhishingSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * PhishingProtectionServiceV1Beta1StubSettings phishingProtectionServiceV1Beta1Settings = phishingProtectionServiceV1Beta1SettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class PhishingProtectionServiceV1Beta1StubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + reportPhishingSettings; + + /** Returns the object with the settings used for calls to reportPhishing. */ + public UnaryCallSettings reportPhishingSettings() { + return reportPhishingSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public PhishingProtectionServiceV1Beta1Stub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPhishingProtectionServiceV1Beta1Stub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "phishingprotection.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.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() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(PhishingProtectionServiceV1Beta1StubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PhishingProtectionServiceV1Beta1StubSettings(Builder settingsBuilder) + throws IOException { + super(settingsBuilder); + + reportPhishingSettings = settingsBuilder.reportPhishingSettings().build(); + } + + /** Builder for PhishingProtectionServiceV1Beta1StubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + reportPhishingSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + reportPhishingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(reportPhishingSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .reportPhishingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(PhishingProtectionServiceV1Beta1StubSettings settings) { + super(settings); + + reportPhishingSettings = settings.reportPhishingSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(reportPhishingSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to reportPhishing. */ + public UnaryCallSettings.Builder + reportPhishingSettings() { + return reportPhishingSettings; + } + + @Override + public PhishingProtectionServiceV1Beta1StubSettings build() throws IOException { + return new PhishingProtectionServiceV1Beta1StubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java b/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java new file mode 100644 index 000000000000..0994d2efb068 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019 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.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockPhishingProtectionServiceV1Beta1 implements MockGrpcService { + private final MockPhishingProtectionServiceV1Beta1Impl serviceImpl; + + public MockPhishingProtectionServiceV1Beta1() { + serviceImpl = new MockPhishingProtectionServiceV1Beta1Impl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java b/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java new file mode 100644 index 000000000000..ddc6c3b90580 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/MockPhishingProtectionServiceV1Beta1Impl.java @@ -0,0 +1,76 @@ +/* + * Copyright 2019 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.core.BetaApi; +import com.google.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1Grpc.PhishingProtectionServiceV1Beta1ImplBase; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockPhishingProtectionServiceV1Beta1Impl + extends PhishingProtectionServiceV1Beta1ImplBase { + private List requests; + private Queue responses; + + public MockPhishingProtectionServiceV1Beta1Impl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void reportPhishing( + ReportPhishingRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ReportPhishingResponse) { + requests.add(request); + responseObserver.onNext((ReportPhishingResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java b/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java new file mode 100644 index 000000000000..275db3c42ccf --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/src/test/java/com/google/cloud/phishingprotection/v1beta1/PhishingProtectionServiceV1Beta1ClientTest.java @@ -0,0 +1,119 @@ +/* + * Copyright 2019 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.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.phishingprotection.v1beta1.ProjectName; +import com.google.phishingprotection.v1beta1.ReportPhishingRequest; +import com.google.phishingprotection.v1beta1.ReportPhishingResponse; +import com.google.protobuf.AbstractMessage; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class PhishingProtectionServiceV1Beta1ClientTest { + private static MockPhishingProtectionServiceV1Beta1 mockPhishingProtectionServiceV1Beta1; + private static MockServiceHelper serviceHelper; + private PhishingProtectionServiceV1Beta1Client client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockPhishingProtectionServiceV1Beta1 = new MockPhishingProtectionServiceV1Beta1(); + serviceHelper = + new MockServiceHelper( + "in-process-1", Arrays.asList(mockPhishingProtectionServiceV1Beta1)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + PhishingProtectionServiceV1Beta1Settings settings = + PhishingProtectionServiceV1Beta1Settings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PhishingProtectionServiceV1Beta1Client.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void reportPhishingTest() { + ReportPhishingResponse expectedResponse = ReportPhishingResponse.newBuilder().build(); + mockPhishingProtectionServiceV1Beta1.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String uri = "uri116076"; + + ReportPhishingResponse actualResponse = client.reportPhishing(parent, uri); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPhishingProtectionServiceV1Beta1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ReportPhishingRequest actualRequest = (ReportPhishingRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertEquals(uri, actualRequest.getUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void reportPhishingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockPhishingProtectionServiceV1Beta1.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 + } + } +} diff --git a/google-cloud-clients/google-cloud-phishingprotection/synth.py b/google-cloud-clients/google-cloud-phishingprotection/synth.py new file mode 100644 index 000000000000..4bcc81ca85e3 --- /dev/null +++ b/google-cloud-clients/google-cloud-phishingprotection/synth.py @@ -0,0 +1,41 @@ +# Copyright 2019 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 +# +# http://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. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import synthtool.languages.java as java + +gapic = gcp.GAPICGenerator() +common_templates = gcp.CommonTemplates() + +versions = ['v1beta1'] +service = 'phishingprotection' +config_pattern = '/google/cloud/phishingprotection/artman_phishingprotection_{version}.yaml' + +for version in versions: + library = gapic.java_library( + service=service, + version=version, + config_path=config_pattern.format(version=version), + artman_output_name='') + + s.copy(library / f'gapic-google-cloud-{service}-{version}/src', 'src') + s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') + s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') + + java.format_code('./src') + java.format_code(f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') + java.format_code(f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index ef4f4c2655b0..75c0d575ec15 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -448,6 +448,7 @@ google-cloud-monitoring google-cloud-notification google-cloud-os-login + google-cloud-phishingprotection google-cloud-pubsub google-cloud-recaptchaenterprise google-cloud-redis @@ -790,7 +791,7 @@ Stub packages - com.google.cloud.asset.v1.stub:com.google.cloud.asset.v1beta1.stub:com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquerydatatransfer.v1.stub:com.google.cloud.bigquerystorage.v1beta1.stub:com.google.cloud.bigtable-admin.v2.stub:com.google.cloud.bigtable.v2.stub:com.google.cloud.container.v1.stub:com.google.cloud.containeranalysis.v1beta1.stub:com.google.cloud.datacatalog.v1beta1.stub:com.google.cloud.datalabeling.v1beta1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.error-reporting.v1beta1.stub:com.google.cloud.firestore-admin.v1.stub:com.google.cloud.firestore.v1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iamcredentials.v1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.os-login.v1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.recaptchaenterprise.v1beta1.stub:com.google.cloud.redis.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.scheduler.v1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.securitycenter.v1.stub:com.google.cloud.securitycenter.v1beta1.stub:com.google.cloud.spanner-admin-database.v1.stub:com.google.cloud.spanner-admin-instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.talent.v4beta1.stub:com.google.cloud.tasks.v2.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.tasks.v2beta3.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.translate.v3beta1.stub:com.google.cloud.video-intelligence.v1.stub:com.google.cloud.video-intelligence.v1beta1.stub:com.google.cloud.video-intelligence.v1beta2.stub:com.google.cloud.video-intelligence.v1p1beta1.stub:com.google.cloud.video-intelligence.v1p2beta1.stub:com.google.cloud.video-intelligence.v1p3beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.vision.v1p4beta1.stub:com.google.cloud.webrisk.v1beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub + com.google.cloud.asset.v1.stub:com.google.cloud.asset.v1beta1.stub:com.google.cloud.automl.v1beta1.stub:com.google.cloud.bigquerydatatransfer.v1.stub:com.google.cloud.bigquerystorage.v1beta1.stub:com.google.cloud.bigtable-admin.v2.stub:com.google.cloud.bigtable.v2.stub:com.google.cloud.container.v1.stub:com.google.cloud.containeranalysis.v1beta1.stub:com.google.cloud.datacatalog.v1beta1.stub:com.google.cloud.datalabeling.v1beta1.stub:com.google.cloud.dataproc.v1.stub:com.google.cloud.dataproc.v1beta2.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.error-reporting.v1beta1.stub:com.google.cloud.firestore-admin.v1.stub:com.google.cloud.firestore.v1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.iamcredentials.v1.stub:com.google.cloud.iot.v1.stub:com.google.cloud.kms.v1.stub:com.google.cloud.language.v1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.os-login.v1.stub:com.google.cloud.phishingprotection.v1beta1.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.recaptchaenterprise.v1beta1.stub:com.google.cloud.redis.v1.stub:com.google.cloud.redis.v1beta1.stub:com.google.cloud.scheduler.v1.stub:com.google.cloud.scheduler.v1beta1.stub:com.google.cloud.securitycenter.v1.stub:com.google.cloud.securitycenter.v1beta1.stub:com.google.cloud.spanner-admin-database.v1.stub:com.google.cloud.spanner-admin-instance.v1.stub:com.google.cloud.spanner.v1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1p1beta1.stub:com.google.cloud.talent.v4beta1.stub:com.google.cloud.tasks.v2.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.tasks.v2beta3.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.translate.v3beta1.stub:com.google.cloud.video-intelligence.v1.stub:com.google.cloud.video-intelligence.v1beta1.stub:com.google.cloud.video-intelligence.v1beta2.stub:com.google.cloud.video-intelligence.v1p1beta1.stub:com.google.cloud.video-intelligence.v1p2beta1.stub:com.google.cloud.video-intelligence.v1p3beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub:com.google.cloud.vision.v1p3beta1.stub:com.google.cloud.vision.v1p4beta1.stub:com.google.cloud.webrisk.v1beta1.stub:com.google.cloud.websecurityscanner.v1alpha.stub Deprecated packages diff --git a/utilities/new_client.py b/utilities/new_client.py index a95573ca33d6..fef9a9b82303 100644 --- a/utilities/new_client.py +++ b/utilities/new_client.py @@ -220,7 +220,7 @@ def write_readme(ctx: Context) -> None: description=ctx.description, name=ctx.name, service=ctx.service, - version=ctx.google_cloud_version, + version=ctx.google_cloud_version.released, product_overview_url=ctx.product_overview_url, product_docs_url=ctx.product_docs_url, ) diff --git a/utilities/templates/README.md.tmpl b/utilities/templates/README.md.tmpl index 45934136fd2e..07431cb97f04 100644 --- a/utilities/templates/README.md.tmpl +++ b/utilities/templates/README.md.tmpl @@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file com.google.cloud google-cloud-{{service}} - 0.71.0-beta + {{version}} ``` If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-{{service}}:0.71.0-beta' +compile 'com.google.cloud:google-cloud-{{service}}:{{version}}' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-{{service}}" % "0.71.0-beta" +libraryDependencies += "com.google.cloud" % "google-cloud-{{service}}" % "{{version}}" ``` [//]: # ({x-version-update-end}) diff --git a/utilities/templates/synth.py b/utilities/templates/synth.py index 509381238fc8..542275f5eab3 100644 --- a/utilities/templates/synth.py +++ b/utilities/templates/synth.py @@ -1,4 +1,4 @@ -# Copyright 2018 Google LLC +# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/versions.txt b/versions.txt index 9f979480b323..3082ccffb1cd 100644 --- a/versions.txt +++ b/versions.txt @@ -47,6 +47,7 @@ google-cloud-nio:0.89.0-alpha:0.89.1-alpha-SNAPSHOT google-cloud-nio-examples:0.89.0-alpha:0.89.1-alpha-SNAPSHOT google-cloud-notification:0.89.0-beta:0.89.1-beta-SNAPSHOT google-cloud-os-login:0.89.0-alpha:0.89.1-alpha-SNAPSHOT +google-cloud-phishingprotection:0.0.0:0.0.1-SNAPSHOT google-cloud-pubsub:1.71.0:1.71.1-SNAPSHOT google-cloud-recaptchaenterprise:0.0.0:0.0.1-SNAPSHOT google-cloud-redis:0.89.0-alpha:0.89.1-alpha-SNAPSHOT @@ -95,6 +96,7 @@ grpc-google-cloud-language-v1beta2:0.54.0:0.54.1-SNAPSHOT grpc-google-cloud-logging-v2:0.54.0:0.54.1-SNAPSHOT grpc-google-cloud-monitoring-v3:1.53.0:1.53.1-SNAPSHOT grpc-google-cloud-os-login-v1:0.54.0:0.54.1-SNAPSHOT +grpc-google-cloud-phishingprotection-v1beta1:0.0.0:0.0.1-SNAPSHOT grpc-google-cloud-pubsub-v1:1.53.0:1.53.1-SNAPSHOT grpc-google-cloud-recaptchaenterprise-v1beta1:0.0.0:0.0.1-SNAPSHOT grpc-google-cloud-redis-v1:0.54.0:0.54.1-SNAPSHOT @@ -160,6 +162,7 @@ proto-google-cloud-language-v1beta2:0.54.0:0.54.1-SNAPSHOT proto-google-cloud-logging-v2:0.54.0:0.54.1-SNAPSHOT proto-google-cloud-monitoring-v3:1.53.0:1.53.1-SNAPSHOT proto-google-cloud-os-login-v1:0.54.0:0.54.1-SNAPSHOT +proto-google-cloud-phishingprotection-v1beta1:0.0.0:0.0.1-SNAPSHOT proto-google-cloud-pubsub-v1:1.53.0:1.53.1-SNAPSHOT proto-google-cloud-recaptchaenterprise-v1beta1:0.0.0:0.0.1-SNAPSHOT proto-google-cloud-redis-v1:0.54.0:0.54.1-SNAPSHOT