| 1 |
// Copyright 2025 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
// |
| 15 |
|
| 16 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 17 |
// versions: |
| 18 |
// - protoc-gen-go-grpc v1.3.0 |
| 19 |
// - protoc v4.25.7 |
| 20 |
// source: google/cloud/phishingprotection/v1beta1/phishingprotection.proto |
| 21 |
|
| 22 |
package phishingprotectionpb |
| 23 |
|
| 24 |
import ( |
| 25 |
context "context" |
| 26 |
grpc "google.golang.org/grpc" |
| 27 |
codes "google.golang.org/grpc/codes" |
| 28 |
status "google.golang.org/grpc/status" |
| 29 |
) |
| 30 |
|
| 31 |
// This is a compile-time assertion to ensure that this generated file |
| 32 |
// is compatible with the grpc package it is being compiled against. |
| 33 |
// Requires gRPC-Go v1.32.0 or later. |
| 34 |
const _ = grpc.SupportPackageIsVersion7 |
| 35 |
|
| 36 |
const ( |
| 37 |
PhishingProtectionServiceV1Beta1_ReportPhishing_FullMethodName = "/google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1/ReportPhishing" |
| 38 |
) |
| 39 |
|
| 40 |
// PhishingProtectionServiceV1Beta1Client is the client API for PhishingProtectionServiceV1Beta1 service. |
| 41 |
// |
| 42 |
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. |
| 43 |
type PhishingProtectionServiceV1Beta1Client interface { |
| 44 |
// Reports a URI suspected of containing phishing content to be reviewed. Once |
| 45 |
// the report review is complete, its result can be found in the Cloud |
| 46 |
// Security Command Center findings dashboard for Phishing Protection. If the |
| 47 |
// result verifies the existence of malicious phishing content, the site will |
| 48 |
// be added the to [Google's Social Engineering |
| 49 |
// lists](https://support.google.com/webmasters/answer/6350487/) in order to |
| 50 |
// protect users that could get exposed to this threat in the future. |
| 51 |
ReportPhishing(ctx context.Context, in *ReportPhishingRequest, opts ...grpc.CallOption) (*ReportPhishingResponse, error) |
| 52 |
} |
| 53 |
|
| 54 |
type phishingProtectionServiceV1Beta1Client struct { |
| 55 |
cc grpc.ClientConnInterface |
| 56 |
} |
| 57 |
|
| 58 |
func NewPhishingProtectionServiceV1Beta1Client(cc grpc.ClientConnInterface) PhishingProtectionServiceV1Beta1Client { |
| 59 |
return &phishingProtectionServiceV1Beta1Client{cc} |
| 60 |
} |
| 61 |
|
| 62 |
func (c *phishingProtectionServiceV1Beta1Client) ReportPhishing(ctx context.Context, in *ReportPhishingRequest, opts ...grpc.CallOption) (*ReportPhishingResponse, error) { |
| 63 |
out := new(ReportPhishingResponse) |
| 64 |
err := c.cc.Invoke(ctx, PhishingProtectionServiceV1Beta1_ReportPhishing_FullMethodName, in, out, opts...) |
| 65 |
if err != nil { |
| 66 |
return nil, err |
| 67 |
} |
| 68 |
return out, nil |
| 69 |
} |
| 70 |
|
| 71 |
// PhishingProtectionServiceV1Beta1Server is the server API for PhishingProtectionServiceV1Beta1 service. |
| 72 |
// All implementations should embed UnimplementedPhishingProtectionServiceV1Beta1Server |
| 73 |
// for forward compatibility |
| 74 |
type PhishingProtectionServiceV1Beta1Server interface { |
| 75 |
// Reports a URI suspected of containing phishing content to be reviewed. Once |
| 76 |
// the report review is complete, its result can be found in the Cloud |
| 77 |
// Security Command Center findings dashboard for Phishing Protection. If the |
| 78 |
// result verifies the existence of malicious phishing content, the site will |
| 79 |
// be added the to [Google's Social Engineering |
| 80 |
// lists](https://support.google.com/webmasters/answer/6350487/) in order to |
| 81 |
// protect users that could get exposed to this threat in the future. |
| 82 |
ReportPhishing(context.Context, *ReportPhishingRequest) (*ReportPhishingResponse, error) |
| 83 |
} |
| 84 |
|
| 85 |
// UnimplementedPhishingProtectionServiceV1Beta1Server should be embedded to have forward compatible implementations. |
| 86 |
type UnimplementedPhishingProtectionServiceV1Beta1Server struct { |
| 87 |
} |
| 88 |
|
| 89 |
func (UnimplementedPhishingProtectionServiceV1Beta1Server) ReportPhishing(context.Context, *ReportPhishingRequest) (*ReportPhishingResponse, error) { |
| 90 |
return nil, status.Errorf(codes.Unimplemented, "method ReportPhishing not implemented") |
| 91 |
} |
| 92 |
|
| 93 |
// UnsafePhishingProtectionServiceV1Beta1Server may be embedded to opt out of forward compatibility for this service. |
| 94 |
// Use of this interface is not recommended, as added methods to PhishingProtectionServiceV1Beta1Server will |
| 95 |
// result in compilation errors. |
| 96 |
type UnsafePhishingProtectionServiceV1Beta1Server interface { |
| 97 |
mustEmbedUnimplementedPhishingProtectionServiceV1Beta1Server() |
| 98 |
} |
| 99 |
|
| 100 |
func RegisterPhishingProtectionServiceV1Beta1Server(s grpc.ServiceRegistrar, srv PhishingProtectionServiceV1Beta1Server) { |
| 101 |
s.RegisterService(&PhishingProtectionServiceV1Beta1_ServiceDesc, srv) |
| 102 |
} |
| 103 |
|
| 104 |
func _PhishingProtectionServiceV1Beta1_ReportPhishing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 105 |
in := new(ReportPhishingRequest) |
| 106 |
if err := dec(in); err != nil { |
| 107 |
return nil, err |
| 108 |
} |
| 109 |
if interceptor == nil { |
| 110 |
return srv.(PhishingProtectionServiceV1Beta1Server).ReportPhishing(ctx, in) |
| 111 |
} |
| 112 |
info := &grpc.UnaryServerInfo{ |
| 113 |
Server: srv, |
| 114 |
FullMethod: PhishingProtectionServiceV1Beta1_ReportPhishing_FullMethodName, |
| 115 |
} |
| 116 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 117 |
return srv.(PhishingProtectionServiceV1Beta1Server).ReportPhishing(ctx, req.(*ReportPhishingRequest)) |
| 118 |
} |
| 119 |
return interceptor(ctx, in, info, handler) |
| 120 |
} |
| 121 |
|
| 122 |
// PhishingProtectionServiceV1Beta1_ServiceDesc is the grpc.ServiceDesc for PhishingProtectionServiceV1Beta1 service. |
| 123 |
// It's only intended for direct use with grpc.RegisterService, |
| 124 |
// and not to be introspected or modified (even as a copy) |
| 125 |
var PhishingProtectionServiceV1Beta1_ServiceDesc = grpc.ServiceDesc{ |
| 126 |
ServiceName: "google.cloud.phishingprotection.v1beta1.PhishingProtectionServiceV1Beta1", |
| 127 |
HandlerType: (*PhishingProtectionServiceV1Beta1Server)(nil), |
| 128 |
Methods: []grpc.MethodDesc{ |
| 129 |
{ |
| 130 |
MethodName: "ReportPhishing", |
| 131 |
Handler: _PhishingProtectionServiceV1Beta1_ReportPhishing_Handler, |
| 132 |
}, |
| 133 |
}, |
| 134 |
Streams: []grpc.StreamDesc{}, |
| 135 |
Metadata: "google/cloud/phishingprotection/v1beta1/phishingprotection.proto", |
| 136 |
} |