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

package pb

import (
	fmt "fmt"
	math "math"

	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"
)

// 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 GetAttachmentsRequest struct {
	// required, attachment ids
	AttachmentId []string `protobuf:"bytes,1,rep,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename, attachment contain one more file
	Filename []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"`
	// ignore the attachment file content, return the filenames directly
	IgnoreContent        bool     `protobuf:"varint,3,opt,name=ignore_content,json=ignoreContent,proto3" json:"ignore_content,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

var xxx_messageInfo_GetAttachmentsRequest proto.InternalMessageInfo

func (m *GetAttachmentsRequest) GetAttachmentId() []string {
	if m != nil {
		return m.AttachmentId
	}
	return nil
}

func (m *GetAttachmentsRequest) GetFilename() []string {
	if m != nil {
		return m.Filename
	}
	return nil
}

func (m *GetAttachmentsRequest) GetIgnoreContent() bool {
	if m != nil {
		return m.IgnoreContent
	}
	return false
}

type GetAttachmentsResponse struct {
	// attachment_id map to Attachment
	Attachments          map[string]*Attachment `protobuf:"bytes,1,rep,name=attachments,proto3" json:"attachments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

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

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

var xxx_messageInfo_GetAttachmentsResponse proto.InternalMessageInfo

func (m *GetAttachmentsResponse) GetAttachments() map[string]*Attachment {
	if m != nil {
		return m.Attachments
	}
	return nil
}

