1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
// This file is @generated by prost-build.
/// Cloud Logging structured payload for events generated from Data Pipelines API
/// requests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestLogEntry {
    /// Type of the Data Pipelines API request.
    #[prost(enumeration = "request_log_entry::RequestType", tag = "1")]
    pub request_type: i32,
    /// The resulting status of the Data Pipelines API request.
    #[prost(message, optional, tag = "2")]
    pub status: ::core::option::Option<super::super::super::super::rpc::Status>,
    /// Cause of the error status.
    #[prost(enumeration = "request_log_entry::ErrorCause", tag = "3")]
    pub error_cause: i32,
}
/// Nested message and enum types in `RequestLogEntry`.
pub mod request_log_entry {
    /// Type of a Data Pipelines API request.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum RequestType {
        /// Default value. This value is not used.
        Unspecified = 0,
        /// A Data Pipelines Create Pipeline request.
        CreatePipeline = 1,
        /// A Data Pipelines Update Pipeline request.
        UpdatePipeline = 2,
        /// A Data Pipelines Delete Pipeline request.
        DeletePipeline = 3,
        /// A Data Pipelines List Pipelines request.
        ListPipelines = 4,
        /// A Data Pipelines Get Pipeline request.
        GetPipeline = 5,
        /// A Data Pipelines Stop Pipeline request.
        StopPipeline = 6,
        /// A Data Pipelines Run Pipeline request.
        RunPipeline = 7,
        /// A Data Pipelines List Jobs request.
        ListJobs = 8,
    }
    impl RequestType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                RequestType::Unspecified => "REQUEST_TYPE_UNSPECIFIED",
                RequestType::CreatePipeline => "CREATE_PIPELINE",
                RequestType::UpdatePipeline => "UPDATE_PIPELINE",
                RequestType::DeletePipeline => "DELETE_PIPELINE",
                RequestType::ListPipelines => "LIST_PIPELINES",
                RequestType::GetPipeline => "GET_PIPELINE",
                RequestType::StopPipeline => "STOP_PIPELINE",
                RequestType::RunPipeline => "RUN_PIPELINE",
                RequestType::ListJobs => "LIST_JOBS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "REQUEST_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "CREATE_PIPELINE" => Some(Self::CreatePipeline),
                "UPDATE_PIPELINE" => Some(Self::UpdatePipeline),
                "DELETE_PIPELINE" => Some(Self::DeletePipeline),
                "LIST_PIPELINES" => Some(Self::ListPipelines),
                "GET_PIPELINE" => Some(Self::GetPipeline),
                "STOP_PIPELINE" => Some(Self::StopPipeline),
                "RUN_PIPELINE" => Some(Self::RunPipeline),
                "LIST_JOBS" => Some(Self::ListJobs),
                _ => None,
            }
        }
    }
    /// Cause code for a Data Pipelines API request error.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ErrorCause {
        /// Default value. This value is not used.
        Unspecified = 0,
        /// The request is invalid.
        InvalidRequest = 1,
        /// Failed to fetch project number for the provided project id.
        ProjectNumberNotFound = 2,
        /// The given pipeline already exists.
        PipelineIdAlreadyExists = 3,
        /// Failed to allocate a token for the per project pipeline count quota.
        PipelineQuotaAllocationFailed = 4,
        /// The given pipeline is not found.
        PipelineNotFound = 5,
        /// The pipeline's workload is invalid.
        InvalidPipelineWorkload = 6,
        /// The user cannot act as the Dataflow worker service account.
        DataflowWorkerServiceAccountPermissionDenied = 7,
        /// The user cannot act as the Cloud Scheduler service account.
        CloudSchedulerServiceAccountPermissionDenied = 8,
        /// Issues related to the per service per project service account.
        InternalDataPipelinesServiceAccountIssue = 9,
        /// Invalid argument in Cloud Scheduler service call.
        CloudSchedulerInvalidArgument = 10,
        /// Exceeds Cloud Scheduler service quota limit.
        CloudSchedulerResourceExhausted = 11,
        /// Cloud Scheduler job not found.
        CloudSchedulerJobNotFound = 12,
        /// Other Cloud Scheduler related issues.
        OtherCloudSchedulerIssue = 13,
        /// Dataflow job with the same name already exists.
        DataflowJobAlreadyExists = 14,
        /// Invalid argument in Dataflow service call.
        DataflowInvalidArgument = 15,
        /// Exceeds Dataflow service quota limit.
        DataflowResourceExhausted = 16,
        /// Dataflow job not found.
        DataflowJobNotFound = 17,
        /// Other Dataflow related issues.
        OtherDataflowIssue = 18,
        /// Database related issues.
        DatabaseError = 19,
        /// Request with the wrong pipeline type. For example, RunPipeline cannot be
        /// used with a streaming pipeline.
        WrongPipelineType = 20,
        /// Issues related to other Google internal services/systems.
        InternalError = 21,
        /// Cannot find the given pipeline or project.
        PipelineOrProjectNotFound = 22,
    }
    impl ErrorCause {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                ErrorCause::Unspecified => "ERROR_CAUSE_UNSPECIFIED",
                ErrorCause::InvalidRequest => "INVALID_REQUEST",
                ErrorCause::ProjectNumberNotFound => "PROJECT_NUMBER_NOT_FOUND",
                ErrorCause::PipelineIdAlreadyExists => "PIPELINE_ID_ALREADY_EXISTS",
                ErrorCause::PipelineQuotaAllocationFailed => {
                    "PIPELINE_QUOTA_ALLOCATION_FAILED"
                }
                ErrorCause::PipelineNotFound => "PIPELINE_NOT_FOUND",
                ErrorCause::InvalidPipelineWorkload => "INVALID_PIPELINE_WORKLOAD",
                ErrorCause::DataflowWorkerServiceAccountPermissionDenied => {
                    "DATAFLOW_WORKER_SERVICE_ACCOUNT_PERMISSION_DENIED"
                }
                ErrorCause::CloudSchedulerServiceAccountPermissionDenied => {
                    "CLOUD_SCHEDULER_SERVICE_ACCOUNT_PERMISSION_DENIED"
                }
                ErrorCause::InternalDataPipelinesServiceAccountIssue => {
                    "INTERNAL_DATA_PIPELINES_SERVICE_ACCOUNT_ISSUE"
                }
                ErrorCause::CloudSchedulerInvalidArgument => {
                    "CLOUD_SCHEDULER_INVALID_ARGUMENT"
                }
                ErrorCause::CloudSchedulerResourceExhausted => {
                    "CLOUD_SCHEDULER_RESOURCE_EXHAUSTED"
                }
                ErrorCause::CloudSchedulerJobNotFound => "CLOUD_SCHEDULER_JOB_NOT_FOUND",
                ErrorCause::OtherCloudSchedulerIssue => "OTHER_CLOUD_SCHEDULER_ISSUE",
                ErrorCause::DataflowJobAlreadyExists => "DATAFLOW_JOB_ALREADY_EXISTS",
                ErrorCause::DataflowInvalidArgument => "DATAFLOW_INVALID_ARGUMENT",
                ErrorCause::DataflowResourceExhausted => "DATAFLOW_RESOURCE_EXHAUSTED",
                ErrorCause::DataflowJobNotFound => "DATAFLOW_JOB_NOT_FOUND",
                ErrorCause::OtherDataflowIssue => "OTHER_DATAFLOW_ISSUE",
                ErrorCause::DatabaseError => "DATABASE_ERROR",
                ErrorCause::WrongPipelineType => "WRONG_PIPELINE_TYPE",
                ErrorCause::InternalError => "INTERNAL_ERROR",
                ErrorCause::PipelineOrProjectNotFound => "PIPELINE_OR_PROJECT_NOT_FOUND",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "ERROR_CAUSE_UNSPECIFIED" => Some(Self::Unspecified),
                "INVALID_REQUEST" => Some(Self::InvalidRequest),
                "PROJECT_NUMBER_NOT_FOUND" => Some(Self::ProjectNumberNotFound),
                "PIPELINE_ID_ALREADY_EXISTS" => Some(Self::PipelineIdAlreadyExists),
                "PIPELINE_QUOTA_ALLOCATION_FAILED" => {
                    Some(Self::PipelineQuotaAllocationFailed)
                }
                "PIPELINE_NOT_FOUND" => Some(Self::PipelineNotFound),
                "INVALID_PIPELINE_WORKLOAD" => Some(Self::InvalidPipelineWorkload),
                "DATAFLOW_WORKER_SERVICE_ACCOUNT_PERMISSION_DENIED" => {
                    Some(Self::DataflowWorkerServiceAccountPermissionDenied)
                }
                "CLOUD_SCHEDULER_SERVICE_ACCOUNT_PERMISSION_DENIED" => {
                    Some(Self::CloudSchedulerServiceAccountPermissionDenied)
                }
                "INTERNAL_DATA_PIPELINES_SERVICE_ACCOUNT_ISSUE" => {
                    Some(Self::InternalDataPipelinesServiceAccountIssue)
                }
                "CLOUD_SCHEDULER_INVALID_ARGUMENT" => {
                    Some(Self::CloudSchedulerInvalidArgument)
                }
                "CLOUD_SCHEDULER_RESOURCE_EXHAUSTED" => {
                    Some(Self::CloudSchedulerResourceExhausted)
                }
                "CLOUD_SCHEDULER_JOB_NOT_FOUND" => Some(Self::CloudSchedulerJobNotFound),
                "OTHER_CLOUD_SCHEDULER_ISSUE" => Some(Self::OtherCloudSchedulerIssue),
                "DATAFLOW_JOB_ALREADY_EXISTS" => Some(Self::DataflowJobAlreadyExists),
                "DATAFLOW_INVALID_ARGUMENT" => Some(Self::DataflowInvalidArgument),
                "DATAFLOW_RESOURCE_EXHAUSTED" => Some(Self::DataflowResourceExhausted),
                "DATAFLOW_JOB_NOT_FOUND" => Some(Self::DataflowJobNotFound),
                "OTHER_DATAFLOW_ISSUE" => Some(Self::OtherDataflowIssue),
                "DATABASE_ERROR" => Some(Self::DatabaseError),
                "WRONG_PIPELINE_TYPE" => Some(Self::WrongPipelineType),
                "INTERNAL_ERROR" => Some(Self::InternalError),
                "PIPELINE_OR_PROJECT_NOT_FOUND" => Some(Self::PipelineOrProjectNotFound),
                _ => None,
            }
        }
    }
}