github.com/microsoft/moc@v0.17.1/rpc/cloudagent/network/moc_cloudagent_logicalnetwork.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: moc_cloudagent_logicalnetwork.proto 3 4 package network 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 LogicalNetworkRequest struct { 30 LogicalNetworks []*LogicalNetwork `protobuf:"bytes,1,rep,name=LogicalNetworks,proto3" json:"LogicalNetworks,omitempty"` 31 OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"` 32 XXX_NoUnkeyedLiteral struct{} `json:"-"` 33 XXX_unrecognized []byte `json:"-"` 34 XXX_sizecache int32 `json:"-"` 35 } 36 37 func (m *LogicalNetworkRequest) Reset() { *m = LogicalNetworkRequest{} } 38 func (m *LogicalNetworkRequest) String() string { return proto.CompactTextString(m) } 39 func (*LogicalNetworkRequest) ProtoMessage() {} 40 func (*LogicalNetworkRequest) Descriptor() ([]byte, []int) { 41 return fileDescriptor_37e4212e5c247b0a, []int{0} 42 } 43 44 func (m *LogicalNetworkRequest) XXX_Unmarshal(b []byte) error { 45 return xxx_messageInfo_LogicalNetworkRequest.Unmarshal(m, b) 46 } 47 func (m *LogicalNetworkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 return xxx_messageInfo_LogicalNetworkRequest.Marshal(b, m, deterministic) 49 } 50 func (m *LogicalNetworkRequest) XXX_Merge(src proto.Message) { 51 xxx_messageInfo_LogicalNetworkRequest.Merge(m, src) 52 } 53 func (m *LogicalNetworkRequest) XXX_Size() int { 54 return xxx_messageInfo_LogicalNetworkRequest.Size(m) 55 } 56 func (m *LogicalNetworkRequest) XXX_DiscardUnknown() { 57 xxx_messageInfo_LogicalNetworkRequest.DiscardUnknown(m) 58 } 59 60 var xxx_messageInfo_LogicalNetworkRequest proto.InternalMessageInfo 61 62 func (m *LogicalNetworkRequest) GetLogicalNetworks() []*LogicalNetwork { 63 if m != nil { 64 return m.LogicalNetworks 65 } 66 return nil 67 } 68 69 func (m *LogicalNetworkRequest) GetOperationType() common.Operation { 70 if m != nil { 71 return m.OperationType 72 } 73 return common.Operation_GET 74 } 75 76 type LogicalNetworkResponse struct { 77 LogicalNetworks []*LogicalNetwork `protobuf:"bytes,1,rep,name=LogicalNetworks,proto3" json:"LogicalNetworks,omitempty"` 78 Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` 79 Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` 80 XXX_NoUnkeyedLiteral struct{} `json:"-"` 81 XXX_unrecognized []byte `json:"-"` 82 XXX_sizecache int32 `json:"-"` 83 } 84 85 func (m *LogicalNetworkResponse) Reset() { *m = LogicalNetworkResponse{} } 86 func (m *LogicalNetworkResponse) String() string { return proto.CompactTextString(m) } 87 func (*LogicalNetworkResponse) ProtoMessage() {} 88 func (*LogicalNetworkResponse) Descriptor() ([]byte, []int) { 89 return fileDescriptor_37e4212e5c247b0a, []int{1} 90 } 91 92 func (m *LogicalNetworkResponse) XXX_Unmarshal(b []byte) error { 93 return xxx_messageInfo_LogicalNetworkResponse.Unmarshal(m, b) 94 } 95 func (m *LogicalNetworkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 96 return xxx_messageInfo_LogicalNetworkResponse.Marshal(b, m, deterministic) 97 } 98 func (m *LogicalNetworkResponse) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_LogicalNetworkResponse.Merge(m, src) 100 } 101 func (m *LogicalNetworkResponse) XXX_Size() int { 102 return xxx_messageInfo_LogicalNetworkResponse.Size(m) 103 } 104 func (m *LogicalNetworkResponse) XXX_DiscardUnknown() { 105 xxx_messageInfo_LogicalNetworkResponse.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_LogicalNetworkResponse proto.InternalMessageInfo 109 110 func (m *LogicalNetworkResponse) GetLogicalNetworks() []*LogicalNetwork { 111 if m != nil { 112 return m.LogicalNetworks 113 } 114 return nil 115 } 116 117 func (m *LogicalNetworkResponse) GetResult() *wrappers.BoolValue { 118 if m != nil { 119 return m.Result 120 } 121 return nil 122 } 123 124 func (m *LogicalNetworkResponse) GetError() string { 125 if m != nil { 126 return m.Error 127 } 128 return "" 129 } 130 131 type LogicalNetwork struct { 132 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 133 Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` 134 Subnets []*LogicalSubnet `protobuf:"bytes,3,rep,name=subnets,proto3" json:"subnets,omitempty"` 135 NetworkVirtualizationEnabled bool `protobuf:"varint,4,opt,name=networkVirtualizationEnabled,proto3" json:"networkVirtualizationEnabled,omitempty"` 136 Status *common.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` 137 LocationName string `protobuf:"bytes,6,opt,name=locationName,proto3" json:"locationName,omitempty"` 138 MacPoolName string `protobuf:"bytes,7,opt,name=macPoolName,proto3" json:"macPoolName,omitempty"` 139 Tags *common.Tags `protobuf:"bytes,8,opt,name=tags,proto3" json:"tags,omitempty"` 140 XXX_NoUnkeyedLiteral struct{} `json:"-"` 141 XXX_unrecognized []byte `json:"-"` 142 XXX_sizecache int32 `json:"-"` 143 } 144 145 func (m *LogicalNetwork) Reset() { *m = LogicalNetwork{} } 146 func (m *LogicalNetwork) String() string { return proto.CompactTextString(m) } 147 func (*LogicalNetwork) ProtoMessage() {} 148 func (*LogicalNetwork) Descriptor() ([]byte, []int) { 149 return fileDescriptor_37e4212e5c247b0a, []int{2} 150 } 151 152 func (m *LogicalNetwork) XXX_Unmarshal(b []byte) error { 153 return xxx_messageInfo_LogicalNetwork.Unmarshal(m, b) 154 } 155 func (m *LogicalNetwork) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 156 return xxx_messageInfo_LogicalNetwork.Marshal(b, m, deterministic) 157 } 158 func (m *LogicalNetwork) XXX_Merge(src proto.Message) { 159 xxx_messageInfo_LogicalNetwork.Merge(m, src) 160 } 161 func (m *LogicalNetwork) XXX_Size() int { 162 return xxx_messageInfo_LogicalNetwork.Size(m) 163 } 164 func (m *LogicalNetwork) XXX_DiscardUnknown() { 165 xxx_messageInfo_LogicalNetwork.DiscardUnknown(m) 166 } 167 168 var xxx_messageInfo_LogicalNetwork proto.InternalMessageInfo 169 170 func (m *LogicalNetwork) GetName() string { 171 if m != nil { 172 return m.Name 173 } 174 return "" 175 } 176 177 func (m *LogicalNetwork) GetId() string { 178 if m != nil { 179 return m.Id 180 } 181 return "" 182 } 183 184 func (m *LogicalNetwork) GetSubnets() []*LogicalSubnet { 185 if m != nil { 186 return m.Subnets 187 } 188 return nil 189 } 190 191 func (m *LogicalNetwork) GetNetworkVirtualizationEnabled() bool { 192 if m != nil { 193 return m.NetworkVirtualizationEnabled 194 } 195 return false 196 } 197 198 func (m *LogicalNetwork) GetStatus() *common.Status { 199 if m != nil { 200 return m.Status 201 } 202 return nil 203 } 204 205 func (m *LogicalNetwork) GetLocationName() string { 206 if m != nil { 207 return m.LocationName 208 } 209 return "" 210 } 211 212 func (m *LogicalNetwork) GetMacPoolName() string { 213 if m != nil { 214 return m.MacPoolName 215 } 216 return "" 217 } 218 219 func (m *LogicalNetwork) GetTags() *common.Tags { 220 if m != nil { 221 return m.Tags 222 } 223 return nil 224 } 225 226 type LogicalSubnet struct { 227 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 228 Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` 229 AddressPrefix string `protobuf:"bytes,3,opt,name=addressPrefix,proto3" json:"addressPrefix,omitempty"` 230 Routes []*common.Route `protobuf:"bytes,4,rep,name=routes,proto3" json:"routes,omitempty"` 231 Allocation common.IPAllocationMethod `protobuf:"varint,5,opt,name=allocation,proto3,enum=moc.IPAllocationMethod" json:"allocation,omitempty"` 232 Vlan uint32 `protobuf:"varint,6,opt,name=vlan,proto3" json:"vlan,omitempty"` 233 IpPools []*common.IPPool `protobuf:"bytes,7,rep,name=ipPools,proto3" json:"ipPools,omitempty"` 234 Dns *common.Dns `protobuf:"bytes,8,opt,name=dns,proto3" json:"dns,omitempty"` 235 IsPublic bool `protobuf:"varint,9,opt,name=isPublic,proto3" json:"isPublic,omitempty"` 236 Tags *common.Tags `protobuf:"bytes,10,opt,name=tags,proto3" json:"tags,omitempty"` 237 NetworkSecurityGroupRef *common.NetworkSecurityGroupReference `protobuf:"bytes,11,opt,name=networkSecurityGroupRef,proto3" json:"networkSecurityGroupRef,omitempty"` 238 XXX_NoUnkeyedLiteral struct{} `json:"-"` 239 XXX_unrecognized []byte `json:"-"` 240 XXX_sizecache int32 `json:"-"` 241 } 242 243 func (m *LogicalSubnet) Reset() { *m = LogicalSubnet{} } 244 func (m *LogicalSubnet) String() string { return proto.CompactTextString(m) } 245 func (*LogicalSubnet) ProtoMessage() {} 246 func (*LogicalSubnet) Descriptor() ([]byte, []int) { 247 return fileDescriptor_37e4212e5c247b0a, []int{3} 248 } 249 250 func (m *LogicalSubnet) XXX_Unmarshal(b []byte) error { 251 return xxx_messageInfo_LogicalSubnet.Unmarshal(m, b) 252 } 253 func (m *LogicalSubnet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 254 return xxx_messageInfo_LogicalSubnet.Marshal(b, m, deterministic) 255 } 256 func (m *LogicalSubnet) XXX_Merge(src proto.Message) { 257 xxx_messageInfo_LogicalSubnet.Merge(m, src) 258 } 259 func (m *LogicalSubnet) XXX_Size() int { 260 return xxx_messageInfo_LogicalSubnet.Size(m) 261 } 262 func (m *LogicalSubnet) XXX_DiscardUnknown() { 263 xxx_messageInfo_LogicalSubnet.DiscardUnknown(m) 264 } 265 266 var xxx_messageInfo_LogicalSubnet proto.InternalMessageInfo 267 268 func (m *LogicalSubnet) GetName() string { 269 if m != nil { 270 return m.Name 271 } 272 return "" 273 } 274 275 func (m *LogicalSubnet) GetId() string { 276 if m != nil { 277 return m.Id 278 } 279 return "" 280 } 281 282 func (m *LogicalSubnet) GetAddressPrefix() string { 283 if m != nil { 284 return m.AddressPrefix 285 } 286 return "" 287 } 288 289 func (m *LogicalSubnet) GetRoutes() []*common.Route { 290 if m != nil { 291 return m.Routes 292 } 293 return nil 294 } 295 296 func (m *LogicalSubnet) GetAllocation() common.IPAllocationMethod { 297 if m != nil { 298 return m.Allocation 299 } 300 return common.IPAllocationMethod_Invalid 301 } 302 303 func (m *LogicalSubnet) GetVlan() uint32 { 304 if m != nil { 305 return m.Vlan 306 } 307 return 0 308 } 309 310 func (m *LogicalSubnet) GetIpPools() []*common.IPPool { 311 if m != nil { 312 return m.IpPools 313 } 314 return nil 315 } 316 317 func (m *LogicalSubnet) GetDns() *common.Dns { 318 if m != nil { 319 return m.Dns 320 } 321 return nil 322 } 323 324 func (m *LogicalSubnet) GetIsPublic() bool { 325 if m != nil { 326 return m.IsPublic 327 } 328 return false 329 } 330 331 func (m *LogicalSubnet) GetTags() *common.Tags { 332 if m != nil { 333 return m.Tags 334 } 335 return nil 336 } 337 338 func (m *LogicalSubnet) GetNetworkSecurityGroupRef() *common.NetworkSecurityGroupReference { 339 if m != nil { 340 return m.NetworkSecurityGroupRef 341 } 342 return nil 343 } 344 345 func init() { 346 proto.RegisterType((*LogicalNetworkRequest)(nil), "moc.cloudagent.network.LogicalNetworkRequest") 347 proto.RegisterType((*LogicalNetworkResponse)(nil), "moc.cloudagent.network.LogicalNetworkResponse") 348 proto.RegisterType((*LogicalNetwork)(nil), "moc.cloudagent.network.LogicalNetwork") 349 proto.RegisterType((*LogicalSubnet)(nil), "moc.cloudagent.network.LogicalSubnet") 350 } 351 352 func init() { 353 proto.RegisterFile("moc_cloudagent_logicalnetwork.proto", fileDescriptor_37e4212e5c247b0a) 354 } 355 356 var fileDescriptor_37e4212e5c247b0a = []byte{ 357 // 652 bytes of a gzipped FileDescriptorProto 358 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, 359 0x14, 0xfd, 0x9c, 0xa4, 0xf9, 0xb9, 0xf9, 0x12, 0xa4, 0x01, 0x5a, 0x2b, 0x82, 0x2a, 0x72, 0x69, 360 0x95, 0x0d, 0xb6, 0x08, 0x48, 0x2c, 0x51, 0x23, 0x2a, 0x54, 0x09, 0x4a, 0x34, 0xad, 0xba, 0x40, 361 0x48, 0xd5, 0xc4, 0x9e, 0xa4, 0xa3, 0x8e, 0x3d, 0x66, 0x66, 0xdc, 0x52, 0x56, 0x2c, 0x79, 0x0b, 362 0x5e, 0x80, 0x25, 0x3c, 0x04, 0x6f, 0x85, 0x7c, 0xe3, 0xa4, 0x71, 0x55, 0xa0, 0x1b, 0x56, 0xf6, 363 0xdc, 0x73, 0xee, 0xb9, 0xf7, 0x9e, 0xf9, 0x81, 0xad, 0x58, 0x85, 0x27, 0xa1, 0x54, 0x59, 0xc4, 364 0x66, 0x3c, 0xb1, 0x27, 0x52, 0xcd, 0x44, 0xc8, 0x64, 0xc2, 0xed, 0x85, 0xd2, 0x67, 0x7e, 0xaa, 365 0x95, 0x55, 0x64, 0x3d, 0x56, 0xa1, 0x7f, 0x45, 0xf2, 0x0b, 0xb4, 0xb7, 0x39, 0x53, 0x6a, 0x26, 366 0x79, 0x80, 0xac, 0x49, 0x36, 0x0d, 0x2e, 0x34, 0x4b, 0x53, 0xae, 0xcd, 0x3c, 0xaf, 0xb7, 0x81, 367 0xe2, 0x2a, 0x8e, 0x55, 0x52, 0x7c, 0x0a, 0x60, 0x73, 0x05, 0x28, 0xc4, 0x56, 0x71, 0xef, 0xab, 368 0x03, 0xf7, 0x5f, 0xcf, 0x3b, 0x39, 0x98, 0xc3, 0x94, 0x7f, 0xc8, 0xb8, 0xb1, 0x64, 0x0c, 0x77, 369 0xca, 0x80, 0x71, 0x9d, 0x7e, 0x75, 0xd0, 0x1e, 0xee, 0xf8, 0x37, 0x37, 0xe9, 0x5f, 0xd3, 0xb9, 370 0x9e, 0x4e, 0x9e, 0x41, 0xe7, 0x6d, 0xca, 0x35, 0xb3, 0x42, 0x25, 0x47, 0x97, 0x29, 0x77, 0x2b, 371 0x7d, 0x67, 0xd0, 0x1d, 0x76, 0x51, 0x6f, 0x89, 0xd0, 0x32, 0xc9, 0xfb, 0xee, 0xc0, 0xfa, 0xf5, 372 0x0e, 0x4d, 0xaa, 0x12, 0xc3, 0xff, 0x41, 0x8b, 0x43, 0xa8, 0x53, 0x6e, 0x32, 0x69, 0xb1, 0xb7, 373 0xf6, 0xb0, 0xe7, 0xcf, 0x8d, 0xf7, 0x17, 0xc6, 0xfb, 0x23, 0xa5, 0xe4, 0x31, 0x93, 0x19, 0xa7, 374 0x05, 0x93, 0xdc, 0x83, 0xb5, 0x3d, 0xad, 0x95, 0x76, 0xab, 0x7d, 0x67, 0xd0, 0xa2, 0xf3, 0x85, 375 0xf7, 0xb3, 0x02, 0xdd, 0xb2, 0x3a, 0x21, 0x50, 0x4b, 0x58, 0xcc, 0x5d, 0x07, 0x79, 0xf8, 0x4f, 376 0xba, 0x50, 0x11, 0x11, 0x16, 0x6b, 0xd1, 0x8a, 0x88, 0xc8, 0x0b, 0x68, 0x98, 0x6c, 0x92, 0x70, 377 0x6b, 0xdc, 0x2a, 0x8e, 0xb2, 0xfd, 0x97, 0x51, 0x0e, 0x91, 0x4d, 0x17, 0x59, 0x64, 0x04, 0x0f, 378 0x0a, 0xc6, 0xb1, 0xd0, 0x36, 0x63, 0x52, 0x7c, 0x42, 0x2f, 0xf7, 0x12, 0x36, 0x91, 0x3c, 0x72, 379 0x6b, 0x7d, 0x67, 0xd0, 0xa4, 0x7f, 0xe4, 0x90, 0x2d, 0xa8, 0x1b, 0xcb, 0x6c, 0x66, 0xdc, 0x35, 380 0x74, 0xa1, 0x8d, 0x3d, 0x1c, 0x62, 0x88, 0x16, 0x10, 0xf1, 0xe0, 0x7f, 0xa9, 0x42, 0xcc, 0x3b, 381 0xc8, 0xa7, 0xaa, 0xe3, 0x0c, 0xa5, 0x18, 0xd9, 0x81, 0x76, 0xcc, 0xc2, 0xb1, 0x52, 0x12, 0x29, 382 0x8d, 0x9c, 0x32, 0xaa, 0x7d, 0xf9, 0xe1, 0x3a, 0x74, 0x15, 0x20, 0x0f, 0xa1, 0x66, 0xd9, 0xcc, 383 0xb8, 0x4d, 0x2c, 0xd7, 0xc2, 0x72, 0x47, 0x6c, 0x66, 0x28, 0x86, 0xbd, 0x6f, 0x55, 0xe8, 0x94, 384 0xc6, 0xbd, 0x95, 0x95, 0x8f, 0xa0, 0xc3, 0xa2, 0x48, 0x73, 0x63, 0xc6, 0x9a, 0x4f, 0xc5, 0xc7, 385 0x62, 0x7f, 0xca, 0x41, 0xe2, 0x41, 0x5d, 0xab, 0xcc, 0x72, 0xe3, 0xd6, 0xd0, 0x6f, 0xc0, 0xe2, 386 0x34, 0x0f, 0xd1, 0x02, 0x21, 0xcf, 0x01, 0x98, 0x5c, 0x0c, 0x86, 0x9e, 0x74, 0x87, 0x1b, 0xc8, 387 0xdb, 0x1f, 0xef, 0x2e, 0x81, 0x37, 0xdc, 0x9e, 0xaa, 0x88, 0xae, 0x50, 0xf3, 0x36, 0xcf, 0x25, 388 0x4b, 0xd0, 0x9b, 0x0e, 0xc5, 0x7f, 0xb2, 0x0d, 0x0d, 0x91, 0xe6, 0x93, 0x1b, 0xb7, 0x81, 0x15, 389 0xdb, 0x85, 0x52, 0x1e, 0xa3, 0x0b, 0x8c, 0xf4, 0xa1, 0x1a, 0x25, 0x0b, 0x47, 0x9a, 0x48, 0x79, 390 0x99, 0x98, 0xc2, 0xbc, 0x1c, 0x22, 0x3d, 0x68, 0x0a, 0x33, 0xce, 0x26, 0x52, 0x84, 0x6e, 0x0b, 391 0x77, 0x75, 0xb9, 0x5e, 0x1a, 0x0a, 0x37, 0x1a, 0x4a, 0xde, 0xc3, 0x46, 0x71, 0x00, 0x0e, 0x79, 392 0x98, 0x69, 0x61, 0x2f, 0x5f, 0x69, 0x95, 0xa5, 0x94, 0x4f, 0xdd, 0x36, 0x66, 0x78, 0x98, 0x71, 393 0x70, 0x33, 0x87, 0x6b, 0x9e, 0x84, 0x9c, 0xfe, 0x4e, 0x62, 0xf8, 0xd9, 0x81, 0xbb, 0xe5, 0xa3, 394 0xbf, 0x9b, 0x9f, 0x5c, 0x22, 0xa0, 0xbe, 0x9f, 0x9c, 0xab, 0x33, 0x4e, 0x1e, 0xdf, 0xf2, 0x7e, 395 0xce, 0x9f, 0xa2, 0x9e, 0x7f, 0x5b, 0xfa, 0xfc, 0x5d, 0xf0, 0xfe, 0x1b, 0x3d, 0x79, 0x17, 0xcc, 396 0x84, 0x3d, 0xcd, 0x26, 0x7e, 0xa8, 0xe2, 0x20, 0x16, 0xa1, 0x56, 0x46, 0x4d, 0x6d, 0x10, 0xab, 397 0x30, 0xd0, 0x69, 0x18, 0x5c, 0x69, 0x05, 0x85, 0xd6, 0xa4, 0x8e, 0x57, 0xfc, 0xe9, 0xaf, 0x00, 398 0x00, 0x00, 0xff, 0xff, 0xec, 0x33, 0xc8, 0x21, 0xa8, 0x05, 0x00, 0x00, 399 } 400 401 // Reference imports to suppress errors if they are not otherwise used. 402 var _ context.Context 403 var _ grpc.ClientConn 404 405 // This is a compile-time assertion to ensure that this generated file 406 // is compatible with the grpc package it is being compiled against. 407 const _ = grpc.SupportPackageIsVersion4 408 409 // LogicalNetworkAgentClient is the client API for LogicalNetworkAgent service. 410 // 411 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 412 type LogicalNetworkAgentClient interface { 413 Invoke(ctx context.Context, in *LogicalNetworkRequest, opts ...grpc.CallOption) (*LogicalNetworkResponse, error) 414 } 415 416 type logicalNetworkAgentClient struct { 417 cc *grpc.ClientConn 418 } 419 420 func NewLogicalNetworkAgentClient(cc *grpc.ClientConn) LogicalNetworkAgentClient { 421 return &logicalNetworkAgentClient{cc} 422 } 423 424 func (c *logicalNetworkAgentClient) Invoke(ctx context.Context, in *LogicalNetworkRequest, opts ...grpc.CallOption) (*LogicalNetworkResponse, error) { 425 out := new(LogicalNetworkResponse) 426 err := c.cc.Invoke(ctx, "/moc.cloudagent.network.LogicalNetworkAgent/Invoke", in, out, opts...) 427 if err != nil { 428 return nil, err 429 } 430 return out, nil 431 } 432 433 // LogicalNetworkAgentServer is the server API for LogicalNetworkAgent service. 434 type LogicalNetworkAgentServer interface { 435 Invoke(context.Context, *LogicalNetworkRequest) (*LogicalNetworkResponse, error) 436 } 437 438 // UnimplementedLogicalNetworkAgentServer can be embedded to have forward compatible implementations. 439 type UnimplementedLogicalNetworkAgentServer struct { 440 } 441 442 func (*UnimplementedLogicalNetworkAgentServer) Invoke(ctx context.Context, req *LogicalNetworkRequest) (*LogicalNetworkResponse, error) { 443 return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented") 444 } 445 446 func RegisterLogicalNetworkAgentServer(s *grpc.Server, srv LogicalNetworkAgentServer) { 447 s.RegisterService(&_LogicalNetworkAgent_serviceDesc, srv) 448 } 449 450 func _LogicalNetworkAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 451 in := new(LogicalNetworkRequest) 452 if err := dec(in); err != nil { 453 return nil, err 454 } 455 if interceptor == nil { 456 return srv.(LogicalNetworkAgentServer).Invoke(ctx, in) 457 } 458 info := &grpc.UnaryServerInfo{ 459 Server: srv, 460 FullMethod: "/moc.cloudagent.network.LogicalNetworkAgent/Invoke", 461 } 462 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 463 return srv.(LogicalNetworkAgentServer).Invoke(ctx, req.(*LogicalNetworkRequest)) 464 } 465 return interceptor(ctx, in, info, handler) 466 } 467 468 var _LogicalNetworkAgent_serviceDesc = grpc.ServiceDesc{ 469 ServiceName: "moc.cloudagent.network.LogicalNetworkAgent", 470 HandlerType: (*LogicalNetworkAgentServer)(nil), 471 Methods: []grpc.MethodDesc{ 472 { 473 MethodName: "Invoke", 474 Handler: _LogicalNetworkAgent_Invoke_Handler, 475 }, 476 }, 477 Streams: []grpc.StreamDesc{}, 478 Metadata: "moc_cloudagent_logicalnetwork.proto", 479 }