#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildTarget {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Model {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Milestone {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Build {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub milestone: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub build_version: ::prost::alloc::string::String,
#[prost(enumeration = "build::BuildStatus", tag = "4")]
pub status: i32,
#[prost(enumeration = "build::BuildType", tag = "5")]
pub r#type: i32,
#[prost(string, tag = "6")]
pub branch: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub rw_firmware_version: ::prost::alloc::string::String,
}
pub mod build {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BuildStatus {
Unspecified = 0,
Pass = 1,
Fail = 2,
Running = 3,
Aborted = 4,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BuildType {
Unspecified = 0,
Release = 1,
Firmware = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuildArtifact {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub build: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub bucket: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub path: ::prost::alloc::string::String,
#[prost(uint32, tag = "5")]
pub object_count: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindMostStableBuildRequest {
#[prost(string, tag = "1")]
pub build_target: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindMostStableBuildResponse {
#[prost(message, optional, tag = "1")]
pub build: ::core::option::Option<Build>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildTargetsRequest {
#[prost(int32, tag = "1")]
pub page_size: i32,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildTargetsResponse {
#[prost(message, repeated, tag = "1")]
pub build_targets: ::prost::alloc::vec::Vec<BuildTarget>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub total_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListModelsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListModelsResponse {
#[prost(message, repeated, tag = "1")]
pub models: ::prost::alloc::vec::Vec<Model>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub total_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(message, optional, tag = "6")]
pub group_by: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBuildsResponse {
#[prost(message, repeated, tag = "1")]
pub builds: ::prost::alloc::vec::Vec<Build>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub total_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckBuildStageStatusRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckBuildStageStatusResponse {
#[prost(bool, tag = "1")]
pub is_build_staged: bool,
#[prost(message, optional, tag = "2")]
pub staged_build_artifact: ::core::option::Option<BuildArtifact>,
#[prost(message, optional, tag = "3")]
pub source_build_artifact: ::core::option::Option<BuildArtifact>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StageBuildRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StageBuildResponse {
#[prost(message, optional, tag = "1")]
pub staged_build_artifact: ::core::option::Option<BuildArtifact>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StageBuildMetadata {
#[prost(float, tag = "1")]
pub progress_percent: f32,
#[prost(message, optional, tag = "2")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[doc = r" Generated client implementations."]
pub mod build_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " Manages Chrome OS build services."]
#[derive(Debug, Clone)]
pub struct BuildServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> BuildServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<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_interceptor<F>(
inner: T,
interceptor: F,
) -> BuildServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
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,
{
BuildServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists all build targets that a user has access to."]
pub async fn list_build_targets(
&mut self,
request: impl tonic::IntoRequest<super::ListBuildTargetsRequest>,
) -> Result<tonic::Response<super::ListBuildTargetsResponse>, 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(
"/google.chromeos.moblab.v1beta1.BuildService/ListBuildTargets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists all models for the given build target."]
pub async fn list_models(
&mut self,
request: impl tonic::IntoRequest<super::ListModelsRequest>,
) -> Result<tonic::Response<super::ListModelsResponse>, 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(
"/google.chromeos.moblab.v1beta1.BuildService/ListModels",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists all builds for the given build target and model in descending order"]
#[doc = " for the milestones and build versions."]
pub async fn list_builds(
&mut self,
request: impl tonic::IntoRequest<super::ListBuildsRequest>,
) -> Result<tonic::Response<super::ListBuildsResponse>, 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(
"/google.chromeos.moblab.v1beta1.BuildService/ListBuilds",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Checks the stage status for a given build artifact in a partner Google"]
#[doc = " Cloud Storage bucket."]
pub async fn check_build_stage_status(
&mut self,
request: impl tonic::IntoRequest<super::CheckBuildStageStatusRequest>,
) -> Result<tonic::Response<super::CheckBuildStageStatusResponse>, 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(
"/google.chromeos.moblab.v1beta1.BuildService/CheckBuildStageStatus",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Stages a given build artifact from a internal Google Cloud Storage bucket"]
#[doc = " to a partner Google Cloud Storage bucket. If any of objects has already"]
#[doc = " been copied, it will overwrite the previous objects. Operation <response:"]
#[doc = " [StageBuildResponse][google.chromeos.moblab.v1beta1.StageBuildResponse],"]
#[doc = " metadata: [StageBuildMetadata][google.chromeos.moblab.v1beta1.StageBuildMetadata]>"]
pub async fn stage_build(
&mut self,
request: impl tonic::IntoRequest<super::StageBuildRequest>,
) -> Result<
tonic::Response<super::super::super::super::longrunning::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(
"/google.chromeos.moblab.v1beta1.BuildService/StageBuild",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Finds the most stable build for the given build target. The definition of"]
#[doc = " the most stable build is determined by evaluating the following rules in"]
#[doc = " order until one is true. If none are true, then there is no stable build"]
#[doc = " and it will return an empty response."]
#[doc = ""]
#[doc = " Evaluation rules:"]
#[doc = " 1. Stable channel build with label “Live”"]
#[doc = " 2. Beta channel build with label “Live”"]
#[doc = " 3. Dev channel build with label “Live”"]
#[doc = " 4. Most recent stable channel build with build status Pass"]
#[doc = " 5. Most recent beta channel build with build status Pass"]
#[doc = " 6. Most recent dev channel build with build status Pass"]
pub async fn find_most_stable_build(
&mut self,
request: impl tonic::IntoRequest<super::FindMostStableBuildRequest>,
) -> Result<tonic::Response<super::FindMostStableBuildResponse>, 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(
"/google.chromeos.moblab.v1beta1.BuildService/FindMostStableBuild",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}