pipelines/backend/api/go_client/experiment.pb.go

475 lines
19 KiB
Go

// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: experiment.proto
package api
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
context "golang.org/x/net/context"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
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.ProtoPackageIsVersion2 // please upgrade the proto package
type CreateExperimentRequest struct {
Experiment *Experiment `protobuf:"bytes,1,opt,name=experiment,proto3" json:"experiment,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateExperimentRequest) Reset() { *m = CreateExperimentRequest{} }
func (m *CreateExperimentRequest) String() string { return proto.CompactTextString(m) }
func (*CreateExperimentRequest) ProtoMessage() {}
func (*CreateExperimentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_7daedc28b4b25757, []int{0}
}
func (m *CreateExperimentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateExperimentRequest.Unmarshal(m, b)
}
func (m *CreateExperimentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateExperimentRequest.Marshal(b, m, deterministic)
}
func (m *CreateExperimentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateExperimentRequest.Merge(m, src)
}
func (m *CreateExperimentRequest) XXX_Size() int {
return xxx_messageInfo_CreateExperimentRequest.Size(m)
}
func (m *CreateExperimentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateExperimentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateExperimentRequest proto.InternalMessageInfo
func (m *CreateExperimentRequest) GetExperiment() *Experiment {
if m != nil {
return m.Experiment
}
return nil
}
type GetExperimentRequest struct {
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 *GetExperimentRequest) Reset() { *m = GetExperimentRequest{} }
func (m *GetExperimentRequest) String() string { return proto.CompactTextString(m) }
func (*GetExperimentRequest) ProtoMessage() {}
func (*GetExperimentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_7daedc28b4b25757, []int{1}
}
func (m *GetExperimentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetExperimentRequest.Unmarshal(m, b)
}
func (m *GetExperimentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetExperimentRequest.Marshal(b, m, deterministic)
}
func (m *GetExperimentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetExperimentRequest.Merge(m, src)
}
func (m *GetExperimentRequest) XXX_Size() int {
return xxx_messageInfo_GetExperimentRequest.Size(m)
}
func (m *GetExperimentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetExperimentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetExperimentRequest proto.InternalMessageInfo
func (m *GetExperimentRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type ListExperimentsRequest struct {
PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Can be format of "field_name", "field_name asc" or "field_name des"
// Ascending by default.
SortBy string `protobuf:"bytes,3,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListExperimentsRequest) Reset() { *m = ListExperimentsRequest{} }
func (m *ListExperimentsRequest) String() string { return proto.CompactTextString(m) }
func (*ListExperimentsRequest) ProtoMessage() {}
func (*ListExperimentsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_7daedc28b4b25757, []int{2}
}
func (m *ListExperimentsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListExperimentsRequest.Unmarshal(m, b)
}
func (m *ListExperimentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListExperimentsRequest.Marshal(b, m, deterministic)
}
func (m *ListExperimentsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListExperimentsRequest.Merge(m, src)
}
func (m *ListExperimentsRequest) XXX_Size() int {
return xxx_messageInfo_ListExperimentsRequest.Size(m)
}
func (m *ListExperimentsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListExperimentsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListExperimentsRequest proto.InternalMessageInfo
func (m *ListExperimentsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
func (m *ListExperimentsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListExperimentsRequest) GetSortBy() string {
if m != nil {
return m.SortBy
}
return ""
}
type ListExperimentsResponse struct {
Experiments []*Experiment `protobuf:"bytes,1,rep,name=experiments,proto3" json:"experiments,omitempty"`
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 *ListExperimentsResponse) Reset() { *m = ListExperimentsResponse{} }
func (m *ListExperimentsResponse) String() string { return proto.CompactTextString(m) }
func (*ListExperimentsResponse) ProtoMessage() {}
func (*ListExperimentsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7daedc28b4b25757, []int{3}
}
func (m *ListExperimentsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListExperimentsResponse.Unmarshal(m, b)
}
func (m *ListExperimentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListExperimentsResponse.Marshal(b, m, deterministic)
}
func (m *ListExperimentsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListExperimentsResponse.Merge(m, src)
}
func (m *ListExperimentsResponse) XXX_Size() int {
return xxx_messageInfo_ListExperimentsResponse.Size(m)
}
func (m *ListExperimentsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListExperimentsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListExperimentsResponse proto.InternalMessageInfo
func (m *ListExperimentsResponse) GetExperiments() []*Experiment {
if m != nil {
return m.Experiments
}
return nil
}
func (m *ListExperimentsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
type Experiment struct {
// Output. Unique experiment ID. Generated by API server.
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Required input field. Unique experiment name provided by user.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// Optional input field. Describing the purpose of the experiment
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// Output. The time that the experiment created.
CreatedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Experiment) Reset() { *m = Experiment{} }
func (m *Experiment) String() string { return proto.CompactTextString(m) }
func (*Experiment) ProtoMessage() {}
func (*Experiment) Descriptor() ([]byte, []int) {
return fileDescriptor_7daedc28b4b25757, []int{4}
}
func (m *Experiment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Experiment.Unmarshal(m, b)
}
func (m *Experiment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Experiment.Marshal(b, m, deterministic)
}
func (m *Experiment) XXX_Merge(src proto.Message) {
xxx_messageInfo_Experiment.Merge(m, src)
}
func (m *Experiment) XXX_Size() int {
return xxx_messageInfo_Experiment.Size(m)
}
func (m *Experiment) XXX_DiscardUnknown() {
xxx_messageInfo_Experiment.DiscardUnknown(m)
}
var xxx_messageInfo_Experiment proto.InternalMessageInfo
func (m *Experiment) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Experiment) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Experiment) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *Experiment) GetCreatedAt() *timestamp.Timestamp {
if m != nil {
return m.CreatedAt
}
return nil
}
func init() {
proto.RegisterType((*CreateExperimentRequest)(nil), "api.CreateExperimentRequest")
proto.RegisterType((*GetExperimentRequest)(nil), "api.GetExperimentRequest")
proto.RegisterType((*ListExperimentsRequest)(nil), "api.ListExperimentsRequest")
proto.RegisterType((*ListExperimentsResponse)(nil), "api.ListExperimentsResponse")
proto.RegisterType((*Experiment)(nil), "api.Experiment")
}
func init() { proto.RegisterFile("experiment.proto", fileDescriptor_7daedc28b4b25757) }
var fileDescriptor_7daedc28b4b25757 = []byte{
// 528 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0x25, 0x4e, 0x49, 0x9b, 0x09, 0x69, 0xda,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0x41, 0x1a, 0x58, 0xe5, 0x5f, 0x75, 0x47, 0xa4, 0x59, 0xd7,
0xcf, 0xed, 0xec, 0x55, 0x2e, 0x24, 0x38, 0x86, 0xea, 0x9d, 0x90, 0xe0, 0x81, 0x21, 0x5c, 0x17,
0x9c, 0xd5, 0x5e, 0x6d, 0xd3, 0xcb, 0xc1, 0x27, 0x1b, 0x7b, 0xf9, 0xdf, 0x78, 0xf0, 0x1d, 0x23,
0xd8, 0xbd, 0x6b, 0x39, 0x36, 0x0d, 0xd5, 0xfa, 0xd8, 0xd9, 0xad, 0xf5, 0x97, 0xb3, 0x90, 0xb8,
0x4f, 0x4d, 0xd3, 0x26, 0x6e, 0x1e, 0xb0, 0x77, 0xf6, 0xeb, 0xf4, 0x43, 0xbf, 0x05, 0xdb, 0x01,
0x5d, 0xb0, 0xe4, 0x52, 0xe3, 0x3e, 0xd6, 0xa0, 0x6a, 0x57, 0x0c, 0xed, 0x40, 0x33, 0x9d, 0xa8,
0x8f, 0x47, 0x70, 0x08, 0xa5, 0x1e, 0x31, 0x49, 0x12, 0x1f, 0xee, 0x58, 0x76, 0x95, 0x25, 0xfa,
0x93, 0x90, 0x7c, 0x6a, 0x3e, 0x47, 0xc7, 0x1a, 0x3d, 0x00, 0xb8, 0x05, 0xdc, 0x1b, 0x95, 0x8c,
0x9b, 0x2f, 0xfe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x97, 0x33, 0xcd, 0x24, 0x04, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// 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.SupportPackageIsVersion4
// ExperimentServiceClient is the client API for ExperimentService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ExperimentServiceClient interface {
CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error)
GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error)
ListExperiment(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error)
}
type experimentServiceClient struct {
cc *grpc.ClientConn
}
func NewExperimentServiceClient(cc *grpc.ClientConn) ExperimentServiceClient {
return &experimentServiceClient{cc}
}
func (c *experimentServiceClient) CreateExperiment(ctx context.Context, in *CreateExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) {
out := new(Experiment)
err := c.cc.Invoke(ctx, "/api.ExperimentService/CreateExperiment", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *experimentServiceClient) GetExperiment(ctx context.Context, in *GetExperimentRequest, opts ...grpc.CallOption) (*Experiment, error) {
out := new(Experiment)
err := c.cc.Invoke(ctx, "/api.ExperimentService/GetExperiment", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *experimentServiceClient) ListExperiment(ctx context.Context, in *ListExperimentsRequest, opts ...grpc.CallOption) (*ListExperimentsResponse, error) {
out := new(ListExperimentsResponse)
err := c.cc.Invoke(ctx, "/api.ExperimentService/ListExperiment", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ExperimentServiceServer is the server API for ExperimentService service.
type ExperimentServiceServer interface {
CreateExperiment(context.Context, *CreateExperimentRequest) (*Experiment, error)
GetExperiment(context.Context, *GetExperimentRequest) (*Experiment, error)
ListExperiment(context.Context, *ListExperimentsRequest) (*ListExperimentsResponse, error)
}
func RegisterExperimentServiceServer(s *grpc.Server, srv ExperimentServiceServer) {
s.RegisterService(&_ExperimentService_serviceDesc, srv)
}
func _ExperimentService_CreateExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateExperimentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExperimentServiceServer).CreateExperiment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ExperimentService/CreateExperiment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExperimentServiceServer).CreateExperiment(ctx, req.(*CreateExperimentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExperimentService_GetExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetExperimentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExperimentServiceServer).GetExperiment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ExperimentService/GetExperiment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExperimentServiceServer).GetExperiment(ctx, req.(*GetExperimentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ExperimentService_ListExperiment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListExperimentsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ExperimentServiceServer).ListExperiment(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ExperimentService/ListExperiment",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ExperimentServiceServer).ListExperiment(ctx, req.(*ListExperimentsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ExperimentService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.ExperimentService",
HandlerType: (*ExperimentServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateExperiment",
Handler: _ExperimentService_CreateExperiment_Handler,
},
{
MethodName: "GetExperiment",
Handler: _ExperimentService_GetExperiment_Handler,
},
{
MethodName: "ListExperiment",
Handler: _ExperimentService_ListExperiment_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "experiment.proto",
}