github.com/cloudwan/edgelq-sdk@v1.15.4/cellular-api/client/v1/sim_card/sim_card_service.pb.client.go (about) 1 // Code generated by protoc-gen-goten-client 2 // API: SimCardService 3 // DO NOT EDIT!!! 4 5 package sim_card_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 sim_card "github.com/cloudwan/edgelq-sdk/cellular-api/resources/v1/sim_card" 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 _ = &sim_card.SimCard{} 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 // SimCardServiceClient is the client API for SimCardService. 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 SimCardServiceClient interface { 52 GetSimCard(ctx context.Context, in *GetSimCardRequest, opts ...grpc.CallOption) (*sim_card.SimCard, error) 53 BatchGetSimCards(ctx context.Context, in *BatchGetSimCardsRequest, opts ...grpc.CallOption) (*BatchGetSimCardsResponse, error) 54 ListSimCards(ctx context.Context, in *ListSimCardsRequest, opts ...grpc.CallOption) (*ListSimCardsResponse, error) 55 WatchSimCard(ctx context.Context, in *WatchSimCardRequest, opts ...grpc.CallOption) (WatchSimCardClientStream, error) 56 WatchSimCards(ctx context.Context, in *WatchSimCardsRequest, opts ...grpc.CallOption) (WatchSimCardsClientStream, error) 57 CreateSimCard(ctx context.Context, in *CreateSimCardRequest, opts ...grpc.CallOption) (*sim_card.SimCard, error) 58 UpdateSimCard(ctx context.Context, in *UpdateSimCardRequest, opts ...grpc.CallOption) (*sim_card.SimCard, error) 59 DeleteSimCard(ctx context.Context, in *DeleteSimCardRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 60 Activate(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 61 Suspend(ctx context.Context, in *SuspendRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 62 Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 63 Reactivate(ctx context.Context, in *ReactivateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 64 } 65 66 type client struct { 67 cc grpc.ClientConnInterface 68 } 69 70 func NewSimCardServiceClient(cc grpc.ClientConnInterface) SimCardServiceClient { 71 return &client{cc} 72 } 73 74 func (c *client) GetSimCard(ctx context.Context, in *GetSimCardRequest, opts ...grpc.CallOption) (*sim_card.SimCard, error) { 75 out := new(sim_card.SimCard) 76 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/GetSimCard", in, out, opts...) 77 if err != nil { 78 return nil, err 79 } 80 return out, nil 81 } 82 83 func (c *client) BatchGetSimCards(ctx context.Context, in *BatchGetSimCardsRequest, opts ...grpc.CallOption) (*BatchGetSimCardsResponse, error) { 84 out := new(BatchGetSimCardsResponse) 85 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/BatchGetSimCards", in, out, opts...) 86 if err != nil { 87 return nil, err 88 } 89 return out, nil 90 } 91 92 func (c *client) ListSimCards(ctx context.Context, in *ListSimCardsRequest, opts ...grpc.CallOption) (*ListSimCardsResponse, error) { 93 out := new(ListSimCardsResponse) 94 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/ListSimCards", in, out, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return out, nil 99 } 100 101 func (c *client) WatchSimCard(ctx context.Context, in *WatchSimCardRequest, opts ...grpc.CallOption) (WatchSimCardClientStream, error) { 102 stream, err := c.cc.NewStream(ctx, 103 &grpc.StreamDesc{ 104 StreamName: "WatchSimCard", 105 ServerStreams: true, 106 }, 107 "/ntt.cellular_api.v1.SimCardService/WatchSimCard", opts...) 108 if err != nil { 109 return nil, err 110 } 111 x := &watchSimCardWatchSimCardClient{stream} 112 if err := x.ClientStream.SendMsg(in); err != nil { 113 return nil, err 114 } 115 if err := x.ClientStream.CloseSend(); err != nil { 116 return nil, err 117 } 118 return x, nil 119 } 120 121 type WatchSimCardClientStream interface { 122 Recv() (*WatchSimCardResponse, error) 123 grpc.ClientStream 124 } 125 126 type watchSimCardWatchSimCardClient struct { 127 grpc.ClientStream 128 } 129 130 func (x *watchSimCardWatchSimCardClient) Recv() (*WatchSimCardResponse, error) { 131 m := new(WatchSimCardResponse) 132 if err := x.ClientStream.RecvMsg(m); err != nil { 133 return nil, err 134 } 135 return m, nil 136 } 137 138 func (c *client) WatchSimCards(ctx context.Context, in *WatchSimCardsRequest, opts ...grpc.CallOption) (WatchSimCardsClientStream, error) { 139 stream, err := c.cc.NewStream(ctx, 140 &grpc.StreamDesc{ 141 StreamName: "WatchSimCards", 142 ServerStreams: true, 143 }, 144 "/ntt.cellular_api.v1.SimCardService/WatchSimCards", opts...) 145 if err != nil { 146 return nil, err 147 } 148 x := &watchSimCardsWatchSimCardsClient{stream} 149 if err := x.ClientStream.SendMsg(in); err != nil { 150 return nil, err 151 } 152 if err := x.ClientStream.CloseSend(); err != nil { 153 return nil, err 154 } 155 return x, nil 156 } 157 158 type WatchSimCardsClientStream interface { 159 Recv() (*WatchSimCardsResponse, error) 160 grpc.ClientStream 161 } 162 163 type watchSimCardsWatchSimCardsClient struct { 164 grpc.ClientStream 165 } 166 167 func (x *watchSimCardsWatchSimCardsClient) Recv() (*WatchSimCardsResponse, error) { 168 m := new(WatchSimCardsResponse) 169 if err := x.ClientStream.RecvMsg(m); err != nil { 170 return nil, err 171 } 172 return m, nil 173 } 174 175 func (c *client) CreateSimCard(ctx context.Context, in *CreateSimCardRequest, opts ...grpc.CallOption) (*sim_card.SimCard, error) { 176 out := new(sim_card.SimCard) 177 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/CreateSimCard", in, out, opts...) 178 if err != nil { 179 return nil, err 180 } 181 return out, nil 182 } 183 184 func (c *client) UpdateSimCard(ctx context.Context, in *UpdateSimCardRequest, opts ...grpc.CallOption) (*sim_card.SimCard, error) { 185 out := new(sim_card.SimCard) 186 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/UpdateSimCard", in, out, opts...) 187 if err != nil { 188 return nil, err 189 } 190 return out, nil 191 } 192 193 func (c *client) DeleteSimCard(ctx context.Context, in *DeleteSimCardRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 194 out := new(emptypb.Empty) 195 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/DeleteSimCard", in, out, opts...) 196 if err != nil { 197 return nil, err 198 } 199 return out, nil 200 } 201 202 func (c *client) Activate(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 203 out := new(emptypb.Empty) 204 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/Activate", in, out, opts...) 205 if err != nil { 206 return nil, err 207 } 208 return out, nil 209 } 210 211 func (c *client) Suspend(ctx context.Context, in *SuspendRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 212 out := new(emptypb.Empty) 213 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/Suspend", in, out, opts...) 214 if err != nil { 215 return nil, err 216 } 217 return out, nil 218 } 219 220 func (c *client) Terminate(ctx context.Context, in *TerminateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 221 out := new(emptypb.Empty) 222 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/Terminate", in, out, opts...) 223 if err != nil { 224 return nil, err 225 } 226 return out, nil 227 } 228 229 func (c *client) Reactivate(ctx context.Context, in *ReactivateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 230 out := new(emptypb.Empty) 231 err := c.cc.Invoke(ctx, "/ntt.cellular_api.v1.SimCardService/Reactivate", in, out, opts...) 232 if err != nil { 233 return nil, err 234 } 235 return out, nil 236 }