locationConstraint = $input['LocationConstraint'] ?? null; } public static function create($input): self { return $input instanceof self ? $input : new self($input); } /** * @return BucketLocationConstraint::*|null */ public function getLocationConstraint(): ?string { return $this->locationConstraint; } /** * @internal */ public function requestBody(\DOMElement $node, \DOMDocument $document): void { if (null !== $v = $this->locationConstraint) { if (!BucketLocationConstraint::exists($v)) { throw new InvalidArgument(sprintf('Invalid parameter "LocationConstraint" for "%s". The value "%s" is not a valid "BucketLocationConstraint".', __CLASS__, $v)); } $node->appendChild($document->createElement('LocationConstraint', $v)); } } }