| 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/dialogflow/cx/v3beta1/deployment.proto |
| 20 |
|
| 21 |
package cxpb |
| 22 |
|
| 23 |
import ( |
| 24 |
context "context" |
| 25 |
grpc "google.golang.org/grpc" |
| 26 |
codes "google.golang.org/grpc/codes" |
| 27 |
status "google.golang.org/grpc/status" |
| 28 |
) |
| 29 |
|
| 30 |
// This is a compile-time assertion to ensure that this generated file |
| 31 |
// is compatible with the grpc package it is being compiled against. |
| 32 |
// Requires gRPC-Go v1.32.0 or later. |
| 33 |
const _ = grpc.SupportPackageIsVersion7 |
| 34 |
|
| 35 |
const ( |
| 36 |
Deployments_ListDeployments_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Deployments/ListDeployments" |
| 37 |
Deployments_GetDeployment_FullMethodName = "/google.cloud.dialogflow.cx.v3beta1.Deployments/GetDeployment" |
| 38 |
) |
| 39 |
|
| 40 |
// DeploymentsClient is the client API for Deployments service. |
| 41 |
// |
| 42 |
// 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. |
| 43 |
type DeploymentsClient interface { |
| 44 |
// Returns the list of all deployments in the specified |
| 45 |
// [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. |
| 46 |
ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) |
| 47 |
// Retrieves the specified |
| 48 |
// [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. |
| 49 |
GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) |
| 50 |
} |
| 51 |
|
| 52 |
type deploymentsClient struct { |
| 53 |
cc grpc.ClientConnInterface |
| 54 |
} |
| 55 |
|
| 56 |
func NewDeploymentsClient(cc grpc.ClientConnInterface) DeploymentsClient { |
| 57 |
return &deploymentsClient{cc} |
| 58 |
} |
| 59 |
|
| 60 |
func (c *deploymentsClient) ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) { |
| 61 |
out := new(ListDeploymentsResponse) |
| 62 |
err := c.cc.Invoke(ctx, Deployments_ListDeployments_FullMethodName, in, out, opts...) |
| 63 |
if err != nil { |
| 64 |
return nil, err |
| 65 |
} |
| 66 |
return out, nil |
| 67 |
} |
| 68 |
|
| 69 |
func (c *deploymentsClient) GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) { |
| 70 |
out := new(Deployment) |
| 71 |
err := c.cc.Invoke(ctx, Deployments_GetDeployment_FullMethodName, in, out, opts...) |
| 72 |
if err != nil { |
| 73 |
return nil, err |
| 74 |
} |
| 75 |
return out, nil |
| 76 |
} |
| 77 |
|
| 78 |
// DeploymentsServer is the server API for Deployments service. |
| 79 |
// All implementations should embed UnimplementedDeploymentsServer |
| 80 |
// for forward compatibility |
| 81 |
type DeploymentsServer interface { |
| 82 |
// Returns the list of all deployments in the specified |
| 83 |
// [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. |
| 84 |
ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) |
| 85 |
// Retrieves the specified |
| 86 |
// [Deployment][google.cloud.dialogflow.cx.v3beta1.Deployment]. |
| 87 |
GetDeployment(context.Context, *GetDeploymentRequest) (*Deployment, error) |
| 88 |
} |
| 89 |
|
| 90 |
// UnimplementedDeploymentsServer should be embedded to have forward compatible implementations. |
| 91 |
type UnimplementedDeploymentsServer struct { |
| 92 |
} |
| 93 |
|
| 94 |
func (UnimplementedDeploymentsServer) ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) { |
| 95 |
return nil, status.Errorf(codes.Unimplemented, "method ListDeployments not implemented") |
| 96 |
} |
| 97 |
func (UnimplementedDeploymentsServer) GetDeployment(context.Context, *GetDeploymentRequest) (*Deployment, error) { |
| 98 |
return nil, status.Errorf(codes.Unimplemented, "method GetDeployment not implemented") |
| 99 |
} |
| 100 |
|
| 101 |
// UnsafeDeploymentsServer may be embedded to opt out of forward compatibility for this service. |
| 102 |
// Use of this interface is not recommended, as added methods to DeploymentsServer will |
| 103 |
// result in compilation errors. |
| 104 |
type UnsafeDeploymentsServer interface { |
| 105 |
mustEmbedUnimplementedDeploymentsServer() |
| 106 |
} |
| 107 |
|
| 108 |
func RegisterDeploymentsServer(s grpc.ServiceRegistrar, srv DeploymentsServer) { |
| 109 |
s.RegisterService(&Deployments_ServiceDesc, srv) |
| 110 |
} |
| 111 |
|
| 112 |
func _Deployments_ListDeployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 113 |
in := new(ListDeploymentsRequest) |
| 114 |
if err := dec(in); err != nil { |
| 115 |
return nil, err |
| 116 |
} |
| 117 |
if interceptor == nil { |
| 118 |
return srv.(DeploymentsServer).ListDeployments(ctx, in) |
| 119 |
} |
| 120 |
info := &grpc.UnaryServerInfo{ |
| 121 |
Server: srv, |
| 122 |
FullMethod: Deployments_ListDeployments_FullMethodName, |
| 123 |
} |
| 124 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 125 |
return srv.(DeploymentsServer).ListDeployments(ctx, req.(*ListDeploymentsRequest)) |
| 126 |
} |
| 127 |
return interceptor(ctx, in, info, handler) |
| 128 |
} |
| 129 |
|
| 130 |
func _Deployments_GetDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 131 |
in := new(GetDeploymentRequest) |
| 132 |
if err := dec(in); err != nil { |
| 133 |
return nil, err |
| 134 |
} |
| 135 |
if interceptor == nil { |
| 136 |
return srv.(DeploymentsServer).GetDeployment(ctx, in) |
| 137 |
} |
| 138 |
info := &grpc.UnaryServerInfo{ |
| 139 |
Server: srv, |
| 140 |
FullMethod: Deployments_GetDeployment_FullMethodName, |
| 141 |
} |
| 142 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 143 |
return srv.(DeploymentsServer).GetDeployment(ctx, req.(*GetDeploymentRequest)) |
| 144 |
} |
| 145 |
return interceptor(ctx, in, info, handler) |
| 146 |
} |
| 147 |
|
| 148 |
// Deployments_ServiceDesc is the grpc.ServiceDesc for Deployments service. |
| 149 |
// It's only intended for direct use with grpc.RegisterService, |
| 150 |
// and not to be introspected or modified (even as a copy) |
| 151 |
var Deployments_ServiceDesc = grpc.ServiceDesc{ |
| 152 |
ServiceName: "google.cloud.dialogflow.cx.v3beta1.Deployments", |
| 153 |
HandlerType: (*DeploymentsServer)(nil), |
| 154 |
Methods: []grpc.MethodDesc{ |
| 155 |
{ |
| 156 |
MethodName: "ListDeployments", |
| 157 |
Handler: _Deployments_ListDeployments_Handler, |
| 158 |
}, |
| 159 |
{ |
| 160 |
MethodName: "GetDeployment", |
| 161 |
Handler: _Deployments_GetDeployment_Handler, |
| 162 |
}, |
| 163 |
}, |
| 164 |
Streams: []grpc.StreamDesc{}, |
| 165 |
Metadata: "google/cloud/dialogflow/cx/v3beta1/deployment.proto", |
| 166 |
} |