operation.pb.go raw

   1  // Code generated by protoc-gen-go. DO NOT EDIT.
   2  // versions:
   3  // 	protoc-gen-go v1.36.6
   4  // 	protoc        v3.21.12
   5  // source: yandex/cloud/operation/operation.proto
   6  
   7  package operation
   8  
   9  import (
  10  	status "google.golang.org/genproto/googleapis/rpc/status"
  11  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  12  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  13  	anypb "google.golang.org/protobuf/types/known/anypb"
  14  	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
  15  	reflect "reflect"
  16  	sync "sync"
  17  	unsafe "unsafe"
  18  )
  19  
  20  const (
  21  	// Verify that this generated code is sufficiently up-to-date.
  22  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  23  	// Verify that runtime/protoimpl is sufficiently up-to-date.
  24  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  25  )
  26  
  27  // An Operation resource. For more information, see [Operation](/docs/api-design-guide/concepts/operation).
  28  type Operation struct {
  29  	state protoimpl.MessageState `protogen:"open.v1"`
  30  	// ID of the operation.
  31  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  32  	// Description of the operation. 0-256 characters long.
  33  	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // ex: Create VM, Stop VM, Delete Disk, Snapshot Disk, etc
  34  	// Creation timestamp.
  35  	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
  36  	// ID of the user or service account who initiated the operation.
  37  	CreatedBy string `protobuf:"bytes,4,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"`
  38  	// The time when the Operation resource was last modified.
  39  	ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"`
  40  	// If the value is `false`, it means the operation is still in progress.
  41  	// If `true`, the operation is completed, and either `error` or `response` is available.
  42  	Done bool `protobuf:"varint,6,opt,name=done,proto3" json:"done,omitempty"`
  43  	// Service-specific metadata associated with the operation.
  44  	// It typically contains the ID of the target resource that the operation is performed on.
  45  	// Any method that returns a long-running operation should document the metadata type, if any.
  46  	Metadata *anypb.Any `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"`
  47  	// The operation result.
  48  	// If `done == false` and there was no failure detected, neither `error` nor `response` is set.
  49  	// If `done == false` and there was a failure detected, `error` is set.
  50  	// If `done == true`, exactly one of `error` or `response` is set.
  51  	//
  52  	// Types that are valid to be assigned to Result:
  53  	//
  54  	//	*Operation_Error
  55  	//	*Operation_Response
  56  	Result        isOperation_Result `protobuf_oneof:"result"`
  57  	unknownFields protoimpl.UnknownFields
  58  	sizeCache     protoimpl.SizeCache
  59  }
  60  
  61  func (x *Operation) Reset() {
  62  	*x = Operation{}
  63  	mi := &file_yandex_cloud_operation_operation_proto_msgTypes[0]
  64  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  65  	ms.StoreMessageInfo(mi)
  66  }
  67  
  68  func (x *Operation) String() string {
  69  	return protoimpl.X.MessageStringOf(x)
  70  }
  71  
  72  func (*Operation) ProtoMessage() {}
  73  
  74  func (x *Operation) ProtoReflect() protoreflect.Message {
  75  	mi := &file_yandex_cloud_operation_operation_proto_msgTypes[0]
  76  	if x != nil {
  77  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  78  		if ms.LoadMessageInfo() == nil {
  79  			ms.StoreMessageInfo(mi)
  80  		}
  81  		return ms
  82  	}
  83  	return mi.MessageOf(x)
  84  }
  85  
  86  // Deprecated: Use Operation.ProtoReflect.Descriptor instead.
  87  func (*Operation) Descriptor() ([]byte, []int) {
  88  	return file_yandex_cloud_operation_operation_proto_rawDescGZIP(), []int{0}
  89  }
  90  
  91  func (x *Operation) GetId() string {
  92  	if x != nil {
  93  		return x.Id
  94  	}
  95  	return ""
  96  }
  97  
  98  func (x *Operation) GetDescription() string {
  99  	if x != nil {
 100  		return x.Description
 101  	}
 102  	return ""
 103  }
 104  
 105  func (x *Operation) GetCreatedAt() *timestamppb.Timestamp {
 106  	if x != nil {
 107  		return x.CreatedAt
 108  	}
 109  	return nil
 110  }
 111  
 112  func (x *Operation) GetCreatedBy() string {
 113  	if x != nil {
 114  		return x.CreatedBy
 115  	}
 116  	return ""
 117  }
 118  
 119  func (x *Operation) GetModifiedAt() *timestamppb.Timestamp {
 120  	if x != nil {
 121  		return x.ModifiedAt
 122  	}
 123  	return nil
 124  }
 125  
 126  func (x *Operation) GetDone() bool {
 127  	if x != nil {
 128  		return x.Done
 129  	}
 130  	return false
 131  }
 132  
 133  func (x *Operation) GetMetadata() *anypb.Any {
 134  	if x != nil {
 135  		return x.Metadata
 136  	}
 137  	return nil
 138  }
 139  
 140  func (x *Operation) GetResult() isOperation_Result {
 141  	if x != nil {
 142  		return x.Result
 143  	}
 144  	return nil
 145  }
 146  
 147  func (x *Operation) GetError() *status.Status {
 148  	if x != nil {
 149  		if x, ok := x.Result.(*Operation_Error); ok {
 150  			return x.Error
 151  		}
 152  	}
 153  	return nil
 154  }
 155  
 156  func (x *Operation) GetResponse() *anypb.Any {
 157  	if x != nil {
 158  		if x, ok := x.Result.(*Operation_Response); ok {
 159  			return x.Response
 160  		}
 161  	}
 162  	return nil
 163  }
 164  
 165  type isOperation_Result interface {
 166  	isOperation_Result()
 167  }
 168  
 169  type Operation_Error struct {
 170  	// The error result of the operation in case of failure or cancellation.
 171  	Error *status.Status `protobuf:"bytes,8,opt,name=error,proto3,oneof"`
 172  }
 173  
 174  type Operation_Response struct {
 175  	// The normal response of the operation in case of success.
 176  	// If the original method returns no data on success, such as Delete,
 177  	// the response is [google.protobuf.Empty].
 178  	// If the original method is the standard Create/Update,
 179  	// the response should be the target resource of the operation.
 180  	// Any method that returns a long-running operation should document the response type, if any.
 181  	Response *anypb.Any `protobuf:"bytes,9,opt,name=response,proto3,oneof"`
 182  }
 183  
 184  func (*Operation_Error) isOperation_Result() {}
 185  
 186  func (*Operation_Response) isOperation_Result() {}
 187  
 188  var File_yandex_cloud_operation_operation_proto protoreflect.FileDescriptor
 189  
 190  const file_yandex_cloud_operation_operation_proto_rawDesc = "" +
 191  	"\n" +
 192  	"&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" +
 193  	"\tOperation\x12\x0e\n" +
 194  	"\x02id\x18\x01 \x01(\tR\x02id\x12 \n" +
 195  	"\vdescription\x18\x02 \x01(\tR\vdescription\x129\n" +
 196  	"\n" +
 197  	"created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x1d\n" +
 198  	"\n" +
 199  	"created_by\x18\x04 \x01(\tR\tcreatedBy\x12;\n" +
 200  	"\vmodified_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
 201  	"modifiedAt\x12\x12\n" +
 202  	"\x04done\x18\x06 \x01(\bR\x04done\x120\n" +
 203  	"\bmetadata\x18\a \x01(\v2\x14.google.protobuf.AnyR\bmetadata\x12*\n" +
 204  	"\x05error\x18\b \x01(\v2\x12.google.rpc.StatusH\x00R\x05error\x122\n" +
 205  	"\bresponse\x18\t \x01(\v2\x14.google.protobuf.AnyH\x00R\bresponseB\b\n" +
 206  	"\x06resultBb\n" +
 207  	"\x1ayandex.cloud.api.operationZDgithub.com/yandex-cloud/go-genproto/yandex/cloud/operation;operationb\x06proto3"
 208  
 209  var (
 210  	file_yandex_cloud_operation_operation_proto_rawDescOnce sync.Once
 211  	file_yandex_cloud_operation_operation_proto_rawDescData []byte
 212  )
 213  
 214  func file_yandex_cloud_operation_operation_proto_rawDescGZIP() []byte {
 215  	file_yandex_cloud_operation_operation_proto_rawDescOnce.Do(func() {
 216  		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)))
 217  	})
 218  	return file_yandex_cloud_operation_operation_proto_rawDescData
 219  }
 220  
 221  var file_yandex_cloud_operation_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
 222  var file_yandex_cloud_operation_operation_proto_goTypes = []any{
 223  	(*Operation)(nil),             // 0: yandex.cloud.operation.Operation
 224  	(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
 225  	(*anypb.Any)(nil),             // 2: google.protobuf.Any
 226  	(*status.Status)(nil),         // 3: google.rpc.Status
 227  }
 228  var file_yandex_cloud_operation_operation_proto_depIdxs = []int32{
 229  	1, // 0: yandex.cloud.operation.Operation.created_at:type_name -> google.protobuf.Timestamp
 230  	1, // 1: yandex.cloud.operation.Operation.modified_at:type_name -> google.protobuf.Timestamp
 231  	2, // 2: yandex.cloud.operation.Operation.metadata:type_name -> google.protobuf.Any
 232  	3, // 3: yandex.cloud.operation.Operation.error:type_name -> google.rpc.Status
 233  	2, // 4: yandex.cloud.operation.Operation.response:type_name -> google.protobuf.Any
 234  	5, // [5:5] is the sub-list for method output_type
 235  	5, // [5:5] is the sub-list for method input_type
 236  	5, // [5:5] is the sub-list for extension type_name
 237  	5, // [5:5] is the sub-list for extension extendee
 238  	0, // [0:5] is the sub-list for field type_name
 239  }
 240  
 241  func init() { file_yandex_cloud_operation_operation_proto_init() }
 242  func file_yandex_cloud_operation_operation_proto_init() {
 243  	if File_yandex_cloud_operation_operation_proto != nil {
 244  		return
 245  	}
 246  	file_yandex_cloud_operation_operation_proto_msgTypes[0].OneofWrappers = []any{
 247  		(*Operation_Error)(nil),
 248  		(*Operation_Response)(nil),
 249  	}
 250  	type x struct{}
 251  	out := protoimpl.TypeBuilder{
 252  		File: protoimpl.DescBuilder{
 253  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 254  			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_operation_operation_proto_rawDesc), len(file_yandex_cloud_operation_operation_proto_rawDesc)),
 255  			NumEnums:      0,
 256  			NumMessages:   1,
 257  			NumExtensions: 0,
 258  			NumServices:   0,
 259  		},
 260  		GoTypes:           file_yandex_cloud_operation_operation_proto_goTypes,
 261  		DependencyIndexes: file_yandex_cloud_operation_operation_proto_depIdxs,
 262  		MessageInfos:      file_yandex_cloud_operation_operation_proto_msgTypes,
 263  	}.Build()
 264  	File_yandex_cloud_operation_operation_proto = out.File
 265  	file_yandex_cloud_operation_operation_proto_goTypes = nil
 266  	file_yandex_cloud_operation_operation_proto_depIdxs = nil
 267  }
 268