// Code generated by protoc-gen-go. DO NOT EDIT.
// source: yandex/cloud/operation/operation.proto

package operation

import (
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	any "github.com/golang/protobuf/ptypes/any"
	timestamp "github.com/golang/protobuf/ptypes/timestamp"
	status "google.golang.org/genproto/googleapis/rpc/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

// An Operation resource. For more information, see [Operation](/docs/api-design-guide/concepts/operation).
type Operation struct {
	// ID of the operation.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Description of the operation. 0-256 characters long.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Creation timestamp.
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// ID of the user or service account who initiated the operation.
	CreatedBy string `protobuf:"bytes,4,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
	// The time when the Operation resource was last modified.
	ModifiedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"`
	// If the value is `false`, it means the operation is still in progress.
	// If `true`, the operation is completed, and either `error` or `response` is available.
	Done bool `protobuf:"varint,6,opt,name=done,proto3" json:"done,omitempty"`
	// Service-specific metadata associated with the operation.
	// It typically contains the ID of the target resource that the operation is performed on.
	// Any method that returns a long-running operation should document the metadata type, if any.
	Metadata *any.Any `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// The operation result.
	// If `done == false` and there was no failure detected, neither `error` nor `response` is set.
	// If `done == false` and there was a failure detected, `error` is set.
	// If `done == true`, exactly one of `error` or `response` is set.
	//
	// Types that are valid to be assigned to Result:
	//	*Operation_Error
	//	*Operation_Response
	Result               isOperation_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

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

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

var xxx_messageInfo_Operation proto.InternalMessageInfo

func (m *Operation) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

func (m *Operation) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

func (m *Operation) GetCreatedAt() *timestamp.Timestamp {
	if m != nil {
		return m.CreatedAt
	}
	return nil
}

func (m *Operation) GetCreatedBy() string {
	if m != nil {
		return m.CreatedBy
	}
	return ""
}

func (m *Operation) GetModifiedAt() *timestamp.Timestamp {
	if m != nil {
		return m.ModifiedAt
	}
	return nil
}

func (m *Operation) GetDone() bool {
	if m != nil {
		return m.Done
	}
	return false
}

func (m *Operation) GetMetadata() *any.Any {
	if m != nil {
		return m.Metadata
	}
	return nil
}

type isOperation_Result interface {
	isOperation_Result()
}

type Operation_Error struct {
	Error *status.Status `protobuf:"bytes,8,opt,name=error,proto3,oneof"`
}

type Operation_Response struct {
	Response *any.Any `protobuf:"bytes,9,opt,name=response,proto3,oneof"`
}

func (*Operation_Error) isOperation_Result() {}

func (*Operation_Response) isOperation_Result() {}

func (m *Operation) GetResult() isOperation_Result {
	if m != nil {
		return m.Result
	}
	return nil
}

func (m *Operation) GetError() *status.Status {
	if x, ok := m.GetResult().(*Operation_Error); ok {
		return x.Error
	}
	return nil
}

func (m *Operation) GetResponse() *any.Any {
	if x, ok := m.GetResult().(*Operation_Response); ok {
		return x.Response
	}
	return nil
}

// XXX_OneofWrappers is for the internal use of the proto package.
func (*Operation) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*Operation_Error)(nil),
		(*Operation_Response)(nil),
	}
}

func init() {
	proto.RegisterType((*Operation)(nil), "yandex.cloud.operation.Operation")
}

func init() {
	proto.RegisterFile("yandex/cloud/operation/operation.proto", fileDescriptor_8a0501b73987a137)
}

var fileDescriptor_8a0501b73987a137 = []byte{
	// 345 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4d, 0x4b, 0xeb, 0x40,
	0x14, 0x86, 0x9b, 0x7e, 0xdd, 0x64, 0x0a, 0x77, 0x31, 0x5c, 0xae, 0x63, 0x41, 0x0c, 0x2e, 0xa4,
	0x08, 0x9d, 0x48, 0x5d, 0x49, 0x57, 0x2d, 0x22, 0xdd, 0x09, 0xd1, 0x95, 0x1b, 0x99, 0x64, 0x4e,
	0xe3, 0x40, 0x93, 0x09, 0x93, 0x13, 0x30, 0x7b, 0x7f, 0xb8, 0x38, 0xd3, 0xa4, 0xe2, 0x07, 0xee,
	0x0e, 0xf3, 0x3e, 0xe7, 0x79, 0x61, 0x38, 0xe4, 0xbc, 0x11, 0x85, 0x84, 0x97, 0x28, 0xdd, 0xe9,
	0x5a, 0x46, 0xba, 0x04, 0x23, 0x50, 0xe9, 0xe2, 0x30, 0xf1, 0xd2, 0x68, 0xd4, 0xf4, 0xbf, 0xe3,
	0xb8, 0xe5, 0x78, 0x97, 0x4e, 0x8f,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