github.com/cloudwan/edgelq-sdk@v1.15.4/devices/client/v1/ztp_provision_hardware/ztp_provision_hardware_service.pb.client.go (about)

     1  // Code generated by protoc-gen-goten-client
     2  // API: ZtpProvisionHardwareService
     3  // DO NOT EDIT!!!
     4  
     5  package ztp_provision_hardware_client
     6  
     7  import (
     8  	"context"
     9  
    10  	"google.golang.org/grpc"
    11  	"google.golang.org/protobuf/runtime/protoimpl"
    12  )
    13  
    14  // proto imports
    15  import ()
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var (
    19  	_ = protoimpl.DescBuilder{}
    20  	_ = new(context.Context)
    21  	_ = grpc.ClientConn{}
    22  )
    23  
    24  // make sure we're using proto imports
    25  var ()
    26  
    27  // This is a compile-time assertion to ensure that this generated file
    28  // is compatible with the proto package it is being compiled against.
    29  // A compilation error at this line likely means your copy of the
    30  // proto package needs to be updated.
    31  const (
    32  	// Verify that this generated code is sufficiently up-to-date.
    33  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    34  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    35  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    36  )
    37  
    38  // This is a compile-time assertion to ensure that this generated file
    39  // is compatible with the grpc package it is being compiled against.
    40  const _ = grpc.SupportPackageIsVersion6
    41  
    42  // ZtpProvisionHardwareServiceClient is the client API for ZtpProvisionHardwareService.
    43  //
    44  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
    45  type ZtpProvisionHardwareServiceClient interface {
    46  	ProvisionHardware(ctx context.Context, opts ...grpc.CallOption) (ProvisionHardwareClientStream, error)
    47  }
    48  
    49  type client struct {
    50  	cc grpc.ClientConnInterface
    51  }
    52  
    53  func NewZtpProvisionHardwareServiceClient(cc grpc.ClientConnInterface) ZtpProvisionHardwareServiceClient {
    54  	return &client{cc}
    55  }
    56  
    57  func (c *client) ProvisionHardware(ctx context.Context, opts ...grpc.CallOption) (ProvisionHardwareClientStream, error) {
    58  	stream, err := c.cc.NewStream(ctx,
    59  		&grpc.StreamDesc{
    60  			StreamName:    "ProvisionHardware",
    61  			ServerStreams: true,
    62  			ClientStreams: true,
    63  		},
    64  		"/ntt.devices.v1.ZtpProvisionHardwareService/ProvisionHardware", opts...)
    65  	if err != nil {
    66  		return nil, err
    67  	}
    68  	x := &provisionHardwareProvisionHardwareClient{stream}
    69  	return x, nil
    70  }
    71  
    72  type ProvisionHardwareClientStream interface {
    73  	Send(*ProvisionHardwareRequest) error
    74  	Recv() (*ProvisionHardwareResponse, error)
    75  	grpc.ClientStream
    76  }
    77  
    78  type provisionHardwareProvisionHardwareClient struct {
    79  	grpc.ClientStream
    80  }
    81  
    82  func (x *provisionHardwareProvisionHardwareClient) Send(m *ProvisionHardwareRequest) error {
    83  	return x.ClientStream.SendMsg(m)
    84  }
    85  
    86  func (x *provisionHardwareProvisionHardwareClient) Recv() (*ProvisionHardwareResponse, error) {
    87  	m := new(ProvisionHardwareResponse)
    88  	if err := x.ClientStream.RecvMsg(m); err != nil {
    89  		return nil, err
    90  	}
    91  	return m, nil
    92  }