github.com/microsoft/moc@v0.17.1/rpc/ipamagent/moc_ipaddress_ipaddress.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: ipaddress/moc_ipaddress_ipaddress.proto 3 4 package ipamagent 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 wrappers "github.com/golang/protobuf/ptypes/wrappers" 11 common "github.com/microsoft/moc/rpc/common" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 math "math" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 28 29 type IPAddressFamily int32 30 31 const ( 32 IPAddressFamily_IPV4 IPAddressFamily = 0 33 IPAddressFamily_IPV6 IPAddressFamily = 1 34 ) 35 36 var IPAddressFamily_name = map[int32]string{ 37 0: "IPV4", 38 1: "IPV6", 39 } 40 41 var IPAddressFamily_value = map[string]int32{ 42 "IPV4": 0, 43 "IPV6": 1, 44 } 45 46 func (x IPAddressFamily) String() string { 47 return proto.EnumName(IPAddressFamily_name, int32(x)) 48 } 49 50 func (IPAddressFamily) EnumDescriptor() ([]byte, []int) { 51 return fileDescriptor_be2c955786c58534, []int{0} 52 } 53 54 type IPAddressRequest struct { 55 IPAddresss []*IPAddress `protobuf:"bytes,1,rep,name=IPAddresss,proto3" json:"IPAddresss,omitempty"` 56 OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"` 57 XXX_NoUnkeyedLiteral struct{} `json:"-"` 58 XXX_unrecognized []byte `json:"-"` 59 XXX_sizecache int32 `json:"-"` 60 } 61 62 func (m *IPAddressRequest) Reset() { *m = IPAddressRequest{} } 63 func (m *IPAddressRequest) String() string { return proto.CompactTextString(m) } 64 func (*IPAddressRequest) ProtoMessage() {} 65 func (*IPAddressRequest) Descriptor() ([]byte, []int) { 66 return fileDescriptor_be2c955786c58534, []int{0} 67 } 68 69 func (m *IPAddressRequest) XXX_Unmarshal(b []byte) error { 70 return xxx_messageInfo_IPAddressRequest.Unmarshal(m, b) 71 } 72 func (m *IPAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 73 return xxx_messageInfo_IPAddressRequest.Marshal(b, m, deterministic) 74 } 75 func (m *IPAddressRequest) XXX_Merge(src proto.Message) { 76 xxx_messageInfo_IPAddressRequest.Merge(m, src) 77 } 78 func (m *IPAddressRequest) XXX_Size() int { 79 return xxx_messageInfo_IPAddressRequest.Size(m) 80 } 81 func (m *IPAddressRequest) XXX_DiscardUnknown() { 82 xxx_messageInfo_IPAddressRequest.DiscardUnknown(m) 83 } 84 85 var xxx_messageInfo_IPAddressRequest proto.InternalMessageInfo 86 87 func (m *IPAddressRequest) GetIPAddresss() []*IPAddress { 88 if m != nil { 89 return m.IPAddresss 90 } 91 return nil 92 } 93 94 func (m *IPAddressRequest) GetOperationType() common.Operation { 95 if m != nil { 96 return m.OperationType 97 } 98 return common.Operation_GET 99 } 100 101 type IPAddressResponse struct { 102 IPAddresss []*IPAddress `protobuf:"bytes,1,rep,name=IPAddresss,proto3" json:"IPAddresss,omitempty"` 103 Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` 104 Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` 105 XXX_NoUnkeyedLiteral struct{} `json:"-"` 106 XXX_unrecognized []byte `json:"-"` 107 XXX_sizecache int32 `json:"-"` 108 } 109 110 func (m *IPAddressResponse) Reset() { *m = IPAddressResponse{} } 111 func (m *IPAddressResponse) String() string { return proto.CompactTextString(m) } 112 func (*IPAddressResponse) ProtoMessage() {} 113 func (*IPAddressResponse) Descriptor() ([]byte, []int) { 114 return fileDescriptor_be2c955786c58534, []int{1} 115 } 116 117 func (m *IPAddressResponse) XXX_Unmarshal(b []byte) error { 118 return xxx_messageInfo_IPAddressResponse.Unmarshal(m, b) 119 } 120 func (m *IPAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 121 return xxx_messageInfo_IPAddressResponse.Marshal(b, m, deterministic) 122 } 123 func (m *IPAddressResponse) XXX_Merge(src proto.Message) { 124 xxx_messageInfo_IPAddressResponse.Merge(m, src) 125 } 126 func (m *IPAddressResponse) XXX_Size() int { 127 return xxx_messageInfo_IPAddressResponse.Size(m) 128 } 129 func (m *IPAddressResponse) XXX_DiscardUnknown() { 130 xxx_messageInfo_IPAddressResponse.DiscardUnknown(m) 131 } 132 133 var xxx_messageInfo_IPAddressResponse proto.InternalMessageInfo 134 135 func (m *IPAddressResponse) GetIPAddresss() []*IPAddress { 136 if m != nil { 137 return m.IPAddresss 138 } 139 return nil 140 } 141 142 func (m *IPAddressResponse) GetResult() *wrappers.BoolValue { 143 if m != nil { 144 return m.Result 145 } 146 return nil 147 } 148 149 func (m *IPAddressResponse) GetError() string { 150 if m != nil { 151 return m.Error 152 } 153 return "" 154 } 155 156 type IPAddress struct { 157 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 158 Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` 159 Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` 160 Cidr string `protobuf:"bytes,4,opt,name=cidr,proto3" json:"cidr,omitempty"` 161 PrefixLength int32 `protobuf:"varint,5,opt,name=prefixLength,proto3" json:"prefixLength,omitempty"` 162 Status *common.Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` 163 XXX_NoUnkeyedLiteral struct{} `json:"-"` 164 XXX_unrecognized []byte `json:"-"` 165 XXX_sizecache int32 `json:"-"` 166 } 167 168 func (m *IPAddress) Reset() { *m = IPAddress{} } 169 func (m *IPAddress) String() string { return proto.CompactTextString(m) } 170 func (*IPAddress) ProtoMessage() {} 171 func (*IPAddress) Descriptor() ([]byte, []int) { 172 return fileDescriptor_be2c955786c58534, []int{2} 173 } 174 175 func (m *IPAddress) XXX_Unmarshal(b []byte) error { 176 return xxx_messageInfo_IPAddress.Unmarshal(m, b) 177 } 178 func (m *IPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 179 return xxx_messageInfo_IPAddress.Marshal(b, m, deterministic) 180 } 181 func (m *IPAddress) XXX_Merge(src proto.Message) { 182 xxx_messageInfo_IPAddress.Merge(m, src) 183 } 184 func (m *IPAddress) XXX_Size() int { 185 return xxx_messageInfo_IPAddress.Size(m) 186 } 187 func (m *IPAddress) XXX_DiscardUnknown() { 188 xxx_messageInfo_IPAddress.DiscardUnknown(m) 189 } 190 191 var xxx_messageInfo_IPAddress proto.InternalMessageInfo 192 193 func (m *IPAddress) GetName() string { 194 if m != nil { 195 return m.Name 196 } 197 return "" 198 } 199 200 func (m *IPAddress) GetId() string { 201 if m != nil { 202 return m.Id 203 } 204 return "" 205 } 206 207 func (m *IPAddress) GetAddress() string { 208 if m != nil { 209 return m.Address 210 } 211 return "" 212 } 213 214 func (m *IPAddress) GetCidr() string { 215 if m != nil { 216 return m.Cidr 217 } 218 return "" 219 } 220 221 func (m *IPAddress) GetPrefixLength() int32 { 222 if m != nil { 223 return m.PrefixLength 224 } 225 return 0 226 } 227 228 func (m *IPAddress) GetStatus() *common.Status { 229 if m != nil { 230 return m.Status 231 } 232 return nil 233 } 234 235 func init() { 236 proto.RegisterEnum("moc.ipaddress.IPAddressFamily", IPAddressFamily_name, IPAddressFamily_value) 237 proto.RegisterType((*IPAddressRequest)(nil), "moc.ipaddress.IPAddressRequest") 238 proto.RegisterType((*IPAddressResponse)(nil), "moc.ipaddress.IPAddressResponse") 239 proto.RegisterType((*IPAddress)(nil), "moc.ipaddress.IPAddress") 240 } 241 242 func init() { 243 proto.RegisterFile("ipaddress/moc_ipaddress_ipaddress.proto", fileDescriptor_be2c955786c58534) 244 } 245 246 var fileDescriptor_be2c955786c58534 = []byte{ 247 // 437 bytes of a gzipped FileDescriptorProto 248 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x4d, 0x6f, 0xd4, 0x30, 249 0x10, 0xad, 0xbb, 0x1f, 0x74, 0x67, 0xe9, 0xb2, 0x58, 0x48, 0x58, 0x7b, 0x80, 0x28, 0x08, 0x88, 250 0x38, 0x24, 0x52, 0xa8, 0x10, 0xd7, 0x96, 0x2f, 0x15, 0x81, 0xa8, 0x02, 0xea, 0x81, 0x0b, 0xf2, 251 0x26, 0xb3, 0xa9, 0xa5, 0x38, 0x36, 0xb6, 0x23, 0xe8, 0x95, 0x3f, 0xc1, 0x3f, 0xe0, 0x47, 0x72, 252 0x42, 0x71, 0xd2, 0xb4, 0x7b, 0xe8, 0x89, 0x9e, 0x32, 0x1f, 0x6f, 0xde, 0xbc, 0xbc, 0x4c, 0xe0, 253 0xa9, 0xd0, 0xbc, 0x28, 0x0c, 0x5a, 0x9b, 0x48, 0x95, 0x7f, 0x1b, 0xb2, 0xcb, 0x28, 0xd6, 0x46, 254 0x39, 0x45, 0xf7, 0xa5, 0xca, 0xe3, 0xa1, 0xb8, 0x7a, 0x50, 0x2a, 0x55, 0x56, 0x98, 0xf8, 0xe6, 255 0xba, 0xd9, 0x24, 0x3f, 0x0c, 0xd7, 0x1a, 0x4d, 0x0f, 0x5f, 0xdd, 0x6f, 0xd9, 0x72, 0x25, 0xa5, 256 0xaa, 0xfb, 0x47, 0xd7, 0x08, 0x7f, 0x11, 0x58, 0x1e, 0x9f, 0x1c, 0x76, 0x34, 0x19, 0x7e, 0x6f, 257 0xd0, 0x3a, 0xfa, 0x12, 0x60, 0xa8, 0x59, 0x46, 0x82, 0x51, 0x34, 0x4f, 0x59, 0xbc, 0xb5, 0x31, 258 0xbe, 0x1c, 0xba, 0x82, 0xa5, 0x07, 0xb0, 0xff, 0x49, 0xa3, 0xe1, 0x4e, 0xa8, 0xfa, 0xcb, 0xb9, 259 0x46, 0xb6, 0x1b, 0x90, 0x68, 0x91, 0x2e, 0xfc, 0xf0, 0xd0, 0xc9, 0xb6, 0x41, 0xe1, 0x6f, 0x02, 260 0x77, 0xaf, 0x88, 0xb0, 0x5a, 0xd5, 0x16, 0xff, 0x43, 0x45, 0x0a, 0xd3, 0x0c, 0x6d, 0x53, 0x39, 261 0xbf, 0x7e, 0x9e, 0xae, 0xe2, 0xce, 0x9e, 0xf8, 0xc2, 0x9e, 0xf8, 0x48, 0xa9, 0xea, 0x94, 0x57, 262 0x0d, 0x66, 0x3d, 0x92, 0xde, 0x83, 0xc9, 0x1b, 0x63, 0x94, 0x61, 0xa3, 0x80, 0x44, 0xb3, 0xac, 263 0x4b, 0xc2, 0x3f, 0x04, 0x66, 0x03, 0x31, 0xa5, 0x30, 0xae, 0xb9, 0x44, 0x46, 0x3c, 0xc4, 0xc7, 264 0x74, 0x01, 0xbb, 0xa2, 0xf0, 0x7b, 0x66, 0xd9, 0xae, 0x28, 0x28, 0x83, 0x5b, 0xbd, 0xb8, 0x9e, 265 0xe9, 0x22, 0x6d, 0xa7, 0x73, 0x51, 0x18, 0x36, 0xee, 0xa6, 0xdb, 0x98, 0x86, 0x70, 0x5b, 0x1b, 266 0xdc, 0x88, 0x9f, 0x1f, 0xb0, 0x2e, 0xdd, 0x19, 0x9b, 0x04, 0x24, 0x9a, 0x64, 0x5b, 0x35, 0xfa, 267 0x08, 0xa6, 0xd6, 0x71, 0xd7, 0x58, 0xb6, 0xe7, 0xdf, 0x66, 0xee, 0x3d, 0xf8, 0xec, 0x4b, 0x59, 268 0xdf, 0x7a, 0xf6, 0x18, 0xee, 0x0c, 0x3a, 0xdf, 0x72, 0x29, 0xaa, 0x73, 0xba, 0x07, 0xe3, 0xe3, 269 0x93, 0xd3, 0x83, 0xe5, 0x4e, 0x1f, 0xbd, 0x58, 0x92, 0xf4, 0x2f, 0x81, 0xc5, 0x80, 0x3b, 0x2c, 270 0xb1, 0x76, 0xf4, 0x3d, 0x8c, 0xde, 0xa1, 0xa3, 0x0f, 0xaf, 0x75, 0xb6, 0x3b, 0x8a, 0x55, 0x70, 271 0x3d, 0xa0, 0xfb, 0x60, 0xe1, 0x0e, 0xfd, 0x08, 0xd3, 0x57, 0x06, 0xb9, 0xc3, 0x1b, 0xa3, 0x7b, 272 0x8d, 0x15, 0xde, 0x10, 0xdd, 0x51, 0xf4, 0xf5, 0x49, 0x29, 0xdc, 0x59, 0xb3, 0x8e, 0x73, 0x25, 273 0x13, 0x29, 0x72, 0xa3, 0xac, 0xda, 0xb8, 0xf6, 0x4f, 0x4b, 0x8c, 0xce, 0x13, 0xa1, 0xb9, 0xe4, 274 0xad, 0x27, 0xeb, 0xa9, 0x3f, 0x94, 0xe7, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x1e, 0x05, 275 0x70, 0x8f, 0x03, 0x00, 0x00, 276 } 277 278 // Reference imports to suppress errors if they are not otherwise used. 279 var _ context.Context 280 var _ grpc.ClientConn 281 282 // This is a compile-time assertion to ensure that this generated file 283 // is compatible with the grpc package it is being compiled against. 284 const _ = grpc.SupportPackageIsVersion4 285 286 // IPAddressAgentClient is the client API for IPAddressAgent service. 287 // 288 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 289 type IPAddressAgentClient interface { 290 Get(ctx context.Context, in *IPAddressRequest, opts ...grpc.CallOption) (*IPAddressResponse, error) 291 Create(ctx context.Context, in *IPAddressRequest, opts ...grpc.CallOption) (*IPAddressResponse, error) 292 Delete(ctx context.Context, in *IPAddressRequest, opts ...grpc.CallOption) (*IPAddressResponse, error) 293 } 294 295 type iPAddressAgentClient struct { 296 cc *grpc.ClientConn 297 } 298 299 func NewIPAddressAgentClient(cc *grpc.ClientConn) IPAddressAgentClient { 300 return &iPAddressAgentClient{cc} 301 } 302 303 func (c *iPAddressAgentClient) Get(ctx context.Context, in *IPAddressRequest, opts ...grpc.CallOption) (*IPAddressResponse, error) { 304 out := new(IPAddressResponse) 305 err := c.cc.Invoke(ctx, "/moc.ipaddress.IPAddressAgent/Get", in, out, opts...) 306 if err != nil { 307 return nil, err 308 } 309 return out, nil 310 } 311 312 func (c *iPAddressAgentClient) Create(ctx context.Context, in *IPAddressRequest, opts ...grpc.CallOption) (*IPAddressResponse, error) { 313 out := new(IPAddressResponse) 314 err := c.cc.Invoke(ctx, "/moc.ipaddress.IPAddressAgent/Create", in, out, opts...) 315 if err != nil { 316 return nil, err 317 } 318 return out, nil 319 } 320 321 func (c *iPAddressAgentClient) Delete(ctx context.Context, in *IPAddressRequest, opts ...grpc.CallOption) (*IPAddressResponse, error) { 322 out := new(IPAddressResponse) 323 err := c.cc.Invoke(ctx, "/moc.ipaddress.IPAddressAgent/Delete", in, out, opts...) 324 if err != nil { 325 return nil, err 326 } 327 return out, nil 328 } 329 330 // IPAddressAgentServer is the server API for IPAddressAgent service. 331 type IPAddressAgentServer interface { 332 Get(context.Context, *IPAddressRequest) (*IPAddressResponse, error) 333 Create(context.Context, *IPAddressRequest) (*IPAddressResponse, error) 334 Delete(context.Context, *IPAddressRequest) (*IPAddressResponse, error) 335 } 336 337 // UnimplementedIPAddressAgentServer can be embedded to have forward compatible implementations. 338 type UnimplementedIPAddressAgentServer struct { 339 } 340 341 func (*UnimplementedIPAddressAgentServer) Get(ctx context.Context, req *IPAddressRequest) (*IPAddressResponse, error) { 342 return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") 343 } 344 func (*UnimplementedIPAddressAgentServer) Create(ctx context.Context, req *IPAddressRequest) (*IPAddressResponse, error) { 345 return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") 346 } 347 func (*UnimplementedIPAddressAgentServer) Delete(ctx context.Context, req *IPAddressRequest) (*IPAddressResponse, error) { 348 return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") 349 } 350 351 func RegisterIPAddressAgentServer(s *grpc.Server, srv IPAddressAgentServer) { 352 s.RegisterService(&_IPAddressAgent_serviceDesc, srv) 353 } 354 355 func _IPAddressAgent_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 356 in := new(IPAddressRequest) 357 if err := dec(in); err != nil { 358 return nil, err 359 } 360 if interceptor == nil { 361 return srv.(IPAddressAgentServer).Get(ctx, in) 362 } 363 info := &grpc.UnaryServerInfo{ 364 Server: srv, 365 FullMethod: "/moc.ipaddress.IPAddressAgent/Get", 366 } 367 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 368 return srv.(IPAddressAgentServer).Get(ctx, req.(*IPAddressRequest)) 369 } 370 return interceptor(ctx, in, info, handler) 371 } 372 373 func _IPAddressAgent_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 374 in := new(IPAddressRequest) 375 if err := dec(in); err != nil { 376 return nil, err 377 } 378 if interceptor == nil { 379 return srv.(IPAddressAgentServer).Create(ctx, in) 380 } 381 info := &grpc.UnaryServerInfo{ 382 Server: srv, 383 FullMethod: "/moc.ipaddress.IPAddressAgent/Create", 384 } 385 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 386 return srv.(IPAddressAgentServer).Create(ctx, req.(*IPAddressRequest)) 387 } 388 return interceptor(ctx, in, info, handler) 389 } 390 391 func _IPAddressAgent_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 392 in := new(IPAddressRequest) 393 if err := dec(in); err != nil { 394 return nil, err 395 } 396 if interceptor == nil { 397 return srv.(IPAddressAgentServer).Delete(ctx, in) 398 } 399 info := &grpc.UnaryServerInfo{ 400 Server: srv, 401 FullMethod: "/moc.ipaddress.IPAddressAgent/Delete", 402 } 403 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 404 return srv.(IPAddressAgentServer).Delete(ctx, req.(*IPAddressRequest)) 405 } 406 return interceptor(ctx, in, info, handler) 407 } 408 409 var _IPAddressAgent_serviceDesc = grpc.ServiceDesc{ 410 ServiceName: "moc.ipaddress.IPAddressAgent", 411 HandlerType: (*IPAddressAgentServer)(nil), 412 Methods: []grpc.MethodDesc{ 413 { 414 MethodName: "Get", 415 Handler: _IPAddressAgent_Get_Handler, 416 }, 417 { 418 MethodName: "Create", 419 Handler: _IPAddressAgent_Create_Handler, 420 }, 421 { 422 MethodName: "Delete", 423 Handler: _IPAddressAgent_Delete_Handler, 424 }, 425 }, 426 Streams: []grpc.StreamDesc{}, 427 Metadata: "ipaddress/moc_ipaddress_ipaddress.proto", 428 }