| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 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 |
|
| 32 |
|
| 33 |
|
| 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 |
|
| 44 |
|
| 45 |
|
| 46 |
type OrgPolicyViolationsPreviewServiceClient interface { |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
ListOrgPolicyViolationsPreviews(ctx context.Context, in *ListOrgPolicyViolationsPreviewsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsPreviewsResponse, error) |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
GetOrgPolicyViolationsPreview(ctx context.Context, in *GetOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*OrgPolicyViolationsPreview, error) |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
CreateOrgPolicyViolationsPreview(ctx context.Context, in *CreateOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 66 |
|
| 67 |
|
| 68 |
|
| 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 |
|
| 117 |
|
| 118 |
|
| 119 |
type OrgPolicyViolationsPreviewServiceServer interface { |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
ListOrgPolicyViolationsPreviews(context.Context, *ListOrgPolicyViolationsPreviewsRequest) (*ListOrgPolicyViolationsPreviewsResponse, error) |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
GetOrgPolicyViolationsPreview(context.Context, *GetOrgPolicyViolationsPreviewRequest) (*OrgPolicyViolationsPreview, error) |
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
CreateOrgPolicyViolationsPreview(context.Context, *CreateOrgPolicyViolationsPreviewRequest) (*longrunningpb.Operation, error) |
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
ListOrgPolicyViolations(context.Context, *ListOrgPolicyViolationsRequest) (*ListOrgPolicyViolationsResponse, error) |
| 143 |
} |
| 144 |
|
| 145 |
|
| 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 |
|
| 163 |
|
| 164 |
|
| 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 |
|
| 246 |
|
| 247 |
|
| 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 |
} |