class_docstr: Serialization schema that serializes to Avro binary format.
class_docstr_tok: ["Serialization","schema","that","serializes","to","Avro","binary","format","."]
docstr: Creates AvroSerializationSchema that serializes SpecificRecord using provided schema or
  record class.
  
  :param record_class: Avro record class used to serialize  Flink's row to Avro's record.
  :param avro_schema_string: Avro schema string to serialize Flink's row to Avro's record.
docstr_tok: ["Creates","AvroSerializationSchema","that","serializes","SpecificRecord","using","provided","schema","or","record","class",".",":","param","record_class",":","Avro","record","class","used","to","serialize","Flink","'s","row","to","Avro","'s","record",".",":","param","avro_schema_string",":","Avro","schema","string","to","serialize","Flink","'s","row","to","Avro","'s","record","."]
code: def __init__(
      self, record_class: str = None, avro_schema_string: str = None
  ):
      """
      Creates AvroSerializationSchema that serializes SpecificRecord using provided schema or
      record class.
  
      :param record_class: Avro record class used to serialize  Flink's row to Avro's record.
      :param avro_schema_string: Avro schema string to serialize Flink's row to Avro's record.
      """
      if avro_schema_string is None and record_class is None:
          raise TypeError(
              "record_class or avro_schema_string should be specified."
          )
  
      j_serialization_schema = None
      if record_class is not None:
          gateway = get_gateway()
          java_import(gateway.jvm, record_class)
          j_record_class = load_java_class(record_class)
          JAvroRowSerializationSchema = (
              get_gateway().jvm.org.apache.flink.formats.avro.AvroRowSerializationSchema
          )
          j_serialization_schema = JAvroRowSerializationSchema(
              j_record_class
          )
  
      elif avro_schema_string is not None:
          JAvroRowSerializationSchema = (
              get_gateway().jvm.org.apache.flink.formats.avro.AvroRowSerializationSchema
          )
          j_serialization_schema = JAvroRowSerializationSchema(
              avro_schema_string
          )
  
      super(AvroRowSerializationSchema, self).__init__(
          j_serialization_schema
      )
  
imports: from py4j.java_gateway import get_java_class, JavaObject, java_import
  from pyflink.common.io import InputFormat
  from pyflink.common.serialization import BulkWriterFactory, SerializationSchema, DeserializationSchema
  from pyflink.common.typeinfo import TypeInformation
  from pyflink.datastream.utils import ResultTypeQueryable
  from pyflink.java_gateway import get_gateway
  from pyflink.util.java_utils import get_field_value, load_java_class
label_desc: Use image node_id 1 to create a new AvroRowSerializationSchema object from inherited base classes: SerializationSchema with example: obj = AvroRowSerializationSchema(record_class, avro_schema_string)