| 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/oslogin/v1/oslogin.proto |
| 20 |
|
| 21 |
package osloginpb |
| 22 |
|
| 23 |
import ( |
| 24 |
commonpb "cloud.google.com/go/oslogin/common/commonpb" |
| 25 |
context "context" |
| 26 |
grpc "google.golang.org/grpc" |
| 27 |
codes "google.golang.org/grpc/codes" |
| 28 |
status "google.golang.org/grpc/status" |
| 29 |
emptypb "google.golang.org/protobuf/types/known/emptypb" |
| 30 |
) |
| 31 |
|
| 32 |
// This is a compile-time assertion to ensure that this generated file |
| 33 |
// is compatible with the grpc package it is being compiled against. |
| 34 |
// Requires gRPC-Go v1.32.0 or later. |
| 35 |
const _ = grpc.SupportPackageIsVersion7 |
| 36 |
|
| 37 |
const ( |
| 38 |
OsLoginService_CreateSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/CreateSshPublicKey" |
| 39 |
OsLoginService_DeletePosixAccount_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/DeletePosixAccount" |
| 40 |
OsLoginService_DeleteSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/DeleteSshPublicKey" |
| 41 |
OsLoginService_GetLoginProfile_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/GetLoginProfile" |
| 42 |
OsLoginService_GetSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/GetSshPublicKey" |
| 43 |
OsLoginService_ImportSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/ImportSshPublicKey" |
| 44 |
OsLoginService_UpdateSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/UpdateSshPublicKey" |
| 45 |
) |
| 46 |
|
| 47 |
// OsLoginServiceClient is the client API for OsLoginService service. |
| 48 |
// |
| 49 |
// 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. |
| 50 |
type OsLoginServiceClient interface { |
| 51 |
// Create an SSH public key |
| 52 |
CreateSshPublicKey(ctx context.Context, in *CreateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) |
| 53 |
// Deletes a POSIX account. |
| 54 |
DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 55 |
// Deletes an SSH public key. |
| 56 |
DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) |
| 57 |
// Retrieves the profile information used for logging in to a virtual machine |
| 58 |
// on Google Compute Engine. |
| 59 |
GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) |
| 60 |
// Retrieves an SSH public key. |
| 61 |
GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) |
| 62 |
// Adds an SSH public key and returns the profile information. Default POSIX |
| 63 |
// account information is set when no username and UID exist as part of the |
| 64 |
// login profile. |
| 65 |
ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) |
| 66 |
// Updates an SSH public key and returns the profile information. This method |
| 67 |
// supports patch semantics. |
| 68 |
UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) |
| 69 |
} |
| 70 |
|
| 71 |
type osLoginServiceClient struct { |
| 72 |
cc grpc.ClientConnInterface |
| 73 |
} |
| 74 |
|
| 75 |
func NewOsLoginServiceClient(cc grpc.ClientConnInterface) OsLoginServiceClient { |
| 76 |
return &osLoginServiceClient{cc} |
| 77 |
} |
| 78 |
|
| 79 |
func (c *osLoginServiceClient) CreateSshPublicKey(ctx context.Context, in *CreateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) { |
| 80 |
out := new(commonpb.SshPublicKey) |
| 81 |
err := c.cc.Invoke(ctx, OsLoginService_CreateSshPublicKey_FullMethodName, in, out, opts...) |
| 82 |
if err != nil { |
| 83 |
return nil, err |
| 84 |
} |
| 85 |
return out, nil |
| 86 |
} |
| 87 |
|
| 88 |
func (c *osLoginServiceClient) DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 89 |
out := new(emptypb.Empty) |
| 90 |
err := c.cc.Invoke(ctx, OsLoginService_DeletePosixAccount_FullMethodName, in, out, opts...) |
| 91 |
if err != nil { |
| 92 |
return nil, err |
| 93 |
} |
| 94 |
return out, nil |
| 95 |
} |
| 96 |
|
| 97 |
func (c *osLoginServiceClient) DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { |
| 98 |
out := new(emptypb.Empty) |
| 99 |
err := c.cc.Invoke(ctx, OsLoginService_DeleteSshPublicKey_FullMethodName, in, out, opts...) |
| 100 |
if err != nil { |
| 101 |
return nil, err |
| 102 |
} |
| 103 |
return out, nil |
| 104 |
} |
| 105 |
|
| 106 |
func (c *osLoginServiceClient) GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) { |
| 107 |
out := new(LoginProfile) |
| 108 |
err := c.cc.Invoke(ctx, OsLoginService_GetLoginProfile_FullMethodName, in, out, opts...) |
| 109 |
if err != nil { |
| 110 |
return nil, err |
| 111 |
} |
| 112 |
return out, nil |
| 113 |
} |
| 114 |
|
| 115 |
func (c *osLoginServiceClient) GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) { |
| 116 |
out := new(commonpb.SshPublicKey) |
| 117 |
err := c.cc.Invoke(ctx, OsLoginService_GetSshPublicKey_FullMethodName, in, out, opts...) |
| 118 |
if err != nil { |
| 119 |
return nil, err |
| 120 |
} |
| 121 |
return out, nil |
| 122 |
} |
| 123 |
|
| 124 |
func (c *osLoginServiceClient) ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) { |
| 125 |
out := new(ImportSshPublicKeyResponse) |
| 126 |
err := c.cc.Invoke(ctx, OsLoginService_ImportSshPublicKey_FullMethodName, in, out, opts...) |
| 127 |
if err != nil { |
| 128 |
return nil, err |
| 129 |
} |
| 130 |
return out, nil |
| 131 |
} |
| 132 |
|
| 133 |
func (c *osLoginServiceClient) UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) { |
| 134 |
out := new(commonpb.SshPublicKey) |
| 135 |
err := c.cc.Invoke(ctx, OsLoginService_UpdateSshPublicKey_FullMethodName, in, out, opts...) |
| 136 |
if err != nil { |
| 137 |
return nil, err |
| 138 |
} |
| 139 |
return out, nil |
| 140 |
} |
| 141 |
|
| 142 |
// OsLoginServiceServer is the server API for OsLoginService service. |
| 143 |
// All implementations should embed UnimplementedOsLoginServiceServer |
| 144 |
// for forward compatibility |
| 145 |
type OsLoginServiceServer interface { |
| 146 |
// Create an SSH public key |
| 147 |
CreateSshPublicKey(context.Context, *CreateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) |
| 148 |
// Deletes a POSIX account. |
| 149 |
DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*emptypb.Empty, error) |
| 150 |
// Deletes an SSH public key. |
| 151 |
DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*emptypb.Empty, error) |
| 152 |
// Retrieves the profile information used for logging in to a virtual machine |
| 153 |
// on Google Compute Engine. |
| 154 |
GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error) |
| 155 |
// Retrieves an SSH public key. |
| 156 |
GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*commonpb.SshPublicKey, error) |
| 157 |
// Adds an SSH public key and returns the profile information. Default POSIX |
| 158 |
// account information is set when no username and UID exist as part of the |
| 159 |
// login profile. |
| 160 |
ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error) |
| 161 |
// Updates an SSH public key and returns the profile information. This method |
| 162 |
// supports patch semantics. |
| 163 |
UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) |
| 164 |
} |
| 165 |
|
| 166 |
// UnimplementedOsLoginServiceServer should be embedded to have forward compatible implementations. |
| 167 |
type UnimplementedOsLoginServiceServer struct { |
| 168 |
} |
| 169 |
|
| 170 |
func (UnimplementedOsLoginServiceServer) CreateSshPublicKey(context.Context, *CreateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) { |
| 171 |
return nil, status.Errorf(codes.Unimplemented, "method CreateSshPublicKey not implemented") |
| 172 |
} |
| 173 |
func (UnimplementedOsLoginServiceServer) DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*emptypb.Empty, error) { |
| 174 |
return nil, status.Errorf(codes.Unimplemented, "method DeletePosixAccount not implemented") |
| 175 |
} |
| 176 |
func (UnimplementedOsLoginServiceServer) DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*emptypb.Empty, error) { |
| 177 |
return nil, status.Errorf(codes.Unimplemented, "method DeleteSshPublicKey not implemented") |
| 178 |
} |
| 179 |
func (UnimplementedOsLoginServiceServer) GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error) { |
| 180 |
return nil, status.Errorf(codes.Unimplemented, "method GetLoginProfile not implemented") |
| 181 |
} |
| 182 |
func (UnimplementedOsLoginServiceServer) GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*commonpb.SshPublicKey, error) { |
| 183 |
return nil, status.Errorf(codes.Unimplemented, "method GetSshPublicKey not implemented") |
| 184 |
} |
| 185 |
func (UnimplementedOsLoginServiceServer) ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error) { |
| 186 |
return nil, status.Errorf(codes.Unimplemented, "method ImportSshPublicKey not implemented") |
| 187 |
} |
| 188 |
func (UnimplementedOsLoginServiceServer) UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) { |
| 189 |
return nil, status.Errorf(codes.Unimplemented, "method UpdateSshPublicKey not implemented") |
| 190 |
} |
| 191 |
|
| 192 |
// UnsafeOsLoginServiceServer may be embedded to opt out of forward compatibility for this service. |
| 193 |
// Use of this interface is not recommended, as added methods to OsLoginServiceServer will |
| 194 |
// result in compilation errors. |
| 195 |
type UnsafeOsLoginServiceServer interface { |
| 196 |
mustEmbedUnimplementedOsLoginServiceServer() |
| 197 |
} |
| 198 |
|
| 199 |
func RegisterOsLoginServiceServer(s grpc.ServiceRegistrar, srv OsLoginServiceServer) { |
| 200 |
s.RegisterService(&OsLoginService_ServiceDesc, srv) |
| 201 |
} |
| 202 |
|
| 203 |
func _OsLoginService_CreateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 204 |
in := new(CreateSshPublicKeyRequest) |
| 205 |
if err := dec(in); err != nil { |
| 206 |
return nil, err |
| 207 |
} |
| 208 |
if interceptor == nil { |
| 209 |
return srv.(OsLoginServiceServer).CreateSshPublicKey(ctx, in) |
| 210 |
} |
| 211 |
info := &grpc.UnaryServerInfo{ |
| 212 |
Server: srv, |
| 213 |
FullMethod: OsLoginService_CreateSshPublicKey_FullMethodName, |
| 214 |
} |
| 215 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 216 |
return srv.(OsLoginServiceServer).CreateSshPublicKey(ctx, req.(*CreateSshPublicKeyRequest)) |
| 217 |
} |
| 218 |
return interceptor(ctx, in, info, handler) |
| 219 |
} |
| 220 |
|
| 221 |
func _OsLoginService_DeletePosixAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 222 |
in := new(DeletePosixAccountRequest) |
| 223 |
if err := dec(in); err != nil { |
| 224 |
return nil, err |
| 225 |
} |
| 226 |
if interceptor == nil { |
| 227 |
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, in) |
| 228 |
} |
| 229 |
info := &grpc.UnaryServerInfo{ |
| 230 |
Server: srv, |
| 231 |
FullMethod: OsLoginService_DeletePosixAccount_FullMethodName, |
| 232 |
} |
| 233 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 234 |
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, req.(*DeletePosixAccountRequest)) |
| 235 |
} |
| 236 |
return interceptor(ctx, in, info, handler) |
| 237 |
} |
| 238 |
|
| 239 |
func _OsLoginService_DeleteSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 240 |
in := new(DeleteSshPublicKeyRequest) |
| 241 |
if err := dec(in); err != nil { |
| 242 |
return nil, err |
| 243 |
} |
| 244 |
if interceptor == nil { |
| 245 |
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, in) |
| 246 |
} |
| 247 |
info := &grpc.UnaryServerInfo{ |
| 248 |
Server: srv, |
| 249 |
FullMethod: OsLoginService_DeleteSshPublicKey_FullMethodName, |
| 250 |
} |
| 251 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 252 |
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, req.(*DeleteSshPublicKeyRequest)) |
| 253 |
} |
| 254 |
return interceptor(ctx, in, info, handler) |
| 255 |
} |
| 256 |
|
| 257 |
func _OsLoginService_GetLoginProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 258 |
in := new(GetLoginProfileRequest) |
| 259 |
if err := dec(in); err != nil { |
| 260 |
return nil, err |
| 261 |
} |
| 262 |
if interceptor == nil { |
| 263 |
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, in) |
| 264 |
} |
| 265 |
info := &grpc.UnaryServerInfo{ |
| 266 |
Server: srv, |
| 267 |
FullMethod: OsLoginService_GetLoginProfile_FullMethodName, |
| 268 |
} |
| 269 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 270 |
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, req.(*GetLoginProfileRequest)) |
| 271 |
} |
| 272 |
return interceptor(ctx, in, info, handler) |
| 273 |
} |
| 274 |
|
| 275 |
func _OsLoginService_GetSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 276 |
in := new(GetSshPublicKeyRequest) |
| 277 |
if err := dec(in); err != nil { |
| 278 |
return nil, err |
| 279 |
} |
| 280 |
if interceptor == nil { |
| 281 |
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, in) |
| 282 |
} |
| 283 |
info := &grpc.UnaryServerInfo{ |
| 284 |
Server: srv, |
| 285 |
FullMethod: OsLoginService_GetSshPublicKey_FullMethodName, |
| 286 |
} |
| 287 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 288 |
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, req.(*GetSshPublicKeyRequest)) |
| 289 |
} |
| 290 |
return interceptor(ctx, in, info, handler) |
| 291 |
} |
| 292 |
|
| 293 |
func _OsLoginService_ImportSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 294 |
in := new(ImportSshPublicKeyRequest) |
| 295 |
if err := dec(in); err != nil { |
| 296 |
return nil, err |
| 297 |
} |
| 298 |
if interceptor == nil { |
| 299 |
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, in) |
| 300 |
} |
| 301 |
info := &grpc.UnaryServerInfo{ |
| 302 |
Server: srv, |
| 303 |
FullMethod: OsLoginService_ImportSshPublicKey_FullMethodName, |
| 304 |
} |
| 305 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 306 |
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, req.(*ImportSshPublicKeyRequest)) |
| 307 |
} |
| 308 |
return interceptor(ctx, in, info, handler) |
| 309 |
} |
| 310 |
|
| 311 |
func _OsLoginService_UpdateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 312 |
in := new(UpdateSshPublicKeyRequest) |
| 313 |
if err := dec(in); err != nil { |
| 314 |
return nil, err |
| 315 |
} |
| 316 |
if interceptor == nil { |
| 317 |
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, in) |
| 318 |
} |
| 319 |
info := &grpc.UnaryServerInfo{ |
| 320 |
Server: srv, |
| 321 |
FullMethod: OsLoginService_UpdateSshPublicKey_FullMethodName, |
| 322 |
} |
| 323 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 324 |
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, req.(*UpdateSshPublicKeyRequest)) |
| 325 |
} |
| 326 |
return interceptor(ctx, in, info, handler) |
| 327 |
} |
| 328 |
|
| 329 |
// OsLoginService_ServiceDesc is the grpc.ServiceDesc for OsLoginService service. |
| 330 |
// It's only intended for direct use with grpc.RegisterService, |
| 331 |
// and not to be introspected or modified (even as a copy) |
| 332 |
var OsLoginService_ServiceDesc = grpc.ServiceDesc{ |
| 333 |
ServiceName: "google.cloud.oslogin.v1.OsLoginService", |
| 334 |
HandlerType: (*OsLoginServiceServer)(nil), |
| 335 |
Methods: []grpc.MethodDesc{ |
| 336 |
{ |
| 337 |
MethodName: "CreateSshPublicKey", |
| 338 |
Handler: _OsLoginService_CreateSshPublicKey_Handler, |
| 339 |
}, |
| 340 |
{ |
| 341 |
MethodName: "DeletePosixAccount", |
| 342 |
Handler: _OsLoginService_DeletePosixAccount_Handler, |
| 343 |
}, |
| 344 |
{ |
| 345 |
MethodName: "DeleteSshPublicKey", |
| 346 |
Handler: _OsLoginService_DeleteSshPublicKey_Handler, |
| 347 |
}, |
| 348 |
{ |
| 349 |
MethodName: "GetLoginProfile", |
| 350 |
Handler: _OsLoginService_GetLoginProfile_Handler, |
| 351 |
}, |
| 352 |
{ |
| 353 |
MethodName: "GetSshPublicKey", |
| 354 |
Handler: _OsLoginService_GetSshPublicKey_Handler, |
| 355 |
}, |
| 356 |
{ |
| 357 |
MethodName: "ImportSshPublicKey", |
| 358 |
Handler: _OsLoginService_ImportSshPublicKey_Handler, |
| 359 |
}, |
| 360 |
{ |
| 361 |
MethodName: "UpdateSshPublicKey", |
| 362 |
Handler: _OsLoginService_UpdateSshPublicKey_Handler, |
| 363 |
}, |
| 364 |
}, |
| 365 |
Streams: []grpc.StreamDesc{}, |
| 366 |
Metadata: "google/cloud/oslogin/v1/oslogin.proto", |
| 367 |
} |