Constants
DirectAccessService_CreateDeviceSession_FullMethodName, DirectAccessService_ListDeviceSessions_FullMethodName, DirectAccessService_GetDeviceSession_FullMethodName, DirectAccessService_CancelDeviceSession_FullMethodName, DirectAccessService_UpdateDeviceSession_FullMethodName, DirectAccessService_AdbConnect_FullMethodName
const (
DirectAccessService_CreateDeviceSession_FullMethodName = "/google.cloud.devicestreaming.v1.DirectAccessService/CreateDeviceSession"
DirectAccessService_ListDeviceSessions_FullMethodName = "/google.cloud.devicestreaming.v1.DirectAccessService/ListDeviceSessions"
DirectAccessService_GetDeviceSession_FullMethodName = "/google.cloud.devicestreaming.v1.DirectAccessService/GetDeviceSession"
DirectAccessService_CancelDeviceSession_FullMethodName = "/google.cloud.devicestreaming.v1.DirectAccessService/CancelDeviceSession"
DirectAccessService_UpdateDeviceSession_FullMethodName = "/google.cloud.devicestreaming.v1.DirectAccessService/UpdateDeviceSession"
DirectAccessService_AdbConnect_FullMethodName = "/google.cloud.devicestreaming.v1.DirectAccessService/AdbConnect"
)Variables
StatusUpdate_DeviceState_name, StatusUpdate_DeviceState_value
var (
StatusUpdate_DeviceState_name = map[int32]string{
0: "DEVICE_STATE_UNSPECIFIED",
1: "DEVICE",
2: "RECOVERY",
3: "RESCUE",
4: "SIDELOAD",
10: "MISSING",
11: "OFFLINE",
12: "UNAUTHORIZED",
13: "AUTHORIZING",
14: "CONNECTING",
}
StatusUpdate_DeviceState_value = map[string]int32{
"DEVICE_STATE_UNSPECIFIED": 0,
"DEVICE": 1,
"RECOVERY": 2,
"RESCUE": 3,
"SIDELOAD": 4,
"MISSING": 10,
"OFFLINE": 11,
"UNAUTHORIZED": 12,
"AUTHORIZING": 13,
"CONNECTING": 14,
}
)Enum value maps for StatusUpdate_DeviceState.
DeviceSession_SessionState_name, DeviceSession_SessionState_value
var (
DeviceSession_SessionState_name = map[int32]string{
0: "SESSION_STATE_UNSPECIFIED",
1: "REQUESTED",
2: "PENDING",
3: "ACTIVE",
4: "EXPIRED",
5: "FINISHED",
6: "UNAVAILABLE",
7: "ERROR",
}
DeviceSession_SessionState_value = map[string]int32{
"SESSION_STATE_UNSPECIFIED": 0,
"REQUESTED": 1,
"PENDING": 2,
"ACTIVE": 3,
"EXPIRED": 4,
"FINISHED": 5,
"UNAVAILABLE": 6,
"ERROR": 7,
}
)Enum value maps for DeviceSession_SessionState.
DirectAccessService_ServiceDesc
var DirectAccessService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.devicestreaming.v1.DirectAccessService",
HandlerType: (*DirectAccessServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateDeviceSession",
Handler: _DirectAccessService_CreateDeviceSession_Handler,
},
{
MethodName: "ListDeviceSessions",
Handler: _DirectAccessService_ListDeviceSessions_Handler,
},
{
MethodName: "GetDeviceSession",
Handler: _DirectAccessService_GetDeviceSession_Handler,
},
{
MethodName: "CancelDeviceSession",
Handler: _DirectAccessService_CancelDeviceSession_Handler,
},
{
MethodName: "UpdateDeviceSession",
Handler: _DirectAccessService_UpdateDeviceSession_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "AdbConnect",
Handler: _DirectAccessService_AdbConnect_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "google/cloud/devicestreaming/v1/service.proto",
}DirectAccessService_ServiceDesc is the grpc.ServiceDesc for DirectAccessService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
File_google_cloud_devicestreaming_v1_adb_service_proto
var File_google_cloud_devicestreaming_v1_adb_service_proto protoreflect.FileDescriptorFile_google_cloud_devicestreaming_v1_service_proto
var File_google_cloud_devicestreaming_v1_service_proto protoreflect.FileDescriptorFunctions
func RegisterDirectAccessServiceServer
func RegisterDirectAccessServiceServer(s grpc.ServiceRegistrar, srv DirectAccessServiceServer)AdbMessage
type AdbMessage struct {
// Types that are assignable to Contents:
//
// *AdbMessage_Open
// *AdbMessage_StreamData
Contents isAdbMessage_Contents `protobuf_oneof:"contents"`
// contains filtered or unexported fields
}A message to an ADB server.
func (*AdbMessage) Descriptor
func (*AdbMessage) Descriptor() ([]byte, []int)Deprecated: Use AdbMessage.ProtoReflect.Descriptor instead.
func (*AdbMessage) GetContents
func (m *AdbMessage) GetContents() isAdbMessage_Contentsfunc (*AdbMessage) GetOpen
func (x *AdbMessage) GetOpen() *Openfunc (*AdbMessage) GetStreamData
func (x *AdbMessage) GetStreamData() *StreamDatafunc (*AdbMessage) ProtoMessage
func (*AdbMessage) ProtoMessage()func (*AdbMessage) ProtoReflect
func (x *AdbMessage) ProtoReflect() protoreflect.Messagefunc (*AdbMessage) Reset
func (x *AdbMessage) Reset()func (*AdbMessage) String
func (x *AdbMessage) String() stringAdbMessage_Open
type AdbMessage_Open struct {
// Open a new stream.
Open *Open `protobuf:"bytes,1,opt,name=open,proto3,oneof"`
}AdbMessage_StreamData
type AdbMessage_StreamData struct {
// Send data to a stream.
StreamData *StreamData `protobuf:"bytes,2,opt,name=stream_data,json=streamData,proto3,oneof"`
}AndroidDevice
type AndroidDevice struct {
// Required. The id of the Android device to be used.
// Use the TestEnvironmentDiscoveryService to get supported options.
AndroidModelId string `protobuf:"bytes,1,opt,name=android_model_id,json=androidModelId,proto3" json:"android_model_id,omitempty"`
// Required. The id of the Android OS version to be used.
// Use the TestEnvironmentDiscoveryService to get supported options.
AndroidVersionId string `protobuf:"bytes,2,opt,name=android_version_id,json=androidVersionId,proto3" json:"android_version_id,omitempty"`
// Optional. The locale the test device used for testing.
// Use the TestEnvironmentDiscoveryService to get supported options.
Locale string `protobuf:"bytes,3,opt,name=locale,proto3" json:"locale,omitempty"`
// Optional. How the device is oriented during the test.
// Use the TestEnvironmentDiscoveryService to get supported options.
Orientation string `protobuf:"bytes,4,opt,name=orientation,proto3" json:"orientation,omitempty"`
// contains filtered or unexported fields
}A single Android device.
func (*AndroidDevice) Descriptor
func (*AndroidDevice) Descriptor() ([]byte, []int)Deprecated: Use AndroidDevice.ProtoReflect.Descriptor instead.
func (*AndroidDevice) GetAndroidModelId
func (x *AndroidDevice) GetAndroidModelId() stringfunc (*AndroidDevice) GetAndroidVersionId
func (x *AndroidDevice) GetAndroidVersionId() stringfunc (*AndroidDevice) GetLocale
func (x *AndroidDevice) GetLocale() stringfunc (*AndroidDevice) GetOrientation
func (x *AndroidDevice) GetOrientation() stringfunc (*AndroidDevice) ProtoMessage
func (*AndroidDevice) ProtoMessage()func (*AndroidDevice) ProtoReflect
func (x *AndroidDevice) ProtoReflect() protoreflect.Messagefunc (*AndroidDevice) Reset
func (x *AndroidDevice) Reset()func (*AndroidDevice) String
func (x *AndroidDevice) String() stringCancelDeviceSessionRequest
type CancelDeviceSessionRequest struct {
// Required. Name of the DeviceSession, e.g.
// "projects/{project_id}/deviceSessions/{session_id}"
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for DirectAccessService.CancelDeviceSession.
func (*CancelDeviceSessionRequest) Descriptor
func (*CancelDeviceSessionRequest) Descriptor() ([]byte, []int)Deprecated: Use CancelDeviceSessionRequest.ProtoReflect.Descriptor instead.
func (*CancelDeviceSessionRequest) GetName
func (x *CancelDeviceSessionRequest) GetName() stringfunc (*CancelDeviceSessionRequest) ProtoMessage
func (*CancelDeviceSessionRequest) ProtoMessage()func (*CancelDeviceSessionRequest) ProtoReflect
func (x *CancelDeviceSessionRequest) ProtoReflect() protoreflect.Messagefunc (*CancelDeviceSessionRequest) Reset
func (x *CancelDeviceSessionRequest) Reset()func (*CancelDeviceSessionRequest) String
func (x *CancelDeviceSessionRequest) String() stringClose
type Close struct {
// contains filtered or unexported fields
}Message signifying that the stream closed.
func (*Close) Descriptor
Deprecated: Use Close.ProtoReflect.Descriptor instead.
func (*Close) ProtoMessage
func (*Close) ProtoMessage()func (*Close) ProtoReflect
func (x *Close) ProtoReflect() protoreflect.Messagefunc (*Close) Reset
func (x *Close) Reset()func (*Close) String
CreateDeviceSessionRequest
type CreateDeviceSessionRequest struct {
// Required. The Compute Engine project under which this device will be
// allocated. "projects/{project_id}"
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. A DeviceSession to create.
DeviceSession *DeviceSession `protobuf:"bytes,2,opt,name=device_session,json=deviceSession,proto3" json:"device_session,omitempty"`
// Optional. The ID to use for the DeviceSession, which will become the final
// component of the DeviceSession's resource name.
//
// This value should be 4-63 characters, and valid characters
// are /[a-z][0-9]-/.
DeviceSessionId string `protobuf:"bytes,4,opt,name=device_session_id,json=deviceSessionId,proto3" json:"device_session_id,omitempty"`
// contains filtered or unexported fields
}Request message for DirectAccessService.CreateDeviceSession.
func (*CreateDeviceSessionRequest) Descriptor
func (*CreateDeviceSessionRequest) Descriptor() ([]byte, []int)Deprecated: Use CreateDeviceSessionRequest.ProtoReflect.Descriptor instead.
func (*CreateDeviceSessionRequest) GetDeviceSession
func (x *CreateDeviceSessionRequest) GetDeviceSession() *DeviceSessionfunc (*CreateDeviceSessionRequest) GetDeviceSessionId
func (x *CreateDeviceSessionRequest) GetDeviceSessionId() stringfunc (*CreateDeviceSessionRequest) GetParent
func (x *CreateDeviceSessionRequest) GetParent() stringfunc (*CreateDeviceSessionRequest) ProtoMessage
func (*CreateDeviceSessionRequest) ProtoMessage()func (*CreateDeviceSessionRequest) ProtoReflect
func (x *CreateDeviceSessionRequest) ProtoReflect() protoreflect.Messagefunc (*CreateDeviceSessionRequest) Reset
func (x *CreateDeviceSessionRequest) Reset()func (*CreateDeviceSessionRequest) String
func (x *CreateDeviceSessionRequest) String() stringDeviceMessage
type DeviceMessage struct {
// Types that are assignable to Contents:
//
// *DeviceMessage_StatusUpdate
// *DeviceMessage_StreamStatus
// *DeviceMessage_StreamData
Contents isDeviceMessage_Contents `protobuf_oneof:"contents"`
// contains filtered or unexported fields
}A message returned from a device.
func (*DeviceMessage) Descriptor
func (*DeviceMessage) Descriptor() ([]byte, []int)Deprecated: Use DeviceMessage.ProtoReflect.Descriptor instead.
func (*DeviceMessage) GetContents
func (m *DeviceMessage) GetContents() isDeviceMessage_Contentsfunc (*DeviceMessage) GetStatusUpdate
func (x *DeviceMessage) GetStatusUpdate() *StatusUpdatefunc (*DeviceMessage) GetStreamData
func (x *DeviceMessage) GetStreamData() *StreamDatafunc (*DeviceMessage) GetStreamStatus
func (x *DeviceMessage) GetStreamStatus() *StreamStatusfunc (*DeviceMessage) ProtoMessage
func (*DeviceMessage) ProtoMessage()func (*DeviceMessage) ProtoReflect
func (x *DeviceMessage) ProtoReflect() protoreflect.Messagefunc (*DeviceMessage) Reset
func (x *DeviceMessage) Reset()func (*DeviceMessage) String
func (x *DeviceMessage) String() stringDeviceMessage_StatusUpdate
type DeviceMessage_StatusUpdate struct {
// Information about the device's state.
StatusUpdate *StatusUpdate `protobuf:"bytes,1,opt,name=status_update,json=statusUpdate,proto3,oneof"`
}DeviceMessage_StreamData
type DeviceMessage_StreamData struct {
// Data from an open stream.
StreamData *StreamData `protobuf:"bytes,3,opt,name=stream_data,json=streamData,proto3,oneof"`
}DeviceMessage_StreamStatus
type DeviceMessage_StreamStatus struct {
// The result of a device stream from ADB.
StreamStatus *StreamStatus `protobuf:"bytes,2,opt,name=stream_status,json=streamStatus,proto3,oneof"`
}DeviceSession
type DeviceSession struct {
// Optional. Name of the DeviceSession, e.g.
// "projects/{project_id}/deviceSessions/{session_id}"
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The title of the DeviceSession to be presented in the UI.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Output only. Current state of the DeviceSession.
State DeviceSession_SessionState `protobuf:"varint,3,opt,name=state,proto3,enum=google.cloud.devicestreaming.v1.DeviceSession_SessionState" json:"state,omitempty"`
// Output only. The historical state transitions of the session_state message
// including the current session state.
StateHistories []*DeviceSession_SessionStateEvent `protobuf:"bytes,14,rep,name=state_histories,json=stateHistories,proto3" json:"state_histories,omitempty"`
// The amount of time that a device will be initially allocated for.
//
// Types that are assignable to Expiration:
//
// *DeviceSession_Ttl
// *DeviceSession_ExpireTime
Expiration isDeviceSession_Expiration `protobuf_oneof:"expiration"`
// Output only. The interval of time that this device must be interacted with
// before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
InactivityTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=inactivity_timeout,json=inactivityTimeout,proto3" json:"inactivity_timeout,omitempty"`
// Output only. The time that the Session was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The timestamp that the session first became ACTIVE.
ActiveStartTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=active_start_time,json=activeStartTime,proto3" json:"active_start_time,omitempty"`
// Required. The requested device
AndroidDevice *AndroidDevice `protobuf:"bytes,15,opt,name=android_device,json=androidDevice,proto3" json:"android_device,omitempty"`
// contains filtered or unexported fields
}Protobuf message describing the device message, used from several RPCs.
func (*DeviceSession) Descriptor
func (*DeviceSession) Descriptor() ([]byte, []int)Deprecated: Use DeviceSession.ProtoReflect.Descriptor instead.
func (*DeviceSession) GetActiveStartTime
func (x *DeviceSession) GetActiveStartTime() *timestamppb.Timestampfunc (*DeviceSession) GetAndroidDevice
func (x *DeviceSession) GetAndroidDevice() *AndroidDevicefunc (*DeviceSession) GetCreateTime
func (x *DeviceSession) GetCreateTime() *timestamppb.Timestampfunc (*DeviceSession) GetDisplayName
func (x *DeviceSession) GetDisplayName() stringfunc (*DeviceSession) GetExpiration
func (m *DeviceSession) GetExpiration() isDeviceSession_Expirationfunc (*DeviceSession) GetExpireTime
func (x *DeviceSession) GetExpireTime() *timestamppb.Timestampfunc (*DeviceSession) GetInactivityTimeout
func (x *DeviceSession) GetInactivityTimeout() *durationpb.Durationfunc (*DeviceSession) GetName
func (x *DeviceSession) GetName() stringfunc (*DeviceSession) GetState
func (x *DeviceSession) GetState() DeviceSession_SessionStatefunc (*DeviceSession) GetStateHistories
func (x *DeviceSession) GetStateHistories() []*DeviceSession_SessionStateEventfunc (*DeviceSession) GetTtl
func (x *DeviceSession) GetTtl() *durationpb.Durationfunc (*DeviceSession) ProtoMessage
func (*DeviceSession) ProtoMessage()func (*DeviceSession) ProtoReflect
func (x *DeviceSession) ProtoReflect() protoreflect.Messagefunc (*DeviceSession) Reset
func (x *DeviceSession) Reset()func (*DeviceSession) String
func (x *DeviceSession) String() stringDeviceSession_ExpireTime
type DeviceSession_ExpireTime struct {
// Optional. If the device is still in use at this time, any connections
// will be ended and the SessionState will transition from ACTIVE to
// FINISHED.
ExpireTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expire_time,json=expireTime,proto3,oneof"`
}DeviceSession_SessionState
type DeviceSession_SessionState int32The state that the DeviceSession resides.
DeviceSession_SESSION_STATE_UNSPECIFIED, DeviceSession_REQUESTED, DeviceSession_PENDING, DeviceSession_ACTIVE, DeviceSession_EXPIRED, DeviceSession_FINISHED, DeviceSession_UNAVAILABLE, DeviceSession_ERROR
const (
// Default value. This value is unused.
DeviceSession_SESSION_STATE_UNSPECIFIED DeviceSession_SessionState = 0
// Initial state of a session request. The session is being validated for
// correctness and a device is not yet requested.
DeviceSession_REQUESTED DeviceSession_SessionState = 1
// The session has been validated and is in the queue for a device.
DeviceSession_PENDING DeviceSession_SessionState = 2
// The session has been granted and the device is accepting
// connections.
DeviceSession_ACTIVE DeviceSession_SessionState = 3
// The session duration exceeded the device's reservation time period and
// timed out automatically.
DeviceSession_EXPIRED DeviceSession_SessionState = 4
// The user is finished with the session and it was canceled by the user
// while the request was still getting allocated or after allocation and
// during device usage period.
DeviceSession_FINISHED DeviceSession_SessionState = 5
// Unable to complete the session because the device was unavailable and
// it failed to allocate through the scheduler. For example, a device not
// in the catalog was requested or the request expired in the allocation
// queue.
DeviceSession_UNAVAILABLE DeviceSession_SessionState = 6
// Unable to complete the session for an internal reason, such as an
// infrastructure failure.
DeviceSession_ERROR DeviceSession_SessionState = 7
)func (DeviceSession_SessionState) Descriptor
func (DeviceSession_SessionState) Descriptor() protoreflect.EnumDescriptorfunc (DeviceSession_SessionState) Enum
func (x DeviceSession_SessionState) Enum() *DeviceSession_SessionStatefunc (DeviceSession_SessionState) EnumDescriptor
func (DeviceSession_SessionState) EnumDescriptor() ([]byte, []int)Deprecated: Use DeviceSession_SessionState.Descriptor instead.
func (DeviceSession_SessionState) Number
func (x DeviceSession_SessionState) Number() protoreflect.EnumNumberfunc (DeviceSession_SessionState) String
func (x DeviceSession_SessionState) String() stringfunc (DeviceSession_SessionState) Type
func (DeviceSession_SessionState) Type() protoreflect.EnumTypeDeviceSession_SessionStateEvent
type DeviceSession_SessionStateEvent struct {
// Output only. The session_state tracked by this event
SessionState DeviceSession_SessionState `protobuf:"varint,1,opt,name=session_state,json=sessionState,proto3,enum=google.cloud.devicestreaming.v1.DeviceSession_SessionState" json:"session_state,omitempty"`
// Output only. The time that the session_state first encountered that
// state.
EventTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=event_time,json=eventTime,proto3" json:"event_time,omitempty"`
// Output only. A human-readable message to explain the state.
StateMessage string `protobuf:"bytes,3,opt,name=state_message,json=stateMessage,proto3" json:"state_message,omitempty"`
// contains filtered or unexported fields
}A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.
func (*DeviceSession_SessionStateEvent) Descriptor
func (*DeviceSession_SessionStateEvent) Descriptor() ([]byte, []int)Deprecated: Use DeviceSession_SessionStateEvent.ProtoReflect.Descriptor instead.
func (*DeviceSession_SessionStateEvent) GetEventTime
func (x *DeviceSession_SessionStateEvent) GetEventTime() *timestamppb.Timestampfunc (*DeviceSession_SessionStateEvent) GetSessionState
func (x *DeviceSession_SessionStateEvent) GetSessionState() DeviceSession_SessionStatefunc (*DeviceSession_SessionStateEvent) GetStateMessage
func (x *DeviceSession_SessionStateEvent) GetStateMessage() stringfunc (*DeviceSession_SessionStateEvent) ProtoMessage
func (*DeviceSession_SessionStateEvent) ProtoMessage()func (*DeviceSession_SessionStateEvent) ProtoReflect
func (x *DeviceSession_SessionStateEvent) ProtoReflect() protoreflect.Messagefunc (*DeviceSession_SessionStateEvent) Reset
func (x *DeviceSession_SessionStateEvent) Reset()func (*DeviceSession_SessionStateEvent) String
func (x *DeviceSession_SessionStateEvent) String() stringDeviceSession_Ttl
type DeviceSession_Ttl struct {
// Optional. The amount of time that a device will be initially allocated
// for. This can eventually be extended with the UpdateDeviceSession RPC.
// Default: 15 minutes.
Ttl *durationpb.Duration `protobuf:"bytes,13,opt,name=ttl,proto3,oneof"`
}DirectAccessServiceClient
type DirectAccessServiceClient interface {
// Creates a DeviceSession.
CreateDeviceSession(ctx context.Context, in *CreateDeviceSessionRequest, opts ...grpc.CallOption) (*DeviceSession, error)
// Lists DeviceSessions owned by the project user.
ListDeviceSessions(ctx context.Context, in *ListDeviceSessionsRequest, opts ...grpc.CallOption) (*ListDeviceSessionsResponse, error)
// Gets a DeviceSession, which documents the allocation status and
// whether the device is allocated. Clients making requests from this API
// must poll GetDeviceSession.
GetDeviceSession(ctx context.Context, in *GetDeviceSessionRequest, opts ...grpc.CallOption) (*DeviceSession, error)
// Cancel a DeviceSession.
// This RPC changes the DeviceSession to state FINISHED and terminates all
// connections.
// Canceled sessions are not deleted and can be retrieved or
// listed by the user until they expire based on the 28 day deletion policy.
CancelDeviceSession(ctx context.Context, in *CancelDeviceSessionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Updates the current DeviceSession to the fields described by the
// update_mask.
UpdateDeviceSession(ctx context.Context, in *UpdateDeviceSessionRequest, opts ...grpc.CallOption) (*DeviceSession, error)
// Exposes an ADB connection if the device supports ADB.
// gRPC headers are used to authenticate the Connect RPC, as well as
// associate to a particular DeviceSession.
// In particular, the user must specify the "X-Omnilab-Session-Name" header.
AdbConnect(ctx context.Context, opts ...grpc.CallOption) (DirectAccessService_AdbConnectClient, error)
}DirectAccessServiceClient is the client API for DirectAccessService 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.
func NewDirectAccessServiceClient
func NewDirectAccessServiceClient(cc grpc.ClientConnInterface) DirectAccessServiceClientDirectAccessServiceServer
type DirectAccessServiceServer interface {
// Creates a DeviceSession.
CreateDeviceSession(context.Context, *CreateDeviceSessionRequest) (*DeviceSession, error)
// Lists DeviceSessions owned by the project user.
ListDeviceSessions(context.Context, *ListDeviceSessionsRequest) (*ListDeviceSessionsResponse, error)
// Gets a DeviceSession, which documents the allocation status and
// whether the device is allocated. Clients making requests from this API
// must poll GetDeviceSession.
GetDeviceSession(context.Context, *GetDeviceSessionRequest) (*DeviceSession, error)
// Cancel a DeviceSession.
// This RPC changes the DeviceSession to state FINISHED and terminates all
// connections.
// Canceled sessions are not deleted and can be retrieved or
// listed by the user until they expire based on the 28 day deletion policy.
CancelDeviceSession(context.Context, *CancelDeviceSessionRequest) (*emptypb.Empty, error)
// Updates the current DeviceSession to the fields described by the
// update_mask.
UpdateDeviceSession(context.Context, *UpdateDeviceSessionRequest) (*DeviceSession, error)
// Exposes an ADB connection if the device supports ADB.
// gRPC headers are used to authenticate the Connect RPC, as well as
// associate to a particular DeviceSession.
// In particular, the user must specify the "X-Omnilab-Session-Name" header.
AdbConnect(DirectAccessService_AdbConnectServer) error
}DirectAccessServiceServer is the server API for DirectAccessService service. All implementations should embed UnimplementedDirectAccessServiceServer for forward compatibility
DirectAccessService_AdbConnectClient
type DirectAccessService_AdbConnectClient interface {
Send(*AdbMessage) error
Recv() (*DeviceMessage, error)
grpc.ClientStream
}DirectAccessService_AdbConnectServer
type DirectAccessService_AdbConnectServer interface {
Send(*DeviceMessage) error
Recv() (*AdbMessage, error)
grpc.ServerStream
}Fail
type Fail struct {
// A user-displayable failure reason.
Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
// contains filtered or unexported fields
}Message signifying that the stream failed to open
func (*Fail) Descriptor
Deprecated: Use Fail.ProtoReflect.Descriptor instead.
func (*Fail) GetReason
func (*Fail) ProtoMessage
func (*Fail) ProtoMessage()func (*Fail) ProtoReflect
func (x *Fail) ProtoReflect() protoreflect.Messagefunc (*Fail) Reset
func (x *Fail) Reset()func (*Fail) String
GetDeviceSessionRequest
type GetDeviceSessionRequest struct {
// Required. Name of the DeviceSession, e.g.
// "projects/{project_id}/deviceSessions/{session_id}"
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}Request message for DirectAccessService.GetDeviceSession.
func (*GetDeviceSessionRequest) Descriptor
func (*GetDeviceSessionRequest) Descriptor() ([]byte, []int)Deprecated: Use GetDeviceSessionRequest.ProtoReflect.Descriptor instead.
func (*GetDeviceSessionRequest) GetName
func (x *GetDeviceSessionRequest) GetName() stringfunc (*GetDeviceSessionRequest) ProtoMessage
func (*GetDeviceSessionRequest) ProtoMessage()func (*GetDeviceSessionRequest) ProtoReflect
func (x *GetDeviceSessionRequest) ProtoReflect() protoreflect.Messagefunc (*GetDeviceSessionRequest) Reset
func (x *GetDeviceSessionRequest) Reset()func (*GetDeviceSessionRequest) String
func (x *GetDeviceSessionRequest) String() stringListDeviceSessionsRequest
type ListDeviceSessionsRequest struct {
// Required. The name of the parent to request, e.g. "projects/{project_id}"
Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of DeviceSessions to return.
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. A continuation token for paging.
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// Optional. If specified, responses will be filtered by the given filter.
// Allowed fields are: session_state.
Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
// contains filtered or unexported fields
}Request message for DirectAccessService.ListDeviceSessions.
func (*ListDeviceSessionsRequest) Descriptor
func (*ListDeviceSessionsRequest) Descriptor() ([]byte, []int)Deprecated: Use ListDeviceSessionsRequest.ProtoReflect.Descriptor instead.
func (*ListDeviceSessionsRequest) GetFilter
func (x *ListDeviceSessionsRequest) GetFilter() stringfunc (*ListDeviceSessionsRequest) GetPageSize
func (x *ListDeviceSessionsRequest) GetPageSize() int32func (*ListDeviceSessionsRequest) GetPageToken
func (x *ListDeviceSessionsRequest) GetPageToken() stringfunc (*ListDeviceSessionsRequest) GetParent
func (x *ListDeviceSessionsRequest) GetParent() stringfunc (*ListDeviceSessionsRequest) ProtoMessage
func (*ListDeviceSessionsRequest) ProtoMessage()func (*ListDeviceSessionsRequest) ProtoReflect
func (x *ListDeviceSessionsRequest) ProtoReflect() protoreflect.Messagefunc (*ListDeviceSessionsRequest) Reset
func (x *ListDeviceSessionsRequest) Reset()func (*ListDeviceSessionsRequest) String
func (x *ListDeviceSessionsRequest) String() stringListDeviceSessionsResponse
type ListDeviceSessionsResponse struct {
// The sessions matching the specified filter in the given cloud project.
DeviceSessions []*DeviceSession `protobuf:"bytes,1,rep,name=device_sessions,json=deviceSessions,proto3" json:"device_sessions,omitempty"`
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}Response message for DirectAccessService.ListDeviceSessions.
func (*ListDeviceSessionsResponse) Descriptor
func (*ListDeviceSessionsResponse) Descriptor() ([]byte, []int)Deprecated: Use ListDeviceSessionsResponse.ProtoReflect.Descriptor instead.
func (*ListDeviceSessionsResponse) GetDeviceSessions
func (x *ListDeviceSessionsResponse) GetDeviceSessions() []*DeviceSessionfunc (*ListDeviceSessionsResponse) GetNextPageToken
func (x *ListDeviceSessionsResponse) GetNextPageToken() stringfunc (*ListDeviceSessionsResponse) ProtoMessage
func (*ListDeviceSessionsResponse) ProtoMessage()func (*ListDeviceSessionsResponse) ProtoReflect
func (x *ListDeviceSessionsResponse) ProtoReflect() protoreflect.Messagefunc (*ListDeviceSessionsResponse) Reset
func (x *ListDeviceSessionsResponse) Reset()func (*ListDeviceSessionsResponse) String
func (x *ListDeviceSessionsResponse) String() stringOkay
type Okay struct {
// contains filtered or unexported fields
}Message signifying that the stream is open
func (*Okay) Descriptor
Deprecated: Use Okay.ProtoReflect.Descriptor instead.
func (*Okay) ProtoMessage
func (*Okay) ProtoMessage()func (*Okay) ProtoReflect
func (x *Okay) ProtoReflect() protoreflect.Messagefunc (*Okay) Reset
func (x *Okay) Reset()func (*Okay) String
Open
type Open struct {
// Required. The unique ID that will be used to talk to this stream. This
// should probably just be a number that increments for each new Open request.
StreamId int32 `protobuf:"varint,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
// Optional. An ADB service to use in the new stream.
Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
// contains filtered or unexported fields
}Message for opening a new stream.
func (*Open) Descriptor
Deprecated: Use Open.ProtoReflect.Descriptor instead.
func (*Open) GetService
func (*Open) GetStreamId
func (*Open) ProtoMessage
func (*Open) ProtoMessage()func (*Open) ProtoReflect
func (x *Open) ProtoReflect() protoreflect.Messagefunc (*Open) Reset
func (x *Open) Reset()func (*Open) String
StatusUpdate
type StatusUpdate struct {
// The device's state
State StatusUpdate_DeviceState `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.devicestreaming.v1.StatusUpdate_DeviceState" json:"state,omitempty"`
// A map of properties with information about this device.
Properties map[string]string `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// A comma-separated list of "features" that this device supports.
Features string `protobuf:"bytes,3,opt,name=features,proto3" json:"features,omitempty"`
// contains filtered or unexported fields
}A StatusUpdate message given over the ADB protocol for the device state.
func (*StatusUpdate) Descriptor
func (*StatusUpdate) Descriptor() ([]byte, []int)Deprecated: Use StatusUpdate.ProtoReflect.Descriptor instead.
func (*StatusUpdate) GetFeatures
func (x *StatusUpdate) GetFeatures() stringfunc (*StatusUpdate) GetProperties
func (x *StatusUpdate) GetProperties() map[string]stringfunc (*StatusUpdate) GetState
func (x *StatusUpdate) GetState() StatusUpdate_DeviceStatefunc (*StatusUpdate) ProtoMessage
func (*StatusUpdate) ProtoMessage()func (*StatusUpdate) ProtoReflect
func (x *StatusUpdate) ProtoReflect() protoreflect.Messagefunc (*StatusUpdate) Reset
func (x *StatusUpdate) Reset()func (*StatusUpdate) String
func (x *StatusUpdate) String() stringStatusUpdate_DeviceState
type StatusUpdate_DeviceState int32The state displayed with the ADB Device when running "adb devices"
StatusUpdate_DEVICE_STATE_UNSPECIFIED, StatusUpdate_DEVICE, StatusUpdate_RECOVERY, StatusUpdate_RESCUE, StatusUpdate_SIDELOAD, StatusUpdate_MISSING, StatusUpdate_OFFLINE, StatusUpdate_UNAUTHORIZED, StatusUpdate_AUTHORIZING, StatusUpdate_CONNECTING
const (
// The device state is unknown.
StatusUpdate_DEVICE_STATE_UNSPECIFIED StatusUpdate_DeviceState = 0
// The ADB device is in the "device" status.
StatusUpdate_DEVICE StatusUpdate_DeviceState = 1
// The ADB device is in the "recovery" status.
StatusUpdate_RECOVERY StatusUpdate_DeviceState = 2
// The ADB device is in the "rescue" status.
StatusUpdate_RESCUE StatusUpdate_DeviceState = 3
// The ADB device is in the "sideload" status.
StatusUpdate_SIDELOAD StatusUpdate_DeviceState = 4
// The ADB device is in the "missing" status.
StatusUpdate_MISSING StatusUpdate_DeviceState = 10
// The ADB device is in the "offline" status.
StatusUpdate_OFFLINE StatusUpdate_DeviceState = 11
// The ADB device is in the "unauthorized" status.
StatusUpdate_UNAUTHORIZED StatusUpdate_DeviceState = 12
// The ADB device is in the "authorizing" status.
StatusUpdate_AUTHORIZING StatusUpdate_DeviceState = 13
// The ADB device is in the "connecting" status.
StatusUpdate_CONNECTING StatusUpdate_DeviceState = 14
)func (StatusUpdate_DeviceState) Descriptor
func (StatusUpdate_DeviceState) Descriptor() protoreflect.EnumDescriptorfunc (StatusUpdate_DeviceState) Enum
func (x StatusUpdate_DeviceState) Enum() *StatusUpdate_DeviceStatefunc (StatusUpdate_DeviceState) EnumDescriptor
func (StatusUpdate_DeviceState) EnumDescriptor() ([]byte, []int)Deprecated: Use StatusUpdate_DeviceState.Descriptor instead.
func (StatusUpdate_DeviceState) Number
func (x StatusUpdate_DeviceState) Number() protoreflect.EnumNumberfunc (StatusUpdate_DeviceState) String
func (x StatusUpdate_DeviceState) String() stringfunc (StatusUpdate_DeviceState) Type
func (StatusUpdate_DeviceState) Type() protoreflect.EnumTypeStreamData
type StreamData struct {
// Required. The unique ID of this stream, assigned by the client.
StreamId int32 `protobuf:"varint,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
// The data of the stream, either bytes or "Close", indicating that the stream
// is done.
//
// Types that are assignable to Contents:
//
// *StreamData_Data
// *StreamData_Close
Contents isStreamData_Contents `protobuf_oneof:"contents"`
// contains filtered or unexported fields
}Data for a stream.
func (*StreamData) Descriptor
func (*StreamData) Descriptor() ([]byte, []int)Deprecated: Use StreamData.ProtoReflect.Descriptor instead.
func (*StreamData) GetClose
func (x *StreamData) GetClose() *Closefunc (*StreamData) GetContents
func (m *StreamData) GetContents() isStreamData_Contentsfunc (*StreamData) GetData
func (x *StreamData) GetData() []bytefunc (*StreamData) GetStreamId
func (x *StreamData) GetStreamId() int32func (*StreamData) ProtoMessage
func (*StreamData) ProtoMessage()func (*StreamData) ProtoReflect
func (x *StreamData) ProtoReflect() protoreflect.Messagefunc (*StreamData) Reset
func (x *StreamData) Reset()func (*StreamData) String
func (x *StreamData) String() stringStreamData_Close
type StreamData_Close struct {
// The stream is closing. EOF.
Close *Close `protobuf:"bytes,3,opt,name=close,proto3,oneof"`
}StreamData_Data
type StreamData_Data struct {
// Data in the stream.
Data []byte `protobuf:"bytes,2,opt,name=data,proto3,oneof"`
}StreamStatus
type StreamStatus struct {
// The unique ID of this stream, assigned by the client.
StreamId int32 `protobuf:"varint,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
// The result of the stream. Either "Okay" for success or "Fail" for failure.
//
// Types that are assignable to Status:
//
// *StreamStatus_Okay
// *StreamStatus_Fail
Status isStreamStatus_Status `protobuf_oneof:"status"`
// contains filtered or unexported fields
}The result of a stream.
func (*StreamStatus) Descriptor
func (*StreamStatus) Descriptor() ([]byte, []int)Deprecated: Use StreamStatus.ProtoReflect.Descriptor instead.
func (*StreamStatus) GetFail
func (x *StreamStatus) GetFail() *Failfunc (*StreamStatus) GetOkay
func (x *StreamStatus) GetOkay() *Okayfunc (*StreamStatus) GetStatus
func (m *StreamStatus) GetStatus() isStreamStatus_Statusfunc (*StreamStatus) GetStreamId
func (x *StreamStatus) GetStreamId() int32func (*StreamStatus) ProtoMessage
func (*StreamStatus) ProtoMessage()func (*StreamStatus) ProtoReflect
func (x *StreamStatus) ProtoReflect() protoreflect.Messagefunc (*StreamStatus) Reset
func (x *StreamStatus) Reset()func (*StreamStatus) String
func (x *StreamStatus) String() stringStreamStatus_Fail
type StreamStatus_Fail struct {
// Fail for failure.
Fail *Fail `protobuf:"bytes,3,opt,name=fail,proto3,oneof"`
}StreamStatus_Okay
type StreamStatus_Okay struct {
// Okay for success.
Okay *Okay `protobuf:"bytes,2,opt,name=okay,proto3,oneof"`
}UnimplementedDirectAccessServiceServer
type UnimplementedDirectAccessServiceServer struct {
}UnimplementedDirectAccessServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedDirectAccessServiceServer) AdbConnect
func (UnimplementedDirectAccessServiceServer) AdbConnect(DirectAccessService_AdbConnectServer) errorfunc (UnimplementedDirectAccessServiceServer) CancelDeviceSession
func (UnimplementedDirectAccessServiceServer) CancelDeviceSession(context.Context, *CancelDeviceSessionRequest) (*emptypb.Empty, error)func (UnimplementedDirectAccessServiceServer) CreateDeviceSession
func (UnimplementedDirectAccessServiceServer) CreateDeviceSession(context.Context, *CreateDeviceSessionRequest) (*DeviceSession, error)func (UnimplementedDirectAccessServiceServer) GetDeviceSession
func (UnimplementedDirectAccessServiceServer) GetDeviceSession(context.Context, *GetDeviceSessionRequest) (*DeviceSession, error)func (UnimplementedDirectAccessServiceServer) ListDeviceSessions
func (UnimplementedDirectAccessServiceServer) ListDeviceSessions(context.Context, *ListDeviceSessionsRequest) (*ListDeviceSessionsResponse, error)func (UnimplementedDirectAccessServiceServer) UpdateDeviceSession
func (UnimplementedDirectAccessServiceServer) UpdateDeviceSession(context.Context, *UpdateDeviceSessionRequest) (*DeviceSession, error)UnsafeDirectAccessServiceServer
type UnsafeDirectAccessServiceServer interface {
// contains filtered or unexported methods
}UnsafeDirectAccessServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DirectAccessServiceServer will result in compilation errors.
UpdateDeviceSessionRequest
type UpdateDeviceSessionRequest struct {
// Required. DeviceSession to update.
// The DeviceSession's `name` field is used to identify the session to update
// "projects/{project_id}/deviceSessions/{session_id}"
DeviceSession *DeviceSession `protobuf:"bytes,1,opt,name=device_session,json=deviceSession,proto3" json:"device_session,omitempty"`
// Optional. The list of fields to update.
UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
// contains filtered or unexported fields
}Request message for DirectAccessService.UpdateDeviceSession.
func (*UpdateDeviceSessionRequest) Descriptor
func (*UpdateDeviceSessionRequest) Descriptor() ([]byte, []int)Deprecated: Use UpdateDeviceSessionRequest.ProtoReflect.Descriptor instead.
func (*UpdateDeviceSessionRequest) GetDeviceSession
func (x *UpdateDeviceSessionRequest) GetDeviceSession() *DeviceSessionfunc (*UpdateDeviceSessionRequest) GetUpdateMask
func (x *UpdateDeviceSessionRequest) GetUpdateMask() *fieldmaskpb.FieldMaskfunc (*UpdateDeviceSessionRequest) ProtoMessage
func (*UpdateDeviceSessionRequest) ProtoMessage()func (*UpdateDeviceSessionRequest) ProtoReflect
func (x *UpdateDeviceSessionRequest) ProtoReflect() protoreflect.Messagefunc (*UpdateDeviceSessionRequest) Reset
func (x *UpdateDeviceSessionRequest) Reset()func (*UpdateDeviceSessionRequest) String
func (x *UpdateDeviceSessionRequest) String() string