private function assembleRouteName() : string
    {
        $prefix = ($this->secure) ? 'secure-api' : 'api';

        $routeName = 'resource';

        if ($this->relatedId !== null) {
            $routeName = 'resource.relationship.item';
        } else {
            if ($this->relationship !== null) {
                $routeName = 'resource.relationship';
            } else {
                if ($this->id !== null) {
                    $routeName = 'resource.item';
                }
            }
        }

        return $prefix . '.' . $routeName;
    }