| 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/apihub/v1/plugin_service.proto |
| 20 |
|
| 21 |
package apihubpb |
| 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 |
ApiHubPlugin_GetPlugin_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/GetPlugin" |
| 38 |
ApiHubPlugin_EnablePlugin_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/EnablePlugin" |
| 39 |
ApiHubPlugin_DisablePlugin_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/DisablePlugin" |
| 40 |
ApiHubPlugin_CreatePlugin_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/CreatePlugin" |
| 41 |
ApiHubPlugin_ListPlugins_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/ListPlugins" |
| 42 |
ApiHubPlugin_DeletePlugin_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/DeletePlugin" |
| 43 |
ApiHubPlugin_CreatePluginInstance_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/CreatePluginInstance" |
| 44 |
ApiHubPlugin_ExecutePluginInstanceAction_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/ExecutePluginInstanceAction" |
| 45 |
ApiHubPlugin_GetPluginInstance_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/GetPluginInstance" |
| 46 |
ApiHubPlugin_ListPluginInstances_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/ListPluginInstances" |
| 47 |
ApiHubPlugin_EnablePluginInstanceAction_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/EnablePluginInstanceAction" |
| 48 |
ApiHubPlugin_DisablePluginInstanceAction_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/DisablePluginInstanceAction" |
| 49 |
ApiHubPlugin_UpdatePluginInstance_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/UpdatePluginInstance" |
| 50 |
ApiHubPlugin_DeletePluginInstance_FullMethodName = "/google.cloud.apihub.v1.ApiHubPlugin/DeletePluginInstance" |
| 51 |
) |
| 52 |
|
| 53 |
// ApiHubPluginClient is the client API for ApiHubPlugin service. |
| 54 |
// |
| 55 |
// 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. |
| 56 |
type ApiHubPluginClient interface { |
| 57 |
// Get an API Hub plugin. |
| 58 |
GetPlugin(ctx context.Context, in *GetPluginRequest, opts ...grpc.CallOption) (*Plugin, error) |
| 59 |
// Enables a plugin. |
| 60 |
// The `state` of the plugin after enabling is `ENABLED` |
| 61 |
EnablePlugin(ctx context.Context, in *EnablePluginRequest, opts ...grpc.CallOption) (*Plugin, error) |
| 62 |
// Disables a plugin. |
| 63 |
// The `state` of the plugin after disabling is `DISABLED` |
| 64 |
DisablePlugin(ctx context.Context, in *DisablePluginRequest, opts ...grpc.CallOption) (*Plugin, error) |
| 65 |
// Create an API Hub plugin resource in the API hub. |
| 66 |
// Once a plugin is created, it can be used to create plugin instances. |
| 67 |
CreatePlugin(ctx context.Context, in *CreatePluginRequest, opts ...grpc.CallOption) (*Plugin, error) |
| 68 |
// List all the plugins in a given project and location. |
| 69 |
ListPlugins(ctx context.Context, in *ListPluginsRequest, opts ...grpc.CallOption) (*ListPluginsResponse, error) |
| 70 |
// Delete a Plugin in API hub. |
| 71 |
// Note, only user owned plugins can be deleted via this method. |
| 72 |
DeletePlugin(ctx context.Context, in *DeletePluginRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 73 |
// Creates a Plugin instance in the API hub. |
| 74 |
CreatePluginInstance(ctx context.Context, in *CreatePluginInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 75 |
// Executes a plugin instance in the API hub. |
| 76 |
ExecutePluginInstanceAction(ctx context.Context, in *ExecutePluginInstanceActionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 77 |
// Get an API Hub plugin instance. |
| 78 |
GetPluginInstance(ctx context.Context, in *GetPluginInstanceRequest, opts ...grpc.CallOption) (*PluginInstance, error) |
| 79 |
// List all the plugins in a given project and location. |
| 80 |
// `-` can be used as wildcard value for {plugin_id} |
| 81 |
ListPluginInstances(ctx context.Context, in *ListPluginInstancesRequest, opts ...grpc.CallOption) (*ListPluginInstancesResponse, error) |
| 82 |
// Enables a plugin instance in the API hub. |
| 83 |
EnablePluginInstanceAction(ctx context.Context, in *EnablePluginInstanceActionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 84 |
// Disables a plugin instance in the API hub. |
| 85 |
DisablePluginInstanceAction(ctx context.Context, in *DisablePluginInstanceActionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 86 |
// Updates a plugin instance in the API hub. |
| 87 |
// The following fields in the |
| 88 |
// [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated |
| 89 |
// currently: |
| 90 |
// |
| 91 |
// * [display_name][google.cloud.apihub.v1.PluginInstance.display_name] |
| 92 |
// * [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression] |
| 93 |
// |
| 94 |
// The |
| 95 |
// [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] |
| 96 |
// should be used to specify the fields being updated. |
| 97 |
// |
| 98 |
// To update the |
| 99 |
// [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and |
| 100 |
// [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] |
| 101 |
// of the plugin instance, use the |
| 102 |
// [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] |
| 103 |
// method. |
| 104 |
UpdatePluginInstance(ctx context.Context, in *UpdatePluginInstanceRequest, opts ...grpc.CallOption) (*PluginInstance, error) |
| 105 |
// Deletes a plugin instance in the API hub. |
| 106 |
DeletePluginInstance(ctx context.Context, in *DeletePluginInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) |
| 107 |
} |
| 108 |
|
| 109 |
type apiHubPluginClient struct { |
| 110 |
cc grpc.ClientConnInterface |
| 111 |
} |
| 112 |
|
| 113 |
func NewApiHubPluginClient(cc grpc.ClientConnInterface) ApiHubPluginClient { |
| 114 |
return &apiHubPluginClient{cc} |
| 115 |
} |
| 116 |
|
| 117 |
func (c *apiHubPluginClient) GetPlugin(ctx context.Context, in *GetPluginRequest, opts ...grpc.CallOption) (*Plugin, error) { |
| 118 |
out := new(Plugin) |
| 119 |
err := c.cc.Invoke(ctx, ApiHubPlugin_GetPlugin_FullMethodName, in, out, opts...) |
| 120 |
if err != nil { |
| 121 |
return nil, err |
| 122 |
} |
| 123 |
return out, nil |
| 124 |
} |
| 125 |
|
| 126 |
func (c *apiHubPluginClient) EnablePlugin(ctx context.Context, in *EnablePluginRequest, opts ...grpc.CallOption) (*Plugin, error) { |
| 127 |
out := new(Plugin) |
| 128 |
err := c.cc.Invoke(ctx, ApiHubPlugin_EnablePlugin_FullMethodName, in, out, opts...) |
| 129 |
if err != nil { |
| 130 |
return nil, err |
| 131 |
} |
| 132 |
return out, nil |
| 133 |
} |
| 134 |
|
| 135 |
func (c *apiHubPluginClient) DisablePlugin(ctx context.Context, in *DisablePluginRequest, opts ...grpc.CallOption) (*Plugin, error) { |
| 136 |
out := new(Plugin) |
| 137 |
err := c.cc.Invoke(ctx, ApiHubPlugin_DisablePlugin_FullMethodName, in, out, opts...) |
| 138 |
if err != nil { |
| 139 |
return nil, err |
| 140 |
} |
| 141 |
return out, nil |
| 142 |
} |
| 143 |
|
| 144 |
func (c *apiHubPluginClient) CreatePlugin(ctx context.Context, in *CreatePluginRequest, opts ...grpc.CallOption) (*Plugin, error) { |
| 145 |
out := new(Plugin) |
| 146 |
err := c.cc.Invoke(ctx, ApiHubPlugin_CreatePlugin_FullMethodName, in, out, opts...) |
| 147 |
if err != nil { |
| 148 |
return nil, err |
| 149 |
} |
| 150 |
return out, nil |
| 151 |
} |
| 152 |
|
| 153 |
func (c *apiHubPluginClient) ListPlugins(ctx context.Context, in *ListPluginsRequest, opts ...grpc.CallOption) (*ListPluginsResponse, error) { |
| 154 |
out := new(ListPluginsResponse) |
| 155 |
err := c.cc.Invoke(ctx, ApiHubPlugin_ListPlugins_FullMethodName, in, out, opts...) |
| 156 |
if err != nil { |
| 157 |
return nil, err |
| 158 |
} |
| 159 |
return out, nil |
| 160 |
} |
| 161 |
|
| 162 |
func (c *apiHubPluginClient) DeletePlugin(ctx context.Context, in *DeletePluginRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 163 |
out := new(longrunningpb.Operation) |
| 164 |
err := c.cc.Invoke(ctx, ApiHubPlugin_DeletePlugin_FullMethodName, in, out, opts...) |
| 165 |
if err != nil { |
| 166 |
return nil, err |
| 167 |
} |
| 168 |
return out, nil |
| 169 |
} |
| 170 |
|
| 171 |
func (c *apiHubPluginClient) CreatePluginInstance(ctx context.Context, in *CreatePluginInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 172 |
out := new(longrunningpb.Operation) |
| 173 |
err := c.cc.Invoke(ctx, ApiHubPlugin_CreatePluginInstance_FullMethodName, in, out, opts...) |
| 174 |
if err != nil { |
| 175 |
return nil, err |
| 176 |
} |
| 177 |
return out, nil |
| 178 |
} |
| 179 |
|
| 180 |
func (c *apiHubPluginClient) ExecutePluginInstanceAction(ctx context.Context, in *ExecutePluginInstanceActionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 181 |
out := new(longrunningpb.Operation) |
| 182 |
err := c.cc.Invoke(ctx, ApiHubPlugin_ExecutePluginInstanceAction_FullMethodName, in, out, opts...) |
| 183 |
if err != nil { |
| 184 |
return nil, err |
| 185 |
} |
| 186 |
return out, nil |
| 187 |
} |
| 188 |
|
| 189 |
func (c *apiHubPluginClient) GetPluginInstance(ctx context.Context, in *GetPluginInstanceRequest, opts ...grpc.CallOption) (*PluginInstance, error) { |
| 190 |
out := new(PluginInstance) |
| 191 |
err := c.cc.Invoke(ctx, ApiHubPlugin_GetPluginInstance_FullMethodName, in, out, opts...) |
| 192 |
if err != nil { |
| 193 |
return nil, err |
| 194 |
} |
| 195 |
return out, nil |
| 196 |
} |
| 197 |
|
| 198 |
func (c *apiHubPluginClient) ListPluginInstances(ctx context.Context, in *ListPluginInstancesRequest, opts ...grpc.CallOption) (*ListPluginInstancesResponse, error) { |
| 199 |
out := new(ListPluginInstancesResponse) |
| 200 |
err := c.cc.Invoke(ctx, ApiHubPlugin_ListPluginInstances_FullMethodName, in, out, opts...) |
| 201 |
if err != nil { |
| 202 |
return nil, err |
| 203 |
} |
| 204 |
return out, nil |
| 205 |
} |
| 206 |
|
| 207 |
func (c *apiHubPluginClient) EnablePluginInstanceAction(ctx context.Context, in *EnablePluginInstanceActionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 208 |
out := new(longrunningpb.Operation) |
| 209 |
err := c.cc.Invoke(ctx, ApiHubPlugin_EnablePluginInstanceAction_FullMethodName, in, out, opts...) |
| 210 |
if err != nil { |
| 211 |
return nil, err |
| 212 |
} |
| 213 |
return out, nil |
| 214 |
} |
| 215 |
|
| 216 |
func (c *apiHubPluginClient) DisablePluginInstanceAction(ctx context.Context, in *DisablePluginInstanceActionRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 217 |
out := new(longrunningpb.Operation) |
| 218 |
err := c.cc.Invoke(ctx, ApiHubPlugin_DisablePluginInstanceAction_FullMethodName, in, out, opts...) |
| 219 |
if err != nil { |
| 220 |
return nil, err |
| 221 |
} |
| 222 |
return out, nil |
| 223 |
} |
| 224 |
|
| 225 |
func (c *apiHubPluginClient) UpdatePluginInstance(ctx context.Context, in *UpdatePluginInstanceRequest, opts ...grpc.CallOption) (*PluginInstance, error) { |
| 226 |
out := new(PluginInstance) |
| 227 |
err := c.cc.Invoke(ctx, ApiHubPlugin_UpdatePluginInstance_FullMethodName, in, out, opts...) |
| 228 |
if err != nil { |
| 229 |
return nil, err |
| 230 |
} |
| 231 |
return out, nil |
| 232 |
} |
| 233 |
|
| 234 |
func (c *apiHubPluginClient) DeletePluginInstance(ctx context.Context, in *DeletePluginInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { |
| 235 |
out := new(longrunningpb.Operation) |
| 236 |
err := c.cc.Invoke(ctx, ApiHubPlugin_DeletePluginInstance_FullMethodName, in, out, opts...) |
| 237 |
if err != nil { |
| 238 |
return nil, err |
| 239 |
} |
| 240 |
return out, nil |
| 241 |
} |
| 242 |
|
| 243 |
// ApiHubPluginServer is the server API for ApiHubPlugin service. |
| 244 |
// All implementations should embed UnimplementedApiHubPluginServer |
| 245 |
// for forward compatibility |
| 246 |
type ApiHubPluginServer interface { |
| 247 |
// Get an API Hub plugin. |
| 248 |
GetPlugin(context.Context, *GetPluginRequest) (*Plugin, error) |
| 249 |
// Enables a plugin. |
| 250 |
// The `state` of the plugin after enabling is `ENABLED` |
| 251 |
EnablePlugin(context.Context, *EnablePluginRequest) (*Plugin, error) |
| 252 |
// Disables a plugin. |
| 253 |
// The `state` of the plugin after disabling is `DISABLED` |
| 254 |
DisablePlugin(context.Context, *DisablePluginRequest) (*Plugin, error) |
| 255 |
// Create an API Hub plugin resource in the API hub. |
| 256 |
// Once a plugin is created, it can be used to create plugin instances. |
| 257 |
CreatePlugin(context.Context, *CreatePluginRequest) (*Plugin, error) |
| 258 |
// List all the plugins in a given project and location. |
| 259 |
ListPlugins(context.Context, *ListPluginsRequest) (*ListPluginsResponse, error) |
| 260 |
// Delete a Plugin in API hub. |
| 261 |
// Note, only user owned plugins can be deleted via this method. |
| 262 |
DeletePlugin(context.Context, *DeletePluginRequest) (*longrunningpb.Operation, error) |
| 263 |
// Creates a Plugin instance in the API hub. |
| 264 |
CreatePluginInstance(context.Context, *CreatePluginInstanceRequest) (*longrunningpb.Operation, error) |
| 265 |
// Executes a plugin instance in the API hub. |
| 266 |
ExecutePluginInstanceAction(context.Context, *ExecutePluginInstanceActionRequest) (*longrunningpb.Operation, error) |
| 267 |
// Get an API Hub plugin instance. |
| 268 |
GetPluginInstance(context.Context, *GetPluginInstanceRequest) (*PluginInstance, error) |
| 269 |
// List all the plugins in a given project and location. |
| 270 |
// `-` can be used as wildcard value for {plugin_id} |
| 271 |
ListPluginInstances(context.Context, *ListPluginInstancesRequest) (*ListPluginInstancesResponse, error) |
| 272 |
// Enables a plugin instance in the API hub. |
| 273 |
EnablePluginInstanceAction(context.Context, *EnablePluginInstanceActionRequest) (*longrunningpb.Operation, error) |
| 274 |
// Disables a plugin instance in the API hub. |
| 275 |
DisablePluginInstanceAction(context.Context, *DisablePluginInstanceActionRequest) (*longrunningpb.Operation, error) |
| 276 |
// Updates a plugin instance in the API hub. |
| 277 |
// The following fields in the |
| 278 |
// [plugin_instance][google.cloud.apihub.v1.PluginInstance] can be updated |
| 279 |
// currently: |
| 280 |
// |
| 281 |
// * [display_name][google.cloud.apihub.v1.PluginInstance.display_name] |
| 282 |
// * [schedule_cron_expression][PluginInstance.actions.schedule_cron_expression] |
| 283 |
// |
| 284 |
// The |
| 285 |
// [update_mask][google.cloud.apihub.v1.UpdatePluginInstanceRequest.update_mask] |
| 286 |
// should be used to specify the fields being updated. |
| 287 |
// |
| 288 |
// To update the |
| 289 |
// [auth_config][google.cloud.apihub.v1.PluginInstance.auth_config] and |
| 290 |
// [additional_config][google.cloud.apihub.v1.PluginInstance.additional_config] |
| 291 |
// of the plugin instance, use the |
| 292 |
// [ApplyPluginInstanceConfig][google.cloud.apihub.v1.ApiHubPlugin.ApplyPluginInstanceConfig] |
| 293 |
// method. |
| 294 |
UpdatePluginInstance(context.Context, *UpdatePluginInstanceRequest) (*PluginInstance, error) |
| 295 |
// Deletes a plugin instance in the API hub. |
| 296 |
DeletePluginInstance(context.Context, *DeletePluginInstanceRequest) (*longrunningpb.Operation, error) |
| 297 |
} |
| 298 |
|
| 299 |
// UnimplementedApiHubPluginServer should be embedded to have forward compatible implementations. |
| 300 |
type UnimplementedApiHubPluginServer struct { |
| 301 |
} |
| 302 |
|
| 303 |
func (UnimplementedApiHubPluginServer) GetPlugin(context.Context, *GetPluginRequest) (*Plugin, error) { |
| 304 |
return nil, status.Errorf(codes.Unimplemented, "method GetPlugin not implemented") |
| 305 |
} |
| 306 |
func (UnimplementedApiHubPluginServer) EnablePlugin(context.Context, *EnablePluginRequest) (*Plugin, error) { |
| 307 |
return nil, status.Errorf(codes.Unimplemented, "method EnablePlugin not implemented") |
| 308 |
} |
| 309 |
func (UnimplementedApiHubPluginServer) DisablePlugin(context.Context, *DisablePluginRequest) (*Plugin, error) { |
| 310 |
return nil, status.Errorf(codes.Unimplemented, "method DisablePlugin not implemented") |
| 311 |
} |
| 312 |
func (UnimplementedApiHubPluginServer) CreatePlugin(context.Context, *CreatePluginRequest) (*Plugin, error) { |
| 313 |
return nil, status.Errorf(codes.Unimplemented, "method CreatePlugin not implemented") |
| 314 |
} |
| 315 |
func (UnimplementedApiHubPluginServer) ListPlugins(context.Context, *ListPluginsRequest) (*ListPluginsResponse, error) { |
| 316 |
return nil, status.Errorf(codes.Unimplemented, "method ListPlugins not implemented") |
| 317 |
} |
| 318 |
func (UnimplementedApiHubPluginServer) DeletePlugin(context.Context, *DeletePluginRequest) (*longrunningpb.Operation, error) { |
| 319 |
return nil, status.Errorf(codes.Unimplemented, "method DeletePlugin not implemented") |
| 320 |
} |
| 321 |
func (UnimplementedApiHubPluginServer) CreatePluginInstance(context.Context, *CreatePluginInstanceRequest) (*longrunningpb.Operation, error) { |
| 322 |
return nil, status.Errorf(codes.Unimplemented, "method CreatePluginInstance not implemented") |
| 323 |
} |
| 324 |
func (UnimplementedApiHubPluginServer) ExecutePluginInstanceAction(context.Context, *ExecutePluginInstanceActionRequest) (*longrunningpb.Operation, error) { |
| 325 |
return nil, status.Errorf(codes.Unimplemented, "method ExecutePluginInstanceAction not implemented") |
| 326 |
} |
| 327 |
func (UnimplementedApiHubPluginServer) GetPluginInstance(context.Context, *GetPluginInstanceRequest) (*PluginInstance, error) { |
| 328 |
return nil, status.Errorf(codes.Unimplemented, "method GetPluginInstance not implemented") |
| 329 |
} |
| 330 |
func (UnimplementedApiHubPluginServer) ListPluginInstances(context.Context, *ListPluginInstancesRequest) (*ListPluginInstancesResponse, error) { |
| 331 |
return nil, status.Errorf(codes.Unimplemented, "method ListPluginInstances not implemented") |
| 332 |
} |
| 333 |
func (UnimplementedApiHubPluginServer) EnablePluginInstanceAction(context.Context, *EnablePluginInstanceActionRequest) (*longrunningpb.Operation, error) { |
| 334 |
return nil, status.Errorf(codes.Unimplemented, "method EnablePluginInstanceAction not implemented") |
| 335 |
} |
| 336 |
func (UnimplementedApiHubPluginServer) DisablePluginInstanceAction(context.Context, *DisablePluginInstanceActionRequest) (*longrunningpb.Operation, error) { |
| 337 |
return nil, status.Errorf(codes.Unimplemented, "method DisablePluginInstanceAction not implemented") |
| 338 |
} |
| 339 |
func (UnimplementedApiHubPluginServer) UpdatePluginInstance(context.Context, *UpdatePluginInstanceRequest) (*PluginInstance, error) { |
| 340 |
return nil, status.Errorf(codes.Unimplemented, "method UpdatePluginInstance not implemented") |
| 341 |
} |
| 342 |
func (UnimplementedApiHubPluginServer) DeletePluginInstance(context.Context, *DeletePluginInstanceRequest) (*longrunningpb.Operation, error) { |
| 343 |
return nil, status.Errorf(codes.Unimplemented, "method DeletePluginInstance not implemented") |
| 344 |
} |
| 345 |
|
| 346 |
// UnsafeApiHubPluginServer may be embedded to opt out of forward compatibility for this service. |
| 347 |
// Use of this interface is not recommended, as added methods to ApiHubPluginServer will |
| 348 |
// result in compilation errors. |
| 349 |
type UnsafeApiHubPluginServer interface { |
| 350 |
mustEmbedUnimplementedApiHubPluginServer() |
| 351 |
} |
| 352 |
|
| 353 |
func RegisterApiHubPluginServer(s grpc.ServiceRegistrar, srv ApiHubPluginServer) { |
| 354 |
s.RegisterService(&ApiHubPlugin_ServiceDesc, srv) |
| 355 |
} |
| 356 |
|
| 357 |
func _ApiHubPlugin_GetPlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 358 |
in := new(GetPluginRequest) |
| 359 |
if err := dec(in); err != nil { |
| 360 |
return nil, err |
| 361 |
} |
| 362 |
if interceptor == nil { |
| 363 |
return srv.(ApiHubPluginServer).GetPlugin(ctx, in) |
| 364 |
} |
| 365 |
info := &grpc.UnaryServerInfo{ |
| 366 |
Server: srv, |
| 367 |
FullMethod: ApiHubPlugin_GetPlugin_FullMethodName, |
| 368 |
} |
| 369 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 370 |
return srv.(ApiHubPluginServer).GetPlugin(ctx, req.(*GetPluginRequest)) |
| 371 |
} |
| 372 |
return interceptor(ctx, in, info, handler) |
| 373 |
} |
| 374 |
|
| 375 |
func _ApiHubPlugin_EnablePlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 376 |
in := new(EnablePluginRequest) |
| 377 |
if err := dec(in); err != nil { |
| 378 |
return nil, err |
| 379 |
} |
| 380 |
if interceptor == nil { |
| 381 |
return srv.(ApiHubPluginServer).EnablePlugin(ctx, in) |
| 382 |
} |
| 383 |
info := &grpc.UnaryServerInfo{ |
| 384 |
Server: srv, |
| 385 |
FullMethod: ApiHubPlugin_EnablePlugin_FullMethodName, |
| 386 |
} |
| 387 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 388 |
return srv.(ApiHubPluginServer).EnablePlugin(ctx, req.(*EnablePluginRequest)) |
| 389 |
} |
| 390 |
return interceptor(ctx, in, info, handler) |
| 391 |
} |
| 392 |
|
| 393 |
func _ApiHubPlugin_DisablePlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 394 |
in := new(DisablePluginRequest) |
| 395 |
if err := dec(in); err != nil { |
| 396 |
return nil, err |
| 397 |
} |
| 398 |
if interceptor == nil { |
| 399 |
return srv.(ApiHubPluginServer).DisablePlugin(ctx, in) |
| 400 |
} |
| 401 |
info := &grpc.UnaryServerInfo{ |
| 402 |
Server: srv, |
| 403 |
FullMethod: ApiHubPlugin_DisablePlugin_FullMethodName, |
| 404 |
} |
| 405 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 406 |
return srv.(ApiHubPluginServer).DisablePlugin(ctx, req.(*DisablePluginRequest)) |
| 407 |
} |
| 408 |
return interceptor(ctx, in, info, handler) |
| 409 |
} |
| 410 |
|
| 411 |
func _ApiHubPlugin_CreatePlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 412 |
in := new(CreatePluginRequest) |
| 413 |
if err := dec(in); err != nil { |
| 414 |
return nil, err |
| 415 |
} |
| 416 |
if interceptor == nil { |
| 417 |
return srv.(ApiHubPluginServer).CreatePlugin(ctx, in) |
| 418 |
} |
| 419 |
info := &grpc.UnaryServerInfo{ |
| 420 |
Server: srv, |
| 421 |
FullMethod: ApiHubPlugin_CreatePlugin_FullMethodName, |
| 422 |
} |
| 423 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 424 |
return srv.(ApiHubPluginServer).CreatePlugin(ctx, req.(*CreatePluginRequest)) |
| 425 |
} |
| 426 |
return interceptor(ctx, in, info, handler) |
| 427 |
} |
| 428 |
|
| 429 |
func _ApiHubPlugin_ListPlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 430 |
in := new(ListPluginsRequest) |
| 431 |
if err := dec(in); err != nil { |
| 432 |
return nil, err |
| 433 |
} |
| 434 |
if interceptor == nil { |
| 435 |
return srv.(ApiHubPluginServer).ListPlugins(ctx, in) |
| 436 |
} |
| 437 |
info := &grpc.UnaryServerInfo{ |
| 438 |
Server: srv, |
| 439 |
FullMethod: ApiHubPlugin_ListPlugins_FullMethodName, |
| 440 |
} |
| 441 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 442 |
return srv.(ApiHubPluginServer).ListPlugins(ctx, req.(*ListPluginsRequest)) |
| 443 |
} |
| 444 |
return interceptor(ctx, in, info, handler) |
| 445 |
} |
| 446 |
|
| 447 |
func _ApiHubPlugin_DeletePlugin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 448 |
in := new(DeletePluginRequest) |
| 449 |
if err := dec(in); err != nil { |
| 450 |
return nil, err |
| 451 |
} |
| 452 |
if interceptor == nil { |
| 453 |
return srv.(ApiHubPluginServer).DeletePlugin(ctx, in) |
| 454 |
} |
| 455 |
info := &grpc.UnaryServerInfo{ |
| 456 |
Server: srv, |
| 457 |
FullMethod: ApiHubPlugin_DeletePlugin_FullMethodName, |
| 458 |
} |
| 459 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 460 |
return srv.(ApiHubPluginServer).DeletePlugin(ctx, req.(*DeletePluginRequest)) |
| 461 |
} |
| 462 |
return interceptor(ctx, in, info, handler) |
| 463 |
} |
| 464 |
|
| 465 |
func _ApiHubPlugin_CreatePluginInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 466 |
in := new(CreatePluginInstanceRequest) |
| 467 |
if err := dec(in); err != nil { |
| 468 |
return nil, err |
| 469 |
} |
| 470 |
if interceptor == nil { |
| 471 |
return srv.(ApiHubPluginServer).CreatePluginInstance(ctx, in) |
| 472 |
} |
| 473 |
info := &grpc.UnaryServerInfo{ |
| 474 |
Server: srv, |
| 475 |
FullMethod: ApiHubPlugin_CreatePluginInstance_FullMethodName, |
| 476 |
} |
| 477 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 478 |
return srv.(ApiHubPluginServer).CreatePluginInstance(ctx, req.(*CreatePluginInstanceRequest)) |
| 479 |
} |
| 480 |
return interceptor(ctx, in, info, handler) |
| 481 |
} |
| 482 |
|
| 483 |
func _ApiHubPlugin_ExecutePluginInstanceAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 484 |
in := new(ExecutePluginInstanceActionRequest) |
| 485 |
if err := dec(in); err != nil { |
| 486 |
return nil, err |
| 487 |
} |
| 488 |
if interceptor == nil { |
| 489 |
return srv.(ApiHubPluginServer).ExecutePluginInstanceAction(ctx, in) |
| 490 |
} |
| 491 |
info := &grpc.UnaryServerInfo{ |
| 492 |
Server: srv, |
| 493 |
FullMethod: ApiHubPlugin_ExecutePluginInstanceAction_FullMethodName, |
| 494 |
} |
| 495 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 496 |
return srv.(ApiHubPluginServer).ExecutePluginInstanceAction(ctx, req.(*ExecutePluginInstanceActionRequest)) |
| 497 |
} |
| 498 |
return interceptor(ctx, in, info, handler) |
| 499 |
} |
| 500 |
|
| 501 |
func _ApiHubPlugin_GetPluginInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 502 |
in := new(GetPluginInstanceRequest) |
| 503 |
if err := dec(in); err != nil { |
| 504 |
return nil, err |
| 505 |
} |
| 506 |
if interceptor == nil { |
| 507 |
return srv.(ApiHubPluginServer).GetPluginInstance(ctx, in) |
| 508 |
} |
| 509 |
info := &grpc.UnaryServerInfo{ |
| 510 |
Server: srv, |
| 511 |
FullMethod: ApiHubPlugin_GetPluginInstance_FullMethodName, |
| 512 |
} |
| 513 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 514 |
return srv.(ApiHubPluginServer).GetPluginInstance(ctx, req.(*GetPluginInstanceRequest)) |
| 515 |
} |
| 516 |
return interceptor(ctx, in, info, handler) |
| 517 |
} |
| 518 |
|
| 519 |
func _ApiHubPlugin_ListPluginInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 520 |
in := new(ListPluginInstancesRequest) |
| 521 |
if err := dec(in); err != nil { |
| 522 |
return nil, err |
| 523 |
} |
| 524 |
if interceptor == nil { |
| 525 |
return srv.(ApiHubPluginServer).ListPluginInstances(ctx, in) |
| 526 |
} |
| 527 |
info := &grpc.UnaryServerInfo{ |
| 528 |
Server: srv, |
| 529 |
FullMethod: ApiHubPlugin_ListPluginInstances_FullMethodName, |
| 530 |
} |
| 531 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 532 |
return srv.(ApiHubPluginServer).ListPluginInstances(ctx, req.(*ListPluginInstancesRequest)) |
| 533 |
} |
| 534 |
return interceptor(ctx, in, info, handler) |
| 535 |
} |
| 536 |
|
| 537 |
func _ApiHubPlugin_EnablePluginInstanceAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 538 |
in := new(EnablePluginInstanceActionRequest) |
| 539 |
if err := dec(in); err != nil { |
| 540 |
return nil, err |
| 541 |
} |
| 542 |
if interceptor == nil { |
| 543 |
return srv.(ApiHubPluginServer).EnablePluginInstanceAction(ctx, in) |
| 544 |
} |
| 545 |
info := &grpc.UnaryServerInfo{ |
| 546 |
Server: srv, |
| 547 |
FullMethod: ApiHubPlugin_EnablePluginInstanceAction_FullMethodName, |
| 548 |
} |
| 549 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 550 |
return srv.(ApiHubPluginServer).EnablePluginInstanceAction(ctx, req.(*EnablePluginInstanceActionRequest)) |
| 551 |
} |
| 552 |
return interceptor(ctx, in, info, handler) |
| 553 |
} |
| 554 |
|
| 555 |
func _ApiHubPlugin_DisablePluginInstanceAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 556 |
in := new(DisablePluginInstanceActionRequest) |
| 557 |
if err := dec(in); err != nil { |
| 558 |
return nil, err |
| 559 |
} |
| 560 |
if interceptor == nil { |
| 561 |
return srv.(ApiHubPluginServer).DisablePluginInstanceAction(ctx, in) |
| 562 |
} |
| 563 |
info := &grpc.UnaryServerInfo{ |
| 564 |
Server: srv, |
| 565 |
FullMethod: ApiHubPlugin_DisablePluginInstanceAction_FullMethodName, |
| 566 |
} |
| 567 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 568 |
return srv.(ApiHubPluginServer).DisablePluginInstanceAction(ctx, req.(*DisablePluginInstanceActionRequest)) |
| 569 |
} |
| 570 |
return interceptor(ctx, in, info, handler) |
| 571 |
} |
| 572 |
|
| 573 |
func _ApiHubPlugin_UpdatePluginInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 574 |
in := new(UpdatePluginInstanceRequest) |
| 575 |
if err := dec(in); err != nil { |
| 576 |
return nil, err |
| 577 |
} |
| 578 |
if interceptor == nil { |
| 579 |
return srv.(ApiHubPluginServer).UpdatePluginInstance(ctx, in) |
| 580 |
} |
| 581 |
info := &grpc.UnaryServerInfo{ |
| 582 |
Server: srv, |
| 583 |
FullMethod: ApiHubPlugin_UpdatePluginInstance_FullMethodName, |
| 584 |
} |
| 585 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 586 |
return srv.(ApiHubPluginServer).UpdatePluginInstance(ctx, req.(*UpdatePluginInstanceRequest)) |
| 587 |
} |
| 588 |
return interceptor(ctx, in, info, handler) |
| 589 |
} |
| 590 |
|
| 591 |
func _ApiHubPlugin_DeletePluginInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 592 |
in := new(DeletePluginInstanceRequest) |
| 593 |
if err := dec(in); err != nil { |
| 594 |
return nil, err |
| 595 |
} |
| 596 |
if interceptor == nil { |
| 597 |
return srv.(ApiHubPluginServer).DeletePluginInstance(ctx, in) |
| 598 |
} |
| 599 |
info := &grpc.UnaryServerInfo{ |
| 600 |
Server: srv, |
| 601 |
FullMethod: ApiHubPlugin_DeletePluginInstance_FullMethodName, |
| 602 |
} |
| 603 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 604 |
return srv.(ApiHubPluginServer).DeletePluginInstance(ctx, req.(*DeletePluginInstanceRequest)) |
| 605 |
} |
| 606 |
return interceptor(ctx, in, info, handler) |
| 607 |
} |
| 608 |
|
| 609 |
// ApiHubPlugin_ServiceDesc is the grpc.ServiceDesc for ApiHubPlugin service. |
| 610 |
// It's only intended for direct use with grpc.RegisterService, |
| 611 |
// and not to be introspected or modified (even as a copy) |
| 612 |
var ApiHubPlugin_ServiceDesc = grpc.ServiceDesc{ |
| 613 |
ServiceName: "google.cloud.apihub.v1.ApiHubPlugin", |
| 614 |
HandlerType: (*ApiHubPluginServer)(nil), |
| 615 |
Methods: []grpc.MethodDesc{ |
| 616 |
{ |
| 617 |
MethodName: "GetPlugin", |
| 618 |
Handler: _ApiHubPlugin_GetPlugin_Handler, |
| 619 |
}, |
| 620 |
{ |
| 621 |
MethodName: "EnablePlugin", |
| 622 |
Handler: _ApiHubPlugin_EnablePlugin_Handler, |
| 623 |
}, |
| 624 |
{ |
| 625 |
MethodName: "DisablePlugin", |
| 626 |
Handler: _ApiHubPlugin_DisablePlugin_Handler, |
| 627 |
}, |
| 628 |
{ |
| 629 |
MethodName: "CreatePlugin", |
| 630 |
Handler: _ApiHubPlugin_CreatePlugin_Handler, |
| 631 |
}, |
| 632 |
{ |
| 633 |
MethodName: "ListPlugins", |
| 634 |
Handler: _ApiHubPlugin_ListPlugins_Handler, |
| 635 |
}, |
| 636 |
{ |
| 637 |
MethodName: "DeletePlugin", |
| 638 |
Handler: _ApiHubPlugin_DeletePlugin_Handler, |
| 639 |
}, |
| 640 |
{ |
| 641 |
MethodName: "CreatePluginInstance", |
| 642 |
Handler: _ApiHubPlugin_CreatePluginInstance_Handler, |
| 643 |
}, |
| 644 |
{ |
| 645 |
MethodName: "ExecutePluginInstanceAction", |
| 646 |
Handler: _ApiHubPlugin_ExecutePluginInstanceAction_Handler, |
| 647 |
}, |
| 648 |
{ |
| 649 |
MethodName: "GetPluginInstance", |
| 650 |
Handler: _ApiHubPlugin_GetPluginInstance_Handler, |
| 651 |
}, |
| 652 |
{ |
| 653 |
MethodName: "ListPluginInstances", |
| 654 |
Handler: _ApiHubPlugin_ListPluginInstances_Handler, |
| 655 |
}, |
| 656 |
{ |
| 657 |
MethodName: "EnablePluginInstanceAction", |
| 658 |
Handler: _ApiHubPlugin_EnablePluginInstanceAction_Handler, |
| 659 |
}, |
| 660 |
{ |
| 661 |
MethodName: "DisablePluginInstanceAction", |
| 662 |
Handler: _ApiHubPlugin_DisablePluginInstanceAction_Handler, |
| 663 |
}, |
| 664 |
{ |
| 665 |
MethodName: "UpdatePluginInstance", |
| 666 |
Handler: _ApiHubPlugin_UpdatePluginInstance_Handler, |
| 667 |
}, |
| 668 |
{ |
| 669 |
MethodName: "DeletePluginInstance", |
| 670 |
Handler: _ApiHubPlugin_DeletePluginInstance_Handler, |
| 671 |
}, |
| 672 |
}, |
| 673 |
Streams: []grpc.StreamDesc{}, |
| 674 |
Metadata: "google/cloud/apihub/v1/plugin_service.proto", |
| 675 |
} |