METHOD_0 ( ) { com . google . cloud . IDENT_0 . IDENT_1 . IDENT_2 converter = new com . google . cloud . IDENT_0 . IDENT_1 . METHOD_1 ( STRING_0 , STRING_1 ) ; com . google . cloud . IDENT_0 . IDENT_1 . IDENT_3 . IDENT_4 empty = com . google . cloud . IDENT_0 . IDENT_1 . IDENT_3 . IDENT_4 . builder ( ) . build ( ) ; "<AssertPlaceHolder>" ; } convert ( com . google . cloud . IDENT_1 . IDENT_5 ) { org . apache . avro . IDENT_6 . IDENT_7 builder = new org . apache . avro . IDENT_6 . METHOD_2 ( schema ) ; java . util . List < org . apache . avro . Schema . Field > fields = schema . METHOD_3 ( ) ; for ( org . apache . avro . Schema . Field field : fields ) { java . lang . String IDENT_8 = field . name ( ) ; org . apache . avro . Schema type = field . schema ( ) ; java . lang . String IDENT_9 = com . google . common . base . IDENT_10 . METHOD_4 ( field . METHOD_5 ( STRING_2 ) ) ; boolean IDENT_11 = false ; if ( ( type . getType ( ) ) == ( Schema . Type . IDENT_12 ) ) { org . apache . avro . Schema IDENT_13 = com . google . cloud . IDENT_0 . IDENT_1 . IDENT_14 . METHOD_6 ( field . schema ( ) ) ; if ( IDENT_13 == null ) { throw new java . lang . IllegalArgumentException ( ( STRING_3 + type ) ) ; } type = IDENT_13 ; IDENT_11 = true ; } boolean IDENT_15 = row . METHOD_7 ( IDENT_8 ) ; if ( IDENT_15 && ( ! IDENT_11 ) ) { throw new java . lang . IllegalArgumentException ( ( STRING_4 + IDENT_8 ) ) ; } switch ( type . getType ( ) ) { case IDENT_16 : builder . set ( field , ( IDENT_15 ? null : row . METHOD_8 ( IDENT_8 ) ) ) ; break ; case IDENT_17 : builder . set ( field , ( IDENT_15 ? null : row . METHOD_9 ( IDENT_8 ) ) ) ; break ; case IDENT_18 : builder . set ( field , ( IDENT_15 ? null : row . METHOD_10 ( IDENT_8 ) ) ) ; break ; case IDENT_19 : builder . set ( field , ( IDENT_15 ? null : java . nio . ByteBuffer . METHOD_11 ( row . getBytes ( IDENT_8 ) . toByteArray ( ) ) ) ) ; break ; case IDENT_20 : if ( java . util . regex . IDENT_21 . matches ( STRING_4 0 , IDENT_9 ) ) { builder . set ( field , ( IDENT_15 ? null : row . getString ( IDENT_8 ) ) ) ; } else if ( IDENT_9 . equals ( STRING_5 ) ) { builder . set ( field , ( IDENT_15 ? null : row . METHOD_12 ( IDENT_8 ) . toString ( ) ) ) ; } else if ( IDENT_9 . equals ( STRING_6 ) ) { builder . set ( field , ( IDENT_15 ? null : row . METHOD_13 ( IDENT_8 ) . toString ( ) ) ) ; } break ; case IDENT_22 : { org . apache . avro . Schema IDENT_23 = type . METHOD_14 ( ) ; boolean IDENT_24 = ( IDENT_23 . getType ( ) ) == ( Schema . Type . IDENT_12 ) ; if ( ! IDENT_24 ) { throw new java . lang . IllegalArgumentException ( ( ( STRING_7 + IDENT_8 ) + STRING_4 1 ) ) ; } IDENT_23 = com . google . cloud . IDENT_0 . IDENT_1 . IDENT_14 . METHOD_6 ( IDENT_23 ) ; if ( IDENT_23 == null ) { throw new java . lang . IllegalArgumentException ( ( STRING_7 + IDENT_8 ) ) ; } switch ( IDENT_23 . getType ( ) ) { case IDENT_16 : builder . set ( field , ( IDENT_15 ? null : row . METHOD_15 ( IDENT_8 ) ) ) ; break ; case IDENT_17 : builder . set ( field , ( IDENT_15 ? null : row . METHOD_16 ( IDENT_8 ) ) ) ; break ; case IDENT_18 : { builder . set ( field , ( IDENT_15 ? null : row . METHOD_17 ( IDENT_8 ) ) ) ; break ; } case IDENT_19 : { java . util . List < java . nio . ByteBuffer > value = null ; if ( ! IDENT_15 ) { value = row . METHOD_18 ( IDENT_8 ) . stream ( ) . map ( ( bytes ) -> bytes == null ? null : java . nio . ByteBuffer . METHOD_11 ( bytes . toByteArray ( ) ) ) . collect ( java . util . stream . IDENT_25 . toList ( ) ) ; } builder . set ( field , value ) ; break ; } case IDENT_20 : { if ( java . util . regex . IDENT_21 . matches ( STRING_8 , IDENT_9 ) ) { builder . set ( field , ( IDENT_15 ? null : row . METHOD_19 ( IDENT_8 ) ) ) ; } else if ( IDENT_9 . equals ( STRING_9 ) ) { if ( IDENT_15 ) { builder . set ( field , null ) ; } else { java . util . List < java . lang . String > values = row . METHOD_20 ( IDENT_8 ) . stream ( ) . map ( ( IDENT_26 ) -> IDENT_26 == null ? null : IDENT_26 . toString ( ) ) . collect ( java . util . stream . IDENT_25 . toList ( ) ) ; builder . set ( field , values ) ; } } else if ( IDENT_9 . equals ( STRING_10 ) ) { if ( IDENT_15 ) { builder . set ( field , null ) ; } else { java . util . List < java . lang . String > values = row . METHOD_21 ( IDENT_8 ) . stream ( ) . map ( ( date ) -> date == null ? null : date . toString ( ) ) . collect ( java . util . stream . IDENT_25 . toList ( ) ) ; builder . set ( field , values ) ; } } break ; } default : { throw new java . lang . IllegalArgumentException ( ( STRING_11 + IDENT_23 ) ) ; } } break ; } default : { throw new java . lang . IllegalArgumentException ( ( STRING_3 + type ) ) ; } } } return builder . build ( ) ; }
org . junit . Assert . assertThat ( converter . convert ( empty ) , org . hamcrest . Matchers . empty ( ) )