def wait(self, request_options=None):
        # type: (Optional[Union[RequestOptions, dict]]) -> RestoreApiKeyResponse # noqa: E501

        retries_count = 1

        while not self._done:
            try:
                self._client._sync().get_api_key(self._key, request_options)
                self._done = True
            except RequestException as e:
                if e.status_code != 404:
                    raise e
                retries_count += 1
                sleep_for(retries_count,
                          self._client._config.wait_task_time_before_retry)

        return self
    def wait(self, request_options=None):
        # type: (Optional[Union[RequestOptions, dict]]) -> DeleteApiKeyResponse

        retries_count = 1

        while not self._done:
            try:
                self._client._sync().get_api_key(self._key, request_options)
            except RequestException as e:
                self._done = e.status_code == 404

            if not self._done:
                retries_count += 1
                sleep_for(retries_count,
                          self._client._config.wait_task_time_before_retry)

        return self
    def wait(self, request_options=None):
        # type: (Optional[Union[RequestOptions, dict]]) -> UpdateApiKeyResponse

        retries_count = 1

        while not self._done:
            api_key = self._client._sync().get_api_key(
                self.raw_response["key"], request_options)

            self._done = self._have_changed(api_key)

            if not self._done:
                retries_count += 1
                sleep_for(retries_count,
                          self._client._config.wait_task_time_before_retry)

        return self
    def wait(self, request_options=None):
        # type: (Optional[Union[RequestOptions, dict]]) -> UpdateApiKeyResponse

        retries_count = 1

        while not self._done:
            api_key = self._client._sync().get_api_key(
                self.raw_response['key'],
                request_options
            )

            self._done = self._have_changed(api_key)

            if not self._done:
                retries_count += 1
                sleep_for(
                    retries_count,
                    self._client._config.wait_task_time_before_retry
                )

        return self
    def wait(self, request_options=None):
        # type: (Optional[Union[RequestOptions, dict]]) -> RestoreApiKeyResponse # noqa: E501

        retries_count = 1

        while not self._done:
            try:
                self._client._sync().get_api_key(
                    self._key,
                    request_options
                )
                self._done = True
            except RequestException as e:
                if e.status_code != 404:
                    raise e
                retries_count += 1
                sleep_for(
                    retries_count,
                    self._client._config.wait_task_time_before_retry
                )

        return self
    def wait(self, request_options=None):
        # type: (Optional[Union[RequestOptions, dict]]) -> DeleteApiKeyResponse

        retries_count = 1

        while not self._done:
            try:
                self._client._sync().get_api_key(
                    self._key,
                    request_options
                )
            except RequestException as e:
                self._done = e.status_code == 404

            if not self._done:
                retries_count += 1
                sleep_for(
                    retries_count,
                    self._client._config.wait_task_time_before_retry
                )

        return self