github.com/microsoft/moc@v0.17.1/rpc/nodeagent/node/moc_nodeagent_host.pb.go (about)

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