protected override void ProcessRecord() { base.ProcessRecord(); StopDeploymentRequest request; try { request = new StopDeploymentRequest { DeploymentId = DeploymentId, StopDeploymentDetails = StopDeploymentDetails, IfMatch = IfMatch, OpcRequestId = OpcRequestId, OpcRetryToken = OpcRetryToken }; response = client.StopDeployment(request).GetAwaiter().GetResult(); WriteOutput(response, CreateWorkRequestObject(response.OpcWorkRequestId)); FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }
/// <summary> /// /// </summary> /// <param name="request"> /// The request object containing all of the parameters for the API call. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// A Task containing the RPC response. /// </returns> public override stt::Task <StopDeploymentResponse> StopDeploymentAsync( StopDeploymentRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_StopDeploymentRequest(ref request, ref callSettings); return(_callStopDeployment.Async(request, callSettings)); }
/// <summary> /// /// </summary> /// <param name="request"> /// The request object containing all of the parameters for the API call. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// The RPC response. /// </returns> public override StopDeploymentResponse StopDeployment( StopDeploymentRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_StopDeploymentRequest(ref request, ref callSettings); return(_callStopDeployment.Sync(request, callSettings)); }
public static void StopDeployment(Deployment deployment) { ExceptionHandler.HandleGrpcCall(() => { var request = new StopDeploymentRequest { Id = deployment.Id, ProjectName = deployment.ProjectName, }; deploymentServiceClient.StopDeployment(request); }); }
partial void Modify_StopDeploymentRequest(ref StopDeploymentRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// /// </summary> /// <param name="request"> /// The request object containing all of the parameters for the API call. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// The RPC response. /// </returns> public virtual StopDeploymentResponse StopDeployment( StopDeploymentRequest request, gaxgrpc::CallSettings callSettings = null) { throw new sys::NotImplementedException(); }
/// <summary> /// /// </summary> /// <param name="request"> /// The request object containing all of the parameters for the API call. /// </param> /// <param name="cancellationToken"> /// A <see cref="st::CancellationToken"/> to use for this RPC. /// </param> /// <returns> /// A Task containing the RPC response. /// </returns> public virtual stt::Task <StopDeploymentResponse> StopDeploymentAsync( StopDeploymentRequest request, st::CancellationToken cancellationToken) => StopDeploymentAsync( request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
/// <summary> /// /// </summary> /// <param name="request"> /// The request object containing all of the parameters for the API call. /// </param> /// <param name="callSettings"> /// If not null, applies overrides to this RPC call. /// </param> /// <returns> /// A Task containing the RPC response. /// </returns> public virtual stt::Task <StopDeploymentResponse> StopDeploymentAsync( StopDeploymentRequest request, gaxgrpc::CallSettings callSettings = null) { throw new sys::NotImplementedException(); }