github.com/microsoft/moc@v0.17.1/rpc/cloudagent/cloud/moc_cloudagent_cluster.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: moc_cloudagent_cluster.proto 3 4 package cloud 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 ClusterResponse struct { 30 Clusters []*Cluster `protobuf:"bytes,1,rep,name=Clusters,proto3" json:"Clusters,omitempty"` 31 Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` 32 Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` 33 XXX_NoUnkeyedLiteral struct{} `json:"-"` 34 XXX_unrecognized []byte `json:"-"` 35 XXX_sizecache int32 `json:"-"` 36 } 37 38 func (m *ClusterResponse) Reset() { *m = ClusterResponse{} } 39 func (m *ClusterResponse) String() string { return proto.CompactTextString(m) } 40 func (*ClusterResponse) ProtoMessage() {} 41 func (*ClusterResponse) Descriptor() ([]byte, []int) { 42 return fileDescriptor_3cf76b1466679011, []int{0} 43 } 44 45 func (m *ClusterResponse) XXX_Unmarshal(b []byte) error { 46 return xxx_messageInfo_ClusterResponse.Unmarshal(m, b) 47 } 48 func (m *ClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 return xxx_messageInfo_ClusterResponse.Marshal(b, m, deterministic) 50 } 51 func (m *ClusterResponse) XXX_Merge(src proto.Message) { 52 xxx_messageInfo_ClusterResponse.Merge(m, src) 53 } 54 func (m *ClusterResponse) XXX_Size() int { 55 return xxx_messageInfo_ClusterResponse.Size(m) 56 } 57 func (m *ClusterResponse) XXX_DiscardUnknown() { 58 xxx_messageInfo_ClusterResponse.DiscardUnknown(m) 59 } 60 61 var xxx_messageInfo_ClusterResponse proto.InternalMessageInfo 62 63 func (m *ClusterResponse) GetClusters() []*Cluster { 64 if m != nil { 65 return m.Clusters 66 } 67 return nil 68 } 69 70 func (m *ClusterResponse) GetResult() *wrappers.BoolValue { 71 if m != nil { 72 return m.Result 73 } 74 return nil 75 } 76 77 func (m *ClusterResponse) GetError() string { 78 if m != nil { 79 return m.Error 80 } 81 return "" 82 } 83 84 type Cluster struct { 85 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 86 Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` 87 Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"` 88 Status *common.Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` 89 UserOwned bool `protobuf:"varint,5,opt,name=UserOwned,proto3" json:"UserOwned,omitempty"` 90 IsLocalCluster bool `protobuf:"varint,6,opt,name=IsLocalCluster,proto3" json:"IsLocalCluster,omitempty"` 91 Domain string `protobuf:"bytes,7,opt,name=domain,proto3" json:"domain,omitempty"` 92 Nodes []*Node `protobuf:"bytes,8,rep,name=Nodes,proto3" json:"Nodes,omitempty"` 93 LocationName string `protobuf:"bytes,9,opt,name=locationName,proto3" json:"locationName,omitempty"` 94 Tags *common.Tags `protobuf:"bytes,10,opt,name=tags,proto3" json:"tags,omitempty"` 95 XXX_NoUnkeyedLiteral struct{} `json:"-"` 96 XXX_unrecognized []byte `json:"-"` 97 XXX_sizecache int32 `json:"-"` 98 } 99 100 func (m *Cluster) Reset() { *m = Cluster{} } 101 func (m *Cluster) String() string { return proto.CompactTextString(m) } 102 func (*Cluster) ProtoMessage() {} 103 func (*Cluster) Descriptor() ([]byte, []int) { 104 return fileDescriptor_3cf76b1466679011, []int{1} 105 } 106 107 func (m *Cluster) XXX_Unmarshal(b []byte) error { 108 return xxx_messageInfo_Cluster.Unmarshal(m, b) 109 } 110 func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 111 return xxx_messageInfo_Cluster.Marshal(b, m, deterministic) 112 } 113 func (m *Cluster) XXX_Merge(src proto.Message) { 114 xxx_messageInfo_Cluster.Merge(m, src) 115 } 116 func (m *Cluster) XXX_Size() int { 117 return xxx_messageInfo_Cluster.Size(m) 118 } 119 func (m *Cluster) XXX_DiscardUnknown() { 120 xxx_messageInfo_Cluster.DiscardUnknown(m) 121 } 122 123 var xxx_messageInfo_Cluster proto.InternalMessageInfo 124 125 func (m *Cluster) GetName() string { 126 if m != nil { 127 return m.Name 128 } 129 return "" 130 } 131 132 func (m *Cluster) GetId() string { 133 if m != nil { 134 return m.Id 135 } 136 return "" 137 } 138 139 func (m *Cluster) GetFqdn() string { 140 if m != nil { 141 return m.Fqdn 142 } 143 return "" 144 } 145 146 func (m *Cluster) GetStatus() *common.Status { 147 if m != nil { 148 return m.Status 149 } 150 return nil 151 } 152 153 func (m *Cluster) GetUserOwned() bool { 154 if m != nil { 155 return m.UserOwned 156 } 157 return false 158 } 159 160 func (m *Cluster) GetIsLocalCluster() bool { 161 if m != nil { 162 return m.IsLocalCluster 163 } 164 return false 165 } 166 167 func (m *Cluster) GetDomain() string { 168 if m != nil { 169 return m.Domain 170 } 171 return "" 172 } 173 174 func (m *Cluster) GetNodes() []*Node { 175 if m != nil { 176 return m.Nodes 177 } 178 return nil 179 } 180 181 func (m *Cluster) GetLocationName() string { 182 if m != nil { 183 return m.LocationName 184 } 185 return "" 186 } 187 188 func (m *Cluster) GetTags() *common.Tags { 189 if m != nil { 190 return m.Tags 191 } 192 return nil 193 } 194 195 func init() { 196 proto.RegisterType((*ClusterResponse)(nil), "moc.cloudagent.cluster.ClusterResponse") 197 proto.RegisterType((*Cluster)(nil), "moc.cloudagent.cluster.Cluster") 198 } 199 200 func init() { proto.RegisterFile("moc_cloudagent_cluster.proto", fileDescriptor_3cf76b1466679011) } 201 202 var fileDescriptor_3cf76b1466679011 = []byte{ 203 // 468 bytes of a gzipped FileDescriptorProto 204 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xcd, 0x6e, 0xd3, 0x40, 205 0x10, 0xc6, 0x6e, 0xe2, 0xc6, 0x93, 0x52, 0xa4, 0x15, 0x2a, 0xdb, 0xa8, 0x40, 0x08, 0x12, 0xe4, 206 0x82, 0x2d, 0x85, 0x23, 0x27, 0x8a, 0x50, 0x85, 0x54, 0x15, 0x64, 0x28, 0xe2, 0xe7, 0x50, 0x6d, 207 0xd6, 0x1b, 0x63, 0xc9, 0xde, 0x31, 0xbb, 0x6b, 0xf5, 0x55, 0x78, 0x14, 0x9e, 0x8b, 0x27, 0x40, 208 0x19, 0x6f, 0x1a, 0x11, 0x51, 0xe5, 0x94, 0x53, 0x66, 0xbf, 0xf9, 0xe6, 0x9b, 0x6f, 0x66, 0x62, 209 0x38, 0xa9, 0x51, 0x5e, 0xc9, 0x0a, 0xdb, 0x5c, 0x14, 0x4a, 0xbb, 0x2b, 0x59, 0xb5, 0xd6, 0x29, 210 0x93, 0x34, 0x06, 0x1d, 0xb2, 0xa3, 0x1a, 0x65, 0xb2, 0xce, 0x26, 0x3e, 0x3b, 0x7a, 0x54, 0x20, 211 0x16, 0x95, 0x4a, 0x89, 0x35, 0x6f, 0x17, 0xe9, 0xb5, 0x11, 0x4d, 0xa3, 0x8c, 0xed, 0xea, 0x46, 212 0x0f, 0x48, 0x15, 0xeb, 0x1a, 0xb5, 0xff, 0xf1, 0x89, 0xe3, 0x8d, 0x76, 0x1a, 0x73, 0xd5, 0xa5, 213 0x26, 0xbf, 0x02, 0xb8, 0xf7, 0xa6, 0xd3, 0xcf, 0x94, 0x6d, 0x50, 0x5b, 0xc5, 0x5e, 0xc1, 0xc0, 214 0x43, 0x96, 0x07, 0xe3, 0xbd, 0xe9, 0x70, 0xf6, 0x38, 0xf9, 0xbf, 0xa5, 0x64, 0x55, 0x7a, 0x53, 215 0xc0, 0x66, 0x10, 0x65, 0xca, 0xb6, 0x95, 0xe3, 0xe1, 0x38, 0x98, 0x0e, 0x67, 0xa3, 0xa4, 0x73, 216 0x9d, 0xac, 0x5c, 0x27, 0xa7, 0x88, 0xd5, 0x67, 0x51, 0xb5, 0x2a, 0xf3, 0x4c, 0x76, 0x1f, 0xfa, 217 0x6f, 0x8d, 0x41, 0xc3, 0xf7, 0xc6, 0xc1, 0x34, 0xce, 0xba, 0xc7, 0xe4, 0x77, 0x08, 0xfb, 0x5e, 218 0x96, 0x31, 0xe8, 0x69, 0x51, 0x2b, 0x1e, 0x10, 0x81, 0x62, 0x76, 0x08, 0x61, 0x99, 0x53, 0x97, 219 0x38, 0x0b, 0xcb, 0x7c, 0xc9, 0x59, 0xfc, 0xcc, 0xb5, 0x17, 0xa1, 0x98, 0x3d, 0x85, 0xc8, 0x3a, 220 0xe1, 0x5a, 0xcb, 0x7b, 0xe4, 0x66, 0x48, 0x83, 0x7c, 0x24, 0x28, 0xf3, 0x29, 0x76, 0x02, 0xf1, 221 0xa5, 0x55, 0xe6, 0xfd, 0xb5, 0x56, 0x39, 0xef, 0x8f, 0x83, 0xe9, 0x20, 0x5b, 0x03, 0xec, 0x19, 222 0x1c, 0xbe, 0xb3, 0xe7, 0x28, 0x45, 0xe5, 0xcd, 0xf0, 0x88, 0x28, 0x1b, 0x28, 0x3b, 0x82, 0x28, 223 0xc7, 0x5a, 0x94, 0x9a, 0xef, 0x93, 0x01, 0xff, 0x62, 0x29, 0xf4, 0x2f, 0x30, 0x57, 0x96, 0x0f, 224 0x68, 0x95, 0xc7, 0x9b, 0xab, 0xa4, 0x63, 0x2c, 0x19, 0x59, 0xc7, 0x63, 0x13, 0x38, 0xa8, 0x50, 225 0x0a, 0x57, 0xa2, 0xbe, 0x58, 0xce, 0x1c, 0x93, 0xdc, 0x3f, 0x18, 0x7b, 0x08, 0x3d, 0x27, 0x0a, 226 0xcb, 0x81, 0xa6, 0x8a, 0x49, 0xf3, 0x93, 0x28, 0x6c, 0x46, 0xf0, 0xec, 0x4f, 0x08, 0x07, 0xde, 227 0xd7, 0xeb, 0x65, 0x13, 0xf6, 0x15, 0x86, 0xe7, 0x28, 0xf2, 0x95, 0xd7, 0x6d, 0xf7, 0x1c, 0x3d, 228 0xdf, 0x76, 0x70, 0xff, 0x5f, 0x99, 0xdc, 0x61, 0xdf, 0xe1, 0xee, 0xa5, 0xae, 0x76, 0x24, 0xfe, 229 0x05, 0xe0, 0x4c, 0xb9, 0x5d, 0x28, 0x7f, 0x80, 0xc1, 0x99, 0x72, 0xdd, 0xc6, 0xb7, 0xea, 0x3e, 230 0xb9, 0xfd, 0x68, 0x37, 0x8a, 0xa7, 0xe9, 0xb7, 0x17, 0x45, 0xe9, 0x7e, 0xb4, 0xf3, 0x44, 0x62, 231 0x9d, 0xd6, 0xa5, 0x34, 0x68, 0x71, 0xe1, 0xd2, 0x1a, 0x65, 0x6a, 0x1a, 0x99, 0xae, 0xcb, 0xbb, 232 0x70, 0x1e, 0xd1, 0x27, 0xf1, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x08, 0xfb, 0x97, 0xb8, 233 0x0e, 0x04, 0x00, 0x00, 234 } 235 236 // Reference imports to suppress errors if they are not otherwise used. 237 var _ context.Context 238 var _ grpc.ClientConn 239 240 // This is a compile-time assertion to ensure that this generated file 241 // is compatible with the grpc package it is being compiled against. 242 const _ = grpc.SupportPackageIsVersion4 243 244 // ClusterAgentClient is the client API for ClusterAgent service. 245 // 246 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 247 type ClusterAgentClient interface { 248 LoadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) 249 UnloadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) 250 GetCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) 251 GetNodes(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*NodeResponse, error) 252 } 253 254 type clusterAgentClient struct { 255 cc *grpc.ClientConn 256 } 257 258 func NewClusterAgentClient(cc *grpc.ClientConn) ClusterAgentClient { 259 return &clusterAgentClient{cc} 260 } 261 262 func (c *clusterAgentClient) LoadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) { 263 out := new(ClusterResponse) 264 err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/LoadCluster", in, out, opts...) 265 if err != nil { 266 return nil, err 267 } 268 return out, nil 269 } 270 271 func (c *clusterAgentClient) UnloadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) { 272 out := new(ClusterResponse) 273 err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/UnloadCluster", in, out, opts...) 274 if err != nil { 275 return nil, err 276 } 277 return out, nil 278 } 279 280 func (c *clusterAgentClient) GetCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) { 281 out := new(ClusterResponse) 282 err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/GetCluster", in, out, opts...) 283 if err != nil { 284 return nil, err 285 } 286 return out, nil 287 } 288 289 func (c *clusterAgentClient) GetNodes(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*NodeResponse, error) { 290 out := new(NodeResponse) 291 err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/GetNodes", in, out, opts...) 292 if err != nil { 293 return nil, err 294 } 295 return out, nil 296 } 297 298 // ClusterAgentServer is the server API for ClusterAgent service. 299 type ClusterAgentServer interface { 300 LoadCluster(context.Context, *Cluster) (*ClusterResponse, error) 301 UnloadCluster(context.Context, *Cluster) (*ClusterResponse, error) 302 GetCluster(context.Context, *Cluster) (*ClusterResponse, error) 303 GetNodes(context.Context, *Cluster) (*NodeResponse, error) 304 } 305 306 // UnimplementedClusterAgentServer can be embedded to have forward compatible implementations. 307 type UnimplementedClusterAgentServer struct { 308 } 309 310 func (*UnimplementedClusterAgentServer) LoadCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) { 311 return nil, status.Errorf(codes.Unimplemented, "method LoadCluster not implemented") 312 } 313 func (*UnimplementedClusterAgentServer) UnloadCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) { 314 return nil, status.Errorf(codes.Unimplemented, "method UnloadCluster not implemented") 315 } 316 func (*UnimplementedClusterAgentServer) GetCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) { 317 return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented") 318 } 319 func (*UnimplementedClusterAgentServer) GetNodes(ctx context.Context, req *Cluster) (*NodeResponse, error) { 320 return nil, status.Errorf(codes.Unimplemented, "method GetNodes not implemented") 321 } 322 323 func RegisterClusterAgentServer(s *grpc.Server, srv ClusterAgentServer) { 324 s.RegisterService(&_ClusterAgent_serviceDesc, srv) 325 } 326 327 func _ClusterAgent_LoadCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 328 in := new(Cluster) 329 if err := dec(in); err != nil { 330 return nil, err 331 } 332 if interceptor == nil { 333 return srv.(ClusterAgentServer).LoadCluster(ctx, in) 334 } 335 info := &grpc.UnaryServerInfo{ 336 Server: srv, 337 FullMethod: "/moc.cloudagent.cluster.ClusterAgent/LoadCluster", 338 } 339 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 340 return srv.(ClusterAgentServer).LoadCluster(ctx, req.(*Cluster)) 341 } 342 return interceptor(ctx, in, info, handler) 343 } 344 345 func _ClusterAgent_UnloadCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 346 in := new(Cluster) 347 if err := dec(in); err != nil { 348 return nil, err 349 } 350 if interceptor == nil { 351 return srv.(ClusterAgentServer).UnloadCluster(ctx, in) 352 } 353 info := &grpc.UnaryServerInfo{ 354 Server: srv, 355 FullMethod: "/moc.cloudagent.cluster.ClusterAgent/UnloadCluster", 356 } 357 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 358 return srv.(ClusterAgentServer).UnloadCluster(ctx, req.(*Cluster)) 359 } 360 return interceptor(ctx, in, info, handler) 361 } 362 363 func _ClusterAgent_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 364 in := new(Cluster) 365 if err := dec(in); err != nil { 366 return nil, err 367 } 368 if interceptor == nil { 369 return srv.(ClusterAgentServer).GetCluster(ctx, in) 370 } 371 info := &grpc.UnaryServerInfo{ 372 Server: srv, 373 FullMethod: "/moc.cloudagent.cluster.ClusterAgent/GetCluster", 374 } 375 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 376 return srv.(ClusterAgentServer).GetCluster(ctx, req.(*Cluster)) 377 } 378 return interceptor(ctx, in, info, handler) 379 } 380 381 func _ClusterAgent_GetNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 382 in := new(Cluster) 383 if err := dec(in); err != nil { 384 return nil, err 385 } 386 if interceptor == nil { 387 return srv.(ClusterAgentServer).GetNodes(ctx, in) 388 } 389 info := &grpc.UnaryServerInfo{ 390 Server: srv, 391 FullMethod: "/moc.cloudagent.cluster.ClusterAgent/GetNodes", 392 } 393 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 394 return srv.(ClusterAgentServer).GetNodes(ctx, req.(*Cluster)) 395 } 396 return interceptor(ctx, in, info, handler) 397 } 398 399 var _ClusterAgent_serviceDesc = grpc.ServiceDesc{ 400 ServiceName: "moc.cloudagent.cluster.ClusterAgent", 401 HandlerType: (*ClusterAgentServer)(nil), 402 Methods: []grpc.MethodDesc{ 403 { 404 MethodName: "LoadCluster", 405 Handler: _ClusterAgent_LoadCluster_Handler, 406 }, 407 { 408 MethodName: "UnloadCluster", 409 Handler: _ClusterAgent_UnloadCluster_Handler, 410 }, 411 { 412 MethodName: "GetCluster", 413 Handler: _ClusterAgent_GetCluster_Handler, 414 }, 415 { 416 MethodName: "GetNodes", 417 Handler: _ClusterAgent_GetNodes_Handler, 418 }, 419 }, 420 Streams: []grpc.StreamDesc{}, 421 Metadata: "moc_cloudagent_cluster.proto", 422 }