type Attachment struct {
	// attachment id
	AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename map to content
	AttachmentContent map[string][]byte `protobuf:"bytes,2,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// the time attachment create
	CreateTime           *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (m *Attachment) Reset()         { *m = Attachment{} }
func (m *Attachment) String() string { return proto.CompactTextString(m) }
func (*Attachment) ProtoMessage()    {}
func (*Attachment) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{2}
}

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

var xxx_messageInfo_Attachment proto.InternalMessageInfo

func (m *Attachment) GetAttachmentId() string {
	if m != nil {
		return m.AttachmentId
	}
	return ""
}

func (m *Attachment) GetAttachmentContent() map[string][]byte {
	if m != nil {
		return m.AttachmentContent
	}
	return nil
}

func (m *Attachment) GetCreateTime() *timestamp.Timestamp {
	if m != nil {
		return m.CreateTime
	}
	return nil
}

type CreateAttachmentRequest struct {
	// required, filename map to content
	AttachmentContent    map[string][]byte `protobuf:"bytes,1,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (m *CreateAttachmentRequest) Reset()         { *m = CreateAttachmentRequest{} }
func (m *CreateAttachmentRequest) String() string { return proto.CompactTextString(m) }
func (*CreateAttachmentRequest) ProtoMessage()    {}
func (*CreateAttachmentRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{3}
}

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

var xxx_messageInfo_CreateAttachmentRequest proto.InternalMessageInfo

func (m *CreateAttachmentRequest) GetAttachmentContent() map[string][]byte {
	if m != nil {
		return m.AttachmentContent
	}
	return nil
}

type CreateAttachmentResponse struct {
	// attachment id
	AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// file name
	Filename             []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *CreateAttachmentResponse) Reset()         { *m = CreateAttachmentResponse{} }
func (m *CreateAttachmentResponse) String() string { return proto.CompactTextString(m) }
func (*CreateAttachmentResponse) ProtoMessage()    {}
func (*CreateAttachmentResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{4}
}

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

var xxx_messageInfo_CreateAttachmentResponse proto.InternalMessageInfo

func (m *CreateAttachmentResponse) GetAttachmentId() string {
	if m != nil {
		return m.AttachmentId
	}
	return ""
}

func (m *CreateAttachmentResponse) GetFilename() []string {
	if m != nil {
		return m.Filename
	}
	return nil
}

type AppendAttachmentRequest struct {
	// required, attachment id
	AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename map to content
	AttachmentContent    map[string][]byte `protobuf:"bytes,2,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (m *AppendAttachmentRequest) Reset()         { *m = AppendAttachmentRequest{} }
func (m *AppendAttachmentRequest) String() string { return proto.CompactTextString(m) }
func (*AppendAttachmentRequest) ProtoMessage()    {}
func (*AppendAttachmentRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{5}
}

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

var xxx_messageInfo_AppendAttachmentRequest proto.InternalMessageInfo

func (m *AppendAttachmentRequest) GetAttachmentId() string {
	if m != nil {
		return m.AttachmentId
	}
	return ""
}

func (m *AppendAttachmentRequest) GetAttachmentContent() map[string][]byte {
	if m != nil {
		return m.AttachmentContent
	}
	return nil
}

type AppendAttachmentResponse struct {
	// attachment id
	AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename, attachment contain one more file
	Filename             []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *AppendAttachmentResponse) Reset()         { *m = AppendAttachmentResponse{} }
func (m *AppendAttachmentResponse) String() string { return proto.CompactTextString(m) }
func (*AppendAttachmentResponse) ProtoMessage()    {}
func (*AppendAttachmentResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{6}
}

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

var xxx_messageInfo_AppendAttachmentResponse proto.InternalMessageInfo

func (m *AppendAttachmentResponse) GetAttachmentId() string {
	if m != nil {
		return m.AttachmentId
	}
	return ""
}

func (m *AppendAttachmentResponse) GetFilename() []string {
	if m != nil {
		return m.Filename
	}
	return nil
}

type ReplaceAttachmentRequest struct {
	// required, id of attachment to replace
	AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename map to content
	AttachmentContent    map[string][]byte `protobuf:"bytes,2,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (m *ReplaceAttachmentRequest) Reset()         { *m = ReplaceAttachmentRequest{} }
func (m *ReplaceAttachmentRequest) String() string { return proto.CompactTextString(m) }
func (*ReplaceAttachmentRequest) ProtoMessage()    {}
func (*ReplaceAttachmentRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{7}
}

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

var xxx_messageInfo_ReplaceAttachmentRequest proto.InternalMessageInfo

func (m *ReplaceAttachmentRequest) GetAttachmentId() string {
	if m != nil {
		return m.AttachmentId
	}
	return ""
}

func (m *ReplaceAttachmentRequest) GetAttachmentContent() map[string][]byte {
	if m != nil {
		return m.AttachmentContent
	}
	return nil
}

type ReplaceAttachmentResponse struct {
	// id of attachment replaced
	AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename, attachment contain one more file
	Filename             []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ReplaceAttachmentResponse) Reset()         { *m = ReplaceAttachmentResponse{} }
func (m *ReplaceAttachmentResponse) String() string { return proto.CompactTextString(m) }
func (*ReplaceAttachmentResponse) ProtoMessage()    {}
func (*ReplaceAttachmentResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{8}
}

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

var xxx_messageInfo_ReplaceAttachmentResponse proto.InternalMessageInfo

func (m *ReplaceAttachmentResponse) GetAttachmentId() string {
	if m != nil {
		return m.AttachmentId
	}
	return ""
}

func (m *ReplaceAttachmentResponse) GetFilename() []string {
	if m != nil {
		return m.Filename
	}
	return nil
}

type DeleteAttachmentsRequest struct {
	// required, ids of attachment to delete
	AttachmentId []string `protobuf:"bytes,1,rep,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename, attachment contain one more file
	Filename             []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *DeleteAttachmentsRequest) Reset()         { *m = DeleteAttachmentsRequest{} }
func (m *DeleteAttachmentsRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteAttachmentsRequest) ProtoMessage()    {}
func (*DeleteAttachmentsRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{9}
}

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

var xxx_messageInfo_DeleteAttachmentsRequest proto.InternalMessageInfo

func (m *DeleteAttachmentsRequest) GetAttachmentId() []string {
	if m != nil {
		return m.AttachmentId
	}
	return nil
}

func (m *DeleteAttachmentsRequest) GetFilename() []string {
	if m != nil {
		return m.Filename
	}
	return nil
}

type DeleteAttachmentsResponse struct {
	// ids of attachment deleted
	AttachmentId []string `protobuf:"bytes,1,rep,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename, attachment contain one more file
	Filename             []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *DeleteAttachmentsResponse) Reset()         { *m = DeleteAttachmentsResponse{} }
func (m *DeleteAttachmentsResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteAttachmentsResponse) ProtoMessage()    {}
func (*DeleteAttachmentsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{10}
}

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

var xxx_messageInfo_DeleteAttachmentsResponse proto.InternalMessageInfo

func (m *DeleteAttachmentsResponse) GetAttachmentId() []string {
	if m != nil {
		return m.AttachmentId
	}
	return nil
}

func (m *DeleteAttachmentsResponse) GetFilename() []string {
	if m != nil {
		return m.Filename
	}
	return nil
}

type GetAttachmentRequest struct {
	// required, use attachment id to get attachment
	AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// filename, attachment contain one more file
	Filename             string   `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetAttachmentRequest) Reset()         { *m = GetAttachmentRequest{} }
func (m *GetAttachmentRequest) String() string { return proto.CompactTextString(m) }
func (*GetAttachmentRequest) ProtoMessage()    {}
func (*GetAttachmentRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{11}
}

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

var xxx_messageInfo_GetAttachmentRequest proto.InternalMessageInfo

func (m *GetAttachmentRequest) GetAttachmentId() string {
	if m != nil {
		return m.AttachmentId
	}
	return ""
}

func (m *GetAttachmentRequest) GetFilename() string {
	if m != nil {
		return m.Filename
	}
	return ""
}

type GetAttachmentResponse struct {
	// file content of attachment
	Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// tell server to pack file
	Etag                 string   `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *GetAttachmentResponse) Reset()         { *m = GetAttachmentResponse{} }
func (m *GetAttachmentResponse) String() string { return proto.CompactTextString(m) }
func (*GetAttachmentResponse) ProtoMessage()    {}
func (*GetAttachmentResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_50ce80bdd3ef17d6, []int{12}
}

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

var xxx_messageInfo_GetAttachmentResponse proto.InternalMessageInfo

func (m *GetAttachmentResponse) GetContent() []byte {
	if m != nil {
		return m.Content
	}
	return nil
}

func (m *GetAttachmentResponse) GetEtag() string {
	if m != nil {
		return m.Etag
	}
	return ""
}

func init() {
	proto.RegisterType((*GetAttachmentsRequest)(nil), "openpitrix.GetAttachmentsRequest")
	proto.RegisterType((*GetAttachmentsResponse)(nil), "openpitrix.GetAttachmentsResponse")
	proto.RegisterMapType((map[string]*Attachment)(nil), "openpitrix.GetAttachmentsResponse.AttachmentsEntry")
	proto.RegisterType((*Attachment)(nil), "openpitrix.Attachment")
	proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.Attachment.AttachmentContentEntry")
	proto.RegisterType((*CreateAttachmentRequest)(nil), "openpitrix.CreateAttachmentRequest")
	proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.CreateAttachmentRequest.AttachmentContentEntry")
	proto.RegisterType((*CreateAttachmentResponse)(nil), "openpitrix.CreateAttachmentResponse")
	proto.RegisterType((*AppendAttachmentRequest)(nil), "openpitrix.AppendAttachmentRequest")
	proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.AppendAttachmentRequest.AttachmentContentEntry")
	proto.RegisterType((*AppendAttachmentResponse)(nil), "openpitrix.AppendAttachmentResponse")
	proto.RegisterType((*ReplaceAttachmentRequest)(nil), "openpitrix.ReplaceAttachmentRequest")
	proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.ReplaceAttachmentRequest.AttachmentContentEntry")
	proto.RegisterType((*ReplaceAttachmentResponse)(nil), "openpitrix.ReplaceAttachmentResponse")
	proto.RegisterType((*DeleteAttachmentsRequest)(nil), "openpitrix.DeleteAttachmentsRequest")
	proto.RegisterType((*DeleteAttachmentsResponse)(nil), "openpitrix.DeleteAttachmentsResponse")
	proto.RegisterType((*GetAttachmentRequest)(nil), "openpitrix.GetAttachmentRequest")
	proto.RegisterType((*GetAttachmentResponse)(nil), "openpitrix.GetAttachmentResponse")
}

func init() { proto.RegisterFile("attachment.proto", fileDescriptor_50ce80bdd3ef17d6) }

var fileDescriptor_50ce80bdd3ef17d6 = []byte{
	// 720 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdf, 0x4e, 0x13, 0x4f,
	0x18, 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 0x8b, 0xea, 0xf2, 0x70, 0x50, 0x24, 0xf1, 0x08, 0xca, 0x83, 0xdb, 0x2f,
	0x49, 0x9f, 0x73, 0x4e, 0x24, 0xe9, 0x73, 0x77, 0xf0, 0x0b, 0xa8, 0xa4, 0xc2, 0x48, 0x97, 0x47,
	0xd9, 0x37, 0xea, 0xca, 0x25, 0xa8, 0xa8, 0xc2, 0x3e, 0xcc, 0x26, 0x2f, 0x00, 0x74, 0x71, 0xd8,
	0xe5, 0x20, 0xe4, 0xae, 0x5e, 0x7e, 0x7f, 0xf0, 0xa5, 0xa7, 0xc2, 0x98, 0x94, 0x9e, 0xb7, 0x11,
	0x92, 0xd2, 0x73, 0x13, 0xdd, 0xf8, 0x4c, 0xe4, 0x05, 0x7f, 0x8c, 0xee, 0x99, 0xd5, 0x44, 0xfa,
	0x89, 0xc0, 0x4c, 0x42, 0x12, 0xd5, 0x72, 0xd5, 0xf6, 0x0a, 0x2e, 0x0e, 0x41, 0x84, 0xc5, 0xaa,
	0x8f, 0x2e, 0xb6, 0xee, 0xd2, 0xf5, 0x3d, 0x14, 0x5a, 0x9c, 0xeb, 0x55, 0xad, 0xeb, 0xa1, 0xf4,
	0xae, 0x59, 0x2d, 0x4d, 0xd8, 0x9a, 0x99, 0x00, 0x7d, 0xf8, 0xf6, 0xfd, 0x63, 0xa1, 0x42, 0xaf,
	0xd7, 0xcf, 0xee, 0xd4, 0xa5, 0x1b, 0xd4, 0xfd, 0x89, 0xe7, 0x05, 0xe7, 0xe4, 0xe4, 0xff, 0xe0,
	0x02, 0xb1, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x86, 0x4c, 0xd3, 0xce, 0x0a, 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

// AttachmentManagerClient is the client API for AttachmentManager service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AttachmentManagerClient interface {
	CreateAttachment(ctx context.Context, in *CreateAttachmentRequest, opts ...grpc.CallOption) (*CreateAttachmentResponse, error)
	AppendAttachment(ctx context.Context, in *AppendAttachmentRequest, opts ...grpc.CallOption) (*AppendAttachmentResponse, error)
	ReplaceAttachment(ctx context.Context, in *ReplaceAttachmentRequest, opts ...grpc.CallOption) (*ReplaceAttachmentResponse, error)
	GetAttachments(ctx context.Context, in *GetAttachmentsRequest, opts ...grpc.CallOption) (*GetAttachmentsResponse, error)
	DeleteAttachments(ctx context.Context, in *DeleteAttachmentsRequest, opts ...grpc.CallOption) (*DeleteAttachmentsResponse, error)
}

type attachmentManagerClient struct {
	cc *grpc.ClientConn
}

func NewAttachmentManagerClient(cc *grpc.ClientConn) AttachmentManagerClient {
	return &attachmentManagerClient{cc}
}

func (c *attachmentManagerClient) CreateAttachment(ctx context.Context, in *CreateAttachmentRequest, opts ...grpc.CallOption) (*CreateAttachmentResponse, error) {
	out := new(CreateAttachmentResponse)
	err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/CreateAttachment", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *attachmentManagerClient) AppendAttachment(ctx context.Context, in *AppendAttachmentRequest, opts ...grpc.CallOption) (*AppendAttachmentResponse, error) {
	out := new(AppendAttachmentResponse)
	err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/AppendAttachment", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *attachmentManagerClient) ReplaceAttachment(ctx context.Context, in *ReplaceAttachmentRequest, opts ...grpc.CallOption) (*ReplaceAttachmentResponse, error) {
	out := new(ReplaceAttachmentResponse)
	err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/ReplaceAttachment", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *attachmentManagerClient) GetAttachments(ctx context.Context, in *GetAttachmentsRequest, opts ...grpc.CallOption) (*GetAttachmentsResponse, error) {
	out := new(GetAttachmentsResponse)
	err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/GetAttachments", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *attachmentManagerClient) DeleteAttachments(ctx context.Context, in *DeleteAttachmentsRequest, opts ...grpc.CallOption) (*DeleteAttachmentsResponse, error) {
	out := new(DeleteAttachmentsResponse)
	err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/DeleteAttachments", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AttachmentManagerServer is the server API for AttachmentManager service.
type AttachmentManagerServer interface {
	CreateAttachment(context.Context, *CreateAttachmentRequest) (*CreateAttachmentResponse, error)
	AppendAttachment(context.Context, *AppendAttachmentRequest) (*AppendAttachmentResponse, error)
	ReplaceAttachment(context.Context, *ReplaceAttachmentRequest) (*ReplaceAttachmentResponse, error)
	GetAttachments(context.Context, *GetAttachmentsRequest) (*GetAttachmentsResponse, error)
	DeleteAttachments(context.Context, *DeleteAttachmentsRequest) (*DeleteAttachmentsResponse, error)
}

func RegisterAttachmentManagerServer(s *grpc.Server, srv AttachmentManagerServer) {
	s.RegisterService(&_AttachmentManager_serviceDesc, srv)
}

func _AttachmentManager_CreateAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateAttachmentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AttachmentManagerServer).CreateAttachment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openpitrix.AttachmentManager/CreateAttachment",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AttachmentManagerServer).CreateAttachment(ctx, req.(*CreateAttachmentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AttachmentManager_AppendAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AppendAttachmentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AttachmentManagerServer).AppendAttachment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openpitrix.AttachmentManager/AppendAttachment",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AttachmentManagerServer).AppendAttachment(ctx, req.(*AppendAttachmentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AttachmentManager_ReplaceAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReplaceAttachmentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AttachmentManagerServer).ReplaceAttachment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openpitrix.AttachmentManager/ReplaceAttachment",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AttachmentManagerServer).ReplaceAttachment(ctx, req.(*ReplaceAttachmentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AttachmentManager_GetAttachments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAttachmentsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AttachmentManagerServer).GetAttachments(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openpitrix.AttachmentManager/GetAttachments",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AttachmentManagerServer).GetAttachments(ctx, req.(*GetAttachmentsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AttachmentManager_DeleteAttachments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteAttachmentsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AttachmentManagerServer).DeleteAttachments(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openpitrix.AttachmentManager/DeleteAttachments",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AttachmentManagerServer).DeleteAttachments(ctx, req.(*DeleteAttachmentsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _AttachmentManager_serviceDesc = grpc.ServiceDesc{
	ServiceName: "openpitrix.AttachmentManager",
	HandlerType: (*AttachmentManagerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateAttachment",
			Handler:    _AttachmentManager_CreateAttachment_Handler,
		},
		{
			MethodName: "AppendAttachment",
			Handler:    _AttachmentManager_AppendAttachment_Handler,
		},
		{
			MethodName: "ReplaceAttachment",
			Handler:    _AttachmentManager_ReplaceAttachment_Handler,
		},
		{
			MethodName: "GetAttachments",
			Handler:    _AttachmentManager_GetAttachments_Handler,
		},
		{
			MethodName: "DeleteAttachments",
			Handler:    _AttachmentManager_DeleteAttachments_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "attachment.proto",
}

// AttachmentServiceClient is the client API for AttachmentService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AttachmentServiceClient interface {
	// Get attachment, use attachment id to get attachment
	GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error)
}

type attachmentServiceClient struct {
	cc *grpc.ClientConn
}

func NewAttachmentServiceClient(cc *grpc.ClientConn) AttachmentServiceClient {
	return &attachmentServiceClient{cc}
}

func (c *attachmentServiceClient) GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error) {
	out := new(GetAttachmentResponse)
	err := c.cc.Invoke(ctx, "/openpitrix.AttachmentService/GetAttachment", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AttachmentServiceServer is the server API for AttachmentService service.
type AttachmentServiceServer interface {
	// Get attachment, use attachment id to get attachment
	GetAttachment(context.Context, *GetAttachmentRequest) (*GetAttachmentResponse, error)
}

func RegisterAttachmentServiceServer(s *grpc.Server, srv AttachmentServiceServer) {
	s.RegisterService(&_AttachmentService_serviceDesc, srv)
}

func _AttachmentService_GetAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAttachmentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AttachmentServiceServer).GetAttachment(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/openpitrix.AttachmentService/GetAttachment",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AttachmentServiceServer).GetAttachment(ctx, req.(*GetAttachmentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _AttachmentService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "openpitrix.AttachmentService",
	HandlerType: (*AttachmentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetAttachment",
			Handler:    _AttachmentService_GetAttachment_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "attachment.proto",
}
