|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace AsyncAws\CloudFormation\Result; |
| 4 | + |
| 5 | +use AsyncAws\CloudFormation\Enum\StackDriftDetectionStatus; |
| 6 | +use AsyncAws\CloudFormation\Enum\StackDriftStatus; |
| 7 | +use AsyncAws\Core\Response; |
| 8 | +use AsyncAws\Core\Result; |
| 9 | + |
| 10 | +class DescribeStackDriftDetectionStatusOutput extends Result |
| 11 | +{ |
| 12 | + /** |
| 13 | + * The ID of the stack. |
| 14 | + */ |
| 15 | + private $stackId; |
| 16 | + |
| 17 | + /** |
| 18 | + * The ID of the drift detection results of this operation. |
| 19 | + */ |
| 20 | + private $stackDriftDetectionId; |
| 21 | + |
| 22 | + /** |
| 23 | + * Status of the stack's actual configuration compared to its expected configuration. |
| 24 | + */ |
| 25 | + private $stackDriftStatus; |
| 26 | + |
| 27 | + /** |
| 28 | + * The status of the stack drift detection operation. |
| 29 | + */ |
| 30 | + private $detectionStatus; |
| 31 | + |
| 32 | + /** |
| 33 | + * The reason the stack drift detection operation has its current status. |
| 34 | + */ |
| 35 | + private $detectionStatusReason; |
| 36 | + |
| 37 | + /** |
| 38 | + * Total number of stack resources that have drifted. This is NULL until the drift detection operation reaches a status |
| 39 | + * of `DETECTION_COMPLETE`. This value will be 0 for stacks whose drift status is `IN_SYNC`. |
| 40 | + */ |
| 41 | + private $driftedStackResourceCount; |
| 42 | + |
| 43 | + /** |
| 44 | + * Time at which the stack drift detection operation was initiated. |
| 45 | + */ |
| 46 | + private $timestamp; |
| 47 | + |
| 48 | + /** |
| 49 | + * @return StackDriftDetectionStatus::* |
| 50 | + */ |
| 51 | + public function getDetectionStatus(): string |
| 52 | + { |
| 53 | + $this->initialize(); |
| 54 | + |
| 55 | + return $this->detectionStatus; |
| 56 | + } |
| 57 | + |
| 58 | + public function getDetectionStatusReason(): ?string |
| 59 | + { |
| 60 | + $this->initialize(); |
| 61 | + |
| 62 | + return $this->detectionStatusReason; |
| 63 | + } |
| 64 | + |
| 65 | + public function getDriftedStackResourceCount(): ?int |
| 66 | + { |
| 67 | + $this->initialize(); |
| 68 | + |
| 69 | + return $this->driftedStackResourceCount; |
| 70 | + } |
| 71 | + |
| 72 | + public function getStackDriftDetectionId(): string |
| 73 | + { |
| 74 | + $this->initialize(); |
| 75 | + |
| 76 | + return $this->stackDriftDetectionId; |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * @return StackDriftStatus::*|null |
| 81 | + */ |
| 82 | + public function getStackDriftStatus(): ?string |
| 83 | + { |
| 84 | + $this->initialize(); |
| 85 | + |
| 86 | + return $this->stackDriftStatus; |
| 87 | + } |
| 88 | + |
| 89 | + public function getStackId(): string |
| 90 | + { |
| 91 | + $this->initialize(); |
| 92 | + |
| 93 | + return $this->stackId; |
| 94 | + } |
| 95 | + |
| 96 | + public function getTimestamp(): \DateTimeImmutable |
| 97 | + { |
| 98 | + $this->initialize(); |
| 99 | + |
| 100 | + return $this->timestamp; |
| 101 | + } |
| 102 | + |
| 103 | + protected function populateResult(Response $response): void |
| 104 | + { |
| 105 | + $data = new \SimpleXMLElement($response->getContent()); |
| 106 | + $data = $data->DescribeStackDriftDetectionStatusResult; |
| 107 | + |
| 108 | + $this->stackId = (string) $data->StackId; |
| 109 | + $this->stackDriftDetectionId = (string) $data->StackDriftDetectionId; |
| 110 | + $this->stackDriftStatus = ($v = $data->StackDriftStatus) ? (string) $v : null; |
| 111 | + $this->detectionStatus = (string) $data->DetectionStatus; |
| 112 | + $this->detectionStatusReason = ($v = $data->DetectionStatusReason) ? (string) $v : null; |
| 113 | + $this->driftedStackResourceCount = ($v = $data->DriftedStackResourceCount) ? (int) (string) $v : null; |
| 114 | + $this->timestamp = new \DateTimeImmutable((string) $data->Timestamp); |
| 115 | + } |
| 116 | +} |
0 commit comments