Integrations/MicrosoftGraphCalendar/MicrosoftGraphCalendar.py
def parse_calendar(raw_calendars: Union[Dict, List[Dict]]) -> Tuple[List[Dict], List[Dict]]:
    """
    Parse Calendar json data coming from Microsoft Graph into Demisto readable format
    :param raw_calendars: raw calendars data
    """
    if not isinstance(raw_calendars, list):
        raw_calendars = [raw_calendars]

    readable_calendars, context_output = [], []
    for raw_calendar in raw_calendars:
        readable_calendar: Dict = camel_case_to_readable(raw_calendar, ['@odata.context', 'color'])  # type: ignore
        if '@removed' in readable_calendar:
            readable_calendar['Status'] = 'deleted'
        context_calendar = {field.replace(' ', ''): value for field, value in readable_calendar.items()}

        readable_calendar = {
            'Name': readable_calendar.get('Name'),
            'Owner Name': readable_calendar.get('Owner', {}).get('name'),
            'Owner Address': readable_calendar.get('Owner', {}).get('address'),
            'ID': readable_calendar.get('ID')
        }
        context_output.append(context_calendar)
        readable_calendars.append(readable_calendar)

    return readable_calendars, context_output

    Parse Calendar json data coming from Microsoft Graph into Demisto readable format
    :param raw_calendars: raw calendars data
    
Parse Calendar json data coming from Microsoft Graph into Demisto readable format
Parse Calendar json data coming from Microsoft Graph into Demisto readable format
def parse_calendar(raw_calendars: Union[Dict, List[Dict]]) -> Tuple[List[Dict], List[Dict]]:
    if not isinstance(raw_calendars, list):
        raw_calendars = [raw_calendars]
    readable_calendars, context_output = [], []
    for raw_calendar in raw_calendars:
        readable_calendar: Dict = camel_case_to_readable(raw_calendar, ['@odata.context', 'color'])  
        if '@removed' in readable_calendar:
            readable_calendar['Status'] = 'deleted'
        context_calendar = {field.replace(' ', ''): value for field, value in readable_calendar.items()}
        readable_calendar = {
            'Name': readable_calendar.get('Name'),
            'Owner Name': readable_calendar.get('Owner', {}).get('name'),
            'Owner Address': readable_calendar.get('Owner', {}).get('address'),
            'ID': readable_calendar.get('ID')
        }
        context_output.append(context_calendar)
        readable_calendars.append(readable_calendar)
    return readable_calendars, context_output
def parse_calendar ( raw_calendars : Union [ Dict , List [ Dict ] ] ) -> Tuple [ List [ Dict ] , List [ Dict ] ] : if not isinstance ( raw_calendars , list ) : raw_calendars = [ raw_calendars ] readable_calendars , context_output = [ ] , [ ] for raw_calendar in raw_calendars : readable_calendar : Dict = camel_case_to_readable ( raw_calendar , [ '@odata.context' , 'color' ] ) if '@removed' in readable_calendar : readable_calendar [ 'Status' ] = 'deleted' context_calendar = { field . replace ( ' ' , '' ) : value for field , value in readable_calendar . items ( ) } readable_calendar = { 'Name' : readable_calendar . get ( 'Name' ) , 'Owner Name' : readable_calendar . get ( 'Owner' , { } ) . get ( 'name' ) , 'Owner Address' : readable_calendar . get ( 'Owner' , { } ) . get ( 'address' ) , 'ID' : readable_calendar . get ( 'ID' ) } context_output . append ( context_calendar ) readable_calendars . append ( readable_calendar ) return readable_calendars , context_output
Parse Calendar json data coming from Microsoft Graph into Demisto readable format
Parse Calendar json data coming from Microsoft Graph into Demisto readable format
"""
    Parse Calendar json data coming from Microsoft Graph into Demisto readable format
    :param raw_calendars: raw calendars data
    """ # type: ignore
raw_calendars
Union[Dict, List[Dict]]
raw calendars data
raw calendars data