cli/azd/pkg/azdext/prompt_grpc.pb.go (365 lines of code) (raw):

// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v5.29.1 // source: prompt.proto package azdext import ( 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.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( PromptService_PromptSubscription_FullMethodName = "/azdext.PromptService/PromptSubscription" PromptService_PromptLocation_FullMethodName = "/azdext.PromptService/PromptLocation" PromptService_PromptResourceGroup_FullMethodName = "/azdext.PromptService/PromptResourceGroup" PromptService_Confirm_FullMethodName = "/azdext.PromptService/Confirm" PromptService_Prompt_FullMethodName = "/azdext.PromptService/Prompt" PromptService_Select_FullMethodName = "/azdext.PromptService/Select" PromptService_MultiSelect_FullMethodName = "/azdext.PromptService/MultiSelect" PromptService_PromptSubscriptionResource_FullMethodName = "/azdext.PromptService/PromptSubscriptionResource" PromptService_PromptResourceGroupResource_FullMethodName = "/azdext.PromptService/PromptResourceGroupResource" ) // PromptServiceClient is the client API for PromptService 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 PromptServiceClient interface { // PromptSubscription prompts the user to select a subscription. PromptSubscription(ctx context.Context, in *PromptSubscriptionRequest, opts ...grpc.CallOption) (*PromptSubscriptionResponse, error) // PromptLocation prompts the user to select a location. PromptLocation(ctx context.Context, in *PromptLocationRequest, opts ...grpc.CallOption) (*PromptLocationResponse, error) // PromptResourceGroup prompts the user to select a resource group. PromptResourceGroup(ctx context.Context, in *PromptResourceGroupRequest, opts ...grpc.CallOption) (*PromptResourceGroupResponse, error) // Confirm prompts the user to confirm an action. Confirm(ctx context.Context, in *ConfirmRequest, opts ...grpc.CallOption) (*ConfirmResponse, error) // Prompt prompts the user for text input. Prompt(ctx context.Context, in *PromptRequest, opts ...grpc.CallOption) (*PromptResponse, error) // Select prompts the user to select an option from a list. Select(ctx context.Context, in *SelectRequest, opts ...grpc.CallOption) (*SelectResponse, error) // MultiSelect prompts the user to select multiple options from a list. MultiSelect(ctx context.Context, in *MultiSelectRequest, opts ...grpc.CallOption) (*MultiSelectResponse, error) // PromptSubscriptionResource prompts the user to select a resource from a subscription. PromptSubscriptionResource(ctx context.Context, in *PromptSubscriptionResourceRequest, opts ...grpc.CallOption) (*PromptSubscriptionResourceResponse, error) // PromptResourceGroupResource prompts the user to select a resource from a resource group. PromptResourceGroupResource(ctx context.Context, in *PromptResourceGroupResourceRequest, opts ...grpc.CallOption) (*PromptResourceGroupResourceResponse, error) } type promptServiceClient struct { cc grpc.ClientConnInterface } func NewPromptServiceClient(cc grpc.ClientConnInterface) PromptServiceClient { return &promptServiceClient{cc} } func (c *promptServiceClient) PromptSubscription(ctx context.Context, in *PromptSubscriptionRequest, opts ...grpc.CallOption) (*PromptSubscriptionResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PromptSubscriptionResponse) err := c.cc.Invoke(ctx, PromptService_PromptSubscription_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) PromptLocation(ctx context.Context, in *PromptLocationRequest, opts ...grpc.CallOption) (*PromptLocationResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PromptLocationResponse) err := c.cc.Invoke(ctx, PromptService_PromptLocation_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) PromptResourceGroup(ctx context.Context, in *PromptResourceGroupRequest, opts ...grpc.CallOption) (*PromptResourceGroupResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PromptResourceGroupResponse) err := c.cc.Invoke(ctx, PromptService_PromptResourceGroup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) Confirm(ctx context.Context, in *ConfirmRequest, opts ...grpc.CallOption) (*ConfirmResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ConfirmResponse) err := c.cc.Invoke(ctx, PromptService_Confirm_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) Prompt(ctx context.Context, in *PromptRequest, opts ...grpc.CallOption) (*PromptResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PromptResponse) err := c.cc.Invoke(ctx, PromptService_Prompt_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) Select(ctx context.Context, in *SelectRequest, opts ...grpc.CallOption) (*SelectResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SelectResponse) err := c.cc.Invoke(ctx, PromptService_Select_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) MultiSelect(ctx context.Context, in *MultiSelectRequest, opts ...grpc.CallOption) (*MultiSelectResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MultiSelectResponse) err := c.cc.Invoke(ctx, PromptService_MultiSelect_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) PromptSubscriptionResource(ctx context.Context, in *PromptSubscriptionResourceRequest, opts ...grpc.CallOption) (*PromptSubscriptionResourceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PromptSubscriptionResourceResponse) err := c.cc.Invoke(ctx, PromptService_PromptSubscriptionResource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *promptServiceClient) PromptResourceGroupResource(ctx context.Context, in *PromptResourceGroupResourceRequest, opts ...grpc.CallOption) (*PromptResourceGroupResourceResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PromptResourceGroupResourceResponse) err := c.cc.Invoke(ctx, PromptService_PromptResourceGroupResource_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // PromptServiceServer is the server API for PromptService service. // All implementations must embed UnimplementedPromptServiceServer // for forward compatibility. type PromptServiceServer interface { // PromptSubscription prompts the user to select a subscription. PromptSubscription(context.Context, *PromptSubscriptionRequest) (*PromptSubscriptionResponse, error) // PromptLocation prompts the user to select a location. PromptLocation(context.Context, *PromptLocationRequest) (*PromptLocationResponse, error) // PromptResourceGroup prompts the user to select a resource group. PromptResourceGroup(context.Context, *PromptResourceGroupRequest) (*PromptResourceGroupResponse, error) // Confirm prompts the user to confirm an action. Confirm(context.Context, *ConfirmRequest) (*ConfirmResponse, error) // Prompt prompts the user for text input. Prompt(context.Context, *PromptRequest) (*PromptResponse, error) // Select prompts the user to select an option from a list. Select(context.Context, *SelectRequest) (*SelectResponse, error) // MultiSelect prompts the user to select multiple options from a list. MultiSelect(context.Context, *MultiSelectRequest) (*MultiSelectResponse, error) // PromptSubscriptionResource prompts the user to select a resource from a subscription. PromptSubscriptionResource(context.Context, *PromptSubscriptionResourceRequest) (*PromptSubscriptionResourceResponse, error) // PromptResourceGroupResource prompts the user to select a resource from a resource group. PromptResourceGroupResource(context.Context, *PromptResourceGroupResourceRequest) (*PromptResourceGroupResourceResponse, error) mustEmbedUnimplementedPromptServiceServer() } // UnimplementedPromptServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedPromptServiceServer struct{} func (UnimplementedPromptServiceServer) PromptSubscription(context.Context, *PromptSubscriptionRequest) (*PromptSubscriptionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PromptSubscription not implemented") } func (UnimplementedPromptServiceServer) PromptLocation(context.Context, *PromptLocationRequest) (*PromptLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PromptLocation not implemented") } func (UnimplementedPromptServiceServer) PromptResourceGroup(context.Context, *PromptResourceGroupRequest) (*PromptResourceGroupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PromptResourceGroup not implemented") } func (UnimplementedPromptServiceServer) Confirm(context.Context, *ConfirmRequest) (*ConfirmResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Confirm not implemented") } func (UnimplementedPromptServiceServer) Prompt(context.Context, *PromptRequest) (*PromptResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Prompt not implemented") } func (UnimplementedPromptServiceServer) Select(context.Context, *SelectRequest) (*SelectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Select not implemented") } func (UnimplementedPromptServiceServer) MultiSelect(context.Context, *MultiSelectRequest) (*MultiSelectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MultiSelect not implemented") } func (UnimplementedPromptServiceServer) PromptSubscriptionResource(context.Context, *PromptSubscriptionResourceRequest) (*PromptSubscriptionResourceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PromptSubscriptionResource not implemented") } func (UnimplementedPromptServiceServer) PromptResourceGroupResource(context.Context, *PromptResourceGroupResourceRequest) (*PromptResourceGroupResourceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PromptResourceGroupResource not implemented") } func (UnimplementedPromptServiceServer) mustEmbedUnimplementedPromptServiceServer() {} func (UnimplementedPromptServiceServer) testEmbeddedByValue() {} // UnsafePromptServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to PromptServiceServer will // result in compilation errors. type UnsafePromptServiceServer interface { mustEmbedUnimplementedPromptServiceServer() } func RegisterPromptServiceServer(s grpc.ServiceRegistrar, srv PromptServiceServer) { // If the following call pancis, it indicates UnimplementedPromptServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&PromptService_ServiceDesc, srv) } func _PromptService_PromptSubscription_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PromptSubscriptionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).PromptSubscription(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_PromptSubscription_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).PromptSubscription(ctx, req.(*PromptSubscriptionRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_PromptLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PromptLocationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).PromptLocation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_PromptLocation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).PromptLocation(ctx, req.(*PromptLocationRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_PromptResourceGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PromptResourceGroupRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).PromptResourceGroup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_PromptResourceGroup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).PromptResourceGroup(ctx, req.(*PromptResourceGroupRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_Confirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ConfirmRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).Confirm(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_Confirm_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).Confirm(ctx, req.(*ConfirmRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_Prompt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PromptRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).Prompt(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_Prompt_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).Prompt(ctx, req.(*PromptRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_Select_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SelectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).Select(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_Select_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).Select(ctx, req.(*SelectRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_MultiSelect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MultiSelectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).MultiSelect(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_MultiSelect_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).MultiSelect(ctx, req.(*MultiSelectRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_PromptSubscriptionResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PromptSubscriptionResourceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).PromptSubscriptionResource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_PromptSubscriptionResource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).PromptSubscriptionResource(ctx, req.(*PromptSubscriptionResourceRequest)) } return interceptor(ctx, in, info, handler) } func _PromptService_PromptResourceGroupResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PromptResourceGroupResourceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(PromptServiceServer).PromptResourceGroupResource(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: PromptService_PromptResourceGroupResource_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(PromptServiceServer).PromptResourceGroupResource(ctx, req.(*PromptResourceGroupResourceRequest)) } return interceptor(ctx, in, info, handler) } // PromptService_ServiceDesc is the grpc.ServiceDesc for PromptService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var PromptService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "azdext.PromptService", HandlerType: (*PromptServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PromptSubscription", Handler: _PromptService_PromptSubscription_Handler, }, { MethodName: "PromptLocation", Handler: _PromptService_PromptLocation_Handler, }, { MethodName: "PromptResourceGroup", Handler: _PromptService_PromptResourceGroup_Handler, }, { MethodName: "Confirm", Handler: _PromptService_Confirm_Handler, }, { MethodName: "Prompt", Handler: _PromptService_Prompt_Handler, }, { MethodName: "Select", Handler: _PromptService_Select_Handler, }, { MethodName: "MultiSelect", Handler: _PromptService_MultiSelect_Handler, }, { MethodName: "PromptSubscriptionResource", Handler: _PromptService_PromptSubscriptionResource_Handler, }, { MethodName: "PromptResourceGroupResource", Handler: _PromptService_PromptResourceGroupResource_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "prompt.proto", }