private void HandleOutput(GetDeployEnvironmentRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

            switch (ParameterSetName)
            {
            case LifecycleStateParamSet:
                response = client.Waiters.ForDeployEnvironment(request, waiterConfig, WaitForLifecycleState).Execute();
                break;

            case Default:
                response = client.GetDeployEnvironment(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, response.DeployEnvironment);
        }
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            GetDeployEnvironmentRequest request;

            try
            {
                request = new GetDeployEnvironmentRequest
                {
                    DeployEnvironmentId = DeployEnvironmentId,
                    OpcRequestId        = OpcRequestId
                };

                HandleOutput(request);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }