// Copyright 2025 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. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/cloud/policysimulator/v1/orgpolicy.proto package policysimulatorpb import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/ListOrgPolicyViolationsPreviews" OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/GetOrgPolicyViolationsPreview" OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/CreateOrgPolicyViolationsPreview" OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_FullMethodName = "/google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService/ListOrgPolicyViolations" ) // OrgPolicyViolationsPreviewServiceClient is the client API for OrgPolicyViolationsPreviewService service. // // 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. type OrgPolicyViolationsPreviewServiceClient interface { // ListOrgPolicyViolationsPreviews lists each // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // in an organization. Each // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // is available for at least 7 days. ListOrgPolicyViolationsPreviews(ctx context.Context, in *ListOrgPolicyViolationsPreviewsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsPreviewsResponse, error) // GetOrgPolicyViolationsPreview gets the specified // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]. // Each // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // is available for at least 7 days. GetOrgPolicyViolationsPreview(ctx context.Context, in *GetOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*OrgPolicyViolationsPreview, error) // CreateOrgPolicyViolationsPreview creates an // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // for the proposed changes in the provided // [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy // are specified by this `OrgPolicyOverlay`. The resources to scan are // inferred from these specified changes. CreateOrgPolicyViolationsPreview(ctx context.Context, in *CreateOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) // ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present // in an // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]. ListOrgPolicyViolations(ctx context.Context, in *ListOrgPolicyViolationsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsResponse, error) } type orgPolicyViolationsPreviewServiceClient struct { cc grpc.ClientConnInterface } func NewOrgPolicyViolationsPreviewServiceClient(cc grpc.ClientConnInterface) OrgPolicyViolationsPreviewServiceClient { return &orgPolicyViolationsPreviewServiceClient{cc} } func (c *orgPolicyViolationsPreviewServiceClient) ListOrgPolicyViolationsPreviews(ctx context.Context, in *ListOrgPolicyViolationsPreviewsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsPreviewsResponse, error) { out := new(ListOrgPolicyViolationsPreviewsResponse) err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orgPolicyViolationsPreviewServiceClient) GetOrgPolicyViolationsPreview(ctx context.Context, in *GetOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*OrgPolicyViolationsPreview, error) { out := new(OrgPolicyViolationsPreview) err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orgPolicyViolationsPreviewServiceClient) CreateOrgPolicyViolationsPreview(ctx context.Context, in *CreateOrgPolicyViolationsPreviewRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { out := new(longrunningpb.Operation) err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *orgPolicyViolationsPreviewServiceClient) ListOrgPolicyViolations(ctx context.Context, in *ListOrgPolicyViolationsRequest, opts ...grpc.CallOption) (*ListOrgPolicyViolationsResponse, error) { out := new(ListOrgPolicyViolationsResponse) err := c.cc.Invoke(ctx, OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // OrgPolicyViolationsPreviewServiceServer is the server API for OrgPolicyViolationsPreviewService service. // All implementations should embed UnimplementedOrgPolicyViolationsPreviewServiceServer // for forward compatibility type OrgPolicyViolationsPreviewServiceServer interface { // ListOrgPolicyViolationsPreviews lists each // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // in an organization. Each // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // is available for at least 7 days. ListOrgPolicyViolationsPreviews(context.Context, *ListOrgPolicyViolationsPreviewsRequest) (*ListOrgPolicyViolationsPreviewsResponse, error) // GetOrgPolicyViolationsPreview gets the specified // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]. // Each // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // is available for at least 7 days. GetOrgPolicyViolationsPreview(context.Context, *GetOrgPolicyViolationsPreviewRequest) (*OrgPolicyViolationsPreview, error) // CreateOrgPolicyViolationsPreview creates an // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview] // for the proposed changes in the provided // [OrgPolicyViolationsPreview.OrgPolicyOverlay][]. The changes to OrgPolicy // are specified by this `OrgPolicyOverlay`. The resources to scan are // inferred from these specified changes. CreateOrgPolicyViolationsPreview(context.Context, *CreateOrgPolicyViolationsPreviewRequest) (*longrunningpb.Operation, error) // ListOrgPolicyViolations lists the [OrgPolicyViolations][] that are present // in an // [OrgPolicyViolationsPreview][google.cloud.policysimulator.v1.OrgPolicyViolationsPreview]. ListOrgPolicyViolations(context.Context, *ListOrgPolicyViolationsRequest) (*ListOrgPolicyViolationsResponse, error) } // UnimplementedOrgPolicyViolationsPreviewServiceServer should be embedded to have forward compatible implementations. type UnimplementedOrgPolicyViolationsPreviewServiceServer struct { } func (UnimplementedOrgPolicyViolationsPreviewServiceServer) ListOrgPolicyViolationsPreviews(context.Context, *ListOrgPolicyViolationsPreviewsRequest) (*ListOrgPolicyViolationsPreviewsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListOrgPolicyViolationsPreviews not implemented") } func (UnimplementedOrgPolicyViolationsPreviewServiceServer) GetOrgPolicyViolationsPreview(context.Context, *GetOrgPolicyViolationsPreviewRequest) (*OrgPolicyViolationsPreview, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOrgPolicyViolationsPreview not implemented") } func (UnimplementedOrgPolicyViolationsPreviewServiceServer) CreateOrgPolicyViolationsPreview(context.Context, *CreateOrgPolicyViolationsPreviewRequest) (*longrunningpb.Operation, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateOrgPolicyViolationsPreview not implemented") } func (UnimplementedOrgPolicyViolationsPreviewServiceServer) ListOrgPolicyViolations(context.Context, *ListOrgPolicyViolationsRequest) (*ListOrgPolicyViolationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListOrgPolicyViolations not implemented") } // UnsafeOrgPolicyViolationsPreviewServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to OrgPolicyViolationsPreviewServiceServer will // result in compilation errors. type UnsafeOrgPolicyViolationsPreviewServiceServer interface { mustEmbedUnimplementedOrgPolicyViolationsPreviewServiceServer() } func RegisterOrgPolicyViolationsPreviewServiceServer(s grpc.ServiceRegistrar, srv OrgPolicyViolationsPreviewServiceServer) { s.RegisterService(&OrgPolicyViolationsPreviewService_ServiceDesc, srv) } func _OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListOrgPolicyViolationsPreviewsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolationsPreviews(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolationsPreviews(ctx, req.(*ListOrgPolicyViolationsPreviewsRequest)) } return interceptor(ctx, in, info, handler) } func _OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetOrgPolicyViolationsPreviewRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrgPolicyViolationsPreviewServiceServer).GetOrgPolicyViolationsPreview(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrgPolicyViolationsPreviewServiceServer).GetOrgPolicyViolationsPreview(ctx, req.(*GetOrgPolicyViolationsPreviewRequest)) } return interceptor(ctx, in, info, handler) } func _OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateOrgPolicyViolationsPreviewRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrgPolicyViolationsPreviewServiceServer).CreateOrgPolicyViolationsPreview(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrgPolicyViolationsPreviewServiceServer).CreateOrgPolicyViolationsPreview(ctx, req.(*CreateOrgPolicyViolationsPreviewRequest)) } return interceptor(ctx, in, info, handler) } func _OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListOrgPolicyViolationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OrgPolicyViolationsPreviewServiceServer).ListOrgPolicyViolations(ctx, req.(*ListOrgPolicyViolationsRequest)) } return interceptor(ctx, in, info, handler) } // OrgPolicyViolationsPreviewService_ServiceDesc is the grpc.ServiceDesc for OrgPolicyViolationsPreviewService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var OrgPolicyViolationsPreviewService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.policysimulator.v1.OrgPolicyViolationsPreviewService", HandlerType: (*OrgPolicyViolationsPreviewServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListOrgPolicyViolationsPreviews", Handler: _OrgPolicyViolationsPreviewService_ListOrgPolicyViolationsPreviews_Handler, }, { MethodName: "GetOrgPolicyViolationsPreview", Handler: _OrgPolicyViolationsPreviewService_GetOrgPolicyViolationsPreview_Handler, }, { MethodName: "CreateOrgPolicyViolationsPreview", Handler: _OrgPolicyViolationsPreviewService_CreateOrgPolicyViolationsPreview_Handler, }, { MethodName: "ListOrgPolicyViolations", Handler: _OrgPolicyViolationsPreviewService_ListOrgPolicyViolations_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/policysimulator/v1/orgpolicy.proto", }