c3r-cli-spark/src/main/java/com/amazonaws/c3r/spark/cli/SchemaMode.java [32:169]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Slf4j
@Getter
@CommandLine.Command(name = "schema",
        mixinStandardHelpOptions = true,
        version = C3rSdkProperties.VERSION,
        descriptionHeading = "%nDescription:%n",
        description = "Generate an encryption schema for a tabular file.")
public class SchemaMode implements Callable<Integer> {

    /**
     * Required command line arguments.
     */
    @Getter
    static class RequiredArgs {
        /**
         * {@value CliDescriptions#INPUT_DESCRIPTION_SCHEMA}.
         */
        @CommandLine.Parameters(
                description = CliDescriptions.INPUT_DESCRIPTION_SCHEMA,
                paramLabel = "<input>")
        private String input = null;
    }

    /**
     * Required values as specified by the user.
     */
    @CommandLine.ArgGroup(multiplicity = "1", heading = "%nRequired parameters:%n")
    private RequiredArgs requiredArgs = new RequiredArgs();

    /**
     * Class for the different modes of scheme generation.
     */
    @Getter
    public static class SubMode {
        /**
         * Create a simple schema automatically.
         */
        @CommandLine.Option(
                names = {"--template", "-t"},
                required = true,
                description = {"Create template schema file for <input>.",
                        "NOTE: user needs to edit schema file before use."})
        private boolean templateMode = false;

        /**
         * Walk user through entire schema creation process.
         */
        @CommandLine.Option(
                names = {"--interactive", "-i"},
                required = true,
                description = "Create a schema file interactively for <input>.")
        private boolean interactiveMode = false;
    }

    /**
     * Which generation mode to use for execution.
     */
    @CommandLine.ArgGroup(multiplicity = "1", heading = "%nGeneration mode (specify one of these):%n")
    private SubMode subMode = new SubMode();

    /**
     * Optional command line arguments.
     */
    @Getter
    static class OptionalArgs {

        /**
         * {@value CliDescriptions#AWS_PROFILE_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--profile", "-l"},
                description = CliDescriptions.AWS_PROFILE_DESCRIPTION)
        private String profile = null;

        /**
         * {@value CliDescriptions#AWS_REGION_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--region", "-g"},
                description = CliDescriptions.AWS_REGION_DESCRIPTION)
        private String region = null;

        /**
         * For description see {@link CliDescriptions#ID_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--id"},
                description = CliDescriptions.ID_DESCRIPTION,
                paramLabel = "<value>")
        private UUID id = null;

        /**
         * If this input file has headers.
         *
         * <p>
         * Note: Using a default value of {@code true} means when the flag {@code --noHeaders}
         * is passed, @{code hasHeaders} is set to {@code false}.
         */
        @CommandLine.Option(names = {"--noHeaders", "-p"},
                description = "Indicates <input> has no column headers (CSV only).")
        private boolean hasHeaders = true;

        /**
         * {@value CliDescriptions#FILE_FORMAT_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--fileFormat", "-e"},
                description = CliDescriptions.FILE_FORMAT_DESCRIPTION,
                paramLabel = "<format>")
        private FileFormat fileFormat = null;

        /**
         * {@value CliDescriptions#OUTPUT_DESCRIPTION_SCHEMA}.
         */
        @CommandLine.Option(names = {"--output", "-o"},
                description = CliDescriptions.OUTPUT_DESCRIPTION_SCHEMA,
                paramLabel = "<file>")
        private String output = null;

        /**
         * {@value CliDescriptions#OVERWRITE_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--overwrite", "-f"},
                description = CliDescriptions.OVERWRITE_DESCRIPTION)
        private boolean overwrite = false;

        /**
         * {@value CliDescriptions#ENABLE_STACKTRACE_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--enableStackTraces", "-v"},
                description = CliDescriptions.ENABLE_STACKTRACE_DESCRIPTION)
        private boolean enableStackTraces = false;
    }

    /**
     * Optional values as specified by the user.
     */
    @CommandLine.ArgGroup(exclusive = false, heading = "%nOptional parameters:%n")
    private OptionalArgs optionalArgs = new OptionalArgs();

