def _add_argparse_args()

in python/activation/main.py [0:0]


  def _add_argparse_args(cls, parser):
    """
    Adds command-line arguments to the parser.

    Args:
      parser: The argparse parser.
    
    The following arguments are defined:
      source_table: The table specification for the source data in the format dataset.data_table.
      ga4_measurement_id: The Measurement ID in Google Analytics 4.
      ga4_api_secret: The client secret for sending data to Google Analytics 4.
      log_db_dataset: The dataset where the log table will be created.
      use_api_validation: A boolean flag indicating whether to use the Measurement Protocol API validation for debugging instead of sending the events.
      activation_type: The activation use case, which can be one of the following values:
        - audience-segmentation-15
        - auto-audience-segmentation-15
        - cltv-180-180
        - cltv-180-90
        - cltv-180-30
        - purchase-propensity-30-15
        - purchase-propensity-15-15
        - purchase-propensity-15-7
        - churn-propensity-30-15
        - lead-score-propensity-5-1
      activation_type_configuration: The GCS path to the configuration file for all activation types.
    """

    parser.add_argument(
      '--source_table',
      type=str,
      help='table specification for the source data. Format [dataset.data_table]',
      required=True
    )
    parser.add_argument(
      '--ga4_measurement_id',
      type=str,
      help='Measurement ID in GA4',
      required=True
    )
    parser.add_argument(
      '--ga4_api_secret',
      type=str,
      help='Client secret for sending to GA4',
      required=True
    )
    parser.add_argument(
      '--log_db_dataset',
      type=str,
      help='dataset where log_table is created',
      required=True
    )
    parser.add_argument(
      '--use_api_validation',
      type=bool,
      help='Use Measurement Protocol API validation for debugging instead of sending the events',
      default=False,
      nargs='?'
    )
    parser.add_argument(
      '--activation_type',
      type=str,
      help='''
      Specifies the activation use case, currently supported values are:
        audience-segmentation-15
        auto-audience-segmentation-15
        cltv-180-180
        cltv-180-90
        cltv-180-30
        purchase-propensity-30-15
        purchase-propensity-15-15
        purchase-propensity-15-7
        churn-propensity-30-15
        lead-score-propensity-5-1
      ''',
      required=True
    )
    parser.add_argument(
      '--activation_type_configuration',
      type=str,
      help='GCS path to the configuration file all activation types',
      required=True
    )