// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v3.21.12 // source: yandex/cloud/operation/operation.proto package operation import ( status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // An Operation resource. For more information, see [Operation](/docs/api-design-guide/concepts/operation). type Operation struct { state protoimpl.MessageState `protogen:"open.v1"` // 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"` // ex: Create VM, Stop VM, Delete Disk, Snapshot Disk, etc // Creation timestamp. CreatedAt *timestamppb.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 *timestamppb.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 *anypb.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"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Operation) Reset() { *x = Operation{} mi := &file_yandex_cloud_operation_operation_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Operation) String() string { return protoimpl.X.MessageStringOf(x) } func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_yandex_cloud_operation_operation_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Operation.ProtoReflect.Descriptor instead. func (*Operation) Descriptor() ([]byte, []int) { return file_yandex_cloud_operation_operation_proto_rawDescGZIP(), []int{0} } func (x *Operation) GetId() string { if x != nil { return x.Id } return "" } func (x *Operation) GetDescription() string { if x != nil { return x.Description } return "" } func (x *Operation) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } func (x *Operation) GetCreatedBy() string { if x != nil { return x.CreatedBy } return "" } func (x *Operation) GetModifiedAt() *timestamppb.Timestamp { if x != nil { return x.ModifiedAt } return nil } func (x *Operation) GetDone() bool { if x != nil { return x.Done } return false } func (x *Operation) GetMetadata() *anypb.Any { if x != nil { return x.Metadata } return nil } func (x *Operation) GetResult() isOperation_Result { if x != nil { return x.Result } return nil } func (x *Operation) GetError() *status.Status { if x != nil { if x, ok := x.Result.(*Operation_Error); ok { return x.Error } } return nil } func (x *Operation) GetResponse() *anypb.Any { if x != nil { if x, ok := x.Result.(*Operation_Response); ok { return x.Response } } return nil } type isOperation_Result interface { isOperation_Result() } type Operation_Error struct { // The error result of the operation in case of failure or cancellation. Error *status.Status `protobuf:"bytes,8,opt,name=error,proto3,oneof"` } type Operation_Response struct { // The normal response of the operation in case of success. // If the original method returns no data on success, such as Delete, // the response is [google.protobuf.Empty]. // If the original method is the standard Create/Update, // the response should be the target resource of the operation. // Any method that returns a long-running operation should document the response type, if any. Response *anypb.Any `protobuf:"bytes,9,opt,name=response,proto3,oneof"` } func (*Operation_Error) isOperation_Result() {} func (*Operation_Response) isOperation_Result() {} var File_yandex_cloud_operation_operation_proto protoreflect.FileDescriptor const file_yandex_cloud_operation_operation_proto_rawDesc = "" + "\n" + "&yandex/cloud/operation/operation.proto\x12\x16yandex.cloud.operation\x1a\x19google/protobuf/any.proto\x1a\x17google/rpc/status.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x84\x03\n" + "\tOperation\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12 \n" + "\vdescription\x18\x02 \x01(\tR\vdescription\x129\n" + "\n" + "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x1d\n" + "\n" + "created_by\x18\x04 \x01(\tR\tcreatedBy\x12;\n" + "\vmodified_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" + "modifiedAt\x12\x12\n" + "\x04done\x18\x06 \x01(\bR\x04done\x120\n" + "\bmetadata\x18\a \x01(\v2\x14.google.protobuf.AnyR\bmetadata\x12*\n" + "\x05error\x18\b \x01(\v2\x12.google.rpc.StatusH\x00R\x05error\x122\n" + "\bresponse\x18\t \x01(\v2\x14.google.protobuf.AnyH\x00R\bresponseB\b\n" + "\x06resultBb\n" + "\x1ayandex.cloud.api.operationZDgithub.com/yandex-cloud/go-genproto/yandex/cloud/operation;operationb\x06proto3" var ( file_yandex_cloud_operation_operation_proto_rawDescOnce sync.Once file_yandex_cloud_operation_operation_proto_rawDescData []byte ) func file_yandex_cloud_operation_operation_proto_rawDescGZIP() []byte { file_yandex_cloud_operation_operation_proto_rawDescOnce.Do(func() { file_yandex_cloud_operation_operation_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_operation_operation_proto_rawDesc), len(file_yandex_cloud_operation_operation_proto_rawDesc))) }) return file_yandex_cloud_operation_operation_proto_rawDescData } var file_yandex_cloud_operation_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_yandex_cloud_operation_operation_proto_goTypes = []any{ (*Operation)(nil), // 0: yandex.cloud.operation.Operation (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp (*anypb.Any)(nil), // 2: google.protobuf.Any (*status.Status)(nil), // 3: google.rpc.Status } var file_yandex_cloud_operation_operation_proto_depIdxs = []int32{ 1, // 0: yandex.cloud.operation.Operation.created_at:type_name -> google.protobuf.Timestamp 1, // 1: yandex.cloud.operation.Operation.modified_at:type_name -> google.protobuf.Timestamp 2, // 2: yandex.cloud.operation.Operation.metadata:type_name -> google.protobuf.Any 3, // 3: yandex.cloud.operation.Operation.error:type_name -> google.rpc.Status 2, // 4: yandex.cloud.operation.Operation.response:type_name -> google.protobuf.Any 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name } func init() { file_yandex_cloud_operation_operation_proto_init() } func file_yandex_cloud_operation_operation_proto_init() { if File_yandex_cloud_operation_operation_proto != nil { return } file_yandex_cloud_operation_operation_proto_msgTypes[0].OneofWrappers = []any{ (*Operation_Error)(nil), (*Operation_Response)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_operation_operation_proto_rawDesc), len(file_yandex_cloud_operation_operation_proto_rawDesc)), NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, GoTypes: file_yandex_cloud_operation_operation_proto_goTypes, DependencyIndexes: file_yandex_cloud_operation_operation_proto_depIdxs, MessageInfos: file_yandex_cloud_operation_operation_proto_msgTypes, }.Build() File_yandex_cloud_operation_operation_proto = out.File file_yandex_cloud_operation_operation_proto_goTypes = nil file_yandex_cloud_operation_operation_proto_depIdxs = nil }