blob: d4697115ac35ad9497e98135941af0f601939713 [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: go.chromium.org/luci/gce/api/projects/v1/service.proto
package projects
import prpc "go.chromium.org/luci/grpc/prpc"
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// A request to delete a project.
type DeleteRequest struct {
// The id of the project to delete.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteRequest) ProtoMessage() {}
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_bb7a04e4c879cc9a, []int{0}
}
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteRequest.Unmarshal(m, b)
}
func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
}
func (m *DeleteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteRequest.Merge(m, src)
}
func (m *DeleteRequest) XXX_Size() int {
return xxx_messageInfo_DeleteRequest.Size(m)
}
func (m *DeleteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
func (m *DeleteRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
// A request to create or update a project.
type EnsureRequest struct {
// The id of the project to ensure.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// The project.
Project *Config `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EnsureRequest) Reset() { *m = EnsureRequest{} }
func (m *EnsureRequest) String() string { return proto.CompactTextString(m) }
func (*EnsureRequest) ProtoMessage() {}
func (*EnsureRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_bb7a04e4c879cc9a, []int{1}
}
func (m *EnsureRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EnsureRequest.Unmarshal(m, b)
}
func (m *EnsureRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EnsureRequest.Marshal(b, m, deterministic)
}
func (m *EnsureRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_EnsureRequest.Merge(m, src)
}
func (m *EnsureRequest) XXX_Size() int {
return xxx_messageInfo_EnsureRequest.Size(m)
}
func (m *EnsureRequest) XXX_DiscardUnknown() {
xxx_messageInfo_EnsureRequest.DiscardUnknown(m)
}
var xxx_messageInfo_EnsureRequest proto.InternalMessageInfo
func (m *EnsureRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *EnsureRequest) GetProject() *Config {
if m != nil {
return m.Project
}
return nil
}
// A request to get an existing project.
type GetRequest struct {
// The id of the project to get.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetRequest) Reset() { *m = GetRequest{} }
func (m *GetRequest) String() string { return proto.CompactTextString(m) }
func (*GetRequest) ProtoMessage() {}
func (*GetRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_bb7a04e4c879cc9a, []int{2}
}
func (m *GetRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetRequest.Unmarshal(m, b)
}
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic)
}
func (m *GetRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetRequest.Merge(m, src)
}
func (m *GetRequest) XXX_Size() int {
return xxx_messageInfo_GetRequest.Size(m)
}
func (m *GetRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetRequest proto.InternalMessageInfo
func (m *GetRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
// A request to list existing projects.
type ListRequest struct {
// The value of next_page_token received in a ListResponse. Used to get the
// next page of projects. If empty, gets the first page.
PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// The maximum number of results to include in the response.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListRequest) Reset() { *m = ListRequest{} }
func (m *ListRequest) String() string { return proto.CompactTextString(m) }
func (*ListRequest) ProtoMessage() {}
func (*ListRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_bb7a04e4c879cc9a, []int{3}
}
func (m *ListRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListRequest.Unmarshal(m, b)
}
func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic)
}
func (m *ListRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListRequest.Merge(m, src)
}
func (m *ListRequest) XXX_Size() int {
return xxx_messageInfo_ListRequest.Size(m)
}
func (m *ListRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListRequest proto.InternalMessageInfo
func (m *ListRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
func (m *ListRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
// A response to a request to list projects.
type ListResponse struct {
// The projects.
Projects []*Config `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"`
// The value to use as the page_token in a ListRequest to get the next page of
// projects. If empty, there are no more projects.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListResponse) Reset() { *m = ListResponse{} }
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
func (*ListResponse) ProtoMessage() {}
func (*ListResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_bb7a04e4c879cc9a, []int{4}
}
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListResponse.Unmarshal(m, b)
}
func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic)
}
func (m *ListResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListResponse.Merge(m, src)
}
func (m *ListResponse) XXX_Size() int {
return xxx_messageInfo_ListResponse.Size(m)
}
func (m *ListResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListResponse proto.InternalMessageInfo
func (m *ListResponse) GetProjects() []*Config {
if m != nil {
return m.Projects
}
return nil
}
func (m *ListResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
func init() {
proto.RegisterType((*DeleteRequest)(nil), "projects.DeleteRequest")
proto.RegisterType((*EnsureRequest)(nil), "projects.EnsureRequest")
proto.RegisterType((*GetRequest)(nil), "projects.GetRequest")
proto.RegisterType((*ListRequest)(nil), "projects.ListRequest")
proto.RegisterType((*ListResponse)(nil), "projects.ListResponse")
}
func init() {
proto.RegisterFile("go.chromium.org/luci/gce/api/projects/v1/service.proto", fileDescriptor_bb7a04e4c879cc9a)
}
var fileDescriptor_bb7a04e4c879cc9a = []byte{
// 360 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4f, 0xea, 0x40,
0x14, 0x85, 0xd3, 0xf2, 0x1e, 0x0f, 0x2e, 0x0f, 0x35, 0x13, 0x45, 0x52, 0x34, 0x92, 0x2e, 0x0c,
0x31, 0x3a, 0x13, 0x21, 0x98, 0xb8, 0x56, 0x42, 0x8c, 0x2e, 0x48, 0x75, 0x4f, 0xa0, 0x5c, 0xea,
0x28, 0x74, 0x6a, 0x67, 0x4a, 0x94, 0x5f, 0xeb, 0x4f, 0x31, 0xed, 0x50, 0x0a, 0x0a, 0x89, 0xcb,
0x39, 0xf7, 0xcc, 0x3d, 0x27, 0xdf, 0x85, 0x2b, 0x4f, 0x50, 0xf7, 0x39, 0x14, 0x53, 0x1e, 0x4d,
0xa9, 0x08, 0x3d, 0x36, 0x89, 0x5c, 0xce, 0x3c, 0x17, 0xd9, 0x20, 0xe0, 0x2c, 0x08, 0xc5, 0x0b,
0xba, 0x4a, 0xb2, 0xd9, 0x25, 0x93, 0x18, 0xce, 0xb8, 0x8b, 0x34, 0x08, 0x85, 0x12, 0xa4, 0x90,
0x8e, 0xac, 0x9a, 0x27, 0x84, 0x37, 0x41, 0x96, 0xe8, 0xc3, 0x68, 0xcc, 0x70, 0x1a, 0xa8, 0x0f,
0x6d, 0xb3, 0xda, 0xbf, 0x5e, 0xef, 0x0a, 0x7f, 0xcc, 0x3d, 0xfd, 0xcd, 0x3e, 0x81, 0xf2, 0x2d,
0x4e, 0x50, 0xa1, 0x83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x84, 0x1c, 0x64, 0x93, 0x15, 0xd8,
0x56, 0xe5, 0xbb, 0xac, 0xc1, 0x0d, 0xf3, 0x49, 0xd5, 0xd6, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff,
0x14, 0x71, 0x09, 0xe0, 0xbe, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// ProjectsClient is the client API for Projects service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ProjectsClient interface {
// Delete deletes a project.
// Internal API.
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Ensure ensures a project exists.
// Creates a new project or updates an existing one as necessary.
// Internal API.
Ensure(ctx context.Context, in *EnsureRequest, opts ...grpc.CallOption) (*Config, error)
// Get returns an existing project.
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Config, error)
// List returns existing projects.
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
}
type projectsPRPCClient struct {
client *prpc.Client
}
func NewProjectsPRPCClient(client *prpc.Client) ProjectsClient {
return &projectsPRPCClient{client}
}
func (c *projectsPRPCClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.client.Call(ctx, "projects.Projects", "Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *projectsPRPCClient) Ensure(ctx context.Context, in *EnsureRequest, opts ...grpc.CallOption) (*Config, error) {
out := new(Config)
err := c.client.Call(ctx, "projects.Projects", "Ensure", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *projectsPRPCClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Config, error) {
out := new(Config)
err := c.client.Call(ctx, "projects.Projects", "Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *projectsPRPCClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
out := new(ListResponse)
err := c.client.Call(ctx, "projects.Projects", "List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type projectsClient struct {
cc grpc.ClientConnInterface
}
func NewProjectsClient(cc grpc.ClientConnInterface) ProjectsClient {
return &projectsClient{cc}
}
func (c *projectsClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/projects.Projects/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *projectsClient) Ensure(ctx context.Context, in *EnsureRequest, opts ...grpc.CallOption) (*Config, error) {
out := new(Config)
err := c.cc.Invoke(ctx, "/projects.Projects/Ensure", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *projectsClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Config, error) {
out := new(Config)
err := c.cc.Invoke(ctx, "/projects.Projects/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *projectsClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
out := new(ListResponse)
err := c.cc.Invoke(ctx, "/projects.Projects/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ProjectsServer is the server API for Projects service.
type ProjectsServer interface {
// Delete deletes a project.
// Internal API.
Delete(context.Context, *DeleteRequest) (*empty.Empty, error)
// Ensure ensures a project exists.
// Creates a new project or updates an existing one as necessary.
// Internal API.
Ensure(context.Context, *EnsureRequest) (*Config, error)
// Get returns an existing project.
Get(context.Context, *GetRequest) (*Config, error)
// List returns existing projects.
List(context.Context, *ListRequest) (*ListResponse, error)
}
// UnimplementedProjectsServer can be embedded to have forward compatible implementations.
type UnimplementedProjectsServer struct {
}
func (*UnimplementedProjectsServer) Delete(ctx context.Context, req *DeleteRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (*UnimplementedProjectsServer) Ensure(ctx context.Context, req *EnsureRequest) (*Config, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ensure not implemented")
}
func (*UnimplementedProjectsServer) Get(ctx context.Context, req *GetRequest) (*Config, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedProjectsServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func RegisterProjectsServer(s prpc.Registrar, srv ProjectsServer) {
s.RegisterService(&_Projects_serviceDesc, srv)
}
func _Projects_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProjectsServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/projects.Projects/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProjectsServer).Delete(ctx, req.(*DeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Projects_Ensure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnsureRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProjectsServer).Ensure(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/projects.Projects/Ensure",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProjectsServer).Ensure(ctx, req.(*EnsureRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Projects_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProjectsServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/projects.Projects/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProjectsServer).Get(ctx, req.(*GetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Projects_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProjectsServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/projects.Projects/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProjectsServer).List(ctx, req.(*ListRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Projects_serviceDesc = grpc.ServiceDesc{
ServiceName: "projects.Projects",
HandlerType: (*ProjectsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Delete",
Handler: _Projects_Delete_Handler,
},
{
MethodName: "Ensure",
Handler: _Projects_Ensure_Handler,
},
{
MethodName: "Get",
Handler: _Projects_Get_Handler,
},
{
MethodName: "List",
Handler: _Projects_List_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/gce/api/projects/v1/service.proto",
}