// Code generated by protoc-gen-go. DO NOT EDIT.
// source: token_create.proto

package rpc

import (
	context "context"
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"
	timestamp "github.com/golang/protobuf/ptypes/timestamp"
	wrappers "github.com/golang/protobuf/ptypes/wrappers"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// 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

// TokenCreateRequest is used to describe the input format
// for creating token
type TokenCreateRequest struct {
	AppUid               string                `protobuf:"bytes,1,opt,name=app_uid,json=appUid,proto3" json:"app_uid,omitempty"`
	AppSecret            string                `protobuf:"bytes,2,opt,name=app_secret,json=appSecret,proto3" json:"app_secret,omitempty"`
	Path                 *wrappers.StringValue `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
	Ip                   *wrappers.StringValue `protobuf:"bytes,5,opt,name=ip,proto3" json:"ip,omitempty"`
	Secret               *wrappers.StringValue `protobuf:"bytes,6,opt,name=secret,proto3" json:"secret,omitempty"`
	AvailableTimes       *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=available_times,json=availableTimes,proto3" json:"available_times,omitempty"`
	ReadOnly             *wrappers.BoolValue   `protobuf:"bytes,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
	ExpiredAt            *timestamp.Timestamp  `protobuf:"bytes,9,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

func (m *TokenCreateRequest) Reset()         { *m = TokenCreateRequest{} }
func (m *TokenCreateRequest) String() string { return proto.CompactTextString(m) }
func (*TokenCreateRequest) ProtoMessage()    {}
func (*TokenCreateRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_56b81cc36ca68ccc, []int{0}
}

func (m *TokenCreateRequest) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_TokenCreateRequest.Unmarshal(m, b)
}
func (m *TokenCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_TokenCreateRequest.Marshal(b, m, deterministic)
}
func (m *TokenCreateRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TokenCreateRequest.Merge(m, src)
}
func (m *TokenCreateRequest) XXX_Size() int {
	return xxx_messageInfo_TokenCreateRequest.Size(m)
}
func (m *TokenCreateRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_TokenCreateRequest.DiscardUnknown(m)
}

var xxx_messageInfo_TokenCreateRequest proto.InternalMessageInfo

func (m *TokenCreateRequest) GetAppUid() string {
	if m != nil {
		return m.AppUid
	}
	return ""
}

func (m *TokenCreateRequest) GetAppSecret() string {
	if m != nil {
		return m.AppSecret
	}
	return ""
}

func (m *TokenCreateRequest) GetPath() *wrappers.StringValue {
	if m != nil {
		return m.Path
	}
	return nil
}

func (m *TokenCreateRequest) GetIp() *wrappers.StringValue {
	if m != nil {
		return m.Ip
	}
	return nil
}

func (m *TokenCreateRequest) GetSecret() *wrappers.StringValue {
	if m != nil {
		return m.Secret
	}
	return nil
}

func (m *TokenCreateRequest) GetAvailableTimes() *wrappers.UInt32Value {
	if m != nil {
		return m.AvailableTimes
	}
	return nil
}

func (m *TokenCreateRequest) GetReadOnly() *wrappers.BoolValue {
	if m != nil {
		return m.ReadOnly
	}
	return nil
}

func (m *TokenCreateRequest) GetExpiredAt() *timestamp.Timestamp {
	if m != nil {
		return m.ExpiredAt
	}
	return nil
}

// TokenCreateResponse
type TokenCreateResponse struct {
	RequestId            uint64   `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	Token                *Token   `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *TokenCreateResponse) Reset()         { *m = TokenCreateResponse{} }
func (m *TokenCreateResponse) String() string { return proto.CompactTextString(m) }
func (*TokenCreateResponse) ProtoMessage()    {}
func (*TokenCreateResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_56b81cc36ca68ccc, []int{1}
}

func (m *TokenCreateResponse) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_TokenCreateResponse.Unmarshal(m, b)
}
func (m *TokenCreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_TokenCreateResponse.Marshal(b, m, deterministic)
}
func (m *TokenCreateResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_TokenCreateResponse.Merge(m, src)
}
func (m *TokenCreateResponse) XXX_Size() int {
	return xxx_messageInfo_TokenCreateResponse.Size(m)
}
func (m *TokenCreateResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_TokenCreateResponse.DiscardUnknown(m)
}

