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 :class:`WriteToText` transform.\n\n    Args:\n      file_path_prefix (str): The file path to write to. The files written will\n        begin with this prefix, followed by a shard identifier (see\n        **num_shards**), and end in a common extension, if given by\n        **file_name_suffix**. In most cases, only this argument is specified and\n        **num_shards**, **shard_name_template**, and **file_name_suffix** use\n        default values.\n      file_name_suffix (str): Suffix for the files written.\n      append_trailing_newlines (bool): indicate whether this sink should write\n        an additional newline char after writing each element.\n      num_shards (int): The number of files (shards) used for output.\n        If not set, the 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 (str): A template string containing placeholders for\n        the shard number and shard count. Currently only ``''`` and\n        ``'-SSSSS-of-NNNNN'`` are patterns accepted by the service.\n        When constructing a filename for a particular shard number, the\n        upper-case letters ``S`` and ``N`` are replaced with the ``0``-padded\n        shard number and shard count respectively.  This argument can be ``''``\n        in which case it behaves as if num_shards was set to 1 and only one file\n        will be generated. The default pattern used is ``'-SSSSS-of-NNNNN'``.\n      coder (~apache_beam.coders.coders.Coder): Coder used to encode each line.\n      compression_type (str): Used to handle compressed output files.\n        Typical value is :class:`CompressionTypes.AUTO\n        <apache_beam.io.filesystem.CompressionTypes.AUTO>`, in which case the\n        final file path's extension (as determined by **file_path_prefix**,\n        **file_name_suffix**, **num_shards** and **shard_name_template**) will\n        be used to detect the compression.\n      header (str): String to write at beginning of file as a header.\n        If not :data:`None` and **append_trailing_newlines** is set, ``\\n`` will\n        be added.\n    "
    self._sink = _TextSink(file_path_prefix, file_name_suffix, append_trailing_newlines, num_shards, shard_name_template, coder, compression_type, header)
Initialize a :class:`WriteToText` transform.

Args:
  file_path_prefix (str): 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 (str): Suffix for the files written.
  append_trailing_newlines (bool): indicate whether this sink should write
    an additional newline char after writing each element.
  num_shards (int): 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 (str): A template string containing placeholders for
    the shard number and shard count. Currently only ``''`` and
    ``'-SSSSS-of-NNNNN'`` are patterns accepted by the service.
    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'``.
  coder (~apache_beam.coders.coders.Coder): Coder used to encode each line.
  compression_type (str): Used to handle compressed output files.
    Typical value is :class:`CompressionTypes.AUTO
    <apache_beam.io.filesystem.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 (str): String to write at beginning of file as a header.
    If not :data:`None` and **append_trailing_newlines** is set, ``\n`` will
    be added.
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 :class:`WriteToText` transform.\n\n    Args:\n      file_path_prefix (str): The file path to write to. The files written will\n        begin with this prefix, followed by a shard identifier (see\n        **num_shards**), and end in a common extension, if given by\n        **file_name_suffix**. In most cases, only this argument is specified and\n        **num_shards**, **shard_name_template**, and **file_name_suffix** use\n        default values.\n      file_name_suffix (str): Suffix for the files written.\n      append_trailing_newlines (bool): indicate whether this sink should write\n        an additional newline char after writing each element.\n      num_shards (int): The number of files (shards) used for output.\n        If not set, the 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 (str): A template string containing placeholders for\n        the shard number and shard count. Currently only ```` and\n        ``'-SSSSS-of-NNNNN'`` are patterns accepted by the service.\n        When constructing a filename for a particular shard number, the\n        upper-case letters ``S`` and ``N`` are replaced with the ``0``-padded\n        shard number and shard count respectively.  This argument can be ````\n        in which case it behaves as if num_shards was set to 1 and only one file\n        will be generated. The default pattern used is ``'-SSSSS-of-NNNNN'``.\n      coder (~apache_beam.coders.coders.Coder): Coder used to encode each line.\n      compression_type (str): Used to handle compressed output files.\n        Typical value is :class:`CompressionTypes.AUTO\n        <apache_beam.io.filesystem.CompressionTypes.AUTO>`, in which case the\n        final file path's extension (as determined by **file_path_prefix**,\n        **file_name_suffix**, **num_shards** and **shard_name_template**) will\n        be used to detect the compression.\n      header (str): String to write at beginning of file as a header.\n        If not :data:`None` and **append_trailing_newlines** is set, ``\\n`` will\n        be added.\n    "
    self._sink = _TextSink(file_path_prefix, file_name_suffix, append_trailing_newlines, num_shards, shard_name_template, coder, compression_type, header)