using System.Collections.Generic; using System.IO; namespace ServiceClientGenerator { /// /// Command line options for the AWS SDK code generator. /// public class GeneratorOptions { /// /// If set, causes the generator to emit additional diagnostic messages /// whilst running. /// public bool Verbose { get; set; } /// /// If set, waits for keypress before exiting generation. /// public bool WaitOnExit { get; set; } /// /// The name and location of the json manifest file listing all supported services /// for generation. By default this is located in the ServiceModels folder and is /// named '_manifests.json'. /// public string Manifest { get; set; } /// /// The name and location of the json versions file listing the versions of all supported /// services for generation. By default this is located in the ServiceModels folder and is /// named '_sdk-versions.json'. /// public string Versions { get; set; } /// /// The location of the folder containing the service model files. /// public string ModelsFolder { get; set; } public string TestModelsFolder { get; set; } /// /// The root folder beneath which the code for the SDK is arranged. Source code exists under /// a .\src folder, which is further partitioned into core runtime (.\Core) and service code /// (.\Services). Tests are placed under a .\test folder, which is further partitioned into /// unit tests (.\UnitTests) and integration tests (.\IntegrationTests). /// public string SdkRootFolder { get; set; } /// /// Collection of one or more service model identifiers. If null or empty, code for all /// services listed in the GenerationManifest file will be generated. If set, only /// the services listed will be generated. The value(s) provided need to match the /// 'model' values in the service manifest file. /// public string ServiceModels { get; set; } /// /// Allows disabling orphaned shape and service cleanup. /// Useful to set if you a) specify and b) /// don't want to remove previously generated services. This is often the case /// in a development environment. /// public bool SkipRemoveOrphanCleanup { get; set; } /// /// If set causes all servicename.customizations*.json files to be 'compiled' into /// one json file during generation. /// public bool CompileCustomizations { get; set; } /// /// If set, the contents of the generated subfolder hierarchy are deleted prior /// to code generation. The default behavior is to leave existing generated /// content in-place and perform a cumulative generation pass. /// public bool Clean { get; set; } /// /// If set the solution files will be rebuilt even if no new projects were added. /// public bool ForceSolutionRebuilt { get; set; } /// /// If set, the generator will create a vsix (Visual Studio Extension) project and manifest. /// This project will reference all of the service specific code analysis projects. /// The default behavior is not to create any assets. /// public bool CreateCodeAnalysisVsixAssets { get; set; } public string SelfServiceModel { get; set; } public string SelfServiceBaseName { get; set; } public string SelfServiceEndpointPrefix { get; set; } public string SelfServiceSigV4Name { get; set; } public GeneratorOptions() { Verbose = false; WaitOnExit = false; // default paths are relative to executing generator assembly // in bin/debug or bin/release Manifest = Utils.PathCombineAlt("..", "..", "..", "ServiceModels", "_manifest.json"); Versions = Utils.PathCombineAlt("..", "..", "..", "ServiceModels", "_sdk-versions.json"); ModelsFolder = Utils.PathCombineAlt("..", "..", "..", "ServiceModels"); TestModelsFolder = Utils.PathCombineAlt("..", "..", "..", "TestServiceModels"); SdkRootFolder = Utils.PathCombineAlt("..", "..", "..", "..", "sdk"); ServiceModels = string.Empty; // process all services CompileCustomizations = true; Clean = false; CreateCodeAnalysisVsixAssets = false; } } }