var xxx_messageInfo_TokenCreateResponse proto.InternalMessageInfo

func (m *TokenCreateResponse) GetRequestId() uint64 {
	if m != nil {
		return m.RequestId
	}
	return 0
}

func (m *TokenCreateResponse) GetToken() *Token {
	if m != nil {
		return m.Token
	}
	return nil
}

func init() {
	proto.RegisterType((*TokenCreateRequest)(nil), "bigfile.token_create.TokenCreateRequest")
	proto.RegisterType((*TokenCreateResponse)(nil), "bigfile.token_create.TokenCreateResponse")
}

func init() { proto.RegisterFile("token_create.proto", fileDescriptor_56b81cc36ca68ccc) }

var fileDescriptor_56b81cc36ca68ccc = []byte{
	// 446 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6f, 0xd3, 0x30,
	0x14, 0xc6, 0x49, 0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0xe7, 0x5d, 0x73, 0x1e, 0x7c, 0x3e, 0xae, 0x84, 0xb9, 0x6a, 0x73, 0x56, 0xc8, 0xe5, 0xd4, 0x0b,
	0x36, 0x5f, 0x85, 0xc5, 0xdf, 0x20, 0xf8, 0x1d, 0xee, 0x25, 0xf3, 0xf4, 0x4f, 0x78, 0x94, 0x78,
	0xbf, 0xf9, 0x26, 0x0d, 0x51, 0x7d, 0x10, 0x35, 0x2c, 0x56, 0x08, 0x3a, 0xef, 0xdb, 0x35, 0xa7,
	0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x1e, 0x7a, 0x1d, 0x6c, 0x03, 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

// TokenCreateClient is the client API for TokenCreate service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TokenCreateClient interface {
	TokenCreate(ctx context.Context, in *TokenCreateRequest, opts ...grpc.CallOption) (*TokenCreateResponse, error)
}

type tokenCreateClient struct {
	cc *grpc.ClientConn
}

func NewTokenCreateClient(cc *grpc.ClientConn) TokenCreateClient {
	return &tokenCreateClient{cc}
}

func (c *tokenCreateClient) TokenCreate(ctx context.Context, in *TokenCreateRequest, opts ...grpc.CallOption) (*TokenCreateResponse, error) {
	out := new(TokenCreateResponse)
	err := c.cc.Invoke(ctx, "/bigfile.token_create.TokenCreate/tokenCreate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TokenCreateServer is the server API for TokenCreate service.
type TokenCreateServer interface {
	TokenCreate(context.Context, *TokenCreateRequest) (*TokenCreateResponse, error)
}

// UnimplementedTokenCreateServer can be embedded to have forward compatible implementations.
type UnimplementedTokenCreateServer struct {
}

func (*UnimplementedTokenCreateServer) TokenCreate(ctx context.Context, req *TokenCreateRequest) (*TokenCreateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method TokenCreate not implemented")
}

func RegisterTokenCreateServer(s *grpc.Server, srv TokenCreateServer) {
	s.RegisterService(&_TokenCreate_serviceDesc, srv)
}

func _TokenCreate_TokenCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TokenCreateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TokenCreateServer).TokenCreate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/bigfile.token_create.TokenCreate/TokenCreate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TokenCreateServer).TokenCreate(ctx, req.(*TokenCreateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _TokenCreate_serviceDesc = grpc.ServiceDesc{
	ServiceName: "bigfile.token_create.TokenCreate",
	HandlerType: (*TokenCreateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "tokenCreate",
			Handler:    _TokenCreate_TokenCreate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "token_create.proto",
}
