-
Notifications
You must be signed in to change notification settings - Fork 195
/
tag_bindings_grpc.pb.go
232 lines (212 loc) · 9.57 KB
/
tag_bindings_grpc.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.12.4
// source: mockgcp/cloud/resourcemanager/v3/tag_bindings.proto
package resourcemanagerpb
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
// TagBindingsClient is the client API for TagBindings 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 TagBindingsClient interface {
// Lists the TagBindings for the given Google Cloud resource, as specified
// with `parent`.
//
// NOTE: The `parent` field is expected to be a full resource name:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
ListTagBindings(ctx context.Context, in *ListTagBindingsRequest, opts ...grpc.CallOption) (*ListTagBindingsResponse, error)
// Creates a TagBinding between a TagValue and a Google Cloud resource.
CreateTagBinding(ctx context.Context, in *CreateTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Deletes a TagBinding.
DeleteTagBinding(ctx context.Context, in *DeleteTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
// Return a list of effective tags for the given Google Cloud resource, as
// specified in `parent`.
ListEffectiveTags(ctx context.Context, in *ListEffectiveTagsRequest, opts ...grpc.CallOption) (*ListEffectiveTagsResponse, error)
}
type tagBindingsClient struct {
cc grpc.ClientConnInterface
}
func NewTagBindingsClient(cc grpc.ClientConnInterface) TagBindingsClient {
return &tagBindingsClient{cc}
}
func (c *tagBindingsClient) ListTagBindings(ctx context.Context, in *ListTagBindingsRequest, opts ...grpc.CallOption) (*ListTagBindingsResponse, error) {
out := new(ListTagBindingsResponse)
err := c.cc.Invoke(ctx, "/mockgcp.cloud.resourcemanager.v3.TagBindings/ListTagBindings", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tagBindingsClient) CreateTagBinding(ctx context.Context, in *CreateTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
out := new(longrunningpb.Operation)
err := c.cc.Invoke(ctx, "/mockgcp.cloud.resourcemanager.v3.TagBindings/CreateTagBinding", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tagBindingsClient) DeleteTagBinding(ctx context.Context, in *DeleteTagBindingRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) {
out := new(longrunningpb.Operation)
err := c.cc.Invoke(ctx, "/mockgcp.cloud.resourcemanager.v3.TagBindings/DeleteTagBinding", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tagBindingsClient) ListEffectiveTags(ctx context.Context, in *ListEffectiveTagsRequest, opts ...grpc.CallOption) (*ListEffectiveTagsResponse, error) {
out := new(ListEffectiveTagsResponse)
err := c.cc.Invoke(ctx, "/mockgcp.cloud.resourcemanager.v3.TagBindings/ListEffectiveTags", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TagBindingsServer is the server API for TagBindings service.
// All implementations must embed UnimplementedTagBindingsServer
// for forward compatibility
type TagBindingsServer interface {
// Lists the TagBindings for the given Google Cloud resource, as specified
// with `parent`.
//
// NOTE: The `parent` field is expected to be a full resource name:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
ListTagBindings(context.Context, *ListTagBindingsRequest) (*ListTagBindingsResponse, error)
// Creates a TagBinding between a TagValue and a Google Cloud resource.
CreateTagBinding(context.Context, *CreateTagBindingRequest) (*longrunningpb.Operation, error)
// Deletes a TagBinding.
DeleteTagBinding(context.Context, *DeleteTagBindingRequest) (*longrunningpb.Operation, error)
// Return a list of effective tags for the given Google Cloud resource, as
// specified in `parent`.
ListEffectiveTags(context.Context, *ListEffectiveTagsRequest) (*ListEffectiveTagsResponse, error)
mustEmbedUnimplementedTagBindingsServer()
}
// UnimplementedTagBindingsServer must be embedded to have forward compatible implementations.
type UnimplementedTagBindingsServer struct {
}
func (UnimplementedTagBindingsServer) ListTagBindings(context.Context, *ListTagBindingsRequest) (*ListTagBindingsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListTagBindings not implemented")
}
func (UnimplementedTagBindingsServer) CreateTagBinding(context.Context, *CreateTagBindingRequest) (*longrunningpb.Operation, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateTagBinding not implemented")
}
func (UnimplementedTagBindingsServer) DeleteTagBinding(context.Context, *DeleteTagBindingRequest) (*longrunningpb.Operation, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteTagBinding not implemented")
}
func (UnimplementedTagBindingsServer) ListEffectiveTags(context.Context, *ListEffectiveTagsRequest) (*ListEffectiveTagsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEffectiveTags not implemented")
}
func (UnimplementedTagBindingsServer) mustEmbedUnimplementedTagBindingsServer() {}
// UnsafeTagBindingsServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TagBindingsServer will
// result in compilation errors.
type UnsafeTagBindingsServer interface {
mustEmbedUnimplementedTagBindingsServer()
}
func RegisterTagBindingsServer(s grpc.ServiceRegistrar, srv TagBindingsServer) {
s.RegisterService(&TagBindings_ServiceDesc, srv)
}
func _TagBindings_ListTagBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListTagBindingsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TagBindingsServer).ListTagBindings(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mockgcp.cloud.resourcemanager.v3.TagBindings/ListTagBindings",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TagBindingsServer).ListTagBindings(ctx, req.(*ListTagBindingsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TagBindings_CreateTagBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTagBindingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TagBindingsServer).CreateTagBinding(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mockgcp.cloud.resourcemanager.v3.TagBindings/CreateTagBinding",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TagBindingsServer).CreateTagBinding(ctx, req.(*CreateTagBindingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TagBindings_DeleteTagBinding_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteTagBindingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TagBindingsServer).DeleteTagBinding(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mockgcp.cloud.resourcemanager.v3.TagBindings/DeleteTagBinding",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TagBindingsServer).DeleteTagBinding(ctx, req.(*DeleteTagBindingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TagBindings_ListEffectiveTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListEffectiveTagsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TagBindingsServer).ListEffectiveTags(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/mockgcp.cloud.resourcemanager.v3.TagBindings/ListEffectiveTags",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TagBindingsServer).ListEffectiveTags(ctx, req.(*ListEffectiveTagsRequest))
}
return interceptor(ctx, in, info, handler)
}
// TagBindings_ServiceDesc is the grpc.ServiceDesc for TagBindings service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TagBindings_ServiceDesc = grpc.ServiceDesc{
ServiceName: "mockgcp.cloud.resourcemanager.v3.TagBindings",
HandlerType: (*TagBindingsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListTagBindings",
Handler: _TagBindings_ListTagBindings_Handler,
},
{
MethodName: "CreateTagBinding",
Handler: _TagBindings_CreateTagBinding_Handler,
},
{
MethodName: "DeleteTagBinding",
Handler: _TagBindings_DeleteTagBinding_Handler,
},
{
MethodName: "ListEffectiveTags",
Handler: _TagBindings_ListEffectiveTags_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "mockgcp/cloud/resourcemanager/v3/tag_bindings.proto",
}