// 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/oslogin/v1/oslogin.proto package osloginpb import ( commonpb "cloud.google.com/go/oslogin/common/commonpb" context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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 ( OsLoginService_CreateSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/CreateSshPublicKey" OsLoginService_DeletePosixAccount_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/DeletePosixAccount" OsLoginService_DeleteSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/DeleteSshPublicKey" OsLoginService_GetLoginProfile_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/GetLoginProfile" OsLoginService_GetSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/GetSshPublicKey" OsLoginService_ImportSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/ImportSshPublicKey" OsLoginService_UpdateSshPublicKey_FullMethodName = "/google.cloud.oslogin.v1.OsLoginService/UpdateSshPublicKey" ) // OsLoginServiceClient is the client API for OsLoginService 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 OsLoginServiceClient interface { // Create an SSH public key CreateSshPublicKey(ctx context.Context, in *CreateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) // Deletes a POSIX account. DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Deletes an SSH public key. DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Retrieves the profile information used for logging in to a virtual machine // on Google Compute Engine. GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) // Retrieves an SSH public key. GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) // Adds an SSH public key and returns the profile information. Default POSIX // account information is set when no username and UID exist as part of the // login profile. ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) // Updates an SSH public key and returns the profile information. This method // supports patch semantics. UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) } type osLoginServiceClient struct { cc grpc.ClientConnInterface } func NewOsLoginServiceClient(cc grpc.ClientConnInterface) OsLoginServiceClient { return &osLoginServiceClient{cc} } func (c *osLoginServiceClient) CreateSshPublicKey(ctx context.Context, in *CreateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) { out := new(commonpb.SshPublicKey) err := c.cc.Invoke(ctx, OsLoginService_CreateSshPublicKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *osLoginServiceClient) DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, OsLoginService_DeletePosixAccount_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *osLoginServiceClient) DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, OsLoginService_DeleteSshPublicKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *osLoginServiceClient) GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) { out := new(LoginProfile) err := c.cc.Invoke(ctx, OsLoginService_GetLoginProfile_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *osLoginServiceClient) GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) { out := new(commonpb.SshPublicKey) err := c.cc.Invoke(ctx, OsLoginService_GetSshPublicKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *osLoginServiceClient) ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) { out := new(ImportSshPublicKeyResponse) err := c.cc.Invoke(ctx, OsLoginService_ImportSshPublicKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *osLoginServiceClient) UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*commonpb.SshPublicKey, error) { out := new(commonpb.SshPublicKey) err := c.cc.Invoke(ctx, OsLoginService_UpdateSshPublicKey_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // OsLoginServiceServer is the server API for OsLoginService service. // All implementations should embed UnimplementedOsLoginServiceServer // for forward compatibility type OsLoginServiceServer interface { // Create an SSH public key CreateSshPublicKey(context.Context, *CreateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) // Deletes a POSIX account. DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*emptypb.Empty, error) // Deletes an SSH public key. DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*emptypb.Empty, error) // Retrieves the profile information used for logging in to a virtual machine // on Google Compute Engine. GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error) // Retrieves an SSH public key. GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*commonpb.SshPublicKey, error) // Adds an SSH public key and returns the profile information. Default POSIX // account information is set when no username and UID exist as part of the // login profile. ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error) // Updates an SSH public key and returns the profile information. This method // supports patch semantics. UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) } // UnimplementedOsLoginServiceServer should be embedded to have forward compatible implementations. type UnimplementedOsLoginServiceServer struct { } func (UnimplementedOsLoginServiceServer) CreateSshPublicKey(context.Context, *CreateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateSshPublicKey not implemented") } func (UnimplementedOsLoginServiceServer) DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeletePosixAccount not implemented") } func (UnimplementedOsLoginServiceServer) DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteSshPublicKey not implemented") } func (UnimplementedOsLoginServiceServer) GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLoginProfile not implemented") } func (UnimplementedOsLoginServiceServer) GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*commonpb.SshPublicKey, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSshPublicKey not implemented") } func (UnimplementedOsLoginServiceServer) ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ImportSshPublicKey not implemented") } func (UnimplementedOsLoginServiceServer) UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*commonpb.SshPublicKey, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSshPublicKey not implemented") } // UnsafeOsLoginServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to OsLoginServiceServer will // result in compilation errors. type UnsafeOsLoginServiceServer interface { mustEmbedUnimplementedOsLoginServiceServer() } func RegisterOsLoginServiceServer(s grpc.ServiceRegistrar, srv OsLoginServiceServer) { s.RegisterService(&OsLoginService_ServiceDesc, srv) } func _OsLoginService_CreateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateSshPublicKeyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OsLoginServiceServer).CreateSshPublicKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OsLoginService_CreateSshPublicKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OsLoginServiceServer).CreateSshPublicKey(ctx, req.(*CreateSshPublicKeyRequest)) } return interceptor(ctx, in, info, handler) } func _OsLoginService_DeletePosixAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeletePosixAccountRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OsLoginService_DeletePosixAccount_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, req.(*DeletePosixAccountRequest)) } return interceptor(ctx, in, info, handler) } func _OsLoginService_DeleteSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteSshPublicKeyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OsLoginService_DeleteSshPublicKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, req.(*DeleteSshPublicKeyRequest)) } return interceptor(ctx, in, info, handler) } func _OsLoginService_GetLoginProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetLoginProfileRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OsLoginServiceServer).GetLoginProfile(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OsLoginService_GetLoginProfile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OsLoginServiceServer).GetLoginProfile(ctx, req.(*GetLoginProfileRequest)) } return interceptor(ctx, in, info, handler) } func _OsLoginService_GetSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSshPublicKeyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OsLoginService_GetSshPublicKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, req.(*GetSshPublicKeyRequest)) } return interceptor(ctx, in, info, handler) } func _OsLoginService_ImportSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ImportSshPublicKeyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OsLoginService_ImportSshPublicKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, req.(*ImportSshPublicKeyRequest)) } return interceptor(ctx, in, info, handler) } func _OsLoginService_UpdateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateSshPublicKeyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: OsLoginService_UpdateSshPublicKey_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, req.(*UpdateSshPublicKeyRequest)) } return interceptor(ctx, in, info, handler) } // OsLoginService_ServiceDesc is the grpc.ServiceDesc for OsLoginService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var OsLoginService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.oslogin.v1.OsLoginService", HandlerType: (*OsLoginServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateSshPublicKey", Handler: _OsLoginService_CreateSshPublicKey_Handler, }, { MethodName: "DeletePosixAccount", Handler: _OsLoginService_DeletePosixAccount_Handler, }, { MethodName: "DeleteSshPublicKey", Handler: _OsLoginService_DeleteSshPublicKey_Handler, }, { MethodName: "GetLoginProfile", Handler: _OsLoginService_GetLoginProfile_Handler, }, { MethodName: "GetSshPublicKey", Handler: _OsLoginService_GetSshPublicKey_Handler, }, { MethodName: "ImportSshPublicKey", Handler: _OsLoginService_ImportSshPublicKey_Handler, }, { MethodName: "UpdateSshPublicKey", Handler: _OsLoginService_UpdateSshPublicKey_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/oslogin/v1/oslogin.proto", }