github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/client/v4/phantom_time_serie/phantom_time_serie_service.pb.client.go (about)

     1  // Code generated by protoc-gen-goten-client
     2  // API: PhantomTimeSerieService
     3  // DO NOT EDIT!!!
     4  
     5  package phantom_time_serie_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  	phantom_time_serie "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/phantom_time_serie"
    17  	emptypb "google.golang.org/protobuf/types/known/emptypb"
    18  )
    19  
    20  // Reference imports to suppress errors if they are not otherwise used.
    21  var (
    22  	_ = protoimpl.DescBuilder{}
    23  	_ = new(context.Context)
    24  	_ = grpc.ClientConn{}
    25  )
    26  
    27  // make sure we're using proto imports
    28  var (
    29  	_ = &phantom_time_serie.PhantomTimeSerie{}
    30  	_ = &emptypb.Empty{}
    31  )
    32  
    33  // This is a compile-time assertion to ensure that this generated file
    34  // is compatible with the proto package it is being compiled against.
    35  // A compilation error at this line likely means your copy of the
    36  // proto package needs to be updated.
    37  const (
    38  	// Verify that this generated code is sufficiently up-to-date.
    39  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    40  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    41  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    42  )
    43  
    44  // This is a compile-time assertion to ensure that this generated file
    45  // is compatible with the grpc package it is being compiled against.
    46  const _ = grpc.SupportPackageIsVersion6
    47  
    48  // PhantomTimeSerieServiceClient is the client API for PhantomTimeSerieService.
    49  //
    50  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
    51  type PhantomTimeSerieServiceClient interface {
    52  	GetPhantomTimeSerie(ctx context.Context, in *GetPhantomTimeSerieRequest, opts ...grpc.CallOption) (*phantom_time_serie.PhantomTimeSerie, error)
    53  	BatchGetPhantomTimeSeries(ctx context.Context, in *BatchGetPhantomTimeSeriesRequest, opts ...grpc.CallOption) (*BatchGetPhantomTimeSeriesResponse, error)
    54  	ListPhantomTimeSeries(ctx context.Context, in *ListPhantomTimeSeriesRequest, opts ...grpc.CallOption) (*ListPhantomTimeSeriesResponse, error)
    55  	WatchPhantomTimeSerie(ctx context.Context, in *WatchPhantomTimeSerieRequest, opts ...grpc.CallOption) (WatchPhantomTimeSerieClientStream, error)
    56  	WatchPhantomTimeSeries(ctx context.Context, in *WatchPhantomTimeSeriesRequest, opts ...grpc.CallOption) (WatchPhantomTimeSeriesClientStream, error)
    57  	CreatePhantomTimeSerie(ctx context.Context, in *CreatePhantomTimeSerieRequest, opts ...grpc.CallOption) (*phantom_time_serie.PhantomTimeSerie, error)
    58  	UpdatePhantomTimeSerie(ctx context.Context, in *UpdatePhantomTimeSerieRequest, opts ...grpc.CallOption) (*phantom_time_serie.PhantomTimeSerie, error)
    59  	DeletePhantomTimeSerie(ctx context.Context, in *DeletePhantomTimeSerieRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
    60  }
    61  
    62  type client struct {
    63  	cc grpc.ClientConnInterface
    64  }
    65  
    66  func NewPhantomTimeSerieServiceClient(cc grpc.ClientConnInterface) PhantomTimeSerieServiceClient {
    67  	return &client{cc}
    68  }
    69  
    70  func (c *client) GetPhantomTimeSerie(ctx context.Context, in *GetPhantomTimeSerieRequest, opts ...grpc.CallOption) (*phantom_time_serie.PhantomTimeSerie, error) {
    71  	out := new(phantom_time_serie.PhantomTimeSerie)
    72  	err := c.cc.Invoke(ctx, "/ntt.monitoring.v4.PhantomTimeSerieService/GetPhantomTimeSerie", in, out, opts...)
    73  	if err != nil {
    74  		return nil, err
    75  	}
    76  	return out, nil
    77  }
    78  
    79  func (c *client) BatchGetPhantomTimeSeries(ctx context.Context, in *BatchGetPhantomTimeSeriesRequest, opts ...grpc.CallOption) (*BatchGetPhantomTimeSeriesResponse, error) {
    80  	out := new(BatchGetPhantomTimeSeriesResponse)
    81  	err := c.cc.Invoke(ctx, "/ntt.monitoring.v4.PhantomTimeSerieService/BatchGetPhantomTimeSeries", in, out, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return out, nil
    86  }
    87  
    88  func (c *client) ListPhantomTimeSeries(ctx context.Context, in *ListPhantomTimeSeriesRequest, opts ...grpc.CallOption) (*ListPhantomTimeSeriesResponse, error) {
    89  	out := new(ListPhantomTimeSeriesResponse)
    90  	err := c.cc.Invoke(ctx, "/ntt.monitoring.v4.PhantomTimeSerieService/ListPhantomTimeSeries", in, out, opts...)
    91  	if err != nil {
    92  		return nil, err
    93  	}
    94  	return out, nil
    95  }
    96  
    97  func (c *client) WatchPhantomTimeSerie(ctx context.Context, in *WatchPhantomTimeSerieRequest, opts ...grpc.CallOption) (WatchPhantomTimeSerieClientStream, error) {
    98  	stream, err := c.cc.NewStream(ctx,
    99  		&grpc.StreamDesc{
   100  			StreamName:    "WatchPhantomTimeSerie",
   101  			ServerStreams: true,
   102  		},
   103  		"/ntt.monitoring.v4.PhantomTimeSerieService/WatchPhantomTimeSerie", opts...)
   104  	if err != nil {
   105  		return nil, err
   106  	}
   107  	x := &watchPhantomTimeSerieWatchPhantomTimeSerieClient{stream}
   108  	if err := x.ClientStream.SendMsg(in); err != nil {
   109  		return nil, err
   110  	}
   111  	if err := x.ClientStream.CloseSend(); err != nil {
   112  		return nil, err
   113  	}
   114  	return x, nil
   115  }
   116  
   117  type WatchPhantomTimeSerieClientStream interface {
   118  	Recv() (*WatchPhantomTimeSerieResponse, error)
   119  	grpc.ClientStream
   120  }
   121  
   122  type watchPhantomTimeSerieWatchPhantomTimeSerieClient struct {
   123  	grpc.ClientStream
   124  }
   125  
   126  func (x *watchPhantomTimeSerieWatchPhantomTimeSerieClient) Recv() (*WatchPhantomTimeSerieResponse, error) {
   127  	m := new(WatchPhantomTimeSerieResponse)
   128  	if err := x.ClientStream.RecvMsg(m); err != nil {
   129  		return nil, err
   130  	}
   131  	return m, nil
   132  }
   133  
   134  func (c *client) WatchPhantomTimeSeries(ctx context.Context, in *WatchPhantomTimeSeriesRequest, opts ...grpc.CallOption) (WatchPhantomTimeSeriesClientStream, error) {
   135  	stream, err := c.cc.NewStream(ctx,
   136  		&grpc.StreamDesc{
   137  			StreamName:    "WatchPhantomTimeSeries",
   138  			ServerStreams: true,
   139  		},
   140  		"/ntt.monitoring.v4.PhantomTimeSerieService/WatchPhantomTimeSeries", opts...)
   141  	if err != nil {
   142  		return nil, err
   143  	}
   144  	x := &watchPhantomTimeSeriesWatchPhantomTimeSeriesClient{stream}
   145  	if err := x.ClientStream.SendMsg(in); err != nil {
   146  		return nil, err
   147  	}
   148  	if err := x.ClientStream.CloseSend(); err != nil {
   149  		return nil, err
   150  	}
   151  	return x, nil
   152  }
   153  
   154  type WatchPhantomTimeSeriesClientStream interface {
   155  	Recv() (*WatchPhantomTimeSeriesResponse, error)
   156  	grpc.ClientStream
   157  }
   158  
   159  type watchPhantomTimeSeriesWatchPhantomTimeSeriesClient struct {
   160  	grpc.ClientStream
   161  }
   162  
   163  func (x *watchPhantomTimeSeriesWatchPhantomTimeSeriesClient) Recv() (*WatchPhantomTimeSeriesResponse, error) {
   164  	m := new(WatchPhantomTimeSeriesResponse)
   165  	if err := x.ClientStream.RecvMsg(m); err != nil {
   166  		return nil, err
   167  	}
   168  	return m, nil
   169  }
   170  
   171  func (c *client) CreatePhantomTimeSerie(ctx context.Context, in *CreatePhantomTimeSerieRequest, opts ...grpc.CallOption) (*phantom_time_serie.PhantomTimeSerie, error) {
   172  	out := new(phantom_time_serie.PhantomTimeSerie)
   173  	err := c.cc.Invoke(ctx, "/ntt.monitoring.v4.PhantomTimeSerieService/CreatePhantomTimeSerie", in, out, opts...)
   174  	if err != nil {
   175  		return nil, err
   176  	}
   177  	return out, nil
   178  }
   179  
   180  func (c *client) UpdatePhantomTimeSerie(ctx context.Context, in *UpdatePhantomTimeSerieRequest, opts ...grpc.CallOption) (*phantom_time_serie.PhantomTimeSerie, error) {
   181  	out := new(phantom_time_serie.PhantomTimeSerie)
   182  	err := c.cc.Invoke(ctx, "/ntt.monitoring.v4.PhantomTimeSerieService/UpdatePhantomTimeSerie", in, out, opts...)
   183  	if err != nil {
   184  		return nil, err
   185  	}
   186  	return out, nil
   187  }
   188  
   189  func (c *client) DeletePhantomTimeSerie(ctx context.Context, in *DeletePhantomTimeSerieRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
   190  	out := new(emptypb.Empty)
   191  	err := c.cc.Invoke(ctx, "/ntt.monitoring.v4.PhantomTimeSerieService/DeletePhantomTimeSerie", in, out, opts...)
   192  	if err != nil {
   193  		return nil, err
   194  	}
   195  	return out, nil
   196  }