properties = [ 'sid' => Values::array_get($payload, 'sid'), 'accountSid' => Values::array_get($payload, 'account_sid'), 'friendlyName' => Values::array_get($payload, 'friendly_name'), 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')), 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')), 'url' => Values::array_get($payload, 'url'), ]; $this->solution = ['sid' => $sid ?: $this->properties['sid'], ]; } /** * Generate an instance context for the instance, the context is capable of * performing various actions. All instance actions are proxied to the context * * @return PublicKeyContext Context for this PublicKeyInstance */ protected function proxy(): PublicKeyContext { if (!$this->context) { $this->context = new PublicKeyContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch the PublicKeyInstance * * @return PublicKeyInstance Fetched PublicKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function fetch(): PublicKeyInstance { return $this->proxy()->fetch(); } /** * Update the PublicKeyInstance * * @param array|Options $options Optional Arguments * @return PublicKeyInstance Updated PublicKeyInstance * @throws TwilioException When an HTTP error occurs. */ public function update(array $options = []): PublicKeyInstance { return $this->proxy()->update($options); } /** * Delete the PublicKeyInstance * * @return bool True if delete succeeds, false otherwise * @throws TwilioException When an HTTP error occurs. */ public function delete(): bool { return $this