def __init__(self, file_path_prefix, file_name_suffix='', append_trailing_newlines=True, num_shards=0, shard_name_template=None, coder=coders.ToStringCoder(), compression_type=CompressionTypes.AUTO, header=None):
    "Initialize a _TextSink.\n\n    Args:\n      file_path_prefix: The file path to write to. The files written will begin\n        with this prefix, followed by a shard identifier (see num_shards), and\n        end in a common extension, if given by file_name_suffix. In most cases,\n        only this argument is specified and num_shards, shard_name_template, and\n        file_name_suffix use default values.\n      file_name_suffix: Suffix for the files written.\n      append_trailing_newlines: indicate whether this sink should write an\n        additional newline char after writing each element.\n      num_shards: The number of files (shards) used for output. If not set, the\n        service will decide on the optimal number of shards.\n        Constraining the number of shards is likely to reduce\n        the performance of a pipeline.  Setting this value is not recommended\n        unless you require a specific number of output files.\n      shard_name_template: A template string containing placeholders for\n        the shard number and shard count. When constructing a filename for a\n        particular shard number, the upper-case letters 'S' and 'N' are\n        replaced with the 0-padded shard number and shard count respectively.\n        This argument can be '' in which case it behaves as if num_shards was\n        set to 1 and only one file will be generated. The default pattern used\n        is '-SSSSS-of-NNNNN' if None is passed as the shard_name_template.\n      coder: Coder used to encode each line.\n      compression_type: Used to handle compressed output files. Typical value\n        is CompressionTypes.AUTO, in which case the final file path's\n        extension (as determined by file_path_prefix, file_name_suffix,\n        num_shards and shard_name_template) will be used to detect the\n        compression.\n      header: String to write at beginning of file as a header. If not None and\n        append_trailing_newlines is set, '\n' will be added.\n\n    Returns:\n      A _TextSink object usable for writing.\n    "
    super(_TextSink, self).__init__(file_path_prefix, file_name_suffix=file_name_suffix, num_shards=num_shards, shard_name_template=shard_name_template, coder=coder, mime_type='text/plain', compression_type=compression_type)
    self._append_trailing_newlines = append_trailing_newlines
    self._header = header
Initialize a _TextSink.

    Args:
      file_path_prefix: The file path to write to. The files written will begin
        with this prefix, followed by a shard identifier (see num_shards), and
        end in a common extension, if given by file_name_suffix. In most cases,
        only this argument is specified and num_shards, shard_name_template, and
        file_name_suffix use default values.
      file_name_suffix: Suffix for the files written.
      append_trailing_newlines: indicate whether this sink should write an
        additional newline char after writing each element.
      num_shards: The number of files (shards) used for output. If not set, the
        service will decide on the optimal number of shards.
        Constraining the number of shards is likely to reduce
        the performance of a pipeline.  Setting this value is not recommended
        unless you require a specific number of output files.
      shard_name_template: A template string containing placeholders for
        the shard number and shard count. When constructing a filename for a
        particular shard number, the upper-case letters 'S' and 'N' are
        replaced with the 0-padded shard number and shard count respectively.
        This argument can be '' in which case it behaves as if num_shards was
        set to 1 and only one file will be generated. The default pattern used
        is '-SSSSS-of-NNNNN' if None is passed as the shard_name_template.
      coder: Coder used to encode each line.
      compression_type: Used to handle compressed output files. Typical value
        is CompressionTypes.AUTO, in which case the final file path's
        extension (as determined by file_path_prefix, file_name_suffix,
        num_shards and shard_name_template) will be used to detect the
        compression.
      header: String to write at beginning of file as a header. If not None and
        append_trailing_newlines is set, '
' will be added.

    Returns:
      A _TextSink object usable for writing.
def __init__(self, file_path_prefix, file_name_suffix=, append_trailing_newlines=True, num_shards=0, shard_name_template=None, coder=coders.ToStringCoder(), compression_type=CompressionTypes.AUTO, header=None):
    "Initialize a _TextSink.\n\n    Args:\n      file_path_prefix: The file path to write to. The files written will begin\n        with this prefix, followed by a shard identifier (see num_shards), and\n        end in a common extension, if given by file_name_suffix. In most cases,\n        only this argument is specified and num_shards, shard_name_template, and\n        file_name_suffix use default values.\n      file_name_suffix: Suffix for the files written.\n      append_trailing_newlines: indicate whether this sink should write an\n        additional newline char after writing each element.\n      num_shards: The number of files (shards) used for output. If not set, the\n        service will decide on the optimal number of shards.\n        Constraining the number of shards is likely to reduce\n        the performance of a pipeline.  Setting this value is not recommended\n        unless you require a specific number of output files.\n      shard_name_template: A template string containing placeholders for\n        the shard number and shard count. When constructing a filename for a\n        particular shard number, the upper-case letters 'S' and 'N' are\n        replaced with the 0-padded shard number and shard count respectively.\n        This argument can be  in which case it behaves as if num_shards was\n        set to 1 and only one file will be generated. The default pattern used\n        is '-SSSSS-of-NNNNN' if None is passed as the shard_name_template.\n      coder: Coder used to encode each line.\n      compression_type: Used to handle compressed output files. Typical value\n        is CompressionTypes.AUTO, in which case the final file path's\n        extension (as determined by file_path_prefix, file_name_suffix,\n        num_shards and shard_name_template) will be used to detect the\n        compression.\n      header: String to write at beginning of file as a header. If not None and\n        append_trailing_newlines is set, '\n' will be added.\n\n    Returns:\n      A _TextSink object usable for writing.\n    "
    super(_TextSink, self).__init__(file_path_prefix, file_name_suffix=file_name_suffix, num_shards=num_shards, shard_name_template=shard_name_template, coder=coder, mime_type='text/plain', compression_type=compression_type)
    self._append_trailing_newlines = append_trailing_newlines
    self._header = header