7676import com .google .cloud .video .livestream .v1 .ListInputsResponse ;
7777import com .google .cloud .video .livestream .v1 .OperationMetadata ;
7878import com .google .cloud .video .livestream .v1 .Pool ;
79+ import com .google .cloud .video .livestream .v1 .PreviewInputRequest ;
80+ import com .google .cloud .video .livestream .v1 .PreviewInputResponse ;
7981import com .google .cloud .video .livestream .v1 .StartChannelRequest ;
82+ import com .google .cloud .video .livestream .v1 .StartDistributionRequest ;
8083import com .google .cloud .video .livestream .v1 .StopChannelRequest ;
84+ import com .google .cloud .video .livestream .v1 .StopDistributionRequest ;
8185import com .google .cloud .video .livestream .v1 .UpdateChannelRequest ;
8286import com .google .cloud .video .livestream .v1 .UpdateDvrSessionRequest ;
8387import com .google .cloud .video .livestream .v1 .UpdateInputRequest ;
@@ -171,6 +175,30 @@ public class GrpcLivestreamServiceStub extends LivestreamServiceStub {
171175 .setSampledToLocalTracing (true )
172176 .build ();
173177
178+ private static final MethodDescriptor <StartDistributionRequest , Operation >
179+ startDistributionMethodDescriptor =
180+ MethodDescriptor .<StartDistributionRequest , Operation >newBuilder ()
181+ .setType (MethodDescriptor .MethodType .UNARY )
182+ .setFullMethodName (
183+ "google.cloud.video.livestream.v1.LivestreamService/StartDistribution" )
184+ .setRequestMarshaller (
185+ ProtoUtils .marshaller (StartDistributionRequest .getDefaultInstance ()))
186+ .setResponseMarshaller (ProtoUtils .marshaller (Operation .getDefaultInstance ()))
187+ .setSampledToLocalTracing (true )
188+ .build ();
189+
190+ private static final MethodDescriptor <StopDistributionRequest , Operation >
191+ stopDistributionMethodDescriptor =
192+ MethodDescriptor .<StopDistributionRequest , Operation >newBuilder ()
193+ .setType (MethodDescriptor .MethodType .UNARY )
194+ .setFullMethodName (
195+ "google.cloud.video.livestream.v1.LivestreamService/StopDistribution" )
196+ .setRequestMarshaller (
197+ ProtoUtils .marshaller (StopDistributionRequest .getDefaultInstance ()))
198+ .setResponseMarshaller (ProtoUtils .marshaller (Operation .getDefaultInstance ()))
199+ .setSampledToLocalTracing (true )
200+ .build ();
201+
174202 private static final MethodDescriptor <CreateInputRequest , Operation > createInputMethodDescriptor =
175203 MethodDescriptor .<CreateInputRequest , Operation >newBuilder ()
176204 .setType (MethodDescriptor .MethodType .UNARY )
@@ -217,6 +245,17 @@ public class GrpcLivestreamServiceStub extends LivestreamServiceStub {
217245 .setSampledToLocalTracing (true )
218246 .build ();
219247
248+ private static final MethodDescriptor <PreviewInputRequest , PreviewInputResponse >
249+ previewInputMethodDescriptor =
250+ MethodDescriptor .<PreviewInputRequest , PreviewInputResponse >newBuilder ()
251+ .setType (MethodDescriptor .MethodType .UNARY )
252+ .setFullMethodName ("google.cloud.video.livestream.v1.LivestreamService/PreviewInput" )
253+ .setRequestMarshaller (ProtoUtils .marshaller (PreviewInputRequest .getDefaultInstance ()))
254+ .setResponseMarshaller (
255+ ProtoUtils .marshaller (PreviewInputResponse .getDefaultInstance ()))
256+ .setSampledToLocalTracing (true )
257+ .build ();
258+
220259 private static final MethodDescriptor <CreateEventRequest , Event > createEventMethodDescriptor =
221260 MethodDescriptor .<CreateEventRequest , Event >newBuilder ()
222261 .setType (MethodDescriptor .MethodType .UNARY )
@@ -446,6 +485,14 @@ public class GrpcLivestreamServiceStub extends LivestreamServiceStub {
446485 private final UnaryCallable <StopChannelRequest , Operation > stopChannelCallable ;
447486 private final OperationCallable <StopChannelRequest , ChannelOperationResponse , OperationMetadata >
448487 stopChannelOperationCallable ;
488+ private final UnaryCallable <StartDistributionRequest , Operation > startDistributionCallable ;
489+ private final OperationCallable <
490+ StartDistributionRequest , ChannelOperationResponse , OperationMetadata >
491+ startDistributionOperationCallable ;
492+ private final UnaryCallable <StopDistributionRequest , Operation > stopDistributionCallable ;
493+ private final OperationCallable <
494+ StopDistributionRequest , ChannelOperationResponse , OperationMetadata >
495+ stopDistributionOperationCallable ;
449496 private final UnaryCallable <CreateInputRequest , Operation > createInputCallable ;
450497 private final OperationCallable <CreateInputRequest , Input , OperationMetadata >
451498 createInputOperationCallable ;
@@ -458,6 +505,7 @@ public class GrpcLivestreamServiceStub extends LivestreamServiceStub {
458505 private final UnaryCallable <UpdateInputRequest , Operation > updateInputCallable ;
459506 private final OperationCallable <UpdateInputRequest , Input , OperationMetadata >
460507 updateInputOperationCallable ;
508+ private final UnaryCallable <PreviewInputRequest , PreviewInputResponse > previewInputCallable ;
461509 private final UnaryCallable <CreateEventRequest , Event > createEventCallable ;
462510 private final UnaryCallable <ListEventsRequest , ListEventsResponse > listEventsCallable ;
463511 private final UnaryCallable <ListEventsRequest , ListEventsPagedResponse > listEventsPagedCallable ;
@@ -618,6 +666,26 @@ protected GrpcLivestreamServiceStub(
618666 return builder .build ();
619667 })
620668 .build ();
669+ GrpcCallSettings <StartDistributionRequest , Operation > startDistributionTransportSettings =
670+ GrpcCallSettings .<StartDistributionRequest , Operation >newBuilder ()
671+ .setMethodDescriptor (startDistributionMethodDescriptor )
672+ .setParamsExtractor (
673+ request -> {
674+ RequestParamsBuilder builder = RequestParamsBuilder .create ();
675+ builder .add ("name" , String .valueOf (request .getName ()));
676+ return builder .build ();
677+ })
678+ .build ();
679+ GrpcCallSettings <StopDistributionRequest , Operation > stopDistributionTransportSettings =
680+ GrpcCallSettings .<StopDistributionRequest , Operation >newBuilder ()
681+ .setMethodDescriptor (stopDistributionMethodDescriptor )
682+ .setParamsExtractor (
683+ request -> {
684+ RequestParamsBuilder builder = RequestParamsBuilder .create ();
685+ builder .add ("name" , String .valueOf (request .getName ()));
686+ return builder .build ();
687+ })
688+ .build ();
621689 GrpcCallSettings <CreateInputRequest , Operation > createInputTransportSettings =
622690 GrpcCallSettings .<CreateInputRequest , Operation >newBuilder ()
623691 .setMethodDescriptor (createInputMethodDescriptor )
@@ -668,6 +736,16 @@ protected GrpcLivestreamServiceStub(
668736 return builder .build ();
669737 })
670738 .build ();
739+ GrpcCallSettings <PreviewInputRequest , PreviewInputResponse > previewInputTransportSettings =
740+ GrpcCallSettings .<PreviewInputRequest , PreviewInputResponse >newBuilder ()
741+ .setMethodDescriptor (previewInputMethodDescriptor )
742+ .setParamsExtractor (
743+ request -> {
744+ RequestParamsBuilder builder = RequestParamsBuilder .create ();
745+ builder .add ("name" , String .valueOf (request .getName ()));
746+ return builder .build ();
747+ })
748+ .build ();
671749 GrpcCallSettings <CreateEventRequest , Event > createEventTransportSettings =
672750 GrpcCallSettings .<CreateEventRequest , Event >newBuilder ()
673751 .setMethodDescriptor (createEventMethodDescriptor )
@@ -935,6 +1013,26 @@ protected GrpcLivestreamServiceStub(
9351013 settings .stopChannelOperationSettings (),
9361014 clientContext ,
9371015 operationsStub );
1016+ this .startDistributionCallable =
1017+ callableFactory .createUnaryCallable (
1018+ startDistributionTransportSettings ,
1019+ settings .startDistributionSettings (),
1020+ clientContext );
1021+ this .startDistributionOperationCallable =
1022+ callableFactory .createOperationCallable (
1023+ startDistributionTransportSettings ,
1024+ settings .startDistributionOperationSettings (),
1025+ clientContext ,
1026+ operationsStub );
1027+ this .stopDistributionCallable =
1028+ callableFactory .createUnaryCallable (
1029+ stopDistributionTransportSettings , settings .stopDistributionSettings (), clientContext );
1030+ this .stopDistributionOperationCallable =
1031+ callableFactory .createOperationCallable (
1032+ stopDistributionTransportSettings ,
1033+ settings .stopDistributionOperationSettings (),
1034+ clientContext ,
1035+ operationsStub );
9381036 this .createInputCallable =
9391037 callableFactory .createUnaryCallable (
9401038 createInputTransportSettings , settings .createInputSettings (), clientContext );
@@ -971,6 +1069,9 @@ protected GrpcLivestreamServiceStub(
9711069 settings .updateInputOperationSettings (),
9721070 clientContext ,
9731071 operationsStub );
1072+ this .previewInputCallable =
1073+ callableFactory .createUnaryCallable (
1074+ previewInputTransportSettings , settings .previewInputSettings (), clientContext );
9741075 this .createEventCallable =
9751076 callableFactory .createUnaryCallable (
9761077 createEventTransportSettings , settings .createEventSettings (), clientContext );
@@ -1176,6 +1277,28 @@ public UnaryCallable<StopChannelRequest, Operation> stopChannelCallable() {
11761277 return stopChannelOperationCallable ;
11771278 }
11781279
1280+ @ Override
1281+ public UnaryCallable <StartDistributionRequest , Operation > startDistributionCallable () {
1282+ return startDistributionCallable ;
1283+ }
1284+
1285+ @ Override
1286+ public OperationCallable <StartDistributionRequest , ChannelOperationResponse , OperationMetadata >
1287+ startDistributionOperationCallable () {
1288+ return startDistributionOperationCallable ;
1289+ }
1290+
1291+ @ Override
1292+ public UnaryCallable <StopDistributionRequest , Operation > stopDistributionCallable () {
1293+ return stopDistributionCallable ;
1294+ }
1295+
1296+ @ Override
1297+ public OperationCallable <StopDistributionRequest , ChannelOperationResponse , OperationMetadata >
1298+ stopDistributionOperationCallable () {
1299+ return stopDistributionOperationCallable ;
1300+ }
1301+
11791302 @ Override
11801303 public UnaryCallable <CreateInputRequest , Operation > createInputCallable () {
11811304 return createInputCallable ;
@@ -1224,6 +1347,11 @@ public UnaryCallable<UpdateInputRequest, Operation> updateInputCallable() {
12241347 return updateInputOperationCallable ;
12251348 }
12261349
1350+ @ Override
1351+ public UnaryCallable <PreviewInputRequest , PreviewInputResponse > previewInputCallable () {
1352+ return previewInputCallable ;
1353+ }
1354+
12271355 @ Override
12281356 public UnaryCallable <CreateEventRequest , Event > createEventCallable () {
12291357 return createEventCallable ;
0 commit comments