# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables

class Classifier(pulumi.CustomResource):
    csv_classifier: pulumi.Output[dict]
    """
    A classifier for Csv content. Defined below.

      * `allowSingleColumn` (`bool`) - Enables the processing of files that contain only one column.
      * `containsHeader` (`str`) - Indicates whether the CSV file contains a header. This can be one of "ABSENT", "PRESENT", or "UNKNOWN".
      * `delimiter` (`str`) - The delimiter used in the Csv to separate columns.
      * `disableValueTrimming` (`bool`) - Specifies whether to trim column values. 
      * `headers` (`list`) - A list of strings representing column names.
      * `quoteSymbol` (`str`) - A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.
    """
    grok_classifier: pulumi.Output[dict]
    """
    A classifier that uses grok patterns. Defined below.

      * `classification` (`str`) - An identifier of the data format that the classifier matches.
      * `customPatterns` (`str`) - Custom grok patterns used by this classifier.
      * `grokPattern` (`str`) - The grok pattern used by this classifier.
    """
    json_classifier: pulumi.Output[dict]
    """
    A classifier for JSON content. Defined below.

      * `jsonPath` (`str`) - A `JsonPath` string defining the JSON data for the classifier to classify. AWS Glue supports a subset of `JsonPath`, as described in [Writing JsonPath Custom Classifiers](https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json).
    """
    name: pulumi.Output[str]
    """
    The name of the classifier.
    """
    xml_classifier: pulumi.Output[dict]
    """
    A classifier for XML content. Defined below.

      * `classification` (`str`) - An identifier of the data format that the classifier matches.
      * `rowTag` (`str`) - The XML tag designating the element that contains each record in an XML document being parsed. Note that this cannot identify a self-closing element (closed by `/>`). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, `<row item_a="A" item_b="B"></row>` is okay, but `<row item_a="A" item_b="B" />` is not).
    """
    def __init__(__self__, resource_name, opts=None, csv_classifier=None, grok_classifier=None, json_classifier=None, name=None, xml_classifier=None, __props__=None, __name__=None, __opts__=None):
        """
        Provides a Glue Classifier resource.

        > **NOTE:** It is only valid to create one type of classifier (csv, grok, JSON, or XML). Changing classifier types will recreate the classifier.



        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[dict] csv_classifier: A classifier for Csv content. Defined below.
        :param pulumi.Input[dict] grok_classifier: A classifier that uses grok patterns. Defined below.
        :param pulumi.Input[dict] json_classifier: A classifier for JSON content. Defined below.
        :param pulumi.Input[str] name: The name of the classifier.
        :param pulumi.Input[dict] xml_classifier: A classifier for XML content. Defined below.

        The **csv_classifier** object supports the following:

          * `allowSingleColumn` (`pulumi.Input[bool]`) - Enables the processing of files that contain only one column.
          * `containsHeader` (`pulumi.Input[str]`) - Indicates whether the CSV file contains a header. This can be one of "ABSENT", "PRESENT", or "UNKNOWN".
          * `delimiter` (`pulumi.Input[str]`) - The delimiter used in the Csv to separate columns.
          * `disableValueTrimming` (`pulumi.Input[bool]`) - Specifies whether to trim column values. 
          * `headers` (`pulumi.Input[list]`) - A list of strings representing column names.
          * `quoteSymbol` (`pulumi.Input[str]`) - A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.

        The **grok_classifier** object supports the following:

          * `classification` (`pulumi.Input[str]`) - An identifier of the data format that the classifier matches.
          * `customPatterns` (`pulumi.Input[str]`) - Custom grok patterns used by this classifier.
          * `grokPattern` (`pulumi.Input[str]`) - The grok pattern used by this classifier.

        The **json_classifier** object supports the following:

          * `jsonPath` (`pulumi.Input[str]`) - A `JsonPath` string defining the JSON data for the classifier to classify. AWS Glue supports a subset of `JsonPath`, as described in [Writing JsonPath Custom Classifiers](https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json).

        The **xml_classifier** object supports the following:

          * `classification` (`pulumi.Input[str]`) - An identifier of the data format that the classifier matches.
          * `rowTag` (`pulumi.Input[str]`) - The XML tag designating the element that contains each record in an XML document being parsed. Note that this cannot identify a self-closing element (closed by `/>`). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, `<row item_a="A" item_b="B"></row>` is okay, but `<row item_a="A" item_b="B" />` is not).
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = dict()

            __props__['csv_classifier'] = csv_classifier
            __props__['grok_classifier'] = grok_classifier
            __props__['json_classifier'] = json_classifier
            __props__['name'] = name
            __props__['xml_classifier'] = xml_classifier
        super(Classifier, __self__).__init__(
            'aws:glue/classifier:Classifier',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, csv_classifier=None, grok_classifier=None, json_classifier=None, name=None, xml_classifier=None):
        """
        Get an existing Classifier resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[dict] csv_classifier: A classifier for Csv content. Defined below.
        :param pulumi.Input[dict] grok_classifier: A classifier that uses grok patterns. Defined below.
        :param pulumi.Input[dict] json_classifier: A classifier for JSON content. Defined below.
        :param pulumi.Input[str] name: The name of the classifier.
        :param pulumi.Input[dict] xml_classifier: A classifier for XML content. Defined below.

        The **csv_classifier** object supports the following:

          * `allowSingleColumn` (`pulumi.Input[bool]`) - Enables the processing of files that contain only one column.
          * `containsHeader` (`pulumi.Input[str]`) - Indicates whether the CSV file contains a header. This can be one of "ABSENT", "PRESENT", or "UNKNOWN".
          * `delimiter` (`pulumi.Input[str]`) - The delimiter used in the Csv to separate columns.
          * `disableValueTrimming` (`pulumi.Input[bool]`) - Specifies whether to trim column values. 
          * `headers` (`pulumi.Input[list]`) - A list of strings representing column names.
          * `quoteSymbol` (`pulumi.Input[str]`) - A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.

        The **grok_classifier** object supports the following:

          * `classification` (`pulumi.Input[str]`) - An identifier of the data format that the classifier matches.
          * `customPatterns` (`pulumi.Input[str]`) - Custom grok patterns used by this classifier.
          * `grokPattern` (`pulumi.Input[str]`) - The grok pattern used by this classifier.

        The **json_classifier** object supports the following:

          * `jsonPath` (`pulumi.Input[str]`) - A `JsonPath` string defining the JSON data for the classifier to classify. AWS Glue supports a subset of `JsonPath`, as described in [Writing JsonPath Custom Classifiers](https://docs.aws.amazon.com/glue/latest/dg/custom-classifier.html#custom-classifier-json).

        The **xml_classifier** object supports the following:

          * `classification` (`pulumi.Input[str]`) - An identifier of the data format that the classifier matches.
          * `rowTag` (`pulumi.Input[str]`) - The XML tag designating the element that contains each record in an XML document being parsed. Note that this cannot identify a self-closing element (closed by `/>`). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, `<row item_a="A" item_b="B"></row>` is okay, but `<row item_a="A" item_b="B" />` is not).
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = dict()

        __props__["csv_classifier"] = csv_classifier
        __props__["grok_classifier"] = grok_classifier
        __props__["json_classifier"] = json_classifier
        __props__["name"] = name
        __props__["xml_classifier"] = xml_classifier
        return Classifier(resource_name, opts=opts, __props__=__props__)
    def translate_output_property(self, prop):
        return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

