From e67ef68fae6334f85b2c3a10e6c973ced0fec6d5 Mon Sep 17 00:00:00 2001 From: Sean Pollock Date: Mon, 28 Oct 2024 11:15:08 -0400 Subject: [PATCH] RSDK-8976 - Add stream server options protos (#577) --- component/arm/v1/arm.pb.gw.go | 14 +- component/base/v1/base.pb.gw.go | 10 +- component/encoder/v1/encoder.pb.gw.go | 10 +- component/generic/v1/generic.pb.gw.go | 10 +- component/gripper/v1/gripper.pb.gw.go | 10 +- component/motor/v1/motor.pb.gw.go | 10 +- component/powersensor/v1/powersensor.pb.gw.go | 10 +- component/sensor/v1/sensor.pb.gw.go | 14 +- component/servo/v1/servo.pb.gw.go | 10 +- gen/js/google/api/client_pb.d.ts | 28 + gen/js/google/api/client_pb.js | 231 ++++- gen/js/stream/v1/stream_grpc_web_pb.js | 122 +++ gen/js/stream/v1/stream_pb.d.ts | 108 +++ gen/js/stream/v1/stream_pb.js | 842 ++++++++++++++++++ gen/js/stream/v1/stream_pb_service.d.ts | 38 + gen/js/stream/v1/stream_pb_service.js | 80 ++ proto/viam/stream/v1/stream.proto | 31 + service/generic/v1/generic.pb.gw.go | 6 +- service/navigation/v1/navigation.pb.gw.go | 6 +- service/shell/v1/shell.pb.gw.go | 6 +- service/slam/v1/slam.pb.gw.go | 6 +- service/vision/v1/vision.pb.gw.go | 6 +- stream/v1/stream.pb.go | 416 ++++++++- stream/v1/stream.pb.gw.go | 170 ++++ stream/v1/stream_grpc.pb.go | 76 ++ 25 files changed, 2173 insertions(+), 97 deletions(-) diff --git a/component/arm/v1/arm.pb.gw.go b/component/arm/v1/arm.pb.gw.go index 22a63d18c..0e9899d57 100644 --- a/component/arm/v1/arm.pb.gw.go +++ b/component/arm/v1/arm.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -509,7 +509,7 @@ var ( ) func request_ArmService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -542,7 +542,7 @@ func request_ArmService_DoCommand_0(ctx context.Context, marshaler runtime.Marsh } func local_request_ArmService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -579,7 +579,7 @@ var ( ) func request_ArmService_GetKinematics_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetKinematicsRequest + var protoReq v1.GetKinematicsRequest var metadata runtime.ServerMetadata var ( @@ -612,7 +612,7 @@ func request_ArmService_GetKinematics_0(ctx context.Context, marshaler runtime.M } func local_request_ArmService_GetKinematics_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetKinematicsRequest + var protoReq v1.GetKinematicsRequest var metadata runtime.ServerMetadata var ( @@ -649,7 +649,7 @@ var ( ) func request_ArmService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client ArmServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -682,7 +682,7 @@ func request_ArmService_GetGeometries_0(ctx context.Context, marshaler runtime.M } func local_request_ArmService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server ArmServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/base/v1/base.pb.gw.go b/component/base/v1/base.pb.gw.go index faa48e8b0..185bd31aa 100644 --- a/component/base/v1/base.pb.gw.go +++ b/component/base/v1/base.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -439,7 +439,7 @@ var ( ) func request_BaseService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -472,7 +472,7 @@ func request_BaseService_DoCommand_0(ctx context.Context, marshaler runtime.Mars } func local_request_BaseService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -509,7 +509,7 @@ var ( ) func request_BaseService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client BaseServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -542,7 +542,7 @@ func request_BaseService_GetGeometries_0(ctx context.Context, marshaler runtime. } func local_request_BaseService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server BaseServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/encoder/v1/encoder.pb.gw.go b/component/encoder/v1/encoder.pb.gw.go index 4fa63db37..ef911f15d 100644 --- a/component/encoder/v1/encoder.pb.gw.go +++ b/component/encoder/v1/encoder.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -247,7 +247,7 @@ var ( ) func request_EncoderService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client EncoderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -280,7 +280,7 @@ func request_EncoderService_DoCommand_0(ctx context.Context, marshaler runtime.M } func local_request_EncoderService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server EncoderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -317,7 +317,7 @@ var ( ) func request_EncoderService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client EncoderServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -350,7 +350,7 @@ func request_EncoderService_GetGeometries_0(ctx context.Context, marshaler runti } func local_request_EncoderService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server EncoderServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/generic/v1/generic.pb.gw.go b/component/generic/v1/generic.pb.gw.go index 81abf78ba..8b95fb2a9 100644 --- a/component/generic/v1/generic.pb.gw.go +++ b/component/generic/v1/generic.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -37,7 +37,7 @@ var ( ) func request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client GenericServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -70,7 +70,7 @@ func request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.M } func local_request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server GenericServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -107,7 +107,7 @@ var ( ) func request_GenericService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client GenericServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -140,7 +140,7 @@ func request_GenericService_GetGeometries_0(ctx context.Context, marshaler runti } func local_request_GenericService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server GenericServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/gripper/v1/gripper.pb.gw.go b/component/gripper/v1/gripper.pb.gw.go index d732daf0a..b432b0c7e 100644 --- a/component/gripper/v1/gripper.pb.gw.go +++ b/component/gripper/v1/gripper.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -299,7 +299,7 @@ var ( ) func request_GripperService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client GripperServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -332,7 +332,7 @@ func request_GripperService_DoCommand_0(ctx context.Context, marshaler runtime.M } func local_request_GripperService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server GripperServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -369,7 +369,7 @@ var ( ) func request_GripperService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client GripperServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -402,7 +402,7 @@ func request_GripperService_GetGeometries_0(ctx context.Context, marshaler runti } func local_request_GripperService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server GripperServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/motor/v1/motor.pb.gw.go b/component/motor/v1/motor.pb.gw.go index a3e2fe669..4ac3a68d9 100644 --- a/component/motor/v1/motor.pb.gw.go +++ b/component/motor/v1/motor.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -719,7 +719,7 @@ var ( ) func request_MotorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -752,7 +752,7 @@ func request_MotorService_DoCommand_0(ctx context.Context, marshaler runtime.Mar } func local_request_MotorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -789,7 +789,7 @@ var ( ) func request_MotorService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client MotorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -822,7 +822,7 @@ func request_MotorService_GetGeometries_0(ctx context.Context, marshaler runtime } func local_request_MotorService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server MotorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetGeometriesRequest + var protoReq v1_0.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/powersensor/v1/powersensor.pb.gw.go b/component/powersensor/v1/powersensor.pb.gw.go index c60c7e312..9a80a7e4a 100644 --- a/component/powersensor/v1/powersensor.pb.gw.go +++ b/component/powersensor/v1/powersensor.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -247,7 +247,7 @@ var ( ) func request_PowerSensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, client PowerSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetReadingsRequest + var protoReq v1_0.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -280,7 +280,7 @@ func request_PowerSensorService_GetReadings_0(ctx context.Context, marshaler run } func local_request_PowerSensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, server PowerSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.GetReadingsRequest + var protoReq v1_0.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -317,7 +317,7 @@ var ( ) func request_PowerSensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client PowerSensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -350,7 +350,7 @@ func request_PowerSensorService_DoCommand_0(ctx context.Context, marshaler runti } func local_request_PowerSensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server PowerSensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/component/sensor/v1/sensor.pb.gw.go b/component/sensor/v1/sensor.pb.gw.go index b45747050..66681c369 100644 --- a/component/sensor/v1/sensor.pb.gw.go +++ b/component/sensor/v1/sensor.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -37,7 +37,7 @@ var ( ) func request_SensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, client SensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetReadingsRequest + var protoReq v1.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -70,7 +70,7 @@ func request_SensorService_GetReadings_0(ctx context.Context, marshaler runtime. } func local_request_SensorService_GetReadings_0(ctx context.Context, marshaler runtime.Marshaler, server SensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetReadingsRequest + var protoReq v1.GetReadingsRequest var metadata runtime.ServerMetadata var ( @@ -107,7 +107,7 @@ var ( ) func request_SensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client SensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -140,7 +140,7 @@ func request_SensorService_DoCommand_0(ctx context.Context, marshaler runtime.Ma } func local_request_SensorService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server SensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -177,7 +177,7 @@ var ( ) func request_SensorService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client SensorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -210,7 +210,7 @@ func request_SensorService_GetGeometries_0(ctx context.Context, marshaler runtim } func local_request_SensorService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server SensorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/component/servo/v1/servo.pb.gw.go b/component/servo/v1/servo.pb.gw.go index 75e698cc0..fd6e0a9d1 100644 --- a/component/servo/v1/servo.pb.gw.go +++ b/component/servo/v1/servo.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -299,7 +299,7 @@ var ( ) func request_ServoService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -332,7 +332,7 @@ func request_ServoService_DoCommand_0(ctx context.Context, marshaler runtime.Mar } func local_request_ServoService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -369,7 +369,7 @@ var ( ) func request_ServoService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, client ServoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( @@ -402,7 +402,7 @@ func request_ServoService_GetGeometries_0(ctx context.Context, marshaler runtime } func local_request_ServoService_GetGeometries_0(ctx context.Context, marshaler runtime.Marshaler, server ServoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.GetGeometriesRequest + var protoReq v1.GetGeometriesRequest var metadata runtime.ServerMetadata var ( diff --git a/gen/js/google/api/client_pb.d.ts b/gen/js/google/api/client_pb.d.ts index dcd7e8030..e140713bc 100644 --- a/gen/js/google/api/client_pb.d.ts +++ b/gen/js/google/api/client_pb.d.ts @@ -15,6 +15,11 @@ export class CommonLanguageSettings extends jspb.Message { setDestinationsList(value: Array): void; addDestinations(value: ClientLibraryDestinationMap[keyof ClientLibraryDestinationMap], index?: number): ClientLibraryDestinationMap[keyof ClientLibraryDestinationMap]; + hasSelectiveGapicGeneration(): boolean; + clearSelectiveGapicGeneration(): void; + getSelectiveGapicGeneration(): SelectiveGapicGeneration | undefined; + setSelectiveGapicGeneration(value?: SelectiveGapicGeneration): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CommonLanguageSettings.AsObject; static toObject(includeInstance: boolean, msg: CommonLanguageSettings): CommonLanguageSettings.AsObject; @@ -29,6 +34,7 @@ export namespace CommonLanguageSettings { export type AsObject = { referenceDocsUri: string, destinationsList: Array, + selectiveGapicGeneration?: SelectiveGapicGeneration.AsObject, } } @@ -477,6 +483,28 @@ export namespace MethodSettings { } } +export class SelectiveGapicGeneration extends jspb.Message { + clearMethodsList(): void; + getMethodsList(): Array; + setMethodsList(value: Array): void; + addMethods(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SelectiveGapicGeneration.AsObject; + static toObject(includeInstance: boolean, msg: SelectiveGapicGeneration): SelectiveGapicGeneration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SelectiveGapicGeneration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SelectiveGapicGeneration; + static deserializeBinaryFromReader(message: SelectiveGapicGeneration, reader: jspb.BinaryReader): SelectiveGapicGeneration; +} + +export namespace SelectiveGapicGeneration { + export type AsObject = { + methodsList: Array, + } +} + export const methodSignature: jspb.ExtensionFieldInfo; export const defaultHost: jspb.ExtensionFieldInfo; diff --git a/gen/js/google/api/client_pb.js b/gen/js/google/api/client_pb.js index 6bff5c682..7990cb846 100644 --- a/gen/js/google/api/client_pb.js +++ b/gen/js/google/api/client_pb.js @@ -37,6 +37,7 @@ goog.exportSymbol('proto.google.api.Publishing', null, global); goog.exportSymbol('proto.google.api.PythonSettings', null, global); goog.exportSymbol('proto.google.api.PythonSettings.ExperimentalFeatures', null, global); goog.exportSymbol('proto.google.api.RubySettings', null, global); +goog.exportSymbol('proto.google.api.SelectiveGapicGeneration', null, global); goog.exportSymbol('proto.google.api.apiVersion', null, global); goog.exportSymbol('proto.google.api.defaultHost', null, global); goog.exportSymbol('proto.google.api.methodSignatureList', null, global); @@ -335,6 +336,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.google.api.MethodSettings.LongRunning.displayName = 'proto.google.api.MethodSettings.LongRunning'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.SelectiveGapicGeneration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.SelectiveGapicGeneration.repeatedFields_, null); +}; +goog.inherits(proto.google.api.SelectiveGapicGeneration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.SelectiveGapicGeneration.displayName = 'proto.google.api.SelectiveGapicGeneration'; +} /** * List of repeated fields within this message type. @@ -375,7 +397,8 @@ proto.google.api.CommonLanguageSettings.prototype.toObject = function(opt_includ proto.google.api.CommonLanguageSettings.toObject = function(includeInstance, msg) { var f, obj = { referenceDocsUri: jspb.Message.getFieldWithDefault(msg, 1, ""), - destinationsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + destinationsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + selectiveGapicGeneration: (f = msg.getSelectiveGapicGeneration()) && proto.google.api.SelectiveGapicGeneration.toObject(includeInstance, f) }; if (includeInstance) { @@ -422,6 +445,11 @@ proto.google.api.CommonLanguageSettings.deserializeBinaryFromReader = function(m msg.addDestinations(values[i]); } break; + case 3: + var value = new proto.google.api.SelectiveGapicGeneration; + reader.readMessage(value,proto.google.api.SelectiveGapicGeneration.deserializeBinaryFromReader); + msg.setSelectiveGapicGeneration(value); + break; default: reader.skipField(); break; @@ -465,6 +493,14 @@ proto.google.api.CommonLanguageSettings.serializeBinaryToWriter = function(messa f ); } + f = message.getSelectiveGapicGeneration(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.api.SelectiveGapicGeneration.serializeBinaryToWriter + ); + } }; @@ -523,6 +559,43 @@ proto.google.api.CommonLanguageSettings.prototype.clearDestinationsList = functi }; +/** + * optional SelectiveGapicGeneration selective_gapic_generation = 3; + * @return {?proto.google.api.SelectiveGapicGeneration} + */ +proto.google.api.CommonLanguageSettings.prototype.getSelectiveGapicGeneration = function() { + return /** @type{?proto.google.api.SelectiveGapicGeneration} */ ( + jspb.Message.getWrapperField(this, proto.google.api.SelectiveGapicGeneration, 3)); +}; + + +/** + * @param {?proto.google.api.SelectiveGapicGeneration|undefined} value + * @return {!proto.google.api.CommonLanguageSettings} returns this +*/ +proto.google.api.CommonLanguageSettings.prototype.setSelectiveGapicGeneration = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.CommonLanguageSettings} returns this + */ +proto.google.api.CommonLanguageSettings.prototype.clearSelectiveGapicGeneration = function() { + return this.setSelectiveGapicGeneration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.CommonLanguageSettings.prototype.hasSelectiveGapicGeneration = function() { + return jspb.Message.getField(this, 3) != null; +}; + + @@ -3815,6 +3888,162 @@ proto.google.api.MethodSettings.prototype.clearAutoPopulatedFieldsList = functio }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.SelectiveGapicGeneration.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.SelectiveGapicGeneration.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.SelectiveGapicGeneration.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.SelectiveGapicGeneration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.SelectiveGapicGeneration.toObject = function(includeInstance, msg) { + var f, obj = { + methodsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.SelectiveGapicGeneration} + */ +proto.google.api.SelectiveGapicGeneration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.SelectiveGapicGeneration; + return proto.google.api.SelectiveGapicGeneration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.SelectiveGapicGeneration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.SelectiveGapicGeneration} + */ +proto.google.api.SelectiveGapicGeneration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addMethods(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.SelectiveGapicGeneration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.SelectiveGapicGeneration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.SelectiveGapicGeneration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.SelectiveGapicGeneration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMethodsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string methods = 1; + * @return {!Array} + */ +proto.google.api.SelectiveGapicGeneration.prototype.getMethodsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.SelectiveGapicGeneration} returns this + */ +proto.google.api.SelectiveGapicGeneration.prototype.setMethodsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.api.SelectiveGapicGeneration} returns this + */ +proto.google.api.SelectiveGapicGeneration.prototype.addMethods = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.SelectiveGapicGeneration} returns this + */ +proto.google.api.SelectiveGapicGeneration.prototype.clearMethodsList = function() { + return this.setMethodsList([]); +}; + + /** * @enum {number} */ diff --git a/gen/js/stream/v1/stream_grpc_web_pb.js b/gen/js/stream/v1/stream_grpc_web_pb.js index a24263e2a..6a0f34a5e 100644 --- a/gen/js/stream/v1/stream_grpc_web_pb.js +++ b/gen/js/stream/v1/stream_grpc_web_pb.js @@ -198,6 +198,128 @@ proto.proto.stream.v1.StreamServicePromiseClient.prototype.addStream = }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.proto.stream.v1.GetStreamOptionsRequest, + * !proto.proto.stream.v1.GetStreamOptionsResponse>} + */ +const methodDescriptor_StreamService_GetStreamOptions = new grpc.web.MethodDescriptor( + '/proto.stream.v1.StreamService/GetStreamOptions', + grpc.web.MethodType.UNARY, + proto.proto.stream.v1.GetStreamOptionsRequest, + proto.proto.stream.v1.GetStreamOptionsResponse, + /** + * @param {!proto.proto.stream.v1.GetStreamOptionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.proto.stream.v1.GetStreamOptionsResponse.deserializeBinary +); + + +/** + * @param {!proto.proto.stream.v1.GetStreamOptionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.proto.stream.v1.GetStreamOptionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.proto.stream.v1.StreamServiceClient.prototype.getStreamOptions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/proto.stream.v1.StreamService/GetStreamOptions', + request, + metadata || {}, + methodDescriptor_StreamService_GetStreamOptions, + callback); +}; + + +/** + * @param {!proto.proto.stream.v1.GetStreamOptionsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.proto.stream.v1.StreamServicePromiseClient.prototype.getStreamOptions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/proto.stream.v1.StreamService/GetStreamOptions', + request, + metadata || {}, + methodDescriptor_StreamService_GetStreamOptions); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.proto.stream.v1.SetStreamOptionsRequest, + * !proto.proto.stream.v1.SetStreamOptionsResponse>} + */ +const methodDescriptor_StreamService_SetStreamOptions = new grpc.web.MethodDescriptor( + '/proto.stream.v1.StreamService/SetStreamOptions', + grpc.web.MethodType.UNARY, + proto.proto.stream.v1.SetStreamOptionsRequest, + proto.proto.stream.v1.SetStreamOptionsResponse, + /** + * @param {!proto.proto.stream.v1.SetStreamOptionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.proto.stream.v1.SetStreamOptionsResponse.deserializeBinary +); + + +/** + * @param {!proto.proto.stream.v1.SetStreamOptionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.proto.stream.v1.SetStreamOptionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.proto.stream.v1.StreamServiceClient.prototype.setStreamOptions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/proto.stream.v1.StreamService/SetStreamOptions', + request, + metadata || {}, + methodDescriptor_StreamService_SetStreamOptions, + callback); +}; + + +/** + * @param {!proto.proto.stream.v1.SetStreamOptionsRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.proto.stream.v1.StreamServicePromiseClient.prototype.setStreamOptions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/proto.stream.v1.StreamService/SetStreamOptions', + request, + metadata || {}, + methodDescriptor_StreamService_SetStreamOptions); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/gen/js/stream/v1/stream_pb.d.ts b/gen/js/stream/v1/stream_pb.d.ts index c4701aab6..cee29832b 100644 --- a/gen/js/stream/v1/stream_pb.d.ts +++ b/gen/js/stream/v1/stream_pb.d.ts @@ -113,3 +113,111 @@ export namespace RemoveStreamResponse { } } +export class Resolution extends jspb.Message { + getWidth(): number; + setWidth(value: number): void; + + getHeight(): number; + setHeight(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Resolution.AsObject; + static toObject(includeInstance: boolean, msg: Resolution): Resolution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Resolution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Resolution; + static deserializeBinaryFromReader(message: Resolution, reader: jspb.BinaryReader): Resolution; +} + +export namespace Resolution { + export type AsObject = { + width: number, + height: number, + } +} + +export class GetStreamOptionsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStreamOptionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetStreamOptionsRequest): GetStreamOptionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStreamOptionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStreamOptionsRequest; + static deserializeBinaryFromReader(message: GetStreamOptionsRequest, reader: jspb.BinaryReader): GetStreamOptionsRequest; +} + +export namespace GetStreamOptionsRequest { + export type AsObject = { + name: string, + } +} + +export class GetStreamOptionsResponse extends jspb.Message { + clearResolutionsList(): void; + getResolutionsList(): Array; + setResolutionsList(value: Array): void; + addResolutions(value?: Resolution, index?: number): Resolution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetStreamOptionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetStreamOptionsResponse): GetStreamOptionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetStreamOptionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetStreamOptionsResponse; + static deserializeBinaryFromReader(message: GetStreamOptionsResponse, reader: jspb.BinaryReader): GetStreamOptionsResponse; +} + +export namespace GetStreamOptionsResponse { + export type AsObject = { + resolutionsList: Array, + } +} + +export class SetStreamOptionsRequest extends jspb.Message { + getName(): string; + setName(value: string): void; + + hasResolution(): boolean; + clearResolution(): void; + getResolution(): Resolution | undefined; + setResolution(value?: Resolution): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetStreamOptionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: SetStreamOptionsRequest): SetStreamOptionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetStreamOptionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetStreamOptionsRequest; + static deserializeBinaryFromReader(message: SetStreamOptionsRequest, reader: jspb.BinaryReader): SetStreamOptionsRequest; +} + +export namespace SetStreamOptionsRequest { + export type AsObject = { + name: string, + resolution?: Resolution.AsObject, + } +} + +export class SetStreamOptionsResponse extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SetStreamOptionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: SetStreamOptionsResponse): SetStreamOptionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SetStreamOptionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SetStreamOptionsResponse; + static deserializeBinaryFromReader(message: SetStreamOptionsResponse, reader: jspb.BinaryReader): SetStreamOptionsResponse; +} + +export namespace SetStreamOptionsResponse { + export type AsObject = { + } +} + diff --git a/gen/js/stream/v1/stream_pb.js b/gen/js/stream/v1/stream_pb.js index 4454a8675..bf225e5dc 100644 --- a/gen/js/stream/v1/stream_pb.js +++ b/gen/js/stream/v1/stream_pb.js @@ -17,10 +17,15 @@ var global = (function() { return this || window || global || self || Function(' goog.exportSymbol('proto.proto.stream.v1.AddStreamRequest', null, global); goog.exportSymbol('proto.proto.stream.v1.AddStreamResponse', null, global); +goog.exportSymbol('proto.proto.stream.v1.GetStreamOptionsRequest', null, global); +goog.exportSymbol('proto.proto.stream.v1.GetStreamOptionsResponse', null, global); goog.exportSymbol('proto.proto.stream.v1.ListStreamsRequest', null, global); goog.exportSymbol('proto.proto.stream.v1.ListStreamsResponse', null, global); goog.exportSymbol('proto.proto.stream.v1.RemoveStreamRequest', null, global); goog.exportSymbol('proto.proto.stream.v1.RemoveStreamResponse', null, global); +goog.exportSymbol('proto.proto.stream.v1.Resolution', null, global); +goog.exportSymbol('proto.proto.stream.v1.SetStreamOptionsRequest', null, global); +goog.exportSymbol('proto.proto.stream.v1.SetStreamOptionsResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -147,6 +152,111 @@ if (goog.DEBUG && !COMPILED) { */ proto.proto.stream.v1.RemoveStreamResponse.displayName = 'proto.proto.stream.v1.RemoveStreamResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.proto.stream.v1.Resolution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.proto.stream.v1.Resolution, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.proto.stream.v1.Resolution.displayName = 'proto.proto.stream.v1.Resolution'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.proto.stream.v1.GetStreamOptionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.proto.stream.v1.GetStreamOptionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.proto.stream.v1.GetStreamOptionsRequest.displayName = 'proto.proto.stream.v1.GetStreamOptionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.proto.stream.v1.GetStreamOptionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.proto.stream.v1.GetStreamOptionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.proto.stream.v1.GetStreamOptionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.proto.stream.v1.GetStreamOptionsResponse.displayName = 'proto.proto.stream.v1.GetStreamOptionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.proto.stream.v1.SetStreamOptionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.proto.stream.v1.SetStreamOptionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.proto.stream.v1.SetStreamOptionsRequest.displayName = 'proto.proto.stream.v1.SetStreamOptionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.proto.stream.v1.SetStreamOptionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.proto.stream.v1.SetStreamOptionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.proto.stream.v1.SetStreamOptionsResponse.displayName = 'proto.proto.stream.v1.SetStreamOptionsResponse'; +} @@ -866,4 +976,736 @@ proto.proto.stream.v1.RemoveStreamResponse.serializeBinaryToWriter = function(me }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.proto.stream.v1.Resolution.prototype.toObject = function(opt_includeInstance) { + return proto.proto.stream.v1.Resolution.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.proto.stream.v1.Resolution} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.Resolution.toObject = function(includeInstance, msg) { + var f, obj = { + width: jspb.Message.getFieldWithDefault(msg, 1, 0), + height: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.proto.stream.v1.Resolution} + */ +proto.proto.stream.v1.Resolution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.proto.stream.v1.Resolution; + return proto.proto.stream.v1.Resolution.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.proto.stream.v1.Resolution} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.proto.stream.v1.Resolution} + */ +proto.proto.stream.v1.Resolution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setWidth(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.proto.stream.v1.Resolution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.proto.stream.v1.Resolution.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.proto.stream.v1.Resolution} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.Resolution.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWidth(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 width = 1; + * @return {number} + */ +proto.proto.stream.v1.Resolution.prototype.getWidth = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.proto.stream.v1.Resolution} returns this + */ +proto.proto.stream.v1.Resolution.prototype.setWidth = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 height = 2; + * @return {number} + */ +proto.proto.stream.v1.Resolution.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.proto.stream.v1.Resolution} returns this + */ +proto.proto.stream.v1.Resolution.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.proto.stream.v1.GetStreamOptionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.proto.stream.v1.GetStreamOptionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.proto.stream.v1.GetStreamOptionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.GetStreamOptionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.proto.stream.v1.GetStreamOptionsRequest} + */ +proto.proto.stream.v1.GetStreamOptionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.proto.stream.v1.GetStreamOptionsRequest; + return proto.proto.stream.v1.GetStreamOptionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.proto.stream.v1.GetStreamOptionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.proto.stream.v1.GetStreamOptionsRequest} + */ +proto.proto.stream.v1.GetStreamOptionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.proto.stream.v1.GetStreamOptionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.proto.stream.v1.GetStreamOptionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.proto.stream.v1.GetStreamOptionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.GetStreamOptionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.proto.stream.v1.GetStreamOptionsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.proto.stream.v1.GetStreamOptionsRequest} returns this + */ +proto.proto.stream.v1.GetStreamOptionsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.proto.stream.v1.GetStreamOptionsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.proto.stream.v1.GetStreamOptionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.proto.stream.v1.GetStreamOptionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.proto.stream.v1.GetStreamOptionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.GetStreamOptionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + resolutionsList: jspb.Message.toObjectList(msg.getResolutionsList(), + proto.proto.stream.v1.Resolution.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.proto.stream.v1.GetStreamOptionsResponse} + */ +proto.proto.stream.v1.GetStreamOptionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.proto.stream.v1.GetStreamOptionsResponse; + return proto.proto.stream.v1.GetStreamOptionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.proto.stream.v1.GetStreamOptionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.proto.stream.v1.GetStreamOptionsResponse} + */ +proto.proto.stream.v1.GetStreamOptionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.proto.stream.v1.Resolution; + reader.readMessage(value,proto.proto.stream.v1.Resolution.deserializeBinaryFromReader); + msg.addResolutions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.proto.stream.v1.GetStreamOptionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.proto.stream.v1.GetStreamOptionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.proto.stream.v1.GetStreamOptionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.GetStreamOptionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResolutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.proto.stream.v1.Resolution.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Resolution resolutions = 1; + * @return {!Array} + */ +proto.proto.stream.v1.GetStreamOptionsResponse.prototype.getResolutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.proto.stream.v1.Resolution, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.proto.stream.v1.GetStreamOptionsResponse} returns this +*/ +proto.proto.stream.v1.GetStreamOptionsResponse.prototype.setResolutionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.proto.stream.v1.Resolution=} opt_value + * @param {number=} opt_index + * @return {!proto.proto.stream.v1.Resolution} + */ +proto.proto.stream.v1.GetStreamOptionsResponse.prototype.addResolutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.proto.stream.v1.Resolution, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.proto.stream.v1.GetStreamOptionsResponse} returns this + */ +proto.proto.stream.v1.GetStreamOptionsResponse.prototype.clearResolutionsList = function() { + return this.setResolutionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.proto.stream.v1.SetStreamOptionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.proto.stream.v1.SetStreamOptionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.SetStreamOptionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + resolution: (f = msg.getResolution()) && proto.proto.stream.v1.Resolution.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.proto.stream.v1.SetStreamOptionsRequest} + */ +proto.proto.stream.v1.SetStreamOptionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.proto.stream.v1.SetStreamOptionsRequest; + return proto.proto.stream.v1.SetStreamOptionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.proto.stream.v1.SetStreamOptionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.proto.stream.v1.SetStreamOptionsRequest} + */ +proto.proto.stream.v1.SetStreamOptionsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.proto.stream.v1.Resolution; + reader.readMessage(value,proto.proto.stream.v1.Resolution.deserializeBinaryFromReader); + msg.setResolution(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.proto.stream.v1.SetStreamOptionsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.proto.stream.v1.SetStreamOptionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.SetStreamOptionsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getResolution(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.proto.stream.v1.Resolution.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.proto.stream.v1.SetStreamOptionsRequest} returns this + */ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Resolution resolution = 2; + * @return {?proto.proto.stream.v1.Resolution} + */ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.getResolution = function() { + return /** @type{?proto.proto.stream.v1.Resolution} */ ( + jspb.Message.getWrapperField(this, proto.proto.stream.v1.Resolution, 2)); +}; + + +/** + * @param {?proto.proto.stream.v1.Resolution|undefined} value + * @return {!proto.proto.stream.v1.SetStreamOptionsRequest} returns this +*/ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.setResolution = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.proto.stream.v1.SetStreamOptionsRequest} returns this + */ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.clearResolution = function() { + return this.setResolution(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.proto.stream.v1.SetStreamOptionsRequest.prototype.hasResolution = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.proto.stream.v1.SetStreamOptionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.proto.stream.v1.SetStreamOptionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.proto.stream.v1.SetStreamOptionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.SetStreamOptionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.proto.stream.v1.SetStreamOptionsResponse} + */ +proto.proto.stream.v1.SetStreamOptionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.proto.stream.v1.SetStreamOptionsResponse; + return proto.proto.stream.v1.SetStreamOptionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.proto.stream.v1.SetStreamOptionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.proto.stream.v1.SetStreamOptionsResponse} + */ +proto.proto.stream.v1.SetStreamOptionsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.proto.stream.v1.SetStreamOptionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.proto.stream.v1.SetStreamOptionsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.proto.stream.v1.SetStreamOptionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.stream.v1.SetStreamOptionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + goog.object.extend(exports, proto.proto.stream.v1); diff --git a/gen/js/stream/v1/stream_pb_service.d.ts b/gen/js/stream/v1/stream_pb_service.d.ts index b2dbd615f..4725d6cb7 100644 --- a/gen/js/stream/v1/stream_pb_service.d.ts +++ b/gen/js/stream/v1/stream_pb_service.d.ts @@ -22,6 +22,24 @@ type StreamServiceAddStream = { readonly responseType: typeof stream_v1_stream_pb.AddStreamResponse; }; +type StreamServiceGetStreamOptions = { + readonly methodName: string; + readonly service: typeof StreamService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof stream_v1_stream_pb.GetStreamOptionsRequest; + readonly responseType: typeof stream_v1_stream_pb.GetStreamOptionsResponse; +}; + +type StreamServiceSetStreamOptions = { + readonly methodName: string; + readonly service: typeof StreamService; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof stream_v1_stream_pb.SetStreamOptionsRequest; + readonly responseType: typeof stream_v1_stream_pb.SetStreamOptionsResponse; +}; + type StreamServiceRemoveStream = { readonly methodName: string; readonly service: typeof StreamService; @@ -35,6 +53,8 @@ export class StreamService { static readonly serviceName: string; static readonly ListStreams: StreamServiceListStreams; static readonly AddStream: StreamServiceAddStream; + static readonly GetStreamOptions: StreamServiceGetStreamOptions; + static readonly SetStreamOptions: StreamServiceSetStreamOptions; static readonly RemoveStream: StreamServiceRemoveStream; } @@ -88,6 +108,24 @@ export class StreamServiceClient { requestMessage: stream_v1_stream_pb.AddStreamRequest, callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.AddStreamResponse|null) => void ): UnaryResponse; + getStreamOptions( + requestMessage: stream_v1_stream_pb.GetStreamOptionsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.GetStreamOptionsResponse|null) => void + ): UnaryResponse; + getStreamOptions( + requestMessage: stream_v1_stream_pb.GetStreamOptionsRequest, + callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.GetStreamOptionsResponse|null) => void + ): UnaryResponse; + setStreamOptions( + requestMessage: stream_v1_stream_pb.SetStreamOptionsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.SetStreamOptionsResponse|null) => void + ): UnaryResponse; + setStreamOptions( + requestMessage: stream_v1_stream_pb.SetStreamOptionsRequest, + callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.SetStreamOptionsResponse|null) => void + ): UnaryResponse; removeStream( requestMessage: stream_v1_stream_pb.RemoveStreamRequest, metadata: grpc.Metadata, diff --git a/gen/js/stream/v1/stream_pb_service.js b/gen/js/stream/v1/stream_pb_service.js index d9d1a544d..2a9784406 100644 --- a/gen/js/stream/v1/stream_pb_service.js +++ b/gen/js/stream/v1/stream_pb_service.js @@ -28,6 +28,24 @@ StreamService.AddStream = { responseType: stream_v1_stream_pb.AddStreamResponse }; +StreamService.GetStreamOptions = { + methodName: "GetStreamOptions", + service: StreamService, + requestStream: false, + responseStream: false, + requestType: stream_v1_stream_pb.GetStreamOptionsRequest, + responseType: stream_v1_stream_pb.GetStreamOptionsResponse +}; + +StreamService.SetStreamOptions = { + methodName: "SetStreamOptions", + service: StreamService, + requestStream: false, + responseStream: false, + requestType: stream_v1_stream_pb.SetStreamOptionsRequest, + responseType: stream_v1_stream_pb.SetStreamOptionsResponse +}; + StreamService.RemoveStream = { methodName: "RemoveStream", service: StreamService, @@ -106,6 +124,68 @@ StreamServiceClient.prototype.addStream = function addStream(requestMessage, met }; }; +StreamServiceClient.prototype.getStreamOptions = function getStreamOptions(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(StreamService.GetStreamOptions, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + +StreamServiceClient.prototype.setStreamOptions = function setStreamOptions(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(StreamService.SetStreamOptions, { + request: requestMessage, + host: this.serviceHost, + metadata: metadata, + transport: this.options.transport, + debug: this.options.debug, + onEnd: function (response) { + if (callback) { + if (response.status !== grpc.Code.OK) { + var err = new Error(response.statusMessage); + err.code = response.status; + err.metadata = response.trailers; + callback(err, null); + } else { + callback(null, response.message); + } + } + } + }); + return { + cancel: function () { + callback = null; + client.close(); + } + }; +}; + StreamServiceClient.prototype.removeStream = function removeStream(requestMessage, metadata, callback) { if (arguments.length === 2) { callback = arguments[1]; diff --git a/proto/viam/stream/v1/stream.proto b/proto/viam/stream/v1/stream.proto index 2995b7c6a..429f437c7 100644 --- a/proto/viam/stream/v1/stream.proto +++ b/proto/viam/stream/v1/stream.proto @@ -14,6 +14,12 @@ service StreamService { // AddStream requests a particular stream be added. rpc AddStream(AddStreamRequest) returns (AddStreamResponse); + // GetStreamOptions returns the options for a particular stream. + rpc GetStreamOptions(GetStreamOptionsRequest) returns (GetStreamOptionsResponse); + + // SetStreamOptions sets the options for a particular stream. + rpc SetStreamOptions(SetStreamOptionsRequest) returns (SetStreamOptionsResponse); + // RemoveStream requests a particular stream be removed. If the calling client // is the last to be receiving the stream, it will attempt to be stopped to // conserve resources. @@ -43,3 +49,28 @@ message RemoveStreamRequest { // RemoveStreamResponse is returned after a successful RemoveStreamRequest. message RemoveStreamResponse {} + +// Resolution details the width and height of a stream. +message Resolution { + int32 width = 1; + int32 height = 2; +} + +// GetStreamOptionsRequest requests the options for a particular stream. +message GetStreamOptionsRequest { + string name = 1; +} + +// GetStreamOptionsResponse details the options for a particular stream. +message GetStreamOptionsResponse { + repeated Resolution resolutions = 1; +} + +// SetStreamOptionsRequest sets the options for a particular stream. +message SetStreamOptionsRequest { + string name = 1; + Resolution resolution = 2; +} + +// SetStreamOptionsResponse is returned after a successful SetStreamOptionsRequest. +message SetStreamOptionsResponse {} diff --git a/service/generic/v1/generic.pb.gw.go b/service/generic/v1/generic.pb.gw.go index 298562d36..3c74de8b6 100644 --- a/service/generic/v1/generic.pb.gw.go +++ b/service/generic/v1/generic.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -37,7 +37,7 @@ var ( ) func request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client GenericServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -70,7 +70,7 @@ func request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.M } func local_request_GenericService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server GenericServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/service/navigation/v1/navigation.pb.gw.go b/service/navigation/v1/navigation.pb.gw.go index 7843d39a9..40f687bd9 100644 --- a/service/navigation/v1/navigation.pb.gw.go +++ b/service/navigation/v1/navigation.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -669,7 +669,7 @@ var ( ) func request_NavigationService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client NavigationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -702,7 +702,7 @@ func request_NavigationService_DoCommand_0(ctx context.Context, marshaler runtim } func local_request_NavigationService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server NavigationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/service/shell/v1/shell.pb.gw.go b/service/shell/v1/shell.pb.gw.go index 660e30a8b..288e3d8b2 100644 --- a/service/shell/v1/shell.pb.gw.go +++ b/service/shell/v1/shell.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1_0 "go.viam.com/api/common/v1" + "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -166,7 +166,7 @@ var ( ) func request_ShellService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client ShellServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -199,7 +199,7 @@ func request_ShellService_DoCommand_0(ctx context.Context, marshaler runtime.Mar } func local_request_ShellService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server ShellServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1_0.DoCommandRequest + var protoReq v1.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/service/slam/v1/slam.pb.gw.go b/service/slam/v1/slam.pb.gw.go index 48ac2664d..afa099e21 100644 --- a/service/slam/v1/slam.pb.gw.go +++ b/service/slam/v1/slam.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -220,7 +220,7 @@ var ( ) func request_SLAMService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client SLAMServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -253,7 +253,7 @@ func request_SLAMService_DoCommand_0(ctx context.Context, marshaler runtime.Mars } func local_request_SLAMService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server SLAMServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/service/vision/v1/vision.pb.gw.go b/service/vision/v1/vision.pb.gw.go index ca0af0132..ad78f24c3 100644 --- a/service/vision/v1/vision.pb.gw.go +++ b/service/vision/v1/vision.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "go.viam.com/api/common/v1" + v1_0 "go.viam.com/api/common/v1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -527,7 +527,7 @@ var ( ) func request_VisionService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, client VisionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( @@ -560,7 +560,7 @@ func request_VisionService_DoCommand_0(ctx context.Context, marshaler runtime.Ma } func local_request_VisionService_DoCommand_0(ctx context.Context, marshaler runtime.Marshaler, server VisionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1.DoCommandRequest + var protoReq v1_0.DoCommandRequest var metadata runtime.ServerMetadata var ( diff --git a/stream/v1/stream.pb.go b/stream/v1/stream.pb.go index 34aab41ca..285aed3fe 100644 --- a/stream/v1/stream.pb.go +++ b/stream/v1/stream.pb.go @@ -281,6 +281,253 @@ func (*RemoveStreamResponse) Descriptor() ([]byte, []int) { return file_stream_v1_stream_proto_rawDescGZIP(), []int{5} } +// Resolution details the width and height of a stream. +type Resolution struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Width int32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"` + Height int32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *Resolution) Reset() { + *x = Resolution{} + if protoimpl.UnsafeEnabled { + mi := &file_stream_v1_stream_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resolution) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resolution) ProtoMessage() {} + +func (x *Resolution) ProtoReflect() protoreflect.Message { + mi := &file_stream_v1_stream_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Resolution.ProtoReflect.Descriptor instead. +func (*Resolution) Descriptor() ([]byte, []int) { + return file_stream_v1_stream_proto_rawDescGZIP(), []int{6} +} + +func (x *Resolution) GetWidth() int32 { + if x != nil { + return x.Width + } + return 0 +} + +func (x *Resolution) GetHeight() int32 { + if x != nil { + return x.Height + } + return 0 +} + +// GetStreamOptionsRequest requests the options for a particular stream. +type GetStreamOptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetStreamOptionsRequest) Reset() { + *x = GetStreamOptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stream_v1_stream_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStreamOptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStreamOptionsRequest) ProtoMessage() {} + +func (x *GetStreamOptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_stream_v1_stream_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStreamOptionsRequest.ProtoReflect.Descriptor instead. +func (*GetStreamOptionsRequest) Descriptor() ([]byte, []int) { + return file_stream_v1_stream_proto_rawDescGZIP(), []int{7} +} + +func (x *GetStreamOptionsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// GetStreamOptionsResponse details the options for a particular stream. +type GetStreamOptionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Resolutions []*Resolution `protobuf:"bytes,1,rep,name=resolutions,proto3" json:"resolutions,omitempty"` +} + +func (x *GetStreamOptionsResponse) Reset() { + *x = GetStreamOptionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stream_v1_stream_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetStreamOptionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetStreamOptionsResponse) ProtoMessage() {} + +func (x *GetStreamOptionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_stream_v1_stream_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetStreamOptionsResponse.ProtoReflect.Descriptor instead. +func (*GetStreamOptionsResponse) Descriptor() ([]byte, []int) { + return file_stream_v1_stream_proto_rawDescGZIP(), []int{8} +} + +func (x *GetStreamOptionsResponse) GetResolutions() []*Resolution { + if x != nil { + return x.Resolutions + } + return nil +} + +// SetStreamOptionsRequest sets the options for a particular stream. +type SetStreamOptionsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Resolution *Resolution `protobuf:"bytes,2,opt,name=resolution,proto3" json:"resolution,omitempty"` +} + +func (x *SetStreamOptionsRequest) Reset() { + *x = SetStreamOptionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_stream_v1_stream_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetStreamOptionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetStreamOptionsRequest) ProtoMessage() {} + +func (x *SetStreamOptionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_stream_v1_stream_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetStreamOptionsRequest.ProtoReflect.Descriptor instead. +func (*SetStreamOptionsRequest) Descriptor() ([]byte, []int) { + return file_stream_v1_stream_proto_rawDescGZIP(), []int{9} +} + +func (x *SetStreamOptionsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SetStreamOptionsRequest) GetResolution() *Resolution { + if x != nil { + return x.Resolution + } + return nil +} + +// SetStreamOptionsResponse is returned after a successful SetStreamOptionsRequest. +type SetStreamOptionsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetStreamOptionsResponse) Reset() { + *x = SetStreamOptionsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_stream_v1_stream_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetStreamOptionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetStreamOptionsResponse) ProtoMessage() {} + +func (x *SetStreamOptionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_stream_v1_stream_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetStreamOptionsResponse.ProtoReflect.Descriptor instead. +func (*SetStreamOptionsResponse) Descriptor() ([]byte, []int) { + return file_stream_v1_stream_proto_rawDescGZIP(), []int{10} +} + var File_stream_v1_stream_proto protoreflect.FileDescriptor var file_stream_v1_stream_proto_rawDesc = []byte{ @@ -298,19 +545,53 @@ var file_stream_v1_stream_proto_rawDesc = []byte{ 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, - 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, - 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0c, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x0a, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, + 0x64, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x2d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x6a, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1a, + 0x0a, 0x18, 0x53, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xec, 0x03, 0x0a, 0x0d, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0b, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, @@ -335,27 +616,38 @@ func file_stream_v1_stream_proto_rawDescGZIP() []byte { return file_stream_v1_stream_proto_rawDescData } -var file_stream_v1_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_stream_v1_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_stream_v1_stream_proto_goTypes = []interface{}{ - (*ListStreamsRequest)(nil), // 0: proto.stream.v1.ListStreamsRequest - (*ListStreamsResponse)(nil), // 1: proto.stream.v1.ListStreamsResponse - (*AddStreamRequest)(nil), // 2: proto.stream.v1.AddStreamRequest - (*AddStreamResponse)(nil), // 3: proto.stream.v1.AddStreamResponse - (*RemoveStreamRequest)(nil), // 4: proto.stream.v1.RemoveStreamRequest - (*RemoveStreamResponse)(nil), // 5: proto.stream.v1.RemoveStreamResponse + (*ListStreamsRequest)(nil), // 0: proto.stream.v1.ListStreamsRequest + (*ListStreamsResponse)(nil), // 1: proto.stream.v1.ListStreamsResponse + (*AddStreamRequest)(nil), // 2: proto.stream.v1.AddStreamRequest + (*AddStreamResponse)(nil), // 3: proto.stream.v1.AddStreamResponse + (*RemoveStreamRequest)(nil), // 4: proto.stream.v1.RemoveStreamRequest + (*RemoveStreamResponse)(nil), // 5: proto.stream.v1.RemoveStreamResponse + (*Resolution)(nil), // 6: proto.stream.v1.Resolution + (*GetStreamOptionsRequest)(nil), // 7: proto.stream.v1.GetStreamOptionsRequest + (*GetStreamOptionsResponse)(nil), // 8: proto.stream.v1.GetStreamOptionsResponse + (*SetStreamOptionsRequest)(nil), // 9: proto.stream.v1.SetStreamOptionsRequest + (*SetStreamOptionsResponse)(nil), // 10: proto.stream.v1.SetStreamOptionsResponse } var file_stream_v1_stream_proto_depIdxs = []int32{ - 0, // 0: proto.stream.v1.StreamService.ListStreams:input_type -> proto.stream.v1.ListStreamsRequest - 2, // 1: proto.stream.v1.StreamService.AddStream:input_type -> proto.stream.v1.AddStreamRequest - 4, // 2: proto.stream.v1.StreamService.RemoveStream:input_type -> proto.stream.v1.RemoveStreamRequest - 1, // 3: proto.stream.v1.StreamService.ListStreams:output_type -> proto.stream.v1.ListStreamsResponse - 3, // 4: proto.stream.v1.StreamService.AddStream:output_type -> proto.stream.v1.AddStreamResponse - 5, // 5: proto.stream.v1.StreamService.RemoveStream:output_type -> proto.stream.v1.RemoveStreamResponse - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 6, // 0: proto.stream.v1.GetStreamOptionsResponse.resolutions:type_name -> proto.stream.v1.Resolution + 6, // 1: proto.stream.v1.SetStreamOptionsRequest.resolution:type_name -> proto.stream.v1.Resolution + 0, // 2: proto.stream.v1.StreamService.ListStreams:input_type -> proto.stream.v1.ListStreamsRequest + 2, // 3: proto.stream.v1.StreamService.AddStream:input_type -> proto.stream.v1.AddStreamRequest + 7, // 4: proto.stream.v1.StreamService.GetStreamOptions:input_type -> proto.stream.v1.GetStreamOptionsRequest + 9, // 5: proto.stream.v1.StreamService.SetStreamOptions:input_type -> proto.stream.v1.SetStreamOptionsRequest + 4, // 6: proto.stream.v1.StreamService.RemoveStream:input_type -> proto.stream.v1.RemoveStreamRequest + 1, // 7: proto.stream.v1.StreamService.ListStreams:output_type -> proto.stream.v1.ListStreamsResponse + 3, // 8: proto.stream.v1.StreamService.AddStream:output_type -> proto.stream.v1.AddStreamResponse + 8, // 9: proto.stream.v1.StreamService.GetStreamOptions:output_type -> proto.stream.v1.GetStreamOptionsResponse + 10, // 10: proto.stream.v1.StreamService.SetStreamOptions:output_type -> proto.stream.v1.SetStreamOptionsResponse + 5, // 11: proto.stream.v1.StreamService.RemoveStream:output_type -> proto.stream.v1.RemoveStreamResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_stream_v1_stream_proto_init() } @@ -436,6 +728,66 @@ func file_stream_v1_stream_proto_init() { return nil } } + file_stream_v1_stream_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resolution); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stream_v1_stream_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStreamOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stream_v1_stream_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetStreamOptionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stream_v1_stream_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetStreamOptionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_stream_v1_stream_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetStreamOptionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -443,7 +795,7 @@ func file_stream_v1_stream_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_stream_v1_stream_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/stream/v1/stream.pb.gw.go b/stream/v1/stream.pb.gw.go index fe28699eb..aa5e3d420 100644 --- a/stream/v1/stream.pb.gw.go +++ b/stream/v1/stream.pb.gw.go @@ -99,6 +99,74 @@ func local_request_StreamService_AddStream_0(ctx context.Context, marshaler runt } +func request_StreamService_GetStreamOptions_0(ctx context.Context, marshaler runtime.Marshaler, client StreamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetStreamOptionsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetStreamOptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_StreamService_GetStreamOptions_0(ctx context.Context, marshaler runtime.Marshaler, server StreamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetStreamOptionsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetStreamOptions(ctx, &protoReq) + return msg, metadata, err + +} + +func request_StreamService_SetStreamOptions_0(ctx context.Context, marshaler runtime.Marshaler, client StreamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetStreamOptionsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SetStreamOptions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_StreamService_SetStreamOptions_0(ctx context.Context, marshaler runtime.Marshaler, server StreamServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SetStreamOptionsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SetStreamOptions(ctx, &protoReq) + return msg, metadata, err + +} + func request_StreamService_RemoveStream_0(ctx context.Context, marshaler runtime.Marshaler, client StreamServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveStreamRequest var metadata runtime.ServerMetadata @@ -189,6 +257,56 @@ func RegisterStreamServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("POST", pattern_StreamService_GetStreamOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/proto.stream.v1.StreamService/GetStreamOptions", runtime.WithHTTPPathPattern("/proto.stream.v1.StreamService/GetStreamOptions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_StreamService_GetStreamOptions_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_StreamService_GetStreamOptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_StreamService_SetStreamOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/proto.stream.v1.StreamService/SetStreamOptions", runtime.WithHTTPPathPattern("/proto.stream.v1.StreamService/SetStreamOptions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_StreamService_SetStreamOptions_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_StreamService_SetStreamOptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_StreamService_RemoveStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -299,6 +417,50 @@ func RegisterStreamServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("POST", pattern_StreamService_GetStreamOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/proto.stream.v1.StreamService/GetStreamOptions", runtime.WithHTTPPathPattern("/proto.stream.v1.StreamService/GetStreamOptions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StreamService_GetStreamOptions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_StreamService_GetStreamOptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_StreamService_SetStreamOptions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/proto.stream.v1.StreamService/SetStreamOptions", runtime.WithHTTPPathPattern("/proto.stream.v1.StreamService/SetStreamOptions")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_StreamService_SetStreamOptions_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_StreamService_SetStreamOptions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_StreamService_RemoveStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -329,6 +491,10 @@ var ( pattern_StreamService_AddStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"proto.stream.v1.StreamService", "AddStream"}, "")) + pattern_StreamService_GetStreamOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"proto.stream.v1.StreamService", "GetStreamOptions"}, "")) + + pattern_StreamService_SetStreamOptions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"proto.stream.v1.StreamService", "SetStreamOptions"}, "")) + pattern_StreamService_RemoveStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"proto.stream.v1.StreamService", "RemoveStream"}, "")) ) @@ -337,5 +503,9 @@ var ( forward_StreamService_AddStream_0 = runtime.ForwardResponseMessage + forward_StreamService_GetStreamOptions_0 = runtime.ForwardResponseMessage + + forward_StreamService_SetStreamOptions_0 = runtime.ForwardResponseMessage + forward_StreamService_RemoveStream_0 = runtime.ForwardResponseMessage ) diff --git a/stream/v1/stream_grpc.pb.go b/stream/v1/stream_grpc.pb.go index 6548c198d..9da51c232 100644 --- a/stream/v1/stream_grpc.pb.go +++ b/stream/v1/stream_grpc.pb.go @@ -26,6 +26,10 @@ type StreamServiceClient interface { ListStreams(ctx context.Context, in *ListStreamsRequest, opts ...grpc.CallOption) (*ListStreamsResponse, error) // AddStream requests a particular stream be added. AddStream(ctx context.Context, in *AddStreamRequest, opts ...grpc.CallOption) (*AddStreamResponse, error) + // GetStreamOptions returns the options for a particular stream. + GetStreamOptions(ctx context.Context, in *GetStreamOptionsRequest, opts ...grpc.CallOption) (*GetStreamOptionsResponse, error) + // SetStreamOptions sets the options for a particular stream. + SetStreamOptions(ctx context.Context, in *SetStreamOptionsRequest, opts ...grpc.CallOption) (*SetStreamOptionsResponse, error) // RemoveStream requests a particular stream be removed. If the calling client // is the last to be receiving the stream, it will attempt to be stopped to // conserve resources. @@ -58,6 +62,24 @@ func (c *streamServiceClient) AddStream(ctx context.Context, in *AddStreamReques return out, nil } +func (c *streamServiceClient) GetStreamOptions(ctx context.Context, in *GetStreamOptionsRequest, opts ...grpc.CallOption) (*GetStreamOptionsResponse, error) { + out := new(GetStreamOptionsResponse) + err := c.cc.Invoke(ctx, "/proto.stream.v1.StreamService/GetStreamOptions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *streamServiceClient) SetStreamOptions(ctx context.Context, in *SetStreamOptionsRequest, opts ...grpc.CallOption) (*SetStreamOptionsResponse, error) { + out := new(SetStreamOptionsResponse) + err := c.cc.Invoke(ctx, "/proto.stream.v1.StreamService/SetStreamOptions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *streamServiceClient) RemoveStream(ctx context.Context, in *RemoveStreamRequest, opts ...grpc.CallOption) (*RemoveStreamResponse, error) { out := new(RemoveStreamResponse) err := c.cc.Invoke(ctx, "/proto.stream.v1.StreamService/RemoveStream", in, out, opts...) @@ -75,6 +97,10 @@ type StreamServiceServer interface { ListStreams(context.Context, *ListStreamsRequest) (*ListStreamsResponse, error) // AddStream requests a particular stream be added. AddStream(context.Context, *AddStreamRequest) (*AddStreamResponse, error) + // GetStreamOptions returns the options for a particular stream. + GetStreamOptions(context.Context, *GetStreamOptionsRequest) (*GetStreamOptionsResponse, error) + // SetStreamOptions sets the options for a particular stream. + SetStreamOptions(context.Context, *SetStreamOptionsRequest) (*SetStreamOptionsResponse, error) // RemoveStream requests a particular stream be removed. If the calling client // is the last to be receiving the stream, it will attempt to be stopped to // conserve resources. @@ -92,6 +118,12 @@ func (UnimplementedStreamServiceServer) ListStreams(context.Context, *ListStream func (UnimplementedStreamServiceServer) AddStream(context.Context, *AddStreamRequest) (*AddStreamResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddStream not implemented") } +func (UnimplementedStreamServiceServer) GetStreamOptions(context.Context, *GetStreamOptionsRequest) (*GetStreamOptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStreamOptions not implemented") +} +func (UnimplementedStreamServiceServer) SetStreamOptions(context.Context, *SetStreamOptionsRequest) (*SetStreamOptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetStreamOptions not implemented") +} func (UnimplementedStreamServiceServer) RemoveStream(context.Context, *RemoveStreamRequest) (*RemoveStreamResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveStream not implemented") } @@ -144,6 +176,42 @@ func _StreamService_AddStream_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _StreamService_GetStreamOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStreamOptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StreamServiceServer).GetStreamOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.stream.v1.StreamService/GetStreamOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StreamServiceServer).GetStreamOptions(ctx, req.(*GetStreamOptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StreamService_SetStreamOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetStreamOptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StreamServiceServer).SetStreamOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.stream.v1.StreamService/SetStreamOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StreamServiceServer).SetStreamOptions(ctx, req.(*SetStreamOptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _StreamService_RemoveStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RemoveStreamRequest) if err := dec(in); err != nil { @@ -177,6 +245,14 @@ var StreamService_ServiceDesc = grpc.ServiceDesc{ MethodName: "AddStream", Handler: _StreamService_AddStream_Handler, }, + { + MethodName: "GetStreamOptions", + Handler: _StreamService_GetStreamOptions_Handler, + }, + { + MethodName: "SetStreamOptions", + Handler: _StreamService_SetStreamOptions_Handler, + }, { MethodName: "RemoveStream", Handler: _StreamService_RemoveStream_Handler,