github.com/microsoft/moc@v0.17.1/rpc/cloudagent/cloud/moc_cloudagent_node.pb.go (about)

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