operation

package
v0.0.0-...-80386e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 13 Imported by: 114

Documentation

Index

Constants

View Source
const (
	OperationService_Get_FullMethodName    = "/yandex.cloud.operation.OperationService/Get"
	OperationService_Cancel_FullMethodName = "/yandex.cloud.operation.OperationService/Cancel"
)

Variables

View Source
var File_yandex_cloud_operation_operation_proto protoreflect.FileDescriptor
View Source
var File_yandex_cloud_operation_operation_service_proto protoreflect.FileDescriptor
View Source
var OperationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.operation.OperationService",
	HandlerType: (*OperationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _OperationService_Get_Handler,
		},
		{
			MethodName: "Cancel",
			Handler:    _OperationService_Cancel_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/operation/operation_service.proto",
}

OperationService_ServiceDesc is the grpc.ServiceDesc for OperationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterOperationServiceServer

func RegisterOperationServiceServer(s grpc.ServiceRegistrar, srv OperationServiceServer)

Types

type CancelOperationRequest

type CancelOperationRequest struct {

	// ID of the operation to cancel.
	OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CancelOperationRequest) Descriptor deprecated

func (*CancelOperationRequest) Descriptor() ([]byte, []int)

Deprecated: Use CancelOperationRequest.ProtoReflect.Descriptor instead.

func (*CancelOperationRequest) GetOperationId

func (x *CancelOperationRequest) GetOperationId() string

func (*CancelOperationRequest) ProtoMessage

func (*CancelOperationRequest) ProtoMessage()

func (*CancelOperationRequest) ProtoReflect

func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message

func (*CancelOperationRequest) Reset

func (x *CancelOperationRequest) Reset()

func (*CancelOperationRequest) SetOperationId

func (m *CancelOperationRequest) SetOperationId(v string)

func (*CancelOperationRequest) String

func (x *CancelOperationRequest) String() string

type GetOperationRequest

type GetOperationRequest struct {

	// ID of the Operation resource to return.
	OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetOperationRequest) Descriptor deprecated

func (*GetOperationRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetOperationRequest.ProtoReflect.Descriptor instead.

func (*GetOperationRequest) GetOperationId

func (x *GetOperationRequest) GetOperationId() string

func (*GetOperationRequest) ProtoMessage

func (*GetOperationRequest) ProtoMessage()

func (*GetOperationRequest) ProtoReflect

func (x *GetOperationRequest) ProtoReflect() protoreflect.Message

func (*GetOperationRequest) Reset

func (x *GetOperationRequest) Reset()

func (*GetOperationRequest) SetOperationId

func (m *GetOperationRequest) SetOperationId(v string)

func (*GetOperationRequest) String

func (x *GetOperationRequest) String() string

type 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"` // 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 assignable to Result:
	//
	//	*Operation_Error
	//	*Operation_Response
	Result isOperation_Result `protobuf_oneof:"result"`
	// contains filtered or unexported fields
}

An Operation resource. For more information, see Operation(/docs/api-design-guide/concepts/operation).

func (*Operation) Descriptor deprecated

func (*Operation) Descriptor() ([]byte, []int)

Deprecated: Use Operation.ProtoReflect.Descriptor instead.

func (*Operation) GetCreatedAt

func (x *Operation) GetCreatedAt() *timestamppb.Timestamp

func (*Operation) GetCreatedBy

func (x *Operation) GetCreatedBy() string

func (*Operation) GetDescription

func (x *Operation) GetDescription() string

func (*Operation) GetDone

func (x *Operation) GetDone() bool

func (*Operation) GetError

func (x *Operation) GetError() *status.Status

func (*Operation) GetId

func (x *Operation) GetId() string

func (*Operation) GetMetadata

func (x *Operation) GetMetadata() *anypb.Any

func (*Operation) GetModifiedAt

func (x *Operation) GetModifiedAt() *timestamppb.Timestamp

func (*Operation) GetResponse

func (x *Operation) GetResponse() *anypb.Any

func (*Operation) GetResult

func (m *Operation) GetResult() isOperation_Result

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) ProtoReflect

func (x *Operation) ProtoReflect() protoreflect.Message

func (*Operation) Reset

func (x *Operation) Reset()

func (*Operation) SetCreatedAt

func (m *Operation) SetCreatedAt(v *timestamppb.Timestamp)

func (*Operation) SetCreatedBy

func (m *Operation) SetCreatedBy(v string)

func (*Operation) SetDescription

func (m *Operation) SetDescription(v string)

func (*Operation) SetDone

func (m *Operation) SetDone(v bool)

func (*Operation) SetError

func (m *Operation) SetError(v *status.Status)

func (*Operation) SetId

func (m *Operation) SetId(v string)

func (*Operation) SetMetadata

func (m *Operation) SetMetadata(v *anypb.Any)

func (*Operation) SetModifiedAt

func (m *Operation) SetModifiedAt(v *timestamppb.Timestamp)

func (*Operation) SetResponse

func (m *Operation) SetResponse(v *anypb.Any)

func (*Operation) SetResult

func (m *Operation) SetResult(v Operation_Result)

func (*Operation) String

func (x *Operation) String() string

type OperationServiceClient

type OperationServiceClient interface {
	// Returns the specified Operation resource.
	Get(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error)
	// Cancels the specified operation.
	//
	// Note that currently Object Storage API does not support cancelling operations.
	Cancel(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*Operation, error)
}

OperationServiceClient is the client API for OperationService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

A set of methods for managing operations for asynchronous API requests.

type OperationServiceServer

type OperationServiceServer interface {
	// Returns the specified Operation resource.
	Get(context.Context, *GetOperationRequest) (*Operation, error)
	// Cancels the specified operation.
	//
	// Note that currently Object Storage API does not support cancelling operations.
	Cancel(context.Context, *CancelOperationRequest) (*Operation, error)
}

OperationServiceServer is the server API for OperationService service. All implementations should embed UnimplementedOperationServiceServer for forward compatibility.

A set of methods for managing operations for asynchronous API requests.

type Operation_Error

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

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"`
}

type Operation_Result

type Operation_Result = isOperation_Result

type UnimplementedOperationServiceServer

type UnimplementedOperationServiceServer struct{}

UnimplementedOperationServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedOperationServiceServer) Cancel

func (UnimplementedOperationServiceServer) Get

type UnsafeOperationServiceServer

type UnsafeOperationServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeOperationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OperationServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL