#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobParameters {
#[prost(message, repeated, tag = "1")]
pub input_files: ::prost::alloc::vec::Vec<File>,
#[prost(message, repeated, tag = "2")]
pub output_files: ::prost::alloc::vec::Vec<FileDesc>,
#[prost(string, repeated, tag = "3")]
pub s3_mount_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub dataset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub cmd: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub env: ::core::option::Option<Environment>,
#[prost(bool, tag = "7")]
pub attach_project_disk: bool,
#[prost(message, repeated, tag = "8")]
pub cloud_instance_types: ::prost::alloc::vec::Vec<CloudInstanceType>,
#[prost(message, optional, tag = "9")]
pub extended_working_storage: ::core::option::Option<ExtendedWorkingStorage>,
#[prost(message, repeated, tag = "10")]
pub arguments: ::prost::alloc::vec::Vec<Argument>,
#[prost(message, repeated, tag = "11")]
pub output_datasets: ::prost::alloc::vec::Vec<OutputDatasetDesc>,
#[prost(message, optional, tag = "12")]
pub graceful_shutdown_parameters: ::core::option::Option<GracefulShutdownParameters>,
#[prost(message, optional, tag = "13")]
pub spark_parameters: ::core::option::Option<SparkParameters>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudInstanceType {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtendedWorkingStorage {
#[prost(enumeration = "extended_working_storage::StorageType", tag = "1")]
pub r#type: i32,
#[prost(int64, tag = "2")]
pub size_gb: i64,
}
pub mod extended_working_storage {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StorageType {
Unspecified = 0,
Ssd = 1,
}
impl StorageType {
pub fn as_str_name(&self) -> &'static str {
match self {
StorageType::Unspecified => "STORAGE_TYPE_UNSPECIFIED",
StorageType::Ssd => "SSD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STORAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SSD" => Some(Self::Ssd),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Argument {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct File {
#[prost(message, optional, tag = "1")]
pub desc: ::core::option::Option<FileDesc>,
#[prost(string, tag = "2")]
pub sha256: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub size_bytes: i64,
#[prost(enumeration = "FileCompressionType", tag = "4")]
pub compression_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageFile {
#[prost(message, optional, tag = "1")]
pub file: ::core::option::Option<File>,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileDesc {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub var: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileUploadError {
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(enumeration = "file_upload_error::ErrorType", tag = "4")]
pub r#type: i32,
#[prost(oneof = "file_upload_error::FileType", tags = "1, 2")]
pub file_type: ::core::option::Option<file_upload_error::FileType>,
}
pub mod file_upload_error {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ErrorType {
Unspecified = 0,
UploadFailed = 1,
NotFound = 2,
}
impl ErrorType {
pub fn as_str_name(&self) -> &'static str {
match self {
ErrorType::Unspecified => "ERROR_TYPE_UNSPECIFIED",
ErrorType::UploadFailed => "UPLOAD_FAILED",
ErrorType::NotFound => "NOT_FOUND",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ERROR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"UPLOAD_FAILED" => Some(Self::UploadFailed),
"NOT_FOUND" => Some(Self::NotFound),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum FileType {
#[prost(message, tag = "1")]
OutputFileDesc(super::FileDesc),
#[prost(string, tag = "2")]
LogFileName(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Environment {
#[prost(map = "string, string", tag = "1")]
pub vars: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub python_env: ::core::option::Option<PythonEnv>,
#[prost(oneof = "environment::DockerImage", tags = "2, 3")]
pub docker_image: ::core::option::Option<environment::DockerImage>,
}
pub mod environment {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DockerImage {
#[prost(string, tag = "2")]
DockerImageResourceId(::prost::alloc::string::String),
#[prost(message, tag = "3")]
DockerImageSpec(super::DockerImageSpec),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DockerImageSpec {
#[prost(string, tag = "1")]
pub image_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String,
#[prost(oneof = "docker_image_spec::Password", tags = "3, 4")]
pub password: ::core::option::Option<docker_image_spec::Password>,
}
pub mod docker_image_spec {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Password {
#[prost(string, tag = "3")]
PasswordPlainText(::prost::alloc::string::String),
#[prost(string, tag = "4")]
PasswordDsSecretName(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PythonEnv {
#[prost(string, tag = "1")]
pub conda_yaml: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub local_modules: ::prost::alloc::vec::Vec<File>,
#[prost(string, tag = "3")]
pub python_version: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub requirements: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub pip_options: ::core::option::Option<PipOptions>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PipOptions {
#[prost(string, tag = "1")]
pub index_url: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub extra_index_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub trusted_hosts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "4")]
pub no_deps: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputDatasetDesc {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "3")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(int64, tag = "4")]
pub size_gb: i64,
#[prost(string, tag = "5")]
pub var: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputDataset {
#[prost(message, optional, tag = "1")]
pub desc: ::core::option::Option<OutputDatasetDesc>,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub desc: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub finished_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "JobStatus", tag = "6")]
pub status: i32,
#[prost(string, tag = "7")]
pub config: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub created_by_id: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub project_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub job_parameters: ::core::option::Option<JobParameters>,
#[prost(message, optional, tag = "11")]
pub data_expires_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "12")]
pub data_cleared: bool,
#[prost(message, repeated, tag = "13")]
pub output_files: ::prost::alloc::vec::Vec<File>,
#[prost(message, repeated, tag = "14")]
pub log_files: ::prost::alloc::vec::Vec<File>,
#[prost(message, repeated, tag = "15")]
pub diagnostic_files: ::prost::alloc::vec::Vec<File>,
#[prost(int64, tag = "16")]
pub data_size_bytes: i64,
#[prost(message, optional, tag = "17")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "18")]
pub status_details: ::prost::alloc::string::String,
#[prost(message, optional, tag = "19")]
pub actual_cloud_instance_type: ::core::option::Option<CloudInstanceType>,
#[prost(string, tag = "20")]
pub parent_job_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "21")]
pub file_errors: ::prost::alloc::vec::Vec<FileUploadError>,
#[prost(message, repeated, tag = "22")]
pub output_datasets: ::prost::alloc::vec::Vec<OutputDataset>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobResult {
#[prost(int64, tag = "1")]
pub return_code: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GracefulShutdownParameters {
#[prost(message, optional, tag = "1")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
#[prost(int64, tag = "2")]
pub signal: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobMetadata {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub finished_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub data_expires_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "JobStatus", tag = "8")]
pub status: i32,
#[prost(string, tag = "9")]
pub status_details: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub created_by_id: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub parent_job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobProgress {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub progress: i64,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparkParameters {
#[prost(string, tag = "1")]
pub connector_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FileCompressionType {
Unspecified = 0,
None = 1,
Zip = 2,
}
impl FileCompressionType {
pub fn as_str_name(&self) -> &'static str {
match self {
FileCompressionType::Unspecified => "FILE_COMPRESSION_TYPE_UNSPECIFIED",
FileCompressionType::None => "NONE",
FileCompressionType::Zip => "ZIP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FILE_COMPRESSION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"NONE" => Some(Self::None),
"ZIP" => Some(Self::Zip),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum JobStatus {
Unspecified = 0,
Creating = 1,
Executing = 2,
UploadingOutput = 3,
Success = 4,
Error = 5,
Cancelled = 6,
Cancelling = 7,
Preparing = 8,
}
impl JobStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
JobStatus::Unspecified => "JOB_STATUS_UNSPECIFIED",
JobStatus::Creating => "CREATING",
JobStatus::Executing => "EXECUTING",
JobStatus::UploadingOutput => "UPLOADING_OUTPUT",
JobStatus::Success => "SUCCESS",
JobStatus::Error => "ERROR",
JobStatus::Cancelled => "CANCELLED",
JobStatus::Cancelling => "CANCELLING",
JobStatus::Preparing => "PREPARING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"CREATING" => Some(Self::Creating),
"EXECUTING" => Some(Self::Executing),
"UPLOADING_OUTPUT" => Some(Self::UploadingOutput),
"SUCCESS" => Some(Self::Success),
"ERROR" => Some(Self::Error),
"CANCELLED" => Some(Self::Cancelled),
"CANCELLING" => Some(Self::Cancelling),
"PREPARING" => Some(Self::Preparing),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProjectJobRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub job_parameters: ::core::option::Option<JobParameters>,
#[prost(string, tag = "3")]
pub config: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub desc: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub data_ttl: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProjectJobMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProjectJobResponse {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub upload_files: ::prost::alloc::vec::Vec<StorageFile>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloneProjectJobRequest {
#[prost(string, tag = "1")]
pub source_job_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub job_parameters_overrides: ::core::option::Option<JobParameters>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub desc: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub data_ttl: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloneProjectJobResponse {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub upload_files: ::prost::alloc::vec::Vec<StorageFile>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloneProjectJobMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteProjectJobRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteProjectJobResponse {
#[prost(message, repeated, tag = "1")]
pub output_files: ::prost::alloc::vec::Vec<StorageFile>,
#[prost(message, repeated, tag = "4")]
pub output_files_errors: ::prost::alloc::vec::Vec<FileUploadError>,
#[prost(message, repeated, tag = "3")]
pub output_datasets: ::prost::alloc::vec::Vec<OutputDataset>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<JobResult>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteProjectJobMetadata {
#[deprecated]
#[prost(message, optional, tag = "1")]
pub job: ::core::option::Option<Job>,
#[prost(message, optional, tag = "2")]
pub progress: ::core::option::Option<JobProgress>,
#[prost(message, optional, tag = "3")]
pub metadata: ::core::option::Option<JobMetadata>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelProjectJobRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub graceful: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadProjectJobStdLogsRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub offset: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadProjectJobStdLogsResponse {
#[prost(message, repeated, tag = "1")]
pub logs: ::prost::alloc::vec::Vec<StdLog>,
#[prost(int64, tag = "2")]
pub offset: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadProjectJobLogsRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub offset: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadProjectJobLogsResponse {
#[prost(message, repeated, tag = "1")]
pub logs: ::prost::alloc::vec::Vec<LogMessage>,
#[prost(int64, tag = "2")]
pub offset: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadProjectJobFilesRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub files: ::prost::alloc::vec::Vec<File>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadProjectJobFilesResponse {
#[prost(message, repeated, tag = "1")]
pub download_files: ::prost::alloc::vec::Vec<StorageFile>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProjectJobRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListProjectJobResponse {
#[prost(message, repeated, tag = "1")]
pub jobs: ::prost::alloc::vec::Vec<Job>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProjectJobRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProjectJobRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProjectJobMetadata {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProjectJobDataRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProjectJobDataMetadata {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteProjectJobDataResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAllProjectJobDataRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAllProjectJobDataMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAllProjectJobDataResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetProjectJobDataTtlRequest {
#[prost(string, tag = "1")]
pub job_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub ttl: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetProjectJobDataTtlResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StdLog {
#[prost(bytes = "vec", tag = "1")]
pub content: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "std_log::Type", tag = "2")]
pub r#type: i32,
}
pub mod std_log {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Out = 1,
Err = 2,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Out => "OUT",
Type::Err => "ERR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"OUT" => Some(Self::Out),
"ERR" => Some(Self::Err),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogMessage {
#[prost(bytes = "vec", tag = "1")]
pub content: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(oneof = "log_message::Source", tags = "3, 4")]
pub source: ::core::option::Option<log_message::Source>,
}
pub mod log_message {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(enumeration = "super::StandardStream", tag = "3")]
StandardStream(i32),
#[prost(string, tag = "4")]
FilePath(::prost::alloc::string::String),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StandardStream {
Unspecified = 0,
Out = 1,
Err = 2,
}
impl StandardStream {
pub fn as_str_name(&self) -> &'static str {
match self {
StandardStream::Unspecified => "STANDARD_STREAM_UNSPECIFIED",
StandardStream::Out => "OUT",
StandardStream::Err => "ERR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STANDARD_STREAM_UNSPECIFIED" => Some(Self::Unspecified),
"OUT" => Some(Self::Out),
"ERR" => Some(Self::Err),
_ => None,
}
}
}
pub mod project_job_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ProjectJobServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ProjectJobServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ProjectJobServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProjectJobServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ProjectJobServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateProjectJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn clone(
&mut self,
request: impl tonic::IntoRequest<super::CloneProjectJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/Clone",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"Clone",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn execute(
&mut self,
request: impl tonic::IntoRequest<super::ExecuteProjectJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/Execute",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"Execute",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn cancel(
&mut self,
request: impl tonic::IntoRequest<super::CancelProjectJobRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/Cancel",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"Cancel",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn read_std_logs(
&mut self,
request: impl tonic::IntoRequest<super::ReadProjectJobStdLogsRequest>,
) -> std::result::Result<
tonic::Response<
tonic::codec::Streaming<super::ReadProjectJobStdLogsResponse>,
>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/ReadStdLogs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"ReadStdLogs",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn read_logs(
&mut self,
request: impl tonic::IntoRequest<super::ReadProjectJobLogsRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::ReadProjectJobLogsResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/ReadLogs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"ReadLogs",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn download_job_files(
&mut self,
request: impl tonic::IntoRequest<super::DownloadProjectJobFilesRequest>,
) -> std::result::Result<
tonic::Response<super::DownloadProjectJobFilesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/DownloadJobFiles",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"DownloadJobFiles",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListProjectJobRequest>,
) -> std::result::Result<
tonic::Response<super::ListProjectJobResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetProjectJobRequest>,
) -> std::result::Result<tonic::Response<super::Job>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteProjectJobRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_data(
&mut self,
request: impl tonic::IntoRequest<super::DeleteProjectJobDataRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/DeleteData",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"DeleteData",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_all_data(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAllProjectJobDataRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/DeleteAllData",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"DeleteAllData",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_data_ttl(
&mut self,
request: impl tonic::IntoRequest<super::SetProjectJobDataTtlRequest>,
) -> std::result::Result<
tonic::Response<super::SetProjectJobDataTtlResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.datasphere.v2.jobs.ProjectJobService/SetDataTtl",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.datasphere.v2.jobs.ProjectJobService",
"SetDataTtl",
),
);
self.inner.unary(req, path, codec).await
}
}
}