Debian Codegraph @

policysimulator/apiv1/policysimulatorpb/orgpolicy_grpc.pb.go

raw symbols SCIP
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 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
16 // versions:
17 // - protoc-gen-go-grpc v1.3.0
18 // - protoc v4.25.7
19 // source: google/cloud/policysimulator/v1/orgpolicy.proto
20
21 package policysimulatorpb
22
23 import (
24 longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
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 OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/ListOrgPolicyViolationsPreviews"
38 OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/GetOrgPolicyViolationsPreview"
39 OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/CreateOrgPolicyViolationsPreview"
40 OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/ListOrgPolicyViolations"
41 )
42
43 // OrgPolicyViolationsPreviewServiceClient is the client API for OrgPolicyViolationsPreviewService service.
44 //
45 // 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.
46 type OrgPolicyViolationsPreviewServiceClient interface {
47 // ListOrgPolicyViolationsPreviews lists each
48 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
49 // in an organization. Each
50 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
51 // is available for at least 7 days.
52 ListOrgPolicyViolationsPreviews(ctx context.Context, in *ListOrgPolicyViolationsPreviewsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsPreviewsResponse, error)
53 // GetOrgPolicyViolationsPreview gets the specified
54 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
55 // Each
56 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
57 // is available for at least 7 days.
58 GetOrgPolicyViolationsPreview(ctx context.Context, in *GetOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*OrgPolicyViolationsPreview, error)
59 // CreateOrgPolicyViolationsPreview creates an
60 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
61 // for the proposed changes in the provided
62 // [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy
63 // are specified by this `OrgPolicyOverlay`. The resources to scan are
64 // inferred from these specified changes.
65 CreateOrgPolicyViolationsPreview(ctx context.Context, in *CreateOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
66 // ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present
67 // in an
68 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
69 ListOrgPolicyViolations(ctx context.Context, in *ListOrgPolicyViolationsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsResponse, error)
70 }
71
72 type orgPolicyViolationsPreviewServiceClient struct {
73 cc grpc.ClientConnInterface
74 }
75
76 func NewOrgPolicyViolationsPreviewServiceClient(cc grpc.ClientConnInterface) OrgPolicyViolationsPreviewServiceClient {
77 return &orgPolicyViolationsPreviewServiceClient{cc}
78 }
79
80 func (c *orgPolicyViolationsPreviewServiceClient) ListOrgPolicyViolationsPreviews(ctx context.Context, in *ListOrgPolicyViolationsPreviewsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsPreviewsResponse, error) {
81 out := new(ListOrgPolicyViolationsPreviewsResponse)
82 err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_FullMethodName, in, out, opts...)
83 if err != nil {
84 return nil, err
85 }
86 return out, nil
87 }
88
89 func (c *orgPolicyViolationsPreviewServiceClient) GetOrgPolicyViolationsPreview(ctx context.Context, in *GetOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*OrgPolicyViolationsPreview, error) {
90 out := new(OrgPolicyViolationsPreview)
91 err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_FullMethodName, in, out, opts...)
92 if err != nil {
93 return nil, err
94 }
95 return out, nil
96 }
97
98 func (c *orgPolicyViolationsPreviewServiceClient) CreateOrgPolicyViolationsPreview(ctx context.Context, in *CreateOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
99 out := new(longrunningpb.Operation)
100 err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_FullMethodName, in, out, opts...)
101 if err != nil {
102 return nil, err
103 }
104 return out, nil
105 }
106
107 func (c *orgPolicyViolationsPreviewServiceClient) ListOrgPolicyViolations(ctx context.Context, in *ListOrgPolicyViolationsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsResponse, error) {
108 out := new(ListOrgPolicyViolationsResponse)
109 err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_FullMethodName, in, out, opts...)
110 if err != nil {
111 return nil, err
112 }
113 return out, nil
114 }
115
116 // OrgPolicyViolationsPreviewServiceServer is the server API for OrgPolicyViolationsPreviewService service.
117 // All implementations should embed UnimplementedOrgPolicyViolationsPreviewServiceServer
118 // for forward compatibility
119 type OrgPolicyViolationsPreviewServiceServer interface {
120 // ListOrgPolicyViolationsPreviews lists each
121 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
122 // in an organization. Each
123 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
124 // is available for at least 7 days.
125 ListOrgPolicyViolationsPreviews(context.Context, *ListOrgPolicyViolationsPreviewsRequest) (*ListOrgPolicyViolationsPreviewsResponse, error)
126 // GetOrgPolicyViolationsPreview gets the specified
127 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
128 // Each
129 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
130 // is available for at least 7 days.
131 GetOrgPolicyViolationsPreview(context.Context, *GetOrgPolicyViolationsPreviewRequest) (*OrgPolicyViolationsPreview, error)
132 // CreateOrgPolicyViolationsPreview creates an
133 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]
134 // for the proposed changes in the provided
135 // [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy
136 // are specified by this `OrgPolicyOverlay`. The resources to scan are
137 // inferred from these specified changes.
138 CreateOrgPolicyViolationsPreview(context.Context, *CreateOrgPolicyViolationsPreviewRequest) (*longrunningpb.Operation, error)
139 // ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present
140 // in an
141 // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview].
142 ListOrgPolicyViolations(context.Context, *ListOrgPolicyViolationsRequest) (*ListOrgPolicyViolationsResponse, error)
143 }
144
145 // UnimplementedOrgPolicyViolationsPreviewServiceServer should be embedded to have forward compatible implementations.
146 type UnimplementedOrgPolicyViolationsPreviewServiceServer struct {
147 }
148
149 func (UnimplementedOrgPolicyViolationsPreviewServiceServer) ListOrgPolicyViolationsPreviews(context.Context, *ListOrgPolicyViolationsPreviewsRequest) (*ListOrgPolicyViolationsPreviewsResponse, error) {
150 return nil, status.Errorf(codes.Unimplemented, "method ListOrgPolicyViolationsPreviews not implemented")
151 }
152 func (UnimplementedOrgPolicyViolationsPreviewServiceServer) GetOrgPolicyViolationsPreview(context.Context, *GetOrgPolicyViolationsPreviewRequest) (*OrgPolicyViolationsPreview, error) {
153 return nil, status.Errorf(codes.Unimplemented, "method GetOrgPolicyViolationsPreview not implemented")
154 }
155 func (UnimplementedOrgPolicyViolationsPreviewServiceServer) CreateOrgPolicyViolationsPreview(context.Context, *CreateOrgPolicyViolationsPreviewRequest) (*longrunningpb.Operation, error) {
156 return nil, status.Errorf(codes.Unimplemented, "method CreateOrgPolicyViolationsPreview not implemented")
157 }
158 func (UnimplementedOrgPolicyViolationsPreviewServiceServer) ListOrgPolicyViolations(context.Context, *ListOrgPolicyViolationsRequest) (*ListOrgPolicyViolationsResponse, error) {
159 return nil, status.Errorf(codes.Unimplemented, "method ListOrgPolicyViolations not implemented")
160 }
161
162 // UnsafeOrgPolicyViolationsPreviewServiceServer may be embedded to opt out of forward compatibility for this service.
163 // Use of this interface is not recommended, as added methods to OrgPolicyViolationsPreviewServiceServer will
164 // result in compilation errors.
165 type UnsafeOrgPolicyViolationsPreviewServiceServer interface {
166 mustEmbedUnimplementedOrgPolicyViolationsPreviewServiceServer()
167 }
168
169 func RegisterOrgPolicyViolationsPreviewServiceServer(s grpc.ServiceRegistrar, srv OrgPolicyViolationsPreviewServiceServer) {
170 s.RegisterService(&OrgPolicyViolationsPreviewService_ServiceDesc, srv)
171 }
172
173 func _OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
174 in := new(ListOrgPolicyViolationsPreviewsRequest)
175 if err := dec(in); err != nil {
176 return nil, err
177 }
178 if interceptor == nil {
179 return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolationsPreviews(ctx, in)
180 }
181 info := &grpc.UnaryServerInfo{
182 Server: srv,
183 FullMethod: OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_FullMethodName,
184 }
185 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
186 return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolationsPreviews(ctx, req.(*ListOrgPolicyViolationsPreviewsRequest))
187 }
188 return interceptor(ctx, in, info, handler)
189 }
190
191 func _OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
192 in := new(GetOrgPolicyViolationsPreviewRequest)
193 if err := dec(in); err != nil {
194 return nil, err
195 }
196 if interceptor == nil {
197 return srv.(OrgPolicyViolationsPreviewServiceServer).GetOrgPolicyViolationsPreview(ctx, in)
198 }
199 info := &grpc.UnaryServerInfo{
200 Server: srv,
201 FullMethod: OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_FullMethodName,
202 }
203 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
204 return srv.(OrgPolicyViolationsPreviewServiceServer).GetOrgPolicyViolationsPreview(ctx, req.(*GetOrgPolicyViolationsPreviewRequest))
205 }
206 return interceptor(ctx, in, info, handler)
207 }
208
209 func _OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
210 in := new(CreateOrgPolicyViolationsPreviewRequest)
211 if err := dec(in); err != nil {
212 return nil, err
213 }
214 if interceptor == nil {
215 return srv.(OrgPolicyViolationsPreviewServiceServer).CreateOrgPolicyViolationsPreview(ctx, in)
216 }
217 info := &grpc.UnaryServerInfo{
218 Server: srv,
219 FullMethod: OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_FullMethodName,
220 }
221 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
222 return srv.(OrgPolicyViolationsPreviewServiceServer).CreateOrgPolicyViolationsPreview(ctx, req.(*CreateOrgPolicyViolationsPreviewRequest))
223 }
224 return interceptor(ctx, in, info, handler)
225 }
226
227 func _OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
228 in := new(ListOrgPolicyViolationsRequest)
229 if err := dec(in); err != nil {
230 return nil, err
231 }
232 if interceptor == nil {
233 return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolations(ctx, in)
234 }
235 info := &grpc.UnaryServerInfo{
236 Server: srv,
237 FullMethod: OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_FullMethodName,
238 }
239 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
240 return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolations(ctx, req.(*ListOrgPolicyViolationsRequest))
241 }
242 return interceptor(ctx, in, info, handler)
243 }
244
245 // OrgPolicyViolationsPreviewService_ServiceDesc is the grpc.ServiceDesc for OrgPolicyViolationsPreviewService service.
246 // It's only intended for direct use with grpc.RegisterService,
247 // and not to be introspected or modified (even as a copy)
248 var OrgPolicyViolationsPreviewService_ServiceDesc = grpc.ServiceDesc{
249 ServiceName: "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService",
250 HandlerType: (*OrgPolicyViolationsPreviewServiceServer)(nil),
251 Methods: []grpc.MethodDesc{
252 {
253 MethodName: "ListOrgPolicyViolationsPreviews",
254 Handler: _OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_Handler,
255 },
256 {
257 MethodName: "GetOrgPolicyViolationsPreview",
258 Handler: _OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_Handler,
259 },
260 {
261 MethodName: "CreateOrgPolicyViolationsPreview",
262 Handler: _OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_Handler,
263 },
264 {
265 MethodName: "ListOrgPolicyViolations",
266 Handler: _OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_Handler,
267 },
268 },
269 Streams: []grpc.StreamDesc{},
270 Metadata: "google/cloud/policysimulator/v1/orgpolicy.proto",
271 }