public void DrawOutputConfig(OutputDataConfig outputConfig) { EditorGUILayout.LabelField("Output".Localization()); using (new EditorGUILayoutx.Scopes.IndentLevelVerticalScope()) { using (new GUILayout.HorizontalScope()) { EditorGUILayout.PrefixLabel("Provider".Localization()); outputConfig.Provider = EditorGUILayoutx.ProviderTypeName(outputConfig.Provider, EditorBuildData.PackageDir, "^Build\\.Data\\.Provider\\.(.*)\\.dll$|BuildData\\.exe", "Build.Data.DataWriter"); } outputConfig.Path = new GUIContent("Path".Localization(), "").FolderField(outputConfig.Path ?? string.Empty, "Output Data Folder", relativePath: relativePath); int oldIndentLevel; //using (new GUILayout.HorizontalScope()) //{ // EditorGUILayout.PrefixLabel(new GUIContent("Format", "")); // oldIndentLevel = EditorGUI.indentLevel; // EditorGUI.indentLevel = 0; // selectedindex = Array.FindIndex(OutputDataFormats, o => string.Equals(o.text, outputConfig.Foramt, StringComparison.InvariantCultureIgnoreCase)); // selectedindex = EditorGUILayout.Popup(selectedindex, OutputDataFormats); // if (selectedindex != -1) // outputConfig.Foramt = OutputDataFormats[selectedindex].text; // EditorGUI.indentLevel = oldIndentLevel; //} } }
public static async Task Main() { var contentType = "text/plain"; var s3InputUri = "http://doc-example-bucket.s3-website-us-west-2.amazonaws.com/"; var s3OutputUri = "http://doc-example-bucket.s3-website-us-west-2.amazonaws.com/translated/"; // This role must have permissions to read the source bucket and to read and // write to the destination bucket where the translated text will be stored. var dataAccessRoleArn = "arn:aws:iam::0123456789ab:role/S3TranslateRole"; var client = new AmazonTranslateClient(); var inputConfig = new InputDataConfig { ContentType = contentType, S3Uri = s3InputUri, }; var outputConfig = new OutputDataConfig { S3Uri = s3OutputUri, }; var request = new StartTextTranslationJobRequest { DataAccessRoleArn = dataAccessRoleArn, InputDataConfig = inputConfig, OutputDataConfig = outputConfig, }; var response = await StartTextTranslationAsync(client, request); if (response.HttpStatusCode == System.Net.HttpStatusCode.OK) { Console.WriteLine($"{response.JobId}: {response.JobStatus}"); } }