# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ReportDistributionCreateRequest(Model):
    """ReportDistributionCreateRequest.

    All required parameters must be populated in order to send to Azure.

    :param specific_report_id: Required. The id of the report to distribute
     A new copy of the report will be created for the distribution with the
     filters specified in this request
     Any changes to the existing report will not effect the distribution copy
     Only SSRS reports are supported <span
     class='property-internal'>Required</span>
    :type specific_report_id: int
    :param report_distribution_name: Required. The name of the report
     distribution <span class='property-internal'>Must be between 0 and 255
     characters</span> <span class='property-internal'>Required</span>
    :type report_distribution_name: str
    :param report_filters: Required. List of filters to apply to the report
     <span class='property-internal'>Required</span>
    :type report_filters: list[~energycap.sdk.models.FilterEdit]
    :param reply_to_email: The email address the receiver should reply to
     <span class='property-internal'>Must be between 0 and 128
     characters</span>
    :type reply_to_email: str
    :param recipient_user_group_ids: Required. The id of each user group that
     should receive the report <span class='property-internal'>Cannot be
     Empty</span> <span class='property-internal'>Required</span>
    :type recipient_user_group_ids: list[int]
    :param email_subject: Required. The subject line of the email <span
     class='property-internal'>Must be between 0 and 255 characters</span>
     <span class='property-internal'>Required</span>
    :type email_subject: str
    :param email_message: Required. The body of the email <span
     class='property-internal'>Required</span>
    :type email_message: str
    :param report_subscription_schedule_type_id: Required. The schedule type
     of the report
     Values may be:
     Daily: 1
     Weekly: 2
     Monthly: 3
     Quarterly: 4 <span class='property-internal'>Required</span> <span
     class='property-internal'>One of 1, 2, 3, 4 </span>
    :type report_subscription_schedule_type_id: int
    :param day_indicator_value: Required. Indicates when to send the report
     for the given schedule type
     Values may be:
     Daily: 0
     Weekly: Day of Week - 0 (Sunday) to 6 (Saturday)
     Monthly: Day of Month - 1 to 28
     Quarterly: Month in Quarter - 1, 2, or 3 <span
     class='property-internal'>Must be between 0 and 28</span> <span
     class='property-internal'>Required</span>
    :type day_indicator_value: int
    :param only_send_if_data: Required. Indicates whether or not to email a
     report if it contains no data.
     When set to true, the subscribed report will not be emailed, if the report
     does not contain data.
     When set to false, if the requested report has no data, it will still be
     sent. <span class='property-internal'>Required</span>
    :type only_send_if_data: bool
    :param report_format: Required. The format in which the generated report
     should be downloaded <span class='property-internal'>Required</span> <span
     class='property-internal'>One of Excel, Excel data only, Csv, PDF, Word
     </span>
    :type report_format: str
    """

    _validation = {
        'specific_report_id': {'required': True},
        'report_distribution_name': {'required': True, 'max_length': 255, 'min_length': 0},
        'report_filters': {'required': True},
        'reply_to_email': {'max_length': 128, 'min_length': 0},
        'recipient_user_group_ids': {'required': True},
        'email_subject': {'required': True, 'max_length': 255, 'min_length': 0},
        'email_message': {'required': True},
        'report_subscription_schedule_type_id': {'required': True},
        'day_indicator_value': {'required': True, 'maximum': 28, 'minimum': 0},
        'only_send_if_data': {'required': True},
        'report_format': {'required': True},
    }

    _attribute_map = {
        'specific_report_id': {'key': 'specificReportId', 'type': 'int'},
        'report_distribution_name': {'key': 'reportDistributionName', 'type': 'str'},
        'report_filters': {'key': 'reportFilters', 'type': '[FilterEdit]'},
        'reply_to_email': {'key': 'replyToEmail', 'type': 'str'},
        'recipient_user_group_ids': {'key': 'recipientUserGroupIds', 'type': '[int]'},
        'email_subject': {'key': 'emailSubject', 'type': 'str'},
        'email_message': {'key': 'emailMessage', 'type': 'str'},
        'report_subscription_schedule_type_id': {'key': 'reportSubscriptionScheduleTypeId', 'type': 'int'},
        'day_indicator_value': {'key': 'dayIndicatorValue', 'type': 'int'},
        'only_send_if_data': {'key': 'onlySendIfData', 'type': 'bool'},
        'report_format': {'key': 'reportFormat', 'type': 'str'},
    }

    def __init__(self, *, specific_report_id: int, report_distribution_name: str, report_filters, recipient_user_group_ids, email_subject: str, email_message: str, report_subscription_schedule_type_id: int, day_indicator_value: int, only_send_if_data: bool, report_format: str, reply_to_email: str=None, **kwargs) -> None:
        super(ReportDistributionCreateRequest, self).__init__(**kwargs)
        self.specific_report_id = specific_report_id
        self.report_distribution_name = report_distribution_name
        self.report_filters = report_filters
        self.reply_to_email = reply_to_email
        self.recipient_user_group_ids = recipient_user_group_ids
        self.email_subject = email_subject
        self.email_message = email_message
        self.report_subscription_schedule_type_id = report_subscription_schedule_type_id
        self.day_indicator_value = day_indicator_value
        self.only_send_if_data = only_send_if_data
        self.report_format = report_format