    /** DAO for interacting with AWS Clean Rooms. */
    private final CleanRoomsDao cleanRoomsDao;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



c3r-cli/src/main/java/com/amazonaws/c3r/cli/SchemaMode.java [30:168]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Slf4j
@Getter
@CommandLine.Command(name = "schema",
        mixinStandardHelpOptions = true,
        version = C3rSdkProperties.VERSION,
        descriptionHeading = "%nDescription:%n",
        description = "Generate an encryption schema for a tabular file.")
public class SchemaMode implements Callable<Integer> {

    /**
     * Required command line arguments.
     */
    @Getter
    static class RequiredArgs {
        /**
         * {@value CliDescriptions#INPUT_DESCRIPTION_SCHEMA}.
         */
        @CommandLine.Parameters(
                description = CliDescriptions.INPUT_DESCRIPTION_SCHEMA,
                paramLabel = "<input>")
        private String input = null;
    }


    /**
     * Required values as specified by the user.
     */
    @CommandLine.ArgGroup(multiplicity = "1", heading = "%nRequired parameters:%n")
    private RequiredArgs requiredArgs = new RequiredArgs();

    /**
     * Class for the different modes of scheme generation.
     */
    @Getter
    public static class SubMode {
        /**
         * Create a simple schema automatically.
         */
        @CommandLine.Option(
                names = {"--template", "-t"},
                required = true,
                description = {"Create template schema file for <input>.",
                        "NOTE: user needs to edit schema file before use."})
        private boolean templateMode = false;

        /**
         * Walk user through entire schema creation process.
         */
        @CommandLine.Option(
                names = {"--interactive", "-i"},
                required = true,
                description = "Create a schema file interactively for <input>.")
        private boolean interactiveMode = false;
    }

    /**
     * Which generation mode to use for execution.
     */
    @CommandLine.ArgGroup(multiplicity = "1", heading = "%nGeneration mode (specify one of these):%n")
    private SubMode subMode = new SubMode();

    /**
     * Optional command line arguments.
     */
    @Getter
    static class OptionalArgs {

        /**
         * {@value CliDescriptions#AWS_PROFILE_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--profile", "-l"},
                description = CliDescriptions.AWS_PROFILE_DESCRIPTION)
        private String profile = null;

        /**
         * {@value CliDescriptions#AWS_REGION_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--region", "-g"},
                description = CliDescriptions.AWS_REGION_DESCRIPTION)
        private String region = null;

        /**
         * For description see {@link CliDescriptions#ID_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--id"},
                description = CliDescriptions.ID_DESCRIPTION,
                paramLabel = "<value>")
        private UUID id = null;

        /**
         * If this input file has headers.
         *
         * <p>
         * Note: Using a default value of {@code true} means when the flag {@code --noHeaders}
         * is passed, @{code hasHeaders} is set to {@code false}.
         */
        @CommandLine.Option(names = {"--noHeaders", "-p"},
                description = "Indicates <input> has no column headers (CSV only).")
        private boolean hasHeaders = true;

        /**
         * {@value CliDescriptions#FILE_FORMAT_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--fileFormat", "-e"},
                description = CliDescriptions.FILE_FORMAT_DESCRIPTION,
                paramLabel = "<format>")
        private FileFormat fileFormat = null;

        /**
         * {@value CliDescriptions#OUTPUT_DESCRIPTION_SCHEMA}.
         */
        @CommandLine.Option(names = {"--output", "-o"},
                description = CliDescriptions.OUTPUT_DESCRIPTION_SCHEMA,
                paramLabel = "<file>")
        private String output = null;

        /**
         * {@value CliDescriptions#OVERWRITE_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--overwrite", "-f"},
                description = CliDescriptions.OVERWRITE_DESCRIPTION)
        private boolean overwrite = false;

        /**
         * {@value CliDescriptions#ENABLE_STACKTRACE_DESCRIPTION}.
         */
        @CommandLine.Option(names = {"--enableStackTraces", "-v"},
                description = CliDescriptions.ENABLE_STACKTRACE_DESCRIPTION)
        private boolean enableStackTraces = false;
    }

    /**
     * Optional values as specified by the user.
     */
    @CommandLine.ArgGroup(exclusive = false, heading = "%nOptional parameters:%n")
    private OptionalArgs optionalArgs = new OptionalArgs();

    /** DAO for interacting with AWS Clean Rooms. */
    private final CleanRoomsDao cleanRoomsDao;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



