# Path: courseraresearchexports/models/utils.py
# def requests_response_to_model(response_transformer):
#     def response_transform_decorator(original_func):
#         def response_transformer_wrapper(*args, **kwargs):
# def lookup_course_slug_by_id(course_id):
# def lookup_course_id_by_slug(course_slug):
# def lookup_partner_id_by_short_name(partner_short_name):
# def lookup_partner_short_name_by_id(partner_id):


import logging
from courseraresearchexports.models import utils
# See the License for the specific language governing permissions and
# limitations under the License.




class ClickstreamDownloadLinksRequest:
    """
    Represents a request for clickstream download links.
    """

    def __init__(self, course_id=None, partner_id=None, interval=None,
                 **kwargs):
        self.course_id = course_id
        self.partner_id = partner_id
        self.interval = interval

    @staticmethod
    def from_args(**kwargs):
        """
        Create a ClickstreamDownloadLinkRequest from arguments. Performs
        course_id/partner_id inference.
        :param kwargs:
        :return eventing_links_request: ClickstreamDownloadLinksRequest
        """
        if kwargs.get('course_slug') and not kwargs.get('course_id'):
            kwargs['course_id'] = utils.lookup_course_id_by_slug(
                kwargs['course_slug'])
        elif kwargs.get('partner_short_name') and not kwargs.get('partner_id'):
            kwargs['partner_id'] = \

# Path: courseraresearchexports/models/utils.py
# def requests_response_to_model(response_transformer):
#     def response_transform_decorator(original_func):
#         def response_transformer_wrapper(*args, **kwargs):
# def lookup_course_slug_by_id(course_id):
# def lookup_course_id_by_slug(course_slug):
# def lookup_partner_id_by_short_name(partner_short_name):
# def lookup_partner_short_name_by_id(partner_id):


# Path: courseraresearchexports/models/ClickstreamDownloadLinksRequest.py
import logging
from courseraresearchexports.models import utils

# See the License for the specific language governing permissions and
# limitations under the License.




class ClickstreamDownloadLinksRequest:
    """
    Represents a request for clickstream download links.
    """

    def __init__(self, course_id=None, partner_id=None, interval=None,
                 **kwargs):
        self.course_id = course_id
        self.partner_id = partner_id
        self.interval = interval

    @staticmethod
    def from_args(**kwargs):
        """
        Create a ClickstreamDownloadLinkRequest from arguments. Performs
        course_id/partner_id inference.
        :param kwargs:
        :return eventing_links_request: ClickstreamDownloadLinksRequest
        """
        if kwargs.get('course_slug') and not kwargs.get('course_id'):
            kwargs['course_id'] = utils.lookup_course_id_by_slug(
                kwargs['course_slug'])
        elif kwargs.get('partner_short_name') and not kwargs.get('partner_id'):
            kwargs['partner_id'] = \

                utils.lookup_partner_id_by_short_